Basic Postfix/MS question: avoid scanning mail for invalid recipients

ram ram at
Fri Aug 1 13:50:39 IST 2008

On Fri, 2008-08-01 at 12:58 +0100, Dave Jenkins wrote:
> Hi,
> We have Postfix/MS/SA running on our main & backup mail servers. The
> main server is both incoming MX and outgoing, auth required. We'd like
> every mail to a valid recipient to be scanned, but don't want to waste
> CPU scanning mail to invalid recipients.

MailScanner is not involved here at all 

Deal with invalid recipients at postfix level. Do not accept mails for
invalid recipients at all by using recipient checks right at the entry
point. That way you save a lot of resources and avoid sending
misdirected bounces 

> Main MX: am I right in thinking Postfix will remove mail to invalid
> recipients before it gets to MS & so that setting MS to scan
> everything will achieve what we want?
> Backup MX: I've written a script to turn /etc/postfix/virtusertable
> from the main MX into a valid rules file to be rsync'd to the backup
> MX's rules directory, is that a sensible approach? Does MS need to be
> restarted when the rules files are updated?

Yes Using a virtusertable with all valid recipients is a good way for
Use a hash/CDB database. You will not have restart anything. Just
postmap the file and you are done


More information about the MailScanner mailing list