[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pine




> > > (zmailer's smtpserver is not setuid and complaining about not able to
> > >  open its logfile)
> > 
> > 	The smtpserver MUST be started by root.
> > 	( None of the software modules are setuid, they all require
> > 	  being started by the root.. -- except the  /usr/lib/sendmail )
> 
> Well, I meant this:
> 
> ~$ /usr/lib/sendmail -bs
> smtp-in: cannot open logfile "/var/log/mail/smtpserver": Permission denied
> smtp-in: cannot open logfile "/var/log/mail/smtpserver": Permission denied
> 220 garfield.sch.bme.hu ZMailer Server 2.99.38 #1 ESMTP+IDENT ready at Mon, 2 Dec 1996 13:02:21 +0100

	Hmm...  Ok, I see.  The use of "sendmail -bs" -mode is not preferred.
	The error message is actually a warning that CAN be ignored.
	You can always use:
		$MAILBIN/smtpserver -i
	which keeps quiet.

> in this case it is running as the user which is correct as far as i can tell.
> the only problem that it is not logged which can be a problem where security
> is important.
> 
> so... what is the sollution?

	The way the smtpserver start up is to:

	- start as a root
	- open log-file
	- open a listening socket on port 25 ( = SMTP )
	- become  "daemon"  user
	- detach (fork()+exit() on parent)
	- wait on accept() syscall for incoming sessions
	  - for each new incoming socket,  fork(), and
	    execute the SMTP-service.

> my workaround is to make the smtpserver setgid and the logfiles writeable by
> that group.
> 
> > 	I will make 2.99.43 latter today.
> 
> I'll try it.
> 
> Gyula
> --
> Matics, Gyula
> mgyula@eik.bme.hu                     Linux!

	/Matti Aarnio <mea@nic.funet.fi>