Discussion:
[AMaViS-user] releasing mail from clean quarantine
(too old to reply)
Sahil Tandon
2009-01-31 04:35:21 UTC
Permalink
We archive incoming mail with Postfix's bcc maps, but want to move this into
amavisd-new because it is easier to 'amavisd-release' mail to the user in
case s/he deletes it and needs re-delivery. In amavisd.conf:

$clean_quarantine_method = 'local:clean/%m.gz';

And this works as expected insofar as emails are quarantined to the
$QUARANTINEDIR/clean/filename.gz. But when trying to release messages (as we
sometimes do from spam or virus quarantine):

# amavisd-release clean/cWDQHseOhkkN.gz
250 2.5.0 No recipients, nothing to do

And in the log:

amavis[26378]: (rel-cWDQHseOhkkN) Quarantined message release
(miscategorized): cWDQHseOhkkN <***@tandon.net> -> , (excluded: <***@tandon.net> )

I am clearly missing something obvious, so please give me a clue!
--
Sahil Tandon <***@tandon.net>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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+ (Mark Martinec)
2009-01-31 15:33:48 UTC
Permalink
Sahil,
Post by Sahil Tandon
We archive incoming mail with Postfix's bcc maps, but want to move this
into amavisd-new because it is easier to 'amavisd-release' mail to the user
$clean_quarantine_method = 'local:clean/%m.gz';
And this works as expected insofar as emails are quarantined to the
$QUARANTINEDIR/clean/filename.gz. But when trying to release messages (as
# amavisd-release clean/cWDQHseOhkkN.gz
250 2.5.0 No recipients, nothing to do
amavis[26378]: (rel-cWDQHseOhkkN) Quarantined message release
I am clearly missing something obvious, so please give me a clue!
Here is a background story (from release notes):

- a quarantined message now receives one additional header field: an
X-Envelope-To-Blocked. An X-Envelope-To still holds a complete list
of envelope recipients, but the X-Envelope-To-Blocked only lists its
subset (in the same order), where only those recipients are listed
which did not receive a message (e.g. being blocked by virus/spam/
banning... rules). This facilitates a release of a multi-recipient
message from a quarantine in case where some recipients had a message
delivered (e.g. spam lovers) and some had it blocked;

- a release request now takes its default recipients list from a header
field X-Envelope-To-Blocked, no longer from X-Envelope-To. This avoids
releasing a message to recipients which have already received it in
the first place, e.g. spam lovers. For backwards compatibility, if
X-Envelope-To-Blocked header field is not found in a quarantined
message, the recipients list defaults to X-Envelope-To as before.
A release request can still provide its explicit list of recipients
to override a default, like before. Loosely based on suggestions
by Christer, by Paolo Schiro and others;


So, the mechanism is there to protect from releasing a message
to recipients, which already did receive the message.

You need to override a list of recipients for this to work:

amavisd-release clean/cWDQHseOhkkN.gz "" recip1 recip2 ...


Mark

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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/
Sahil Tandon
2009-01-31 17:16:19 UTC
Permalink
Post by Mark.Martinec+ (Mark Martinec)
Sahil,
Post by Sahil Tandon
We archive incoming mail with Postfix's bcc maps, but want to move this
into amavisd-new because it is easier to 'amavisd-release' mail to the user
$clean_quarantine_method = 'local:clean/%m.gz';
And this works as expected insofar as emails are quarantined to the
$QUARANTINEDIR/clean/filename.gz. But when trying to release messages (as
# amavisd-release clean/cWDQHseOhkkN.gz
250 2.5.0 No recipients, nothing to do
amavis[26378]: (rel-cWDQHseOhkkN) Quarantined message release
I am clearly missing something obvious, so please give me a clue!
- a quarantined message now receives one additional header field: an
X-Envelope-To-Blocked. An X-Envelope-To still holds a complete list
of envelope recipients, but the X-Envelope-To-Blocked only lists its
subset (in the same order), where only those recipients are listed
which did not receive a message (e.g. being blocked by virus/spam/
banning... rules). This facilitates a release of a multi-recipient
message from a quarantine in case where some recipients had a message
delivered (e.g. spam lovers) and some had it blocked;
- a release request now takes its default recipients list from a header
field X-Envelope-To-Blocked, no longer from X-Envelope-To. This avoids
releasing a message to recipients which have already received it in
the first place, e.g. spam lovers. For backwards compatibility, if
X-Envelope-To-Blocked header field is not found in a quarantined
message, the recipients list defaults to X-Envelope-To as before.
A release request can still provide its explicit list of recipients
to override a default, like before. Loosely based on suggestions
by Christer, by Paolo Schiro and others;
So, the mechanism is there to protect from releasing a message
to recipients, which already did receive the message.
amavisd-release clean/cWDQHseOhkkN.gz "" recip1 recip2 ...
Thanks Mark. This works and makes sense. Apologies for my careless reading
of the RELEASE_NOTES.
--
Sahil Tandon <***@tandon.net>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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/
Continue reading on narkive:
Loading...