Poll: What Mail Transport Agent do you use
This poll is closed.
exim 4
16.67%
1 16.67%
postfix
66.67%
4 66.67%
other
16.67%
1 16.67%
Total 6 vote(s) 100%
* You voted for this item. [Show Results]

Exim 4 - mail system for sending on fresh Debian install.
#1
Photo 
Create system backup for safety first.

Update and upgrade Debian.

Code:
apt-get update
apt-get upgrade


It may last more then 10 minutes.
The advantage of Debian update and upgrade in my case was that it stopped permission and ownership issues of the exim 4 log path.

Try to send mail. The recipient should be valid. 

Code:
echo "test message" | mail -s "test message" recipient12x3@gmail.com



Quote:root@debian:~# echo "test message" | mail -s "test message" recipient12x3@gmail.com
root@debian:~#


Check exim 4 log file

Code:
cat /var/log/exim4/mainlog





Quote:root@debian:~# cat /var/log/exim4/mainlog
2016-12-28 08:16:42 exim 4.84_2 daemon started: pid=24997, -q30m, listening for SMTP on [127.0.0.1]:25 [::1]:25
2016-12-28 08:16:42 Start queue run: pid=24998
2016-12-28 08:16:42 1cMDqt-0000Zx-63 ** user@debian <root@debian>: Unrouteable address
2016-12-28 08:16:42 1cME5y-0006VF-OT <= <> R=1cMDqt-0000Zx-63 U=Debian-exim P=local S=4236
2016-12-28 08:16:43 1cME5y-0006VF-OT ** user@debian <root@debian>: Unrouteable address
2016-12-28 08:16:43 1cME5y-0006VF-OT Frozen (delivery error message)
2016-12-28 08:16:43 1cMDqt-0000Zx-63 Completed
2016-12-28 08:16:43 End queue run: pid=24998
root@debian:~# 

As you see in the log something crashed.

To fix it run exim 4 reconfiguration.

Code:
dpkg-reconfigure exim4-config



Watch the settings and set them accordingly to the screenshots:



[Image: image.png]

[Image: image.png]

[Image: image.png]

[Image: image.png]

[Image: image.png]

[Image: image.png]

[Image: image.png]

[Image: image.png]

Then get it to work. Put the following commands:

Code:
update-exim4.conf
/etc/init.d/exim4 restart



Resend test mail

Code:
echo "test message" | mail -s "test message" recipient12x3@gmail.com



Check exim 4 log file

Code:
cat /var/log/exim4/mainlog




Quote:2016-12-28 09:51:40 1cMFZs-0000fg-4U <= root@blabla.com U=root P=local S=329
2016-12-28 09:51:40 1cMFZs-0000fg-4U gmail-smtp-in.l.google.com [2a00:1450:4010:c0b::1b] Network is unreachable
2016-12-28 09:51:41 1cMFZs-0000fg-4U => recipient12x3@gmail.com R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.222.27] X=TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128 DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=mx.google.com" C="250 2.0.0 OK 1482936701 h26si29181103lji.97 - gsmtp"
2016-12-28 09:51:41 1cMFZs-0000fg-4U Completed


Bravo! This is the log you have been waiting for! You can read the mail in mail client of recipient. Notice that the sender is root <root@blabla.com> in received mail.
#2
I vote for postfix because I use postfix most of the time.

And not seeing how exim 4 can be used better than postfix. I am just satisfied with using postfix.

Thanks for the tutorial anyway. Smile
#3
I have never used exim 4. I always use postfix. I am definitely gonna try it after this tutorial.
#4
I always used postfix. I might change it up in the future. Thanks for the tutorial Smile
Thank you FreeVPS and Hostigation for my VPS 18!
My personal projects: https://rpark.co
---

[Image: img.php?userid=19312]

#5
I recommend mailcow, its easy to set up and you could be sending mail in 30 min. I use it personally and its really configurable too
Thanks to FreeVPS Hostigation for VPS 18

[Image: show_img.php?userid=20107&vpscount=1]




Users browsing this thread: 1 Guest(s)

Switch to mobile version

Sponsors: FuzzyHosts - Ftpit - ZXPlay - GalaxyHostPlus - Verelox- HostUS - HostMada - Host4Fun - Evolution-Host - NodeBlade - HostDare


BitCoin donations: 1DQxbstaTb5SWk6QC2gFeQUTFR64JX4cEo