Re: Recommended method for blasting the queue clean- can smtpctl be used?
On Thu, Feb 25, 2016 at 10:17:55AM -0800, Seth wrote: > On Tue, 23 Feb 2016 21:44:22 -0800, Sunil Nimmagadda> wrote: > >This was committed the same day as I shared the diff on list... > > > >commit 376147cc2686eca13e1ade1d121be2c5074c178b > >Author: Sunil Nimmagadda > >Date: Thu Jul 2 19:38:07 2015 +0530 > > > >Let "resume envelope", "pause envelope" and "remove" subcommands > >accept "all" as a valid argument. > > That's odd because it does not seem to be available in the 5.7.3 release > > $ sudo smtpd -h > version: OpenSMTPD 5.7.3 > usage: smtpd [-dhnv] [-D macro=value] [-f file] [-P system] [-T trace] > > $ sudo smtpctl remove all > possibilities are: > remove > remove > yes, the release was a bugfix release, new features were not backported. remove all will be part of the next major release scheduled in 2 months. in the meantime (untested): smtpctl show queue |\ cut -d\| -f1 |\ while read line; do smtpctl remove ${line}; done -- Gilles Chehade https://www.poolp.org @poolpOrg -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Re: Recommended method for blasting the queue clean- can smtpctl be used?
> Can someone please commit Sunil's patch below to the main code base when > they get a chance? This was committed the same day as I shared the diff on list... commit 376147cc2686eca13e1ade1d121be2c5074c178b Author: Sunil NimmagaddaDate: Thu Jul 2 19:38:07 2015 +0530 Let "resume envelope", "pause envelope" and "remove" subcommands accept "all" as a valid argument. > > Removing all the spammer's bogus email destinations from my queue one at a > time is painful. > > > On Thu, 02 Jul 2015 01:44:10 -0700, Sunil Nimmagadda > wrote: > > > As far I can see, the smtpctl is capable of... > > smtpctl remove all > > smtpctl resume envelope all > > smtpctl pause envelope all > > > > just like... > > smtpctl schedule all > > > > but a cmd_install of the "all" variant is missing. This diff works > > for me, could you try... > > > > diff --git a/smtpd/smtpctl.8 b/smtpd/smtpctl.8 > > index fa7a661..9369234 100644 > > --- a/smtpd/smtpctl.8 > > +++ b/smtpd/smtpctl.8 > > @@ -99,6 +99,8 @@ Generated bounces. > > .It Cm pause envelope Ar envelope-id | message-id > > Temporarily suspend scheduling for the envelope with the given ID, > > or all envelopes with the given message ID. > > +.It Cm pause envelope all > > +Temporarily suspend scheduling all the envelopes. > > .It Cm pause mda > > Temporarily stop deliveries to local users. > > .It Cm pause mta > > @@ -119,9 +121,13 @@ imsg, to profile cost of event handlers > > .El > > .It Cm remove Ar envelope-id | message-id > > Remove a single envelope, or all envelopes with the same message ID. > > +.It Cm remove all > > +Remove all envelopes. > > .It Cm resume envelope Ar envelope-id | message-id > > Resume scheduling for the envelope with the given ID, > > or all envelopes with the given message ID. > > +.It Cm resume envelope all > > +Resume scheduling all the envelopes. > > .It Cm resume mda > > Resume deliveries to local users. > > .It Cm resume mta > > diff --git a/smtpd/smtpctl.c b/smtpd/smtpctl.c > > index e45a0a0..fa9642e 100644 > > --- a/smtpd/smtpctl.c > > +++ b/smtpd/smtpctl.c > > @@ -990,14 +990,17 @@ main(int argc, char **argv) > > cmd_install("monitor", do_monitor); > > cmd_install("pause envelope ", do_pause_envelope); > > cmd_install("pause envelope ", do_pause_envelope); > > + cmd_install("pause envelope all", do_pause_envelope); > > cmd_install("pause mda",do_pause_mda); > > cmd_install("pause mta",do_pause_mta); > > cmd_install("pause smtp", do_pause_smtp); > > cmd_install("profile ",do_profile); > > cmd_install("remove ", do_remove); > > cmd_install("remove ", do_remove); > > + cmd_install("remove all", do_remove); > > cmd_install("resume envelope ", do_resume_envelope); > > cmd_install("resume envelope ", do_resume_envelope); > > + cmd_install("resume envelope all", do_resume_envelope); > > cmd_install("resume mda", do_resume_mda); > > cmd_install("resume mta", do_resume_mta); > > cmd_install("resume route ", do_resume_route); > > > > > -- > Using Opera'smail client: http://www.opera.com/mail/ > > -- > You received this mail because you are subscribed to misc@opensmtpd.org > To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org > -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Re: Recommended method for blasting the queue clean- can smtpctl be used?
Can someone please commit Sunil's patch below to the main code base when they get a chance? Removing all the spammer's bogus email destinations from my queue one at a time is painful. On Thu, 02 Jul 2015 01:44:10 -0700, Sunil Nimmagaddawrote: As far I can see, the smtpctl is capable of... smtpctl remove all smtpctl resume envelope all smtpctl pause envelope all just like... smtpctl schedule all but a cmd_install of the "all" variant is missing. This diff works for me, could you try... diff --git a/smtpd/smtpctl.8 b/smtpd/smtpctl.8 index fa7a661..9369234 100644 --- a/smtpd/smtpctl.8 +++ b/smtpd/smtpctl.8 @@ -99,6 +99,8 @@ Generated bounces. .It Cm pause envelope Ar envelope-id | message-id Temporarily suspend scheduling for the envelope with the given ID, or all envelopes with the given message ID. +.It Cm pause envelope all +Temporarily suspend scheduling all the envelopes. .It Cm pause mda Temporarily stop deliveries to local users. .It Cm pause mta @@ -119,9 +121,13 @@ imsg, to profile cost of event handlers .El .It Cm remove Ar envelope-id | message-id Remove a single envelope, or all envelopes with the same message ID. +.It Cm remove all +Remove all envelopes. .It Cm resume envelope Ar envelope-id | message-id Resume scheduling for the envelope with the given ID, or all envelopes with the given message ID. +.It Cm resume envelope all +Resume scheduling all the envelopes. .It Cm resume mda Resume deliveries to local users. .It Cm resume mta diff --git a/smtpd/smtpctl.c b/smtpd/smtpctl.c index e45a0a0..fa9642e 100644 --- a/smtpd/smtpctl.c +++ b/smtpd/smtpctl.c @@ -990,14 +990,17 @@ main(int argc, char **argv) cmd_install("monitor",do_monitor); cmd_install("pause envelope ", do_pause_envelope); cmd_install("pause envelope ", do_pause_envelope); + cmd_install("pause envelope all", do_pause_envelope); cmd_install("pause mda", do_pause_mda); cmd_install("pause mta", do_pause_mta); cmd_install("pause smtp", do_pause_smtp); cmd_install("profile ",do_profile); cmd_install("remove ", do_remove); cmd_install("remove ", do_remove); + cmd_install("remove all", do_remove); cmd_install("resume envelope ", do_resume_envelope); cmd_install("resume envelope ", do_resume_envelope); + cmd_install("resume envelope all",do_resume_envelope); cmd_install("resume mda", do_resume_mda); cmd_install("resume mta", do_resume_mta); cmd_install("resume route ", do_resume_route); -- Using Opera's mail client: http://www.opera.com/mail/ -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Recommended method for blasting the queue clean- can smtpctl be used?
I discovered I had thousands of message stuck in my queue from running some stress tests earlier which needed removal. Apparently the 'smtpctl remove evpid|msgid' command does not support wild cards. Instead, I changed to /var/spool/smtpd/queue and ran this command with root privs: # 'find . -type f -exec rm {} \;' That seemed to do the trick but was wondering if there's any way to accomplish the same via the smtpctl utility. -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org