Updating the MailScanner Wiki

Jim Holland mailscanner at mango.zw
Wed Jul 5 12:25:45 IST 2006


On Wed, 5 Jul 2006, Jim Holland wrote:

> Some time ago I agreed to update the Wiki in relation to using /^$/ in a 
> ruleset to match the null sender address <>.  Sorry for the delay.
 
I think we just need the following changes to these two files:

(1) /etc/MailScanner/rules/README:

Add: /^$/			# Null envelope sender address <>
				# used in MAILER-DAEMON bounces

to the following section, eg:

2. The pattern describes what messages should match this rule.
   Some examples are:
        user at sub.domain.com     # Individual address
        user@*                  # 1 user at any domain
        *@sub.domain.com        # Any user at 1 domain
        *@*.domain.com          # Any user at any sub-domain of "domain.com"
        *@domain.com            # Any user at 1 specific domain
        /pattern/               # Any address matching this Perl regular
                                # expression
        192.168.                # Any SMTP client IP address in this network
        /pattern-with-no-letters/ # Any SMTP client IP address matching this
                                  # Perl regular expression
        /^192\.168\.1[4567]\./  # Any SMTP client IP address in the networks
                                # 192.168.14 - 192.168.17
        /^$/                    # Null envelope sender address <>
				# used in MAILER-DAEMON bounces
        *@*                     # Default value
        default                 # Default value
   You should be able to do just about anything with that.

(2) /etc/MailScanner/rules/EXAMPLES:

Add:
   # Match the null envelope sender address <> used in MAILER-DAEMON bounces
   From:   /^$/                         yes

to the following section, eg:

9. Use perl's pattern matching to make more advanced rules:

   # Match user at domain.com as well as user at sub.domain.com, but not
   # foo-domain.com at spammer.com:
   From:   /[\@\.]domain\.com$/         yes

   # Match all US .gov traffic:
   From:   /\.gov$/                     yes

   # Match the null envelope sender address <> used in MAILER-DAEMON bounces
   From:   /^$/                         yes

Regards

Jim Holland
System Administrator
MANGO - Zimbabwe's non-profit e-mail service



More information about the MailScanner mailing list