MailScanner and spam check after disarming harmful message

Discussion in 'Server Operation' started by N4zroth, Oct 19, 2017.

  1. N4zroth

    N4zroth New Member

    Hi,
    I'm using MailScanner with spamassassin and clamav on my server. I configured MailScanner to delete spam messages but deliver disinfected messages (some of our customers send crap which clamav disinfects). Deleting spam works fine, as does disinfecting. The problem is with mails that get disinfected but are in fact spam. These get delivered after getting disinfected. I assume that MailScanner doesn't check for spam after disinfecting a message. Anyone got an idea on how to make MailScanner also check for spam after disinfecting?
    Thanks!
    Logs for spam that gets deleted correctly:
    Code:
    Oct 19 23:43:55 mail MailScanner[16998]: New Batch: Scanning 1 messages, 5335 bytes
    Oct 19 23:43:55 mail MailScanner[16998]: Virus and Content Scanning: Starting
    Oct 19 23:43:56 mail MailScanner[16998]: Spam Checks: Found 1 spam messages
    Oct 19 23:43:56 mail MailScanner[16998]: Deleted 1 messages from processing-database
    
    Logs for spam that goes through the virus scanner first and then gets delivered even though it is spam (even the X-SPAM header is set):
    Code:
    Oct 19 22:48:04 mail MailScanner[3639]: New Batch: Scanning 1 messages, 14393 bytes
    Oct 19 22:48:04 mail MailScanner[3639]: Virus and Content Scanning: Starting
    Oct 19 22:48:04 mail MailScanner[3639]: Expired 1 records from the SpamAssassin cache
    Oct 19 22:48:06 mail MailScanner[3639]: Content Checks: Detected and have disarmed web bug tags in HTML message in 637802DC96AC.A054D from [email protected]
    Oct 19 22:48:06 mail MailScanner[3639]: Requeue: 637802DC96AC.A054D to 2F9EF2DC9B57
    Oct 19 22:48:06 mail postfix/qmgr[21209]: 2F9EF2DC9B57: from=<[email protected]>, size=13547, nrcpt=1 (queue active)
    Oct 19 22:48:06 mail MailScanner[3639]: Uninfected: Delivered 1 messages
    Oct 19 22:48:06 mail MailScanner[3639]: Deleted 1 messages from processing-database
    
    Edit: I seem to be running amavisd-new as well as MailScanner but amavis isn't logging anything although it is configured to log into /var/log/amavis.log. Are there any problems in running both? If so, can I just remove amavisd-new, or do I have to remove something from my postfix/main.cf? (Sorry I set the server up ages ago with one of the perfect server guides, and after an unsuccessful update I re-did it with another guide but kept some old stuff by accident as it seems).
     
    Last edited: Oct 20, 2017

Share This Page