Re: [Bug 3159] New: Exim fails to deliver paniclog email when it contains long lines
Thomas Hochstein via Exim-dev <[email protected]>
| Newsgroups | gmane.mail.exim.devel |
|---|---|
| Message-ID | <[email protected]> |
Exim Bugzilla wrote::
> When exim paniclog email contains lines longer than 1000 characters, it fails
> at delivering it because it violates SMTP specifications (RFC 5321): "message
> has lines too long for transport". In other words, exim is dropping its own
> email and fails to report the original issue reported by paniclog.
That's not Exim sending those mails, but a cronjob* from the exim4-base
Debian package, located at /etc/cron.daily/exim4-base with those lines:
| if [ "$E4BCD_WATCH_PANICLOG" != "no" ]; then
| if [ -s "/var/log/exim4/paniclog" ]; then
| if [ -x "/usr/local/lib/exim4/nonzero_paniclog_hook" ]; then
| /usr/local/lib/exim4/nonzero_paniclog_hook
| fi
| if [ -z "$E4BCD_PANICLOG_NOISE" ] || grep -vq "$E4BCD_PANICLOG_NOISE" /var/log/exim4/paniclog; then
| log_this "ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken"
| if ! printf "Subject: exim paniclog on %s has non-zero size\nTo: %s\n\nexim paniclog /var/log/exim4/paniclog on %s has non-zero size, mail system might be broken. Up to ${E4BCD_PANICLOG_LINES} lines are quoted below.\n\n%s\n" \
| "${HOSTNAME}" "${E4BCD_PANICLOG_REPORT_TO}" "${HOSTNAME}" \
| "$(if [ -z "$E4BCD_PANICLOG_NOISE" ] ; then tail -n "${E4BCD_PANICLOG_LINES}" /var/log/exim4/paniclog ; else grep -v "$E4BCD_PANICLOG_NOISE" /var/log/exim4/paniclog | tail -n "${E4BCD_PANICLOG_LINES}" ; fi)" \
| | exim4 "${E4BCD_PANICLOG_REPORT_TO}"; then
| log_this "PANIC: sending out e-mail warning has failed, exim has non-zero return code"
| fi
| if [ "$E4BCD_WATCH_PANICLOG" = "once" ]; then
| logrotate -f /etc/logrotate.d/exim4-paniclog
| fi
| fi
| fi
| fi
* or a systemd-timer (exim4-base.timer) activating exim4-base.service
which is running that same cronjob script.
> To fix this issue, exim should ensure it wraps line in its paniclog email
> ("exim paniclog on <domain> has non-zero size") to less than 1000 characters
> per line.
From /etc/cron.daily/exim4-base:
| # Patches for more sophisticated processing are appreciated via the
| # Debian BTS.
:-)
-thh