Ok, I didn't explain my problem clear. It is this way:
First a mail from mail@motograndprix.com was sent to klodoma@ar-sd.net. This
email was rejected because I worked in the postfix settings, and I did
something wrong. Due to this reject an email was sent from ar-sd.net to
mail@motograndprix.com to announce this reject. This second email which was
sent from my host(ar-sd.net) is always rejected(relay), but the email was
always resend.
My question was: how can I delete the email from the mail queue after it was
rejected. So that it is not sent anymore.
I think I understanded clearly from the logs what happened. ( I hope so).
Mar 16 04:07:54 linz postfix/smtpd[11405]: NOQUEUE: reject: RCPT from
unknown[62.77.58.234]: 504 <c015836-srv7>: Helo command rejected: need
fully-qualified hostname; from=
The Friday 2005-03-18 at 12:07 +0200, Andrei Bintintan wrote:
Due to a missconfiguration of my postfix I received an email which was not locally delivered. The postfix tries to send back the notification every time, but this notification is also rejected by the other host.
The original email:
Mar 16 04:07:27 linz postfix/smtpd[11405]: connect from unknown[62.77.58.234] Mar 16 04:07:50 linz postfix/smtpd[11405]: warning: 234.58.77.62.ipwhois.rfc-ignorant.org: RBL lookup error: Host or domain name not found. Name service error for name=234.58.77.62.ipwhois.rfc-ignorant.org type=A: Host not found, try again Mar 16 04:07:54 linz postfix/smtpd[11405]: NOQUEUE: reject: RCPT from unknown[62.77.58.234]: 504 <c015836-srv7>: Helo command rejected: need fully-qualified hostname; from=
to= proto=ESMTP helo=<c015836-srv7> Mar 16 04:07:55 linz postfix/smtpd[11405]: disconnect from unknown[62.77.58.234] This is the response that postfix sends from since the original email was rejected...:
Mar 18 11:30:15 linz postfix/smtpd[32135]: connect from unknown[62.77.58.234] Mar 18 11:30:39 linz postfix/smtpd[32135]: NOQUEUE: reject: RCPT from unknown[62.77.58.234]: 450
: Sender address rejected: undeliverable address: host mx2.intelideas.com[217.75.254.201] said: 554 : Relay access denied (in reply to RCPT TO command); from= to= proto=ESMTP helo=<c015836-srv7> Mar 18 11:30:39 linz postfix/smtpd[32135]: disconnect from unknown[62.77.58.234] So, how can I drop/delete this kind of rejected emails? Postfix tries to resend this email for 2 days. I couldn't find this mail in the mail queue.
If the command "mailq" does not show that email, it is not in your system, and postfix is not trying to resend it. It doesn't exist. IMO.
What I see from your logs, is, that the first one is rejected because it lacks a fully qualified host name. (The warning above it I don't fully understand). Notice the "NOQUEUE" and that it is rejected at the HELO stage.
In the second case, it seems that unknown[62.77.58.234] is trying to relay through your system (sending an email from mail@motograndprix.com to klodoma@ar-sd.net, and you are not ar-sd.net), and postfix rejects him. That is correct.
Hold on, you really are "ar-sd.net", are you? Is your machine handling email fro that domain? There are things about your setup i don't know.
I think he tried one way, got rejected, and then tried another. Block him in the firewall. Investigate why he is trying to relay through your system, and why your postfix considers an email to you as a relay.
-- Cheers, Carlos Robinson
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com