Lately our local Exim MTA (version 4.69 #1 built 05-Aug-2008 12:27:08)
has been receiving e-mails from external contractors and also some from
within the company with invalid address headers (seems that some of the
e-mails that Exim is receiving have singlequote pairs added around some
of the e-mail addresses in their To: and Cc: and Exim objects to this as
being invalid!).
To help debug these e-mails that Exim is objecting to I have modified
the 'header_syntax' checking ACL. Initially I used 'logwrite' with
$message_headers variable but all the linefeeds in the header are
written as '\n' in the log file.
So next I tried 'log_message' to get some linefeed formatting in the log
file. However, when used with the 'deny' ACL verb this only writes to
the log file up until the first occurrence of a linefeed which is as
explained in Philip Hazel's Exim book, "Official guide to Release 4",
section 15.10.10, page 328.
Here is a snippet from my Exim config file:
<snip>
acl_smtp_data = check_message
<snip>
## ACL that is used after the DATA command. OK to use 'discard' in this
ACL and all the message's recipients will be discarded.
check_message:
<snip>
deny !verify = header_syntax
log_message = Invalid address header line syntax - 'data'
acl deny! [$acl_verify_message] [[$message_headers"]]
message = Invalid address header line syntax!
[$acl_verify_message]
<snip>
Does anyone know if there is a way to get 'log_message' to write e-mail
header linefeeds to the log file or is there another way to achieve
this?
Thanks
Paul McIlfatrick