I have configured the Debian workstations at our department to use Exim 4 for mail delivery. Also I have created an alias such that I receive all the
root emails. The Exim 4 configuration (via Ansible and debconf) has those settings:
exim4_dc_eximconfig_configtype: internet exim4_dc_readhost: … exim4_dc_smarthost: … exim4_dc_use_split_config: 'true' exim4_dc_hide_mailname: 'true' exim4_dc_mailname_in_oh: 'true'
On each of the machines, I can use
mailx to send an email to
root and it will show up in my inbox just fine. Also some executions of the cron jobs are properly sent to me.
However, most cron jobs fail to deliver their emails and instead I get the following email:
This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: ueding@… (generated from root@echo) Reporting-MTA: dns; echo Action: failed Final-Recipient: rfc822;ueding@… Status: 5.0.0 Return-path: <root@echo> Received: from root by echo with local (Exim 4.89) (envelope-from <root@echo>) id 1f7Jqz-0007jU-7y for root@echo; Sat, 14 Apr 2018 14:00:25 +0200 From: root@echo (Cron Daemon) To: root@echo Subject: Cron <root@echo> ansible-pull -U email@example.com:…/….git --private-key /root/.ssh/ansible_pull localhost.yml MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/root> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=root> Message-Id: <E1f7Jqz-0007jU-7y@echo> Date: Sat, 14 Apr 2018 14:00:25 +0200 X-Exim-DSN-Information: Due to administrative limits only headers are returned
I really do not understand why this is happening. Either all email delivery fails, or almost all succeed. How can the email from cron fail on most workstations but succeed on others, while the delivery failure emails always get through?
The system log regarding exim on the machine, echo, is really sparse:
# journalctl -u exim4.service -- Logs begin at Tue 2018-03-06 18:35:11 CET, end at Sat 2018-04-14 17:13:08 CEST. -- Apr 02 18:00:30 echo systemd: Starting LSB: exim Mail Transport Agent... Apr 02 18:01:23 echo exim4: Starting MTA: exim4. Apr 02 18:01:23 echo systemd: Started LSB: exim Mail Transport Agent.
/var/log/exim4/mainlog serves the explanation on a silver platter:
2018-04-14 14:00:25 1f7Jqz-0007jU-7y <= root@echo U=root P=local S=7948 2018-04-14 14:00:25 1f7Jqz-0007jU-7y ** ueding@… <root@echo> R=dnslookup T=remote_smtp: message is too big (transport limit = 1) 2018-04-14 14:00:25 1f7Jqz-0007jW-BM <= <> R=1f7Jqz-0007jU-7y U=Debian-exim P=local S=1856 2018-04-14 14:00:25 1f7Jqz-0007jU-7y Completed 2018-04-14 14:00:26 1f7Jqz-0007jW-BM => ueding@… <root@echo> R=dnslookup T=remote_smtp H=… […] X=TLS1.0:RSA_AES_256_CBC_SHA1:256 CV=yes DN="C=DE,ST=…,L=…,O=…,OU=…,CN=…" C="250 2.0.0 Ok: queued as 6FCA1155FC32" 2018-04-14 14:00:26 1f7Jqz-0007jW-BM Completed
The error likely is “message is too big (transport limit = 1)”. But that still does not make so much sense since I have 30 identically configured workstations and for some of them the messages get through several days in a row. The length of the message should be the same for each machine (except the length of the hostname), and the two machines which currently get their emails through have longer names.