Tcp.smtp

From QmailToaster
Jump to navigation Jump to search

Back
/etc/tcprules.d/tcp.smtp is a 2 line (default toaster) file that orchestrates many of the QMT functions. It is the traffic cop in a busy intersection, controlling SMTP processing alternatives.

If you're running another MTA in concert with QmailToaster, or you have an unusual or complicated setup, the following might not be applicable to you. If that is the case, you should take your problem straight to the mailing list. Hopefully this page will eventually cover advanced configurations as documented by those who have such requirements.

Reminder: if you make changes to tcp.smtp, execute the following afterwards to activate the changes:

 # qmailctl cdb

You do not need to stop and start qmail when only regenerating the .cdb files.

Stock (default) tcp.smtp file Your default tcp.smtp file on a fresh install looks like this (backslashes are for display purposes only, do not include them or newlines or extra spaces in the file - there are two and only two lines here):

127.:allow,RELAYCLIENT=""
:allow,BADMIMETYPE="",BADLOADERTYPE="M",CHKUSER_RCPTLIMIT="50",CHKUSER_WRONGRCPTLIMIT="10",QMAILQUEUE="/var/qmail/bin/simscan"

Line 1

127.:allow - Allow localhost
RELAYCLIENT="" - Allow relaying without authentication

Line 2

(empty):allow - Allow remote to deliver locally, no relay
BADMIMETYPE="" - Warlord patch
BADLOADERTYPE="M" - Warlord patch
CHKUSER_RCPTLIMIT="50" - Max recipients any more are denied
CHKUSER_WRONGRCPTLIMIT="10" - Max non-existent recipients any more denied
QMAILQUEUE="/var/qmail/bin/simscan" - Simscan is the queue and will call qmail-queue

tcprules

# tcprulescheck tcp.smtp.cdb
rule :
set environment variable SIMSCAN_DEBUG=1
set environment variable SMTP_DEBUG=1
set environment variable DSPAM_BIN=/usr/bin/dspamc
set environment variable DSPAM_DEBUG=1
set environment variable BADMIMETYPE=
set environment variable BADLOADERTYPE=M
set environment variable CHKUSER_RCPTLIMIT=50
set environment variable CHKUSER_WRONGRCPTLIMIT=10
set environment variable QMAILQUEUE=/var/qmail/bin/simscan
allow connection