Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to process all emails sent to (that is any subdomain of to a PHP script using EXIM. Is this possible and can someone show me a tutorial/clue related to this one.

I'm creating a SaaS apps that create to a user with and email * with it.

I've already setup the wildcard dns for domain and mx * 14400 IN A mail 14400 IN A * 14400 IN MX 10 mail

I hope can receive some example or clue to the right direction.

share|improve this question

There are some addresses you should exempt such as postmaster, abuse, hostmaster, and any other administrative addresses. I would recommend you pick a domain or two that will be used for email rather than wildcarding the domain.

  • Configure local_domains to include *, or a specific list of domains.
  • Enable wildcard aliases and configure an wildcard alias to and local part which will run your process. Add a router to handle this id and direct it to a new transport. Add the new transport to run your program.
  • Test and release

You will likely need to configure the transport to run as a specific user.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.