2010-05-24 23:52

The main idea is to have a set of anything@ads.mydomain.com addresses, all redirecting to a single mailbox. Then I can use any address @ads.mydomain.com as an alias to my primary mailbox.
This way, I give ebay@ads.mydomain.com to Ebay, amazon@ads.mydomain.com to Amazon and so on.

This solutions allows me to disable an alias if unsubscribing on the site doesn’t work. I can also use this to track sites selling my address to other sites.

First, Exim has to listen on the network, and accept mail to the ads.mydomain.com domain. Under Debian, put this in /etc/exim4/update-exim4.conf.conf:

dc_local_interfaces='0.0.0.0'
dc_relay_domains='ads.mydomain.com'

Note under Debian: each time Exim starts the /etc/exim4/exim4.conf.template file is filled with variables set in /etc/exim4/update-exim4.conf.conf, générating the /var/lib/exim4/config.autogenerated file. This is to ease Exim configuration in standard cases.

Then edit the /etc/exim4/exim4.conf.template file to add a new router, in first position just bellow begin routers:

catchall_pub:
  driver = redirect
  domains = ads.mydomain.com
  data = user@mydomain.com

The router will be called for any mail @ads.mydomain.com. It give all mails to the redirect transport sending them to the address set in data.

Finally, you can then use a /home/user/.forward file to disable aliases with a Sieve or Exim filter.

UPDATE 2010-11-10: another way of disabling aliases

References:

2010-05-24 23:52 · Tags: , , ,

3 Comments

  1. Thanks that worked a treat on Ubuntu LTS10.4, just what I needed only change was I used dc_local_interfaces=”

    Reply

  2. Thanks for the help.

    What’s the difference between the dc_other_hostnames and the dc_relay_domains?

    I have multiple domains at one IP address.

    Do I want to specify the domains that do catchall as just a relay_domain, or do I need to specify them as other_hostnames as well?

    Reply

  3. you get the answer in man update-exim4.conf.conf

    If you want the catchall to relay to another email address, as in my example, you will want to use dc_relay_domains.

    If, however, your exim server is intended to put mail in local mailboxes, you can try dc_other_hostnames.

    Reply

Leave a Reply to Marc Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>