≡ Menu

Routing all mail to unknown users to a single mail account

Recently one of our clients mail server was getting lots email message from unknown users which was causing some trouble so I decided to route all mail to unknown users (for verification ) to a single mail account. This server use sendmail MTA. Sendmail has option called LUSER_RELAY.

Open Sendmail configuration file sendmail.mc using text editor:

# vi /etc/mail/sendmail.mc

Add following macro to file:


Rebuild sendmail.cf:

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Reload configuration:

# /etc/init.d/sendmail restart

Please note that you can also configure virtual domains but it will take some time to configure sendmail virtual domains.

See also:

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 0 comments… add one }

Leave a Comment