ArchiveMail Exclusions

Stephen Conway sconway at wlnet.com
Tue Sep 18 19:36:53 IST 2007


Hello:

Ok, I am trying now to do what I need but with Non-Spam-Actions.  I have the
forwarding working but there is one problem.  We already have a custom
function called "FleetActions" which is our default action for non-SPAM.  If
I specify this function as the action for Non-Spam in the MailScanner.conf
as follows:

Non Spam Actions = &FleetActions

Then all works as it should, our custom function in CustomConfig.pm gets
called.  But, if I try to put it instead to a ruleset file as:

Non Spam Actions = /opt/MailScanner/etc/rules/message.nonspam.rules

Which is:

From:   *@domain.com   and     To:     someuser at otherdomain.com
fowardeduser at domain.com
FromOrTo:       default &FleetActions

The messages that should be forwarded are working perfectly, the problem is
that our custom function now doesn't get called and an error goes in log as
follows:

" Message l8IIKrLi013637 produced illegal Non-Spam Action "&fleetactions",
so message is being delivered"

So I guess the question is, is there a way inside a ruleset file for Non
Spam Actions to specify a custom function found in CustomConfig.pm?

Thanks,

Steve

-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Julian
Field
Sent: Monday, September 17, 2007 12:55 PM
To: MailScanner discussion
Subject: Re: ArchiveMail Exclusions



Stephen Conway wrote:
> Hello Julien:
>
> Yes, sorry I think I wasn't clear what I was asking.  I know that if you
> enter as an action here an e-mail address that messages will go to that
> e-mail.  But as I have seen, this sends a 'copy' of the message to the
> address (meaning that a copy still goes to the original recipient).  Is
> there a way for example, putting a ! in front of the address, where the
> message is actually forwarded (not copy) to the other address?
>   
Do that with non-spam actions, spam actions and high-scoring spam actions.
> Also, I have another item as well.  I have blacklist file, and it seems
that
> if MailScanner sees another 'X-Spam: No' flag in the message, that it will
> not block the message even if on the black list.  Any way to bypass this,
to
> make MailScanner scan for Spam even if the message has been scanned by
> another Relay server before?
>   
That's not happening. MailScanner doesn't rely on *anything* in the 
headers to control scanning, as everything in the headers can be forged 
by a spammer or virus writer.
> -----Original Message-----
> From: mailscanner-bounces at lists.mailscanner.info
> [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Julian
> Field
> Sent: Saturday, September 15, 2007 9:55 AM
> To: MailScanner discussion
> Subject: Re: ArchiveMail Exclusions
>
> As it says right at the top of the comment about Archive Mail =, you can 
> include
>
> # Space-separated list of any combination of
> # 1. email addresses to which mail should be forwarded,
> # 2. directory names where you want mail to be stored,
> # 3. file names (they must already exist!) to which mail will be appended
> #    in "mbox" format suitable for most Unix mail systems.
>
> Stephen Conway wrote:
>   
>> 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
>>
>>   
>>     
>
> Jules
>
>   

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