Sender Notices

Julian Field MailScanner at ecs.soton.ac.uk
Wed Mar 16 17:16:12 GMT 2005


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

That's not how you do rulesets. You specify a ruleset for each of the
configuration options you want fine control over. But several
configuration items can use the same ruleset file if you like, so you
have multiple options controlled from one file.

So for example, in MailScanner.conf put
Send Notices = %rules-dir%/send.notices.rules
(%rules-dir% is just an abbreviation for whatever value it is set to
near the top of MailScanner.conf)
Then in the send.notices.rules you might put
From: @yourdomain.com yes
FromOrTo: default no

This would cause notices to be sent about problems in mail from anyone
in the yourdomain.com domain, while having a default value of no, hence
stopping notices about mail from other places.

There are examples of rulesets in the book, the MAQ, the FAQ and the
%rules-dir% directory.
So instead of having an option that looks like
Send Notices = the-value-you-want
you can put
Send Notices = %rules-dir%/a-filename.rules
and then in each line of the a-filename.rules file,
From/To/FromOrTo/FromAndTo/Virus address-pattern the-value-you-want
and I would advise you to always specify a "default" rule to catch all
the mails not caught by any of your other rules:
FromOrTo: default the-default-value-you-want

Most of the rules use the-value-you-want given in the first rule that
matches the email details. So it makes logical sense to put the default
rule at the end of the file. But if you are auto-generating the ruleset
files from a database or some script you wrote, you might want to put
the default rule at the beginning, which is also fine and works the
same. The "default" rule is used whenever none of the other rules match,
regardless of where it is in the rules file.

If a few people want to have a go at writing another "Rules Tutorial",
feel free and we will get it into the wiki which is under development.
The more docs in there the better!


Bagt wrote:

> a syntax error appears in /var/log/mail
>
> Mar 15 21:17:04 MailScanner[28625]: Syntax error in first field in line
> 2 of ruleset /etc/MailScanner/rules/send.notification.rules
> Mar 15 21:17:04 MailScanner[28625]: Syntax error in first field in line
> 3 of ruleset /etc/MailScanner/rules/send.notification.rules
>
> send.notification.rules
> ===============
> Virus:          default                no
> Filename:      default         yes
> Dangerous Content:     default    yes
>
> It's a space ou name error in the first field ?
>
>> What's wrong with the solution you have come up with?
>>
>> Bagt wrote:
>>
>>> Hi,
>>>
>>> I will notice Mailscanner's administrator for blocked messages, not
>>> for the
>>> virus but for only unaccetable attachment and for others infections.
>>>
>>> It's possible to write a file's rules like this for "Send Notices" in
>>> MailScanner.conf :
>>>
>>> Virus: default no
>>> Filename : default yes
>>> Dangerous Content : yes
>>>
>>> Have you an another solution ?
>>>
>>> Can you add a configuration option in futur release to separate
>>> notices ?
>>>
>>> Thanks for your response.
>>>
>>> Cleo
>>>
>>> ------------------------ 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).
>>>
>>> Support MailScanner development - buy the book off the website!
>>>
>>
>> --
>> Julian Field
>> www.MailScanner.info
>> MailScanner thanks transtec Computers for their support
>> Buy the MailScanner book at www.MailScanner.info/store
>>
>> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>>
>> ------------------------ 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).
>>
>> Support MailScanner development - buy the book off the website!
>>
>>
>
> ------------------------ 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).
>
> Support MailScanner development - buy the book off the website!
>

--
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

------------------------ 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).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list