Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to process all emails sent to @.example.com (that is any subdomain of example.com) 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 subdomain.example.com to a user with and email *@subdomain.example.com with it.

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

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

share|improve this question
add comment

1 Answer

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 *.example.com, 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
add comment

Your Answer

 
discard

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.