ArchiveMail Exclusions

Stephen Conway sconway at wlnet.com
Fri Sep 14 21:21:06 IST 2007


Hello Julien:

Thanks very much for that.  Seems to work OK.

One other question, is there a way using ArchiveMail to forward messages
instead of just make an archive?

Ex:

To:	*@domain.com	!somegroupmailbox at otherdomain.com

Thanks,

Steve

-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Julian
Field
Sent: Thursday, September 13, 2007 4:57 PM
To: MailScanner discussion
Subject: Re: ArchiveMail Exclusions

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

-- 
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website! 



-- 
ShipMail Now 30% Faster



More information about the MailScanner mailing list