email forwarding anti loop mechanism
Today it seems Plesk is not able to manage a simple mail forwarder configuration like the following:
pippo@domain.com (local address) forwarding to pluto@domain.com (local address)
pluto@domain.com (local address) forwarding to pippo@domain.com (local address)
This kind of configuration generates a mail-forwarding-loop, but it should be possible to avoid it and terminate the forwarding without issues.
This kind of configuration is simple and immediately working on cPanel based systems (tested on several systems). in my specific case, I migrated from cPanel to Plesk a company mail server and now I'm experiencing big complaints because I'm not able to preserve this simple configuration with Plesk.
Thank you for your input!
Unfortunately, we have to close your request, because over the years it has not become quite popular for further implementation.
—
IG
-
Deepak M commented
Yes in cpanel it works, basically it mail server functionality not control panel
cpanel use exim and plesk use postfix / qmail -
Bryan commented
Plesk has no interface to Maildir delivery, but it's super-easy to set up manually. You'll use the .qmail file, located above your Maildir directory. Here's mine:
/mail/mailnames/<domain>/<account>/.qmail
/mail/mailnames/<domain>/<account>/Maildir/
The .qmail file has a bunch of options: http://qmail.org/man/man5/dot-qmail.html
It can forward e-mail, which is another way to create the same mail forwarding loop problem.
It can also run a shell command.
It can also append to an mbox.
It can also deposit into a Maildir -- that's what we want here:
[ /mail/mailnames/<domain>/joe/.qmail ]
/mail/mailnames/<domain>/jill/Maildir/
[ /mail/mailnames/<domain>/jill/.qmail ]
/mail/mailnames/<domain>/joe/Maildir/
A few funny things:
First, apparently this just copies the file into the other Maildir. So obviously, since it hasn't been re-routed through e-mail, headers don't change as they otherwise would.
Second, plesk also uses this file. When you set up normal forwarding in plesk, it writes to this file -- either to add or to remove your forward. But plesk avoids changing anything else in the file. So this remains reliable.
So, there you go. Finally, after all these years, Joe and Jill can both receive incoming e-mails -- since they are equal business partners, yay! -
Bryan commented
I've needed this for years -- and now I'm stuck with an even more exotic version of this -- I'm redirecting across servers, my domain exists on two different plesk servers, and while the first routes to the second, the second fails thinking that it's a loop by address, not realizing that it's never seen the e-mail before:
server 1: user@domain.com forwards to user@newdomain.com
server 2: newdomain.com is a domain alias of domain.com
domain.com's dns has switched from server1 to server2.
server 1 correctly forwards user@domain.com to server2's user@newdomain.com
server2 correctly forwards user@newdomain.com to user@domain.com
server 2 then screams mail forward loop, because user@domain.com appears already, even though server 2 never saw it before!cpanel, and others, work either because they do "local delivery", which simply deposits into the mailbox without going through e-mail routing, or because they look for 2-appearances to detect mail forwarding loops, not just one.