Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Related to this questions answer:

I have found the /var/qmail/users/cdb file on my installation, but can't find the qmail-smtpd/tcp file or the tcprules command to create or modify the cdb. I was able to disable relaying on the plesk interface, but still need to deny any incoming mail from external domains with the described ":deny" line. The ones using the combination of CentOS and Plesk: please elaborate on how this works for you.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Most installations of qmail put the tcp.smtp files in /etc. If the file does not exist, then you probably have not installed tcpserver which is installed with the ucspi package. Was this a pre-installed rpm of qmail, or did you install yourself? If you installed yourself, installing ucspi was a pre-requisite...
After installing ucspi, you can use the commands below to turn your tcp.smtp file into a cdb file that qmail can read.

  tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
     chmod 644 /etc/tcp.smtp.cdb

You will also need to check that the startup command for qmail-smtpd includes tcpserver, or the tcp filtering will not work. See these instructions (life with qmail) for further help on this, especially section 2.8.2.2.
Another good tool is to create a qmailctl script (see section 2.8.2.1 from life with qmail link above). This will simplify most qmail management greatly.

share|improve this answer
add comment

I have:

/home/vpopmail/etc/tcp.smtp.cdb used on qmail-smptd/run
-rw-r--r-- 1 vpopmail vchkpw 2288 Dec 26 18:59 tcp.smtp.cdb

/etc/tcp.pop3.cdb used in qmail-pop3d/run
-rw-r--r-- 1 root root 2113 Dec 26 17:26 /etc/tcp.pop3.cdb

qmail delivery e pop3 run correctly, but please can you give me the correct user e group for tcp.smtp.cdb and tcp.pop3.cdb?

My /var/qmail/supervise/qmail-smtpd/run:

!/bin/sh

MAXSMTPD=cat /var/qmail/control/concurrencyincoming LOCAL=head -1 /var/qmail/control/me

QMAILQUEUE="/var/qmail/bin/simscan" export QMAILQUEUE

if [ -z "$MAXSMTPD" -o -z "$LOCAL" ]; then echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in echo /var/qmail/supervise/qmail-smtpd/run exit 1 fi

if [ ! -f /var/qmail/control/rcpthosts ]; then echo "No /var/qmail/control/rcpthosts!" echo "Refusing to start SMTP listener because it'll create an open relay" exit 1 fi

exec /usr/local/bin/softlimit -m 2000000 \

/usr/local/bin/tcpserver -H -v -x /home/vpopmail/etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-R -u 89 -g 89 0 smtp /usr/local/bin/rblsmtpd -b -C \
-r 'list.dsbl.org:Your message was rejected because the message was sent from a server listed in DSBL - More information regarding this problem is available at http://dsbl.org/listing?%IP% - Please forward this error to your email server support staff for resolution.' \
-r 'sbl-xbl.spamhaus.org:Your message was rejected because the message was sent from a server listed in the Spamhaus RBL - More information regarding this problems is available at http://www.spamhaus.org/query/bl?ip=%IP% - Please forward this error to your email server support staff for resolution.' \
-t 5 /var/qmail/bin/qmail-smtpd 2>&1


My /var/qmail/supervise/qmail-pop3d/run:

Blockquote

!/bin/sh

/usr/local/bin/tcpserver \ -H -v -x /etc/tcp.pop3.cdb \ -c 30 -R 0 pop3 \ /var/qmail/bin/qmail-popup mx.myserverdomain.com \ /home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 2>&1

Blockquote

regards, Paola

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.