ArchiveMail Exclusions

Julian Field MailScanner at ecs.soton.ac.uk
Thu Sep 13 21:57:18 IST 2007


Stephen,

Stephen Conway wrote:
> Hello:
>
> I have the requirement to archive mail for some senders to a certain address
> but not if certain senders are matched, I have put the following but it
> still always archives, any way to configure this?
>
> From:   *@dontcopydomain.com     and     To:     @domaintobecopied.com
> no
>   
That will attempt to archive the mail to a directory called "no" which 
isn't what you meant. To archive nothing, you just leave it blank, so 
this is what you meant:
From: dontcopydomain.com and to: domaintobecopied.com
> From:	*@*	and	To:     @domaintobecopied.com
> usertobecopied at otherdomain.com
>   
That (the second line) is the same as saying
To: domaintobecopied.com usertobecopied at otherdomain.com
> This type of logic works well for the Max Message size rules, to have size
> restrictions for certain domains than others, but for this ruleset file
> which is type (AllMatch) as per docs, it doesn't use same logic.
>   
Correct, as it's an "AllMatch". This means that it will archive to all 
of the places and addresses specified by all the matching rules. That 
seemed a sensible thing to do at the time, and I still believe is what 
most people will want.

If you want to make it a FirstMatch, edit 
/usr/lib/MailScanner/MailScanner/ConfigDefs.pl and move this line:
ArchiveMail
from the [All,Other] section to the [First,Other] section.
Then restart MailScanner, and you will have changed the logic it uses. 
Dead easy.
Remember to re-apply the change when you next upgrade MailScanner, as 
changes you make to that file will be lost during the upgrade process.

Jules

-- 
Julian Field MEng CITP
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
For all your IT requirements visit www.transtec.co.uk


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
For all your IT requirements visit www.transtec.co.uk



More information about the MailScanner mailing list