Problem with archive.rules

Martin Hepworth martinh at SOLID-STATE-LOGIC.COM
Thu Jan 20 12:30:22 GMT 2005


Oliver Rooney wrote:

> Hello All,
>
> I am running MailScanner on a sendmail relay and I am having some
> trouble with archiving email. I have successfully been archiving all
> emails sent throught the relay to a directory, but now I am trying to
> archive emails to mail boxes based on the domain of the
> sender/recipient. This itself is not the problem, I also need to exclude
> some emails based on the username of the sender/recipient. I have tried
> the following %rules_dir%/archive.rules setup:
>
> Fromorto:       exclude at mydomain.com    /var/mailarchive
> Fromorto:       *@external_domain.com   /var/mailarchive
> external_domain at mydomain.com
> Fromorto:       default                 /var/mailarchive
>
> And had no joy as emails match both rules. I have also tried separate
> to: and from: lines for both, also withou joy. I have also tried
> (longshot) recursive rulsets
>
> Fromorto:       *@external_domain.com   %rules_dir%/external.rules
>
> But that gets interpreted as an mbox file.
>
> Is there anyway to achieve this? Thanks in advance.
>
> Regards,
>
> Oliver Rooney
> Trayport Ltd
> <http://www.trayport.com>
>
Oliver

FromOrTO:<tab>*@external_domain.com<tab>/var/archive/external_domain.com

should work, extrapolating from my rules and the examples..

--
Martin Hepworth
Senior Systems Administrator
Solid State Logic Ltd
tel: +44 (0)1865 842300


**********************************************************************

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote confirms that this email message has been swept
for the presence of computer viruses and is believed to be clean.

**********************************************************************

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