Routing all mail to unknown users to a single mail account

Posted on in Categories News last updated April 29, 2006

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:[email protected]’)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:

Leave a Comment