How To Configure exim4 on Debian

sudo vi hosts

127.0.0.1 localhost
{server ip address} www.domain.com www

sudo vi hostname

www.domain.com

hostname -f

sudo vi /etc/mailname

domain.com

apt-get install exim4

dpkg-reconfigure exim4-config

(the following setup for Google mail server)
Hide local mail name in outgoing mail? No
Split configuration into small files? Yes

sudo vi /etc/exim4/update-exim4.conf.conf

dc_eximconfig_configtype=’smarthost’
dc_other_hostnames=’localhost;www.domain.com’
dc_local_interfaces=’127.0.0.1′
dc_readhost=”
dc_relay_domains=”
dc_minimaldns=’false’
dc_relay_nets=”
dc_smarthost=’smtp.gmail.com::587′
CFILEMODE=’644′
dc_use_split_config=’true’
dc_hide_mailname=’false’
dc_mailname_in_oh=’true’
dc_localdelivery=’mail_spool’

sudo vi /etc/exim4/passwd.client

gmail-smtp.l.google.com:webmaster@domain.com:password
*.google.com:webmaster@domain.com:password
smtp.gmail.com:webmaster@domain.com:password

sudo vi /etc/aliases

# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: /dev/null
hostmaster: root
usenet: root
news: root
webmaster:webmaster@domain.com
www: root
ftp: root
abuse: root
noc: root
security: root
root:webmaster@domain.com

sudo newaliases

login as root – create forward email address for root

sudo -i

sudo vi .forward

webmaster@domain.com

sudo service exim4 restart

echo “this is a test from domain” | mail -s “Success” webmaster@domain.com

Submit your review
1
2
3
4
5
Submit
     
Cancel

Create your own review

Average rating:  
 1 reviews
Thanks

Worked for me thanks

You may also like...