Feature request / Implementation question: Add header to postmaster notifies.

Stijn Jonker SJCJonker at SJC.NL
Fri Oct 8 12:12:37 IST 2004


<x-flowed>
Hello all,

Recently I build an other MailScanner system for an (private) relation,
they would like to receive all the postmaster warnings about viruses
found. This works wonderfully well as it does normally with mailscanner.

The "attack" of virus warning mails is becoming to much for them, but
they still want to "read" / verify them.

My first solution/remark was "Oh i'll do some procmail magic for you and
they only show up in this subfolder..." Only to find out that since the
new subject line (which contains the security violation like bad content
etc) it's extremly difficult to detect these messages as they don't have
any common fields.

I was wondering if I wanted to add an specific header to the
administrative emails where and how to do this.

I check the sources and found the function "CreatePostmasterHeaders" is
this the correct spot to add it?

Julian, is this an option you want to include if I provide the patch in
a week or so. (I first have to upgrade to the latest version & SA3 ;-))

Next to this, to add an config option to enable it, and a second one to
modify the header I think I would have to do the following:
1) Create 2 keys in ConfigDefs.pl under translation,translation
        enablepostmheader       = EnablePostMHeader
        postmheader             = PostMHeader
2) Under [Simple,YesNo] do
enablepostmheader 0 no 0 yes 1

3) Under [First,Other]
PostMHeader    X-MailScanner-PostMHeader:

4) The in the sub CreatePostmasterHeaders
a) Check if enablepostmheader = 1 then
b) Verify the settings for PostMHeader when invalid fallback to default.
c) Insert header after to & from and before subject.

Is this correct, according to the MailScanner coding standards/flows?

Stijn

--
Met Vriendelijke groet/Yours Sincerely
Stijn Jonker <SJCJonker at sjc.nl>

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
</x-flowed>



More information about the MailScanner mailing list