UserPreferences

ApplicationNotes/AmavisdNewNotes


1. Amavisd-new Notes

1.1. Disable SpamAssassin

Should you want to disable SpamAssassin, uncomment the line in amavisd.conf:

@bypass_spam_checks_acl  = qw( . );  # uncomment to DISABLE anti-spam code

1.2. Virus Notifications

Mark posted a recipe for a $viruses_that_fake_sender_re that only sends notifications for the few viruses that don't fake the sending address.

$viruses_that_fake_sender_re = new_RE(
    qr'@mm',  # mass mailing viruses as labeled by f-prot
    [qr'^(EICAR\.COM|Joke\.|Junk\.)'i     => 0],
    [qr'^(WM97|OF97|W95/CIH-|JS/Fort)'i   => 0],
    [qr/.*/ => 1],   # true by default!
);

1.3. Nano-HOWTO for Regular Expressions

Some comments about regular expressions I wrote up while explaining to a customer how to modify the $banned_filename_re.

$banned_filename_re = new_RE(
  qr'\.[a-zA-Z][a-zA-Z0-9]{0,3}\.(vbs|pif|scr|bat|com|exe|dll)$'i, # double extension
  qr'.\.(ade|adp|bas|bat|chm|cmd|com|cpl|crt|exe|hlp|hta|inf|ins|isp|js|
         jse|lnk|mdb|mde|msc|msi|msp|mst|pcd|pif|reg|scr|sct|shs|shb|vb|
         vbe|vbs|wsc|wsf|wsh)$'ix,                  # banned extension - long
  qr'^\.(exe|lha|tnef)$'i,                      # banned file(1) types
  qr'^application/x-msdownload$'i,                  # banned MIME types
  qr'^message/partial$'i, qr'^message/external-body$'i, # rfc2046
);