It looks like amavisd follows these steps for SQL reporting/quarantining:

in check_mail sub (in the order indicated):
 1. save_info_preliminary()
    1.1. find_or_save_addr()
       1.1.1. ins_adr (inserts info into maddr table)
    1.2. ins_msg (inserts preliminary data into msg table)
 2. do_notify_and_quarantine()
    2.1. do_quarantine()
       2.1.1. Amavis::Out::SQL::Quarantine::mail_via_sql()
          2.1.1.1. ins_quar (inserts data into quarantine table)
 3. save_info_final()
    3.1. ins_rcp (inserts data into msgrcpt table)
    3.2. upd_msg (inserts additional data into msgs table)

So my approach will be to try and delay all transactions until the final 
stage where I would only commit them if the message is getting 
quarantined. Do you guys see any problems with that?

Tenyo

Tenyo Grozev wrote:
> Hi. I'm working on a custom Amavis/SA quarantine solution using MySQL, 
> and I was curious if there's a way to disable the SQL reporting while 
> still having spam get quarantined?
> My understanding is that as soon as you specify @storage_sql_dsn, Amavis 
> starts logging all e-mails. For right now, I'm occasionally scanning the 
> database and deleting all records from maddr, msgrcpt, and msgs,  that 
> are not related to quarantine e-mails. However, being able to disable 
> that in the first place, would save quite a bit of resources.
> I haven't been able to find any options that I can specify for that 
> purpose, so I wanted to see if that would be relatively easy to modify 
> in the source.
>
> Thanks much,
> Tenyo Grozev
>
>   


-- 
Tenyo Grozev
Perimeter Internetworking
203-541-3425




--
The sender of this email subscribes to Perimeter Internetworking's email
anti-virus service. This email has been scanned for malicious code and is
believed to be virus free. For more information on email security please visit:
http://www.perimeterusa.com/malicious_code_defense_content.html

This communication is confidential, intended only for the named recipient(s)
above and may contain trade secrets or other information that is exempt from
disclosure under applicable law. Any use, dissemination, distribution or
copying of this communication by anyone other than the named recipient(s) is
strictly prohibited. If you have received this communication in error, please
delete the email and immediately notify our Command Center at 203-541-3444.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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