Ian,

> Currently, we've got a special user "archiver" that gets all emails are
> BCC'ed to.  I've been trying to figure out how to get amavisd to simply
> send all emails through to this user without exception, even if it
> contains spam, bad headers, virii, etc...
> So far I've got these rules:
> @bypass_virus_checks_maps = ({ "[EMAIL PROTECTED]" => 1 });
> @virus_lovers_maps = ({ "[EMAIL PROTECTED]" => 1 } );
> @bypass_spam_checks_maps = ({ "[EMAIL PROTECTED]" => 1 });
> @spam_lovers_maps = ({ "[EMAIL PROTECTED]" => 1 });
> @bypass_banned_checks_maps = ({ "[EMAIL PROTECTED]" => 1 });
> @banned_files_lovers_maps = ({ "[EMAIL PROTECTED]" => 1 });
> @bypass_header_checks_maps = ({ "[EMAIL PROTECTED]" => 1 });
> @bad_header_lovers_maps = ({ "[EMAIL PROTECTED]" => 1 });

Ok.

> According to the logs, things seem to be working correctly:
> Sep 19 10:49:39 wopr amavis[9249]: (09249-10) Passed BANNED
> (multipart/mixed | application/x-zip-compressed,.zip,38426.zip |
> .dat,38426.xls), LOCAL [192.168.0.14] [192.168.0.14] <[EMAIL PROTECTED]>
> -> <[EMAIL PROTECTED]>, quarantine: FGiiGTluaLV2, Message-ID:
> <[EMAIL PROTECTED]>,
> mail_id: FGiiGTluaLV2, Hits: -, queued_as: 1CA7F5D08530, 29589 ms
> Sep 19 10:49:39 wopr amavis[9249]: (09249-10) Blocked BANNED
> (multipart/mixed | application/x-zip-compressed,.zip,38426.zip |
> .dat,38426.xls), LOCAL [192.168.0.14] [192.168.0.14] <[EMAIL PROTECTED]>
> -> <[EMAIL PROTECTED]>, quarantine: FGiiGTluaLV2, Message-ID:...

> And it even states so in the notify email as well:
> The message has been quarantined as: FGiiGTluaLV2
> The message WILL BE relayed to: <[EMAIL PROTECTED]>
> The message WAS NOT relayed to: <[EMAIL PROTECTED]>:

Ok.

> yet, when I go in and view the quarantine, I see two copies of the email,
> one for archiver, and one for the original recipient.  How can I avoid
> this?

Turn off quarantining for the archiver:

@archive_quarantine_to_maps = (
  { "[EMAIL PROTECTED]" => '' },
  \$archive_quarantine_to,
);

Btw, it would be easier to get away with all of the above,
and let amavisd do the archiving, instead of using always_bcc
in MTA:

  $archive_quarantine_to = '[EMAIL PROTECTED]';
  $archive_quarantine_method = 'smtp:[127.0.0.1]:10025';

See also:
  http://www.ijs.si/software/amavisd/amavisd-new-docs.html#quarantine

amavisd-new-2.4.3 release notes:
- added configuration variables @archive_quarantine_to_maps and
  $archive_quarantine_method, allowing for archival quarantine of all mail
  (configurable by recipient and by policy banks) regardless of its contents
  category. This archive is independent from other quarantining, i.e. if
  spam quarantining and archival quarantining are both enabled, two copies
  will be stored to quarantine. When quarantining for archive one has two
  choices: archive_quarantine would store all mail addressed to recipient,
  whereas enabling clean quarantine as in:
    $quarantine_method_by_ccat{+CC_CLEAN} = 'local:clean-%m';
    $quarantine_to_maps_by_ccat{+CC_CLEAN} = 'clean-quarantine';
  would quarantine only clean mail, no spam, no viruses, no banned, no badh.

  Note that logging to SQL has only one field to store quarantine location,
  so in case of multiple quarantine locations only the first is remembered.
  The usual logging however reports all quarantine locations with the main
  log entry.


> Also, it looks like spam that should have been cut off and dropped is
> still showing up in the quarantine as well:
> $sa_tag2_level_deflt = 5;
> $sa_kill_level_deflt = 5;
> $sa_dsn_cutoff_level = 10;
> $sa_quarantine_cutoff_level = 10;

Show an example from a log. Your provided example hit a BANNED,
SpamAssassin was not even called, $sa_quarantine_cutoff_level did not apply.

> Finally, how the heck can I disable the bad headers check?

@bypass_header_checks_maps = ( 1 );

> I get way too many false positives from this!

False positives in what sense? That a test said a header is bad
but is really not??? Or, more likely, that a header is bad,
but mail is passed anyway. Yoy can turn off quarantining
of bad header mail if that is what you are asking:
  $bad_header_quarantine_method = undef;

Steven writes:
> You don't need the => 1 in your entry.   That syntax is for creating
> policy banks, where you assign values to a perl array.

Bad advice, Ian is using hash-type lookups, syntax is correct.

> Normal rules just take the values as a list.
> @bypass_virus_checks_maps = ( "[EMAIL PROTECTED]");

Bad advice, a @*_maps value is a LIST OF LOOKUP TABLES.
The above example is inperpreted as a list of one element,
which is a pseudo-lookup table A CONSTANT, which always
yields its value regardless of a query key. When interpreted
as a boolean, it is always true in the above example, regardless
of the query key.

  Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to