My activities New request

contact atmail support

PH: +61 (7) 5357-6605

support@atmail.com

Follow

Scan outgoing emails for spam

Stewart -

PROBLEM
I want to scan my outgoing mail for spam.

ENVIRONMENT

  • On-Premise Server + WebMail Installations: Version 6.0 > Current Version

CAUSE

By default, Exim only checks inbound emails for spam. This is easily configurable, via the following steps:

RESOLUTION

  1. Open up /usr/local/atmail/mailserver/configure.
  2. Find:
    # Accept outgoing messages from authenticated users, no need to scan as spam
    accept  authenticated = *
     
    # Skip scanning messages from users that are trusted
    accept hosts = +relay_from_hosts
     
    # Skip if message over size
    accept condition = ${if > {$message_size}{50k} }
     
    # Pass the email via Spamassassin and don't scan messages over the specified size to save CPU
    # Append the X-Spam-Score and X-Spam-Report for all messages
    warn  message = X-Spam-Score: $spam_score
    condition = ${if < {$message_size}{50k} }
    hosts = ! +relay_from_hosts
    spam = nobody:true/defer_ok
     
    warn  message = X-Spam-Report: $spam_report
    condition = ${if < {$message_size}{50k} }
    hosts = ! +relay_from_hosts
    spam = nobody:true/defer_ok
     
    # Reject message if Spam-score is too high ( avoid wasted disk/CPU on obvious Spam messages)
    drop message = This message is rejected by the Anti-Spam System. Spam-score too high : $spam_score spam points - Please reformat your email and send again
    spam = nobody:true/defer_ok
    hosts = ! +relay_from_hosts
    condition = ${if < {$message_size}{50k} }
    condition = ${if > {$spam_score_int}{100}{1}{0}}
  3. Change the block so it looks like:
    # Skip if message over size
    accept condition = ${if > {$message_size}{50k} }
     
    # Pass the email via Spamassassin and don't scan messages over the specified size to save CPU
    # Append the X-Spam-Score and X-Spam-Report for all messages
    warn  message = X-Spam-Score: $spam_score
    condition = ${if < {$message_size}{50k} }
    spam = nobody:true/defer_ok
     
    warn  message = X-Spam-Report: $spam_report
    condition = ${if < {$message_size}{50k} }
    spam = nobody:true/defer_ok
     
    # Reject message if Spam-score is too high ( avoid wasted disk/CPU on obvious Spam messages)
    drop message = This message is rejected by the Anti-Spam System. Spam-score too high : $spam_score spam points - Please reformat your email and send again
    spam = nobody:true/defer_ok
    condition = ${if < {$message_size}{50k} }
    condition = ${if > {$spam_score_int}{100}{1}{0}}
  4. Go to WebAdmin > Services > Anti-Spam, and set 'Skip Trusted' to off. Save changes.
  5. Restart Atmail.
    % /etc/init.d/atmailserver restart
Have more questions? Submit a request

Comments