Re: [Bug 3159] New: Exim fails to deliver paniclog email when it contains long lines

Andreas Metzler via Exim-dev <[email protected]>
Newsgroups gmane.mail.exim.devel
Message-ID <[email protected]>
On 2025-09-21 Jeremy Harris via Exim-dev <[email protected]> wrote:
> On 2025/09/20 11:26 AM, Thomas Hochstein via Exim-dev wrote:
> > 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"

> At the very least they could put "  awk '{print substr($0, 0, 998)}'  " into that pipeline.
> Or, there exists MIME::QuotedPrint.

I have gone for
+      | fold --bytes --width=990 \
in GIT.

cu Andreas
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE0uCSA5741Jbt9PpepU8BhUOCFIQFAmjP2QYACgkQpU8BhUOC
FIS7fA/8C6foqbxCFjKPi4SXCMvPai2YRMO+wq3uwDcM+2Rkmb+9Pj86eSD/Sqbl
n3q4UoCUjqA+tvIpmnx27BE9aT42Vfkf2vDF3HcfQLnNHsA/zlBulvLAYOrXj41n
HcdNy0Zcv8vmOsAXicrwXM20LZGmoZi6fTWTZerK5apUTtj2feQn3+fWNckE4d2H
nrllq73roq+nlpzx0P42RpsZVKAxM6XAbptt3eWnom/Ev+jdpjJYG2jWyA86z2oG
mkZaTTldHe5bZYLKELg/9J7EbZZFcXLgpsrGfQbU8CtM4S1i/3R/MuF8DRrcfEKZ
K6XyKlboY2MCBF1vsT+Eai58XI6NIPk+LZixHHKBE9/jvxkXMd3toqvUguemG8S4
gpCF473YaFdBnba/uda8ahrEJFqmuiBfaeTdaJgsojTccAGUp/0mDJovJ9DSRHpy
m/mDfwa/5Tr28oZlnHg+YO83YZGd3k1ZdozHoC/Zj5hTfuMjUEGgxVDpEeVHPE4H
vy1hm7tffVuRcMd2oDE/zGUVnHG7HNyObvaNnSjL3Gev/SQhhiTYuiACEJwLl3q5
3MMLWJtinrjChUVG0iO1BxZK+JI4RZ/ozUQYvHL4a9baYnJf78SCHjLhvcEsP3ar
xcTb9Ryb87hdx+KACA8qpru1c1XnEk0lilRPftiWBOMYq0zdY/o=
=hj9v
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.