Create system backup for safety first.
Update and upgrade Debian.
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.
Check exim 4 log file
As you see in the log something crashed.
To fix it run exim 4 reconfiguration.
Watch the settings and set them accordingly to the screenshots:
![[Image: image.png]](https://s28.postimg.org/ftfxecs0t/image.png)
![[Image: image.png]](https://s28.postimg.org/syvfkglwd/image.png)
![[Image: image.png]](https://s28.postimg.org/fj8ev0del/image.png)
![[Image: image.png]](https://s28.postimg.org/5n7bvd7ml/image.png)
![[Image: image.png]](https://s28.postimg.org/ewe3j85wd/image.png)
![[Image: image.png]](https://s28.postimg.org/50d0jl04d/image.png)
![[Image: image.png]](https://s28.postimg.org/mex8rux99/image.png)
![[Image: image.png]](https://s28.postimg.org/5sfois4bh/image.png)
Then get it to work. Put the following commands:
Resend test mail
Check exim 4 log file
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.
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]](https://s28.postimg.org/ftfxecs0t/image.png)
![[Image: image.png]](https://s28.postimg.org/syvfkglwd/image.png)
![[Image: image.png]](https://s28.postimg.org/fj8ev0del/image.png)
![[Image: image.png]](https://s28.postimg.org/5n7bvd7ml/image.png)
![[Image: image.png]](https://s28.postimg.org/ewe3j85wd/image.png)
![[Image: image.png]](https://s28.postimg.org/50d0jl04d/image.png)
![[Image: image.png]](https://s28.postimg.org/mex8rux99/image.png)
![[Image: image.png]](https://s28.postimg.org/5sfois4bh/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.