heihachi88
11/4/2014 - 8:19 AM

Exim4 mail-send only server

Exim4 mail-send only server

# update evyerthing
sudo apt-get update
sudo apt-get dist-upgrade

# install exim4
sudo apt-get install exim4

# start exim configuration
sudo dpkg-reconfigure exim4-config

1) Select internet site
2) Enter your FQDN (hostname --fqdn)
3) 127.0.0.1 ; ::1 (IP address to listen for SMTP connection)
4) srv.webium.me; srv.webium.me; localhost.localdomain; localhost
5) Leave the relay domains and relay machines fields blank.
6) Select No when asked whether to keep DNS queries to a minimum.
7) Maildir format in home directory
8) Accept the default non-split option for your mail configuration file.

# add spf record ipv4 and ipv6 for your hostname domain in bind
@ IN TXT "v=spf1 ip4:148.251.3.143 ip6:2a01:4f8:201:538e::2 a mx ~all"

# crontab email for specific email address
crontab -e

# at the top of file put
MAILTO="username@domain.com"
CONTENT_TYPE="text/plain; charset=utf-8"