Hi,
I have a post office which basically is used as forwarders i.e.
1234@mydomain.com -> jack@yahoo.com
hfgh@mydomain.com -> gsmith@hotmail.com
Instead of adding thousands of entries to the mail enable address map ( program files\mail enable\config\address-map.tab file ) to handle the routing/forwarding of email sent to @mydomain.com I was wondering if I could use my database. In other words each time a piece of mail arrived for @mydomain.com I would like to run a piece of code or access a database with will be able to lookup the inbound address i.e. 1234@mydomain.com and supply the store with a forwarding address i.e. jack@yahoo.com
Doing this would be much more efficient that having to create an address map that could run into the 10,000's of records.
Any advice would be GREATLY appreciated..
Thanks,
Creating many mail forwarders? How?
-
- Site Admin
- Posts: 1127
- Joined: Mon Jun 10, 2002 6:31 pm
- Location: Melbourne, Victoria, Australia
Re: Creating many mail forwarders? How?
Hi,
You could probably do this with a pickup event configured at the MTA service. Every message has to pass through this service, so you could check the command file for the message (the command file is a file containing the sender/recipient and other details). You could use these details to then rewrite the command file with the new details. There is some information on the pickup event at:
http://www.mailenable.com/kb/Content/Ar ... D=me020028
There is also a bigger example in the SpamAssassin pickup event sample at:
http://www.mailenable.com/addons_Filtering.asp
You could probably do this with a pickup event configured at the MTA service. Every message has to pass through this service, so you could check the command file for the message (the command file is a file containing the sender/recipient and other details). You could use these details to then rewrite the command file with the new details. There is some information on the pickup event at:
http://www.mailenable.com/kb/Content/Ar ... D=me020028
There is also a bigger example in the SpamAssassin pickup event sample at:
http://www.mailenable.com/addons_Filtering.asp
Re: Creating many mail forwarders? How?
Hello,
thank you for the reply, does this mean that I also have to create a catchall account in order that the messages actually make to the MTA for further processing? and then when processing the command file either rewrite it if I find a matching forwarder within my db, or delete it if it never should have gotten back the catchall address and made it to the mta?
thanks,
thank you for the reply, does this mean that I also have to create a catchall account in order that the messages actually make to the MTA for further processing? and then when processing the command file either rewrite it if I find a matching forwarder within my db, or delete it if it never should have gotten back the catchall address and made it to the mta?
thanks,
-
- Site Admin
- Posts: 1127
- Joined: Mon Jun 10, 2002 6:31 pm
- Location: Melbourne, Victoria, Australia
Re: Creating many mail forwarders? How?
Hi,
So the email address you are wishing to accept the email for does not exist either? In this case you would need a catchall, in order for the SMTP service to accept it - and delete the invalid messages in your pickup event. This is not too bad, since the pickup event happens before filtering. Or possibly you can use the SMTP scripting option to check the recipient address as well. ie. in the administration program under the Advanced SMTP options you can edit the SMTP script and change the ME_RCPT() function to lookup the recipient. Though I don't think necessarily this will be more efficient, due to the extra work in running the extra script.
So the email address you are wishing to accept the email for does not exist either? In this case you would need a catchall, in order for the SMTP service to accept it - and delete the invalid messages in your pickup event. This is not too bad, since the pickup event happens before filtering. Or possibly you can use the SMTP scripting option to check the recipient address as well. ie. in the administration program under the Advanced SMTP options you can edit the SMTP script and change the ME_RCPT() function to lookup the recipient. Though I don't think necessarily this will be more efficient, due to the extra work in running the extra script.