MailScanner archive question

Julian Field MailScanner at ecs.soton.ac.uk
Tue Apr 7 13:33:14 IST 2009


"To" and "Cc" users are identical from MailScanner's point of view. 
MailScanner doesn't use the contents of the "To" or "From" or "Cc" 
headers at all, it looks at the real recipients and senders of the 
message, which is all stored in the envelope.
So your rules will store the mail in all directories corresponding to 
every recipient of the messages, not just the ones that happen to be in 
your domain. The rule will fire if *any* recipient is in your domain, 
and will cause the message to be stored in the directory for *every* 
recipient.
So if you use

To *@mydomain.com 
/var/spool/MailScanner/archive/_TODOMAIN_/_TO_USER_/_DATE_/Received

then it will be stored in a separate directory for each domain. If you 
are not interested in any except those where _TODOMAIN_ == mydomain.com, 
then just delete those directories every day on a cron job.

On 7/4/09 13:10, Jose Perez wrote:
> Hi People:
>
> I'm using MailScanner 4.74.16 with Archiving feature like this:
>
> Archive Mail = Archive Mail = %rules-dir%/mail.archiving.rules
>
> The content of %rules-dir%/mail.archiving.rules is this:
>
> To:       *@mydomain.com
> /var/spool/MailScanner/archive/mydomain.com/_TOUSER_/_DATE_/Received
> From:   *@mydomain.com
> /var/spool/MailScanner/archive/mydomain.com/_FROMUSER_/_DATE_/Sent
>
> This is working fine, all mydomain.com users that send and receive
> e-mail are getting their messages archived but MailScanner it's doing
> something I believe is wrong.
>
> Only when some external user (some user at Internet, outside
> mydomain.com) sends a message to somebody of mydomain.com with CC
> (copies) to other people of external domains (i.e hotmail.com,
> yahoo.com) then MailScanner is creating also a directory under
> /var/spool/MailScanner/archive/mydomain.com/ with the name (only user
> part without @domain.com) of those users who received the copies but
> aren't mydomain.com, so I'm seeing how now exists more directories
> than users of mydomain.com under
> /var/spool/MailScanner/archive/mydomain.com/
>
> I mean, if jvoorhees1 at gmail.com send a message to admin at mydomain.com
> with CC to bgates at hotmail.com then MailScanner creates the file
> Received under the
> /var/spool/MailScanner/archive/mydomain.com/bgates/20090326/
>
> How can I prevent MailScanner of creating directories of external users?
>
> I hope someone can give me some advice, thanks. Bye!
>    

Jules

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

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

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


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list