Configuring sendmail to drop invalid users

Mailing List Subscriber lists at ListOwners.Net
Tue Sep 28 21:34:51 IST 2004


kfliong <kfliong at WOFS.COM> said:


> I now want to refine script by allowing only mails sent to valid users.
> Those mails send to invalid users currently goes to catchall account. And I
> have configured catchall to go to /dev/null. But this is not good enough as
> these mails are still keep in queues and then processed by mailscanner. Is
> there a way to drop these mails directly from MTA level?

So you have your regular aliases defined for addresses that you want to be
deliverable, then a catchall that sends anything else to /dev/null, but you
actually want anything else to be rejected.  Pretty simple.  Just get rid of
the catchall.  End of problem.  If the invalid address does not match a
defined alias, and no catchall exists, (which is how it becomes invalid),
sendmail will automagically reject any mail sent to that address as "user
unknown" during the initial communications between hosts.  You won't wind up
queueing any mail at all this way.

Because you have a catchall defined, all addresses, real and imagined, are
valid and therefore deliverable.  Remove the catchall and the only
deliverable addresses are those you have aliases for.  The rest get rejected
automatically.  I don't see a need for any special scripts here.

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).



More information about the MailScanner mailing list