Postfix - forward email to another address and keep a copy in the mailbox
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Postfix - forward email to another address and keep a copy in the mailbox
Hi, I have postfix setup using LDAP and virtual domains, here is the line that got forwarding working:
virtual_alias_maps = ldap:aliases, ldap:virtualforward
This forwards the mail to a different address properly but I've had requests for it to keep a copy in the mailbox.
I have a field in ldap for forwarding yes/no then a field for forward address. I have a couple business partners that have their email at my domain forwarded to theirs but they also want a copy to stay on my server so they can check it(and reply or whatever) from my domain.
in the alias map, add both addresses: the forwarded address and the local. Postfix is smart enough to not get into a loop and retains one copy for the local address;
In my LDAP directory I included both forward address and the local address. When an email is sent to the local address a copy is stored in the local address mailbox, which is exactly what I want.
The problem is the forward address receives multiple copies of the email.
The setup I am trying to achieve is a email archive. All email sent to the address forumadmin@ example.net will also goto the email address forumadmin.archive@ example.net. When I check the forumadmin.archive mailbox multiple copies of all email reside in this mail box.
As you can see from the above log file, mail sent to forumadmin@ example.net is sent to the archive account, but multiple copies are delivered.
Does anyone know why this occurs?
In my LDAP directory I included both forward address and the local address. When an email is sent to the local address a copy is stored in the local address mailbox, which is exactly what I want.
The problem is the forward address receives multiple copies of the email.
The setup I am trying to achieve is a email archive. All email sent to the address forumadmin@ example.net will also goto the email address forumadmin.archive@ example.net. When I check the forumadmin.archive mailbox multiple copies of all email reside in this mail box.
As you can see from the above log file, mail sent to forumadmin@ example.net is sent to the archive account, but multiple copies are delivered.
Does anyone know why this occurs?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.