websnail.net

Well-Known Member
Mar 24, 2002
45
4
308
Incomplete email receive causing loop

I've been having fun with a clients account which houses multiple domains and in this instance we seem to have found a problem that results in a loop.

The setup is as follows:
- domain.com is domain forwarded to domain.co.uk

Normally this would be great but what seems to happen is that when anyone tries to cover the bases and sends an email to:

[email protected]; [email protected]

... the whole thing ends up in a very long loop with emails being constantly forwarded again and again..

Whatever script task is happening is not removing the forwarded domain and so it keeps repeating the email without alteration and looping.


Strikes me as a bug and something that has to be hitting other people in similar situation so has anyone got any input on ways to avoid or resolve this that don't involve telling the end-users clients not to email to both addresses.

Thanks in advance...
 
Last edited:

Lyttek

Well-Known Member
Jan 2, 2004
775
5
168
There must be something else going on, as the setup you describe doesn't create a loop.

Based on the information given:

message leaves sender's server via two connections: 1) to mail.domain.com and 2) mail.domain.co.uk

Message 2 arrives at mail.domain.co.uk and is delivered to [email protected] mailbox.

Message 1 arrives at mail.domain.com and is forwarded to mail.domain.co.uk and is delivered to the [email protected] mailbox.

Unless there is sometype of forwarding, alias, autoresponder, filtering or etc. somewhere else in the path, there isn't a loop. They'll get two copies of the message, however.
 

websnail.net

Well-Known Member
Mar 24, 2002
45
4
308
Thanks for that Lyttek..

I'm starting to suspect the problem is caused by some external email client rules being setup that I haven't been able to locate to date...
 

websnail.net

Well-Known Member
Mar 24, 2002
45
4
308
OK... I was willing to accept this might be a problem with the local settings but I've started seeing the same issue myself on a completely seperate server and machine that I have a few suspicions as to what's going on.

The situation seems to be that the mail server drops the connection and then restarts without marking received emails as received... It's only when the email client actually manages to get all the way through the email that it marks everything as received and leaves well alone.

I'm taking stabs in the dark here but it's very frustrating and because I know my email client hasn't changed in months I'm left with the distinct feeling that the issue is Cpanel related.

My theory may be out of whack btw... but I do know that I do end up with a loop where email gets delivered again and again and again for quite some time.


Any ideas?
 

websnail.net

Well-Known Member
Mar 24, 2002
45
4
308
Ok.... after a little bad/good luck I've started seeing the behaviour I mistakenly took for a domain loop occuring on one of my own accounts.


What's happening is that an account starts getting checked by a POP3 mail client and as it works its way through the mailbox it downloads all the messages until it fails for whatever reason.

At this point you have some of the emails in your inbox but my mistake was in assuming there was a loop.. In fact what appears to be happening is that the mailbox is not marking anything off as "Received" so when the account is next checked it starts at the beginning all over again and repeats the process.

This gives the impression of a loop when in fact it seems to be a corrupted mailbox..

Checking the same account in IMAP indicates a few suspiciously empty emails and a slew of spam that spamassassin seems to have just died on...

These consisted of something like this:

Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Wed, 11 Oct 2006 05:59:31 +0000
Received: from [222.252.83.173] (helo=yuvb.a6vt2oo.rr.com)
by mydomain.com with esmtp (Exim 4.52)
id 1GXX7q-0001xv-Mc
for [email protected]; Wed, 11 Oct 2006 05:59:30 +0000
X-Antivirus: avast! (VPS 0641-2, 10/10/2006), Inbound message
X-Antivirus-Status: Clean

Removing them using IMAP and then setting the POP3 client to retrieve messages again seemed to do the trick so I'm wondering if this format is corrupting the mailbox and causing the issue... and if so, how can we stop it happening again?
 

websnail.net

Well-Known Member
Mar 24, 2002
45
4
308
At the risk of sounding petulant it's a little frustrating to be having this conversation with myself...

So far I'm still unsure as to the root cause of the issue but I've learned along the way that Cpanel doesn't properly get rid of it's disablespamd file...


Anyway, the host in question has a fortigate anti-virus system in front of my server on the net so could this be a potential cause? Or does anyone have any insight as to the problems I've spotted?

Anyone?