binding qpopper to one ip address with xinetd
In its default package on Debian, qpopper is a pop3 daemon, which is easy to configure and quite complete in its implementation (supporting apop and ssl encryption), however has the nasty disadvantage of listening to port 110 on all the interfaces a server provides. The reason is that on Debian, qpopper is started via inetd and inetd does not know how to listen to specific interfaces. If we want to change this, we have two possibilities to choose from:
1. Compiling qpopper ourselves as standalone server and have it listened to one interface.
2. Replacing inetd with xinetd.
The latter is the one I would like to focus on because it allows what we want to reach with minimal changes. At first it might be useful to explain xinetd is: xinetd is thought as a replacement of inetd and one of its biggest advantages is that it make services listen to specific interfaces only, even if they themselves do not provide such a configuration option. Xinetd can be easily retrieved via the usual apt-get install command. /etc/xinetd.d is the directory where all the services that are supposed to be run by the daemon should have their configuration file. As we like to run qpopper, we simply create a new file called “pop3″ (after the service) and fill it with the following values:
service pop3
{
disable = no
id = pop3
socket_type = stream
protocol = tcp
user = root
wait = no
flags = nameinargs
server = /usr/sbin/tcpd
server_args = /usr/sbin/in.qpopper -f /etc/qpopper.conf
bind = 1.2.3.4
}
Of course you want to replace 1.2.3.4 with the ip address of the interface you would like to use for qpopper. Restart xinitd by invoking
# /etc/init.d/xinetd restart
as root and if things went well, you should see qpopper now listening at your specified ip address:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 20888/sendmail: MTA tcp 0 0 1.2.3.4:110 0.0.0.0:* LISTEN 14263/xinetd [...]
No Comments »
No comments yet.
RSS feed for comments on this post
Leave a comment
Posting comments requires Javascript to be turned on.