Page 1 of 1

email looping on server

Posted: Wed Oct 31, 2007 5:37 am
by willyika
i wrongly type the email address ( abc@yahoo.com as abc@yhoo.com), and the error message i receive is like the following:

Subject: Warning: could not send message for past 4 hours


**********************************************
** THIS IS A WARNING MESSAGE ONLY **
** YOU DO NOT NEED TO RESEND YOUR MESSAGE **
**********************************************

The original message was received at Tue, 30 Oct 2007 18:48:32 +0800
from localhost.localdomain [127.0.0.1]

----- Transcript of session follows -----
<abc@yhoo.com>... Deferred: Connection refused by yhoo.com.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old


can someone help me how to remove this mail from server so that this mail will not keep continue looping on the server..

Posted: Wed Oct 31, 2007 7:21 am
by Valerion
On your server, run mailq. You'll get output like the following:

Code: Select all

                /var/spool/mqueue (2 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
l9T0Z0UA000957     7804 Mon Oct 29 02:35 MAILER-DAEMON
                 (host map: lookup (bankofchina.com.hk): deferred)
                                         <info@bankofchina.com.hk>


The message ID is l9T0Z0UA000957 in this case. Now go to /var/spool/mqueue and delete *l9T0Z0UA000957 (usually dfl9T0Z0UA000957, qfl9T0Z0UA000957 and xfl9T0Z0UA000957). Run mailq again to verify the message is now gone.

email looping on server

Posted: Thu Nov 01, 2007 3:15 am
by willyika
thanks a lot,

to delete the mail, is it any other command beside i use:

rm -f file *l9T0Z0UA000957

...

Posted: Thu Nov 01, 2007 6:44 am
by Valerion
Remove the word "file", otherwise you are spot on. -f will force a delete without promting, which can be dangerous if you're not careful. -i (default on RH, at least) will prompt for each file.

Posted: Thu Nov 01, 2007 7:33 pm
by adhodgson
Hi,

Just for reference, this message is not looping, it is just in the queue waiting for a server to respond and accept it. It will remove itself in a few days, and is perfectly normal behaviour.

Thanks.
Andrew.