Hello All, I am a postfix newb, so hopefully this one is easy. I have been searching all over the internet and I can't seem how to configure postfix to forward wildcard emails to another email account. This comes out of the need to handle bounced emails to maintain my email list. I read that a good strategy is to embed the userID in the return-path of all emails being sent out, and if they bounce, you can send all the bounced emails to a catchall account, then process them from there, grab the userID and remove the user from the mailing list. Well, I wrote all the code to do that, I pull emails from an exchange account, parse out the userid, and remove it if it's a hard bounce, it works great, but I can't figure out how to forward the emails to the catchall account. I looked at alias, but I couldn't get it to work. I also looked at VERP, but I don't think it's what I want. for example <[email protected]> ends up in <[email protected]> <[email protected]> ends up in <[email protected]> <[email protected]> ends up in <[email protected]> <[email protected]> ends up in <[email protected]> etc... thank you very much for any input or direction you could provide!
You can do that using the virtual transport, so this depends on how your postfix is implemented if you are not using external storage ie a database do this Edit /etc/postfix/virtual Code: @example.com <user_to_get_all_unknown> Then run Code: postmap /etc/postfix/virtual postfix reload
Thanks for the reply. I looked at this virtual domain, and the problem is that I already have a catchall account setup on my domain. @example -> [email protected] so, I was hoping in postfix, I could set up some sort of wildcard address that forwarded "bounced*@example.com" -> [email protected] so that anything that was emailed to bounce<anything else>@example.com would show up in [email protected]'s mailbox. i guess if all else fails, I could send emails from a sub-domain and have another catch-all on that sub-domain which I could assume would only be bounced-emails. But I would prefer to not have to set up a sub-domain. Thanks again for any input.
I think you can do that i have never tried but give it a try although i think bounce* to bounce will give you a mail loop