Routing all mail to unknown users to a single mail account

by on April 29, 2006 · 0 comments· LAST UPDATED April 29, 2006

in

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:

define(`LUSER_RELAY',`local:username@myhost.com')dnl

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:

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: