Configure Qmail
It's time to configure Qmail ...
Copy the script to its proper locations
cp /downloads/scripts/qmailctl /var/qmail/bin/qmailctl (View the script qmailctl)Adapt script permission
chmod 755 /var/qmail/bin/qmailctlThe script /var/qmail/rc (View here) is no longer used.
In original qmailrocks installation guide, it was used in script send_run replaced by service-send-run (from John M.Simpson) in this guide.
Create needed symlinks
ln -s /var/qmail/bin/qmailctl /usr/binSet Maildir as default mailbox type (./Mailbox for mbox type)
echo ./Maildir > /var/qmail/control/defaultdeliverySet some configuration (You can find more on http://www.lifewithqmail.com/lwq.html#configuration)
echo 255 > /var/qmail/control/concurrencyremoteecho 30 > /var/qmail/control/concurrencyincoming
echo 3 > /var/qmail/control/spfbehavior
echo postmaster > /var/qmail/control/bouncefrom
echo yourdomain.tld > /var/qmail/control/doublebouncehost
echo postmaster > /var/qmail/control/doublebounceto
echo 'MEDIUM:HIGH:!SSLv2:!MD5:!RC4:!3DES' > /var/qmail/control/tlsserverciphers
cd /var/qmail/control/
chmod 644 bouncefrom doublebouncehost doublebounceto concurrencyremote concurrencyincoming spfbehavior tlsserverciphers
Set maximum message size to be 8Mb
echo '8000000' > /var/qmail/control/databytesSet 30 seconds as timeout
echo 30 > /var/qmail/control/timeoutsmtpdAllows localhost to send mails
echo '127.:allow,RELAYCLIENT=""' >> /etc/tcp.smtpqmailctl cdb
If you use backup MX servers or if this server is acting as smart host for others, I advice you to add execute command :
echo 'OTHER-SERVER-IP:allow,RELAYCLIENT="",QS_SPAMASSASSIN="1"' >> /etc/tcp.smtpqmailctl cdb
If you want to learn other available options, take a look on this sample.
Create mail aliases
echo some_address > /var/qmail/alias/.qmail-rootecho some_address > /var/qmail/alias/.qmail-postmaster
echo some_address > /var/qmail/alias/.qmail-mailer-daemon
Where some_address is the system user or email address you want these addresses aliased to
chmod 644 /var/qmail/alias/.qmail*Final configuration
./config-fast host.domain.tld
You should have an answer like this :
Putting host.domain.tld into control/me...
Putting domain.tld into control/defaultdomain...
Putting domain.tld into control/plusdomain...
Putting host.domain.tld into control/locals...
Putting host.domain.tld into control/rcpthosts...
Now qmail will refuse to accept SMTP messages except to host.domain.tld.
Make sure to change rcpthosts if you add hosts to locals or virtualdomains!
Edit /var/qmail/control/locals and remove host.domain.tld
Users comments