Koozali.org: home of the SME Server

Emails sent several times from SME server

Offline albatroz

  • *****
  • 159
  • +0/-0
Emails sent several times from SME server
« on: November 08, 2005, 05:29:56 PM »
A user (in another company) we exchange email regularly is reporting that he is receiving emails coming from my SME 6.01 box repeatedly 5 or 7 times.

The received messages are not spam or worms but normal email messages..

yiibong

Emails sent several times from SME server
« Reply #1 on: November 09, 2005, 05:49:40 PM »
yes, it is happened to me too without any reason, i am also confuse it.

geo

Emails sent several times from SME server
« Reply #2 on: November 10, 2005, 07:05:31 AM »
i have same problem with big e-mails

tandum

Emails sent several times from SME server
« Reply #3 on: November 10, 2005, 03:49:29 PM »
I struck the same problem today with sme 7b5. It looked like clamd was hanging or sleeping on the server so the clients outbox had not been cleared after a send. The client appears to resend it's outbox at the client side set interval. I guess the previous send did not complete.

I eventually had workstations receiving messages about too many connections being open and the qmail queue had many identically sized e-mails trying to get out. Webmail would also hang when trying to send.

Using ps aux, I saw multiple qpsmtpd processes and spawned clamd jobs all sleeping but I couldn't find anything in the logs to tell me why. I turned off virus scan, stopped qpsmtpd and clamd, qmail wouldn't stop but I cleared the queue anyway. I then restarted the server and the email clients on all the workstations to get it all working again.

Offline albatroz

  • *****
  • 159
  • +0/-0
Emails sent several times from SME server
« Reply #4 on: January 13, 2006, 02:26:28 AM »
I am going to disable antivirus scanning on outgoing messages and see if this fixes the problem

Offline albatroz

  • *****
  • 159
  • +0/-0
Emails sent several times from SME server
« Reply #5 on: January 17, 2006, 08:32:48 PM »
Well, I disabled the antivirus in outgoing messages, but the problem remains...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Emails sent several times from SME server
« Reply #6 on: January 17, 2006, 08:44:25 PM »
Quote from: "albatroz"
A user (in another company) we exchange email regularly is reporting that he is receiving emails coming from my SME 6.01 box repeatedly 5 or 7 times.


The problem is at his end. The SME mail system will not delete a message from its outgoing queue until the remote end acknowledges that it has received it completely. If the remote end receives and delivers part of the message, or receives the full message, and delivers it, but doesn't return a "complete" status to the SME server, then the SME server will try to deliver it again. Check your qmail logs for the delivery status of those messages.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Emails sent several times from SME server
« Reply #7 on: January 17, 2006, 08:46:55 PM »
Quote from: "tandum"
I struck the same problem today with sme 7b5.
...
I eventually had workstations receiving messages about too many connections being open and the qmail queue had many identically sized e-mails trying to get out. Webmail would also hang when trying to send.

Using ps aux, I saw multiple qpsmtpd processes and spawned clamd jobs all sleeping but I couldn't find anything in the logs to tell me why.


Did you report these problems in the Bug Tracker? If not, please do so now.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Emails sent several times from SME server
« Reply #8 on: January 17, 2006, 08:54:48 PM »
Quote from: "CharlieBrady"

The problem is at his end.


Or maybe not. As someone else said, it's possible for a message to be sent multiple times from the Send folder of a mail client, if the same problem of co-ordination occurs.

The simple solution to this problem is likely to be not to send very large email messages. Put the files that you want to send into an i-bay, and send a URL to your colleague.

Offline albatroz

  • *****
  • 159
  • +0/-0
Emails sent several times from SME server
« Reply #9 on: January 17, 2006, 09:03:53 PM »
Inside my qmail current file log, I could find several messages like this....

And as it was before this problem occurs only with BIG emails

@4000000043ccb00d1854050c warning: trouble opening remote/10/786564; will try again later
@4000000043ccb00d18541894 warning: trouble opening remote/10/786564; will try again later
@4000000043ccb00d18542064 warning: trouble opening remote/10/786564; will try again later
@4000000043ccb0161853c68c warning: trouble opening remote/10/786564; will try again later
@4000000043ccb01a1853ddfc warning: trouble opening remote/10/786564; will try again later
@4000000043ccb01c1852f39c warning: trouble opening remote/10/786564; will try again later
@4000

Jon_Reynolds

Emails sent several times from SME server
« Reply #10 on: January 18, 2006, 02:18:05 AM »
This might not solve the problem but I thought I would put it in here.

I found this on the qmail mailing list, I am quoting Scott Gifford who answerd the post with the subject line of :

 Same emaill coming through multiple times.

It sounds like a mail server is timing out somewhere.  There's a time
period in SMTP, between sending the DATA command and receiving a
response, where it's impossible to know whether the message has been
succesfully sent.  If a mail server does something slow between the
DATA command and sending its response (like scan for viruses or spam
on a busy server), an SMTP client may time out waiting for the DATA
response, and decide to re-send the message.  In the meantime, the
server may have finished with the message and delivered it before
noticing that the client has gone away.

If your server is the SMTP client in this scenario, increase your
timeouts.  If it's the SMTP server, speed up your mail processing.
Either way, your logs should give more details.

Good luck!

I also found this while searching google on that error:

qmail had preprocessed a message and decided that it had to be delivered remotely, and put a file into the remote/15 directory to tell qmail-send that this email was waiting to be sent.

qmail-send then tried to send it (via qmail-rspawn) but found that it could not open the file.

Two possible problems: Either qmail-send was over-eager and tried to read the file before it got completely written and closed (possible, but unlikely unless you have a very large email load on your system), or there was a disk faliure and that file got corrupted.

If you're running linux and your system has crashed any time recently, it is almost certainly a problem of corrupt metadata; fscking the disk should fix it.

Hope that helps,

Jon