Web Hosting Talk







View Full Version : tcpserver (110) + root


clocker1996
02-12-2002, 02:20 AM
Hi. I have installed qmail just like the instructions off www.lifewithqmail.org, and i must say the instructions there are really good, very helpful. However today i noticed something. i was just wondering if this was correct, and if not correct, what could i do to fix it?

I use qmail for smtp, and as well as pop (qmail-pop3d)

I run qmail with svscan or whtaever (the /service) dir
daemontools

I noticed that for the tcpserver process for port 110, it runs as root, but the tcpserver process for port 25 (Smtp) runs as qmaild

Is the 110 suppose to be running as root?

qmaild 2012 890 0 Feb10 ? 00:00:00 /usr/local/bin/tcpserver -v -R -l 0 -x /etc/tcp.smtp.cdb -c 100 -u 518 -g 517 0 smtp
root 2018 892 0 Feb10 ? 00:00:00 /usr/local/bin/tcpserver -H -R -v -c100 0 110 /var/qmail/bin/qmail-popup mail.counte

See how the tcpserver for POP is running as root?

I hve the /var/qmail/supervise/* files symlinked to /service

Maybe I missed one small step..
Basically I just need to know if
a) is it suppose to be running as root? if it is then thats fine i have no more questions
b) If it is suppose to be running as a certain user, what would it be typically, and how could I fix this.

serve-you
02-12-2002, 04:35 AM
That is correct.

cperciva
02-12-2002, 06:16 AM
The POP3 tcpserver needs to setuid to the appropriate user in order to serve their mail. While this doesn't absolutely require that it run as root, that is certainly the simplest solution.

priyadi
02-12-2002, 07:28 AM
tcpserver for pop3 is owned by root to be able to serve mailbox for different system user. Later, the qmail-popup, checkpassword and qmail-pop3d combination will lower their privilege to the uid/gid of the owner of mailbox being served. If tcpserver is running as non root user, qmail-pop3d and related process will not be able to switch uid/gid to desired user.

On the other hand, qmail-smtpd delivers mail to qmail-queue, and it doesn't require root privilege to execute qmail-queue, so tcpserver doesn't need to run as root.