Yuriy Markiv blog

TECH

exim4 - antispam using aliases

12 December, 2017 | tech

 For those of you who already got own domain and use exim4 as MTA (or other MTA that considers /etc/aliases). 

Whenever you might need to register at some forum or other online service, don't reveal your personal email address. 

Just open /etc/aliases file in your favourite text editor and put there new line like below: 

site.com: username

site.com is site name of online service you need to register at,

username is name of user where your MTA should place messages.

Once you saved your /etc/aliases file, test your new email from some external mailbox, it should look like this: site.com@example.com where example.com is your domain.

Next step is tricky and tested on exim4 only so far.

Once you successfully registered at needed online service, after you no longer need to receive emails from that site, just change line to:

site.com: :blackhole:

It will not send any errors to your sender, also you will not see those emails again.

Good luck.