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 30 > /var/qmail/control/timeoutsmtpd
echo 3 > /var/qmail/control/spfbehavior
echo postmaster@yourdomain.tld > /var/qmail/control/bouncefrom
echo yourdomain.tld > /var/qmail/control/doublebouncehost
echo postmaster > /var/qmail/control/doublebounceto
cd /var/qmail/control/
chmod 644 bouncefrom doublebouncehost doublebounceto concurrencyremote concurrencyincoming spfbehavior
Set maximum message size to be 8Mb
echo '8000000' > /var/qmail/control/databytesAllows 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
cd /usr/src/qmail/qmail-1.03./config-fast YOUR_SERVER_NAME
Edit /var/qmail/control/locals and remove YOUR_SERVER_NAME
Users comments
Hello Georgi,
I'm sure it's not an error in my tutorial.
Indeed you can see :
echo yourdomain.tld > /var/qmail/control/doublebouncehost
...
cd /var/qmail/control/
chmod 644 bouncefrom doublebouncehost doublebounceto concurrencyremote concurrencyincoming spfbehavior
So you MUST have those files
Hi Thibs,
I'm trying your install and it seems there is a little mistake
chmod 644 bouncefrom doublebouncehost doublebounceto concurrencyremote concurrencyincoming spfbehavior
does return err:
ebounceto concurrencyremote concurrencyincoming spfbehavior
chmod: cannot access `doublebounceto': No such file or directory
Fix it in the tutorial.
Best!
Georgi
@Monkey : indeed you're right !
Not sure yey, but I think YOUR_SERVER_NAME should be "host.domain.tld".

After testing bounces, the line:
echo postmaster@yourdomain.tld > /var/qmail/control/bouncefrom
seems it should just be:
echo postmaster > /var/qmail/control/bouncefrom
Thank you for your work.