Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't delete mail from queue which does not route to host #793

Open
hostingnuggets opened this issue Jun 25, 2017 · 12 comments
Open

Can't delete mail from queue which does not route to host #793

hostingnuggets opened this issue Jun 25, 2017 · 12 comments
Assignees
Labels

Comments

@hostingnuggets
Copy link

I am using OpenSMTPD 6.0.2p1 as smart host and have the following mail stuck my queue:

e2355b9a1d9e4851|inet4|mta||@|klikbcabisnis@klikbca.com|klikbcabisnis@klikbca.com|1498116150|1498461750|1498402916|0|inflight|97|

I tried to remove it using:

smtpctl remove e2355b9a1d9e4851

but somehow it re-appears again in the queue. Even more annoying is the following log messages which appear every 15 seconds

Jun 25 17:02:11 smhost smtpd[3122]: smtp-out: Enabling route [] <-> 202.6.210.36 (smtp.klikbca.com)
Jun 25 17:02:12 smhost smtpd[3122]: 2fe76864626d3773 mta event=connecting address=smtp+tls://202.6.210.36:25 host=smtp.klikbca.com
Jun 25 17:02:12 smhost smtpd[3122]: 2fe76864626d3773 mta event=error reason=IO Error: No route to host
Jun 25 17:02:12 smhost smtpd[3122]: smtp-out: Disabling route [] <-> 202.6.210.36 (smtp.klikbca.com) for 15s

So my question here really is how can I get rid of this mail for ever without having to wait the default 4 days of expiring?

Thanks.

@hostingnuggets
Copy link
Author

Just a short update, it is now over 5 days that this message is in the queue and I can't get rid of it and neither does it seem to disappear from the queue. After so much time think I don't think this is an expected behavior from OpenSMTPD. I would be glad if someone can look into this and let me know if there is a workaround to get rid of this never ending message in the queue.

@poolpOrg
Copy link
Member

poolpOrg commented Sep 1, 2018

The issue has been discussed with @ericfaurot and is well understood:

It is not possible to remove envelopes that are inflight and due to how the MTA currently buffers envelopes, it is possible that an envelope remains inflight for way too long when a route is temporarily invalidated.

We will look into a quick fix though the real fix is known and will be handled as part of #800

@poolpOrg poolpOrg added this to the OpenSMTPD 6.4.0 milestone Sep 1, 2018
@hostingnuggets
Copy link
Author

@poolpOrg cheers for the news, looking forward to version 6.4.0 👍

@zoot
Copy link

zoot commented Oct 29, 2019

@poolpOrg - may I ask when this bug might be tackled and squashed?

I know it's in the to do list for MTA layer rewrite

I'm revisiting OpenSMTPD for my systems, but realise that this bug was one of my show-stoppers for considering it for production, since one wouldn't be able to clear the queue of spam, or messages injected by rogue email clients in the event of flooding.

@poolpOrg
Copy link
Member

The plan is to have the MTA layer rewrite done for the 6.7.0 release.

@dimpase
Copy link

dimpase commented Aug 5, 2020

I'm on 6.7, and still cannot remove that kind of messages.

@savchenko
Copy link

Same here. Is there a way to delete invalid envelopes from the queue while one is experimenting with OpenSMTPd?

@buzmeg
Copy link

buzmeg commented Jan 7, 2021

I'm seeing this issue as well. I can delete the envelopes with "smtpctl remove all" and mailq reports that they're gone. However, if I do "/etc/rc.d/smtpd restart" they all come back.

Thanks.

@ghost
Copy link

ghost commented Sep 21, 2021

6.8.0p2-3 and this issue still persist.

@serhanekicii
Copy link

7.0, still persist.

@simeonmiteff
Copy link

FYI I worked around this by stopping smtpd, finding the message in /var/spool/smtp with grep and deleting the two related files and then restarting smtpd.

@sec
Copy link

sec commented May 17, 2022

Can confirm that I also hit this issue using 6.8.0p2,
After removing envelope from queue, it was still trying to deliver, doing restart fixed the issue

May 17 10:35:32 mail smtpd[736]: 3a7b6c4a16fe8b18 mta connecting address=smtp://91.234.194.166:25 host=louiseslaviero.com
May 17 10:35:34 mail smtpd[736]: 3a7b6c485dcbd1b4 mta error reason=IO Error: No route to host
May 17 10:35:34 mail smtpd[736]: smtp-out: Disabling route [] <-> 91.234.194.243 (louiseslaviero.com) for 15s
May 17 10:35:34 mail smtpd[736]: 3a7b6c4b80306f36 mta connecting address=smtp://185.98.128.49:25 host=louiseslaviero.com
May 17 10:35:37 mail smtpd[731]: Exiting
May 17 10:35:37 mail smtpd[61497]: info: OpenSMTPD 6.8.0p2 starting
May 17 10:35:37 mail smtpd[61503]: warn: queue: no return path!
May 17 10:35:37 mail smtpd[61503]: relay: Expire for e5210d4af6eec745: from=<@>, to=<contact@louiseslaviero.com>, rcpt=<->, delay=9d6h18m31s, stat=Envelope expired
May 17 10:37:24 mail smtpd[61513]: info: OpenSMTPD 6.8.0p2 starting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests