Title: setup_netqmail_smtp_on_port_587.txt Subject: Start SMPT on port 587 using supervise and tcprules with netqmail in gentoo DATE: 20070802 # They blocked port 25 outbound at work because of too many trojans # SMTP Port 465 is considered depcricated. # So I've got to make my server listen on port 25 and 587. # # Setup Supervise script # By copying it from qmail-smtp # /var/qmail/supervise/ rsync -avz qmail-smtpd/ qmail-smtpd-587 # # Chang port and service name # sed -i \ -e 's/\${TCPSERVER_PORT}/587/' \ /var/qmail/supervise/qmail-smtpd-587/run # # Cange log folder name # sed -i \ -e 's/\${TCPSERVER_PORT}/587/' \ -e 's|\${LOG_OPTS}\ \${LOG_DEST}|t s2500000 n2000 /var/log/qmail/qmail-smtpd-587|' \ /var/qmail/supervise/qmail-smtpd-587/log/run # # Setup tcprules # cd /etc/tcprules.d/ cp tcp.qmail-smtp tcp.qmail-smtp-587 tcprules tcp.qmail-smtp-587.cdb tcp.qmail-smtp-587..tmp < tcp.qmail-smtp-587 # # Append tcp.qmail-smtp-587.cdb to first line of Makefile.qmail # vi Makefile.qmail # # QMAIL_CDBS = tcp.qmail-pop3.cdb tcp.qmail-qmqp.cdb tcp.qmail-qmtp.cdb tcp.qmail-smtp.cdb tcp.qmail-smtp-587.cdb # CDBS += $(QMAIL_CDBS) # qmail: $(QMAIL_CDBS) # # # Check for listening ports # lsof -i tcp -nP |grep qmail # tcpserver 10665 qmaild 3u IPv4 2773132 TCP *:25 (LISTEN) # tcpserver 11035 qmaild 3u IPv4 2774445 TCP *:587 (LISTEN)