Вопрос

How can I configure a mail server to parse the"TO" field of each incoming message, and if it is of the form <uniqueID>.CommonID.User1@domain.com then route the email to user1@domain.com. Otherwise deliver to the intended recipient. It seems I would need to configure/create a handler inside the MTA. Should I utilize an SMTP relay?

As a side question, does Godaddy expose this type of functionality since I am currently hosting my web page and email server through them.

Это было полезно?

Решение

This is simple to do with Procmail.

:0
* ^To: <uniqueID>\.CommonID\.User1@domain\.cim
! User1@domain.com

It's not clear what <uniqueID> and CommonID should represent, but if they can be expressed as regular expressions, you are all set.

The LDA can pass your email on standard input to any program you write. Procmail is specialized for this purpose so even if you want to write your program in PHP, it might make sense to invoke it from Procmail rather than directly from the LDA.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top