limit archive size?

Mark Martinec Mark.Martinec+amavis at
Fri Mar 11 17:54:51 CET 2011


> on certain installations I use the archive, not for 'archive', but so
> that the email I submit for bayes/spamcop/dcc/razor is NOT screwed up by
> microsoft exchange.
> I don't need the 24MB picture files that some non nuts like to email
> back and forth, so, question:
> how would I limit what was archived in the sql-archive?  yes, I guess I
> could add a trigger that deleted everything with chunk_id > 10.  but, is
> there an easier way?

Something like this in amavisd.conf should work:

package Amavis::Custom;
sub new {
  my($class,$conn,$msginfo) = @_;
  bless {}, $class;
sub before_send {
  my($self,$conn,$msginfo) = @_;
  if ($msginfo->msg_size < 1024*1024) {
    Amavis::do_quarantine($conn,$msginfo, undef,
      ['archive-quarantine'], 'sql:');


More information about the amavis-users mailing list