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. How do I keep a copy? |
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;
from a working setup here at my workplace: Code:
miguel: miguel myexternaladdress@hotmail.com |
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. postfix/virtual[5276]: 356CC540D117: to=<forumadmin.archive@ example.net>, relay=virtual, delay=0.1, delays=0.06/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to maildir) postfix/virtual[5276]: 356CC540D117: to=<forumadmin.archive@ example.net>, orig_to=<forumadmin@example.net>, relay=virtual, delay=0.1, delays=0.06/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to maildir) postfix/virtual[5276]: 356CC540D117: to=<forumadmin@ example.net>, relay=virtual, delay=0.11, delays=0.06/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to maildir) 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? |
Quote:
http://forums.gentoo.org/viewtopic-t...8.html#6463502 Keeps a local copy, forwards the email, and doesn't deliver multiple copies. Regards, Chris K. |
All times are GMT -5. The time now is 09:40 AM. |