From: Mark M. <Mar...@ij...> - 2007-10-30 16:27:34
|
Chris, > Is it possible to log *only* quarantined mails, and not all mails > passing through amavis? From what I can see, setting @storage_sql_dsn > will cause logging of all mails. > > I am trying to create a quarantining system using sqlite for a low > volume mail gateway, but want to limit the impact of all mails being > logged to the sqlite database. This is currently not possible. It would be a bit tricky to implement, because a provisional record is inserted into SQL at the start of mail checks to insure message-id is unique in a database, but at this point in time it is not yet know if the message is spam. At the end of processing the existing record is only updated with additional information. For your needs the sub save_info_final() could be modified to delete the record, instead of updating it. But is it worth it? It is usual that over 80% of mail is spam and gets quarantined, so does the additional 20% make any difference? Non-spam records could be given a shorter retention time while peforming a database purge. Mark |