Per Domain Recovery Archiving
Julian Field
mailscanner at ecs.soton.ac.uk
Thu Aug 14 18:03:20 IST 2003
At 17:26 14/08/2003, you wrote:
>Good day:
>
>We have an install of MailScanner running. We want to 'archive' ALL
>messages based on domain for the ability to recover any lost messages for a
>given domain. That is, all incoming messages for @domaina.com get appended
>to a file called /arc/inc_domaina and all outgoing messages would be
>appended to /arc/out_domaina , I know that if we give a path in the
>'Archive Mail' option, that it will create a 'Sendmail' queue type archive,
>what would be nice is just to have the SMTP messages be appended in a BSD
>style mailbox , or even forwarded to a user 'inc_domaina at domaina.com' user
>mailbox, . Or maybe, with a rule can we create per domain archive files
>with Mail scanner ? Is there a way to get the 'Mail Archive' option to
>archive not ALL messages to one location, but domaina to one address , and
>domainb to another address ?
Create the file /arc/inc_domaina before you restart MailScanner, instead of
making it a directory. It will see that it's a file and start automagically
appending messages to it in mbox format (which is what you want).
Then use a ruleset for
Archive Mail = /etc/MailScanner/rules/archive.mail.rules
In the ruleset file put things like this:
From: domaina.com /arc/inc_domaina
To: domaina.com /arc/out_domaina
From: domainb.com /arc/inc_domainb
To: domainb.com /arc/out_domainb
and so on.
Just do
touch /arc/inc_domaina /arc/out_domaina /arc/inc_domainb /arc/out_domainb
before you restart MailScanner so that all the files already exist so it
knows to treat them as mbox files and not "normal" archive directories.
Neat, huh? :-)
Here's the latest edition of the comments for the "Archive Mail" parameter:
# 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.
#
# If you give this option a ruleset, you can control exactly whose mail
# is archived or forwarded. If you do this, beware of the legal implications
# as this could be deemed to be illegal interception unless the police have
# asked you to do this.
#Archive Mail = /var/spool/MailScanner/archive
--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support
More information about the MailScanner
mailing list