Mark, thanks for your helpful response.

On 10/31/07, Mark Martinec <[EMAIL PROTECTED]> wrote:
> > Can I do the same per-recipient if I wanted to?
>
> Yes, add_contents_category is a property of each
> recipient (and also a property of a message as a whole,
> see 'blocking contents category' in 2.5.0 release notes).

(after reading about blocking contents cateogory) now I understand why
each recipient AND the message need to be marked as banned.

> >   (!!)TROUBLE in check_mail: delivery-notificaton FAILED: Assert
> > failed: 0, 1,  at ...
>
> Don't set recip_done to true, just add_contents_category().

OK, but...

> If you do set recip_done, you must also set recip_smtp_response(...),
> indicating the success status of a delivery that you pretended
> to have done.

So I could do this if I wanted to have control over the SMTP response.

> > Can I choose to not quarantine a message in some cases, but send a
> > notificaton as if I had?
>
> Additional notifications can be sent from a custom hook,
> as indicated in the amavisd-custom.conf example.
> Turning off quarantinining is trickier - I can't think
> of an elegant way to do it from a custom hook.
> I admit it would be useful.

Can I set the quarantine method ($banned_files_quarantine_method) to
undef() or something like that?

>> Also, I realise that I'm trying to tag a message as banned, which is
>> normally associated with an attachment.  However, I still want to ban
>> messages by my policy even when there's no attachment.
>
> There is no involvement of attachents concept there, all MIME
> parts are treated equally.

Yes, for a single-part MIME with no other parts.  However what about a
plain RFC2822 message without any MIME?  In particular, some of the
base code, do_notify_and_quarantine(), looks at $r->banned_parts, but
if I haven't set any banned parts, I might break something.  I suspect
this will only break template macros related to banned attachments,
which I can deal with.  But I'd like to be sure that there isn't a bit
of code that assumes a banned attachment is always present in a banned
message.

Two more questions on this subject, if I may impose:

My reading of the release notes suggests that I can check the virus
status of the message before performing an action, because the custom
checks() happens after the built-in checks.  Assuming that's correct,
what's the best way to do this?  Should I test
$r->is_in_contents_category(CC_VIRUS) per recipient?  Or can I do it
for the entire message with
$msginfo->is_in_contents_category(CC_VIRUS)?

Also, can I determine, from within a custom hook, what is the current
loaded policy bank?

Cheers
Jeremy

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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