[SA-exim] Need more logging!

Marc MERLIN marc at merlins.org
Fri Aug 15 08:25:13 PDT 2003


On Fri, Aug 15, 2003 at 07:23:40AM -0700, Marc MERLIN wrote:
> This is already logged in rejectlog

Mmmh, actually, spam that is accepted doesn't have its headers logged.

Just use the system_filter to save the headers of all incoming mails

Here's a sample you can modify:
if $header_message-id matches "<[^>]+@>"
then
  logfile /var/log/exim/nullmesgidbouncedemail.log 0600
  logwrite "$tod_log $message_id envelope: $sender_address, From: $h_from ($send
er_host_name[$sender_host_address]) => $recipients (recipients=$recipients_count
)  subject=$header_subject\n$message_headers"

  save /var/spool/exim/rejects/nullmesgidbouncedemail 0644

  if not error_message
  then
    fail text "Sorry, but your message-ID is broken, apparently because your\n\
             hostname isn't set right\n\
             You need to fix this before you can send us mail.\n"
  endif

  seen finish
endif

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger marc_f at merlins.org for PGP key



More information about the SA-Exim mailing list