Discussion:
Mailing quarantined spam to a separate host
Adriel Goddard
2005-08-09 22:20:05 UTC
Permalink
Hello,

Firstly, I am new to this mailing list and would like to apologize in
advance if this has already been talked about. I did scan through the
archives but didn't see anything that seemed to match.

Currently I am running amavisd-new on 4 mail gateways. They all use
Postfix, SpamAssassin, and ClamAV. They store all of the quarantined
messages on localhost. What I am looking to do is for them to pass
along the quarantined message as is (same sender, same recipient) to a
different mail host (not the primary one where filtered mail resides).
I would like the address to be preserved so users can log into this
mail host via Squirrelmail or such if they believe that some of their
legitimate email is being tagged as spam.

Unfortunately, whomever set up the current mail system didn't plan
things out too well. In short, I am left with a Windows NT mail host,
making per-user configurations a bit more complicated.

I am trying to set $spam_quarantine_method = 'local:%R' (I believe the
%R macro should provide the proper recipient email address) and
$notify_method = 'smtp:[mailhost's IP]:25'. After searching online for
a solution, I am led to believe that I am on the right path, but I
can't seem to get it configured properly.

According to http://mirrors.catpipe.net/amavisd-new/amavisd-new-docs.html#quarantine,
if $spam_quarantine_method is set to local: and $spam_quarantine_to is
set to an email address (I currently have it set as $spam_quarantine =
'%R'), then it will use the $notify_method to send the message.

Perhaps I am using the macros improperly, or configuring the variables
incorrectly, or both. Thank you in advance for any help/insight.

Adriel Goddard


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
AMaViS-user mailing list
AMaViS-***@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/
Mark Martinec
2005-08-09 23:01:16 UTC
Permalink
Adriel,
Post by Adriel Goddard
Currently I am running amavisd-new on 4 mail gateways. They all use
Postfix, SpamAssassin, and ClamAV. They store all of the quarantined
messages on localhost. What I am looking to do is for them to pass
along the quarantined message as is (same sender, same recipient) to a
different mail host (not the primary one where filtered mail resides).
I would like the address to be preserved so users can log into this
mail host via Squirrelmail or such if they believe that some of their
legitimate email is being tagged as spam.
If the intention is for the 'quarantined' mail to be directly viewable
by original recipients without pre-processing, then the quarantining
mechanism is not the right way. Quarantining stores one copy per message,
not one per recipient, which looses personalized header fields inserted,
and reveals all original envelope recipients, violating sender's privacy.
Releasing from a quarantine or viewing quarantined mail by users
requires some pre-processing, like hiding X-Envelope-To.

The right approach is to deliver spam mail, but reroute it to another
mailbox, either to a subfolder, or like you want, to an entirely different
mailer.

The correct solution lies in adding address extensions as a way
to tag spam (at tag2 level), ensure the mail is delivered (D_PASS
or having kill_level safely high), then use MTA's virtual mapping
to rewrite modified address (with address extension appended)
to some other mailbox on some host. See the:
http://www.ijs.si/software/amavisd/amavisd-new-docs.html#addrext
and follow the example at the end of that section.

This approach ensures that each recipient receives mail the way
it was intended for them, with proper personalized headers inserted,
with bypass*, while/blacklists, spam levels, etc. properly observed.
Post by Adriel Goddard
I would like the address to be preserved so users
Replying to your original question, the envelope sender when sending
a quarantine to a mail address could be preserved by having
$mailfrom_to_quarantine set to undef. Recipients can't be preserved
in the true quarantine envelope, as this would reroute the quarantine
to original recipients. But like I said, this is a wrong approach.
Post by Adriel Goddard
I am trying to set $spam_quarantine_method = 'local:%R' (I believe the
%R macro should provide the proper recipient email address) and
Unfortunately the full set of macros is not available for this purpose,
only few %x replacements in $*_quarantine_method are done ad-hoc for speed.

Mark


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
AMaViS-user mailing list
AMaViS-***@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/

Loading...