New feature - hostname lookups in rulesets

Julian Field MailScanner at
Sun May 31 17:17:13 IST 2009

Hash: SHA1

I have just added a new feature which I hope you will find useful.
It struck me that it has always been really awkward to have to use IP 
addresses in the "From:" lines in rulesets, and wouldn't it be a lot 
easier to be able to use hostnames or domain names, with wildcards, and 
stuff like that.

So now you can.

You just put "host:" at the start of the hostname or domain name (or 
wildcard or regexp or whatever) and it matches it against the hostname 
of the SMTP client that sent the message to MailScanner.

So you can now do rules such as these:

From: host:localhost.localdomain yes
From: yes
From: host:mailgate* yes
From: yes
From: yes
From: host:example.* yes
From: host:/\.(de|dk|es)$/ yes

and all sorts of things like that.

I hope you find this useful, particularly those where who have to live 
in a world of dynamic IP addresses for their machines.

This will be in the stable release tomorrow, but I don't consider this 
feature itself to be "stable" quite yet, as I only just wrote it. 
However, it shouldn't interfere with anything else.


- -- 
Julian Field MEng CITP CEng
Buy the MailScanner book at
Follow me at

MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key:

Version: PGP Desktop 9.10.0 (Build 500)
Comment: Use PGP or Thunderbird Enigmail to verify this message
Charset: ISO-8859-1


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the MailScanner mailing list