On my server, mail is sometimes delayed for apparently no specific reason.
In this example two mails were generated by systemd-cron
about failing cron jobs:
mailq
output (domains edited):
3m 1.9K 1i6W6d-0003UT-Ut <[email protected]>
www-data@server
3m 1.8K 1i6W6e-0003Uh-1y <[email protected]>
root@server
After some minutes or when I issue exim -qf
the mail is finally sent and delivered without any issue.
/var/log/exim4/mainlog
(Domains/IPs edited):
2019-09-07 10:30:04 1i6W6d-0003UT-Ut <= [email protected] U=nobody P=local S=1914
2019-09-07 10:30:04 1i6W6e-0003Uh-1y <= [email protected] U=nobody P=local S=1875
2019-09-07 10:34:13 Start queue run: pid=13447 -qf
2019-09-07 10:34:14 1i6W6d-0003UT-Ut => [email protected] <www-data@server> R=smarthost T=remote_smtp_smarthost H=smtp.example.com [1.2.3.4] X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=yes DN="…" A=plain C="250 2.0.0 Ok: queued as 268D26139FAA"
2019-09-07 10:34:14 1i6W6d-0003UT-Ut Completed
2019-09-07 10:34:14 1i6W6e-0003Uh-1y => [email protected] <root@server> R=smarthost T=remote_smtp_smarthost H=smtp.example.com [1.2.3.4] X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=yes DN="…" A=plain C="250 2.0.0 Ok: queued as BA7EE6139FAC"
2019-09-07 10:34:14 1i6W6e-0003Uh-1y Completed
2019-09-07 10:34:14 End queue run: pid=13447 -qf
When I sent an email from command line echo 'Test' | mail -s test root
, the mail is delivered immediately, without log entries for start/end queue run:
2019-09-07 10:35:21 1i6WBk-0003V9-VR <= [email protected] U=root P=local S=397
2019-09-07 10:35:21 1i6WBk-0003V9-VR => [email protected] <root@server> R=smarthost T=remote_smtp_smarthost H=smtp.example.com [1.2.3.4] X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=yes DN="…" A=plain C="250 2.0.0 Ok: queued as 723116139F77"
2019-09-07 10:35:21 1i6WBk-0003V9-VR Completed
Do you know the reason for the delay? How can I have exim process all mail immediately?
My configuration:
- up to date Debian Buster
- exim version 4.92-8+deb10u2
- both,
root
andwww-data
(among others) have aliases to [email protected] (external) - standard Debian exim config (using
update-exim4.conf
)
/etc/exim4/update-exim4.conf.conf
:
dc_eximconfig_configtype='smarthost'
dc_other_hostnames=''
dc_local_interfaces='127.0.0.1 ; ::1'
dc_readhost='server'
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='smtp.example.com::587'
CFILEMODE='644'
dc_use_split_config='true'
dc_hide_mailname='false'
dc_mailname_in_oh='true'
dc_localdelivery='maildir_home'