Guardian Digital Inc. >
InfoCenter >
Mailing List Archives >
Amavis
Amavis Mailing List Archive
> I want to change default behaviour of spam_quarantine_to from policy sql
> field now it points to local_delivery_aliases -> spam-quarantine
> defined as QUARANTINE + VIRUSFILE
>
> how to make spam_quarantine_to be real system path per user ??
> for example: /var/spool/mail/id_domain/id_user
> where id_domain and id_user - sql fields in users policy table
You will have to provide (or modify) the entry in %local_delivery_aliases
as you correctly concluded. All the required information about
sender and recipients etc is hanging off the $MSGINFO object.
Don't forget there may be more than one recipient in a message.
Make sure the sender-specified funny characters in a recipient address
do not escape to the file system, just in case if it would happen
that MTA would fail to reject mail for nonexistent user.
> is it possible to use cached sql fields values in subroutine in
> local_delivery_aliases -> spam-quarantine ??
> for example:
> 'spam-quarantine' => sub { (! cached value of sql lookup! , $VIRUSFILE)},
Yes, just call lookup() on whatever you are interested in,
it will use a cached field for a SQL query, if the record
had already been queried before during processing of this message.
Since you are thinking of per-user quarantine (and recipients are
not supposed to have direct access to the quarantine to protect the
sender privacy), a much cleaner approach is to deliver spam, but
redirect it to a separate folder, either a subfolder in user's mailbox,
or perhaps a centralized mailbox/mailboxes. The technique is to enable
adding address extension (e.g. +spam) in amavisd, and configure MTA to
reroute/deliver such mail somewhere else (using virtual or alias mappings).
Mark
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.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/
|