Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

manually expire mail in queue

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


mail at oliwel

May 26, 2009, 1:23 AM

Post #1 of 12 (3407 views)
Permalink
manually expire mail in queue

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi All,

I guess this question has a simple answer, but I was unable to find it.
Short: Is there a way to remove a message from the queue in a way that
the sender gets an NDR?
I run qmHandle which allows me to delete a message from the queue but
this would not inform the sender about the deletion.

The Long: From time to time I get malformed mails that qmail is unable
to handle properly (Colons or Whitespace in Headers) and which stay in
the local queue until they are rejected after 5 days. From my
perspective, local mails should never need more than a second to get
delivered (as long as system load is fine) and so I am alerted if there
are mails stuck in the local queue as it usually inidcates a problem.

Any help is appreciated.

Oliver
- --
Protect your environment - close windows and adopt a penguin!
PGP-Key: 3B2C 8095 A7DF 8BB5 2CFF 8168 CAB7 B0DD 3985 1721
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkobpvoACgkQyrew3TmFFyG1VQCfYEgd51FvcKHbxCY4U8+B2S3k
qekAnjhTiASdEVi+RdvY/beXcs23A1M4
=wPeb
-----END PGP SIGNATURE-----


hanche at math

May 26, 2009, 3:04 AM

Post #2 of 12 (3305 views)
Permalink
Re: manually expire mail in queue [In reply to]

+ Oliver Welter <mail [at] oliwel>:

> I guess this question has a simple answer, but I was unable to find it.
> Short: Is there a way to remove a message from the queue in a way that
> the sender gets an NDR?

Just do the reverse of item 7.3 in the FAQ: Backdate the message's
file in /var/qmail/queue/mess/ by a week of more. Next time qmail
tries to deliver the message, it is bounced with a "been in the queue
too long" message. (If you have GNU touch, use touch -d '7 days ago'.)

> the local queue until they are rejected after 5 days. From my
> perspective, local mails should never need more than a second to get
> delivered (as long as system load is fine)

or a user has set the sticky bit on the home directory in order to
edit .qmail.

- Harald


qmail-07 at jeremykister

May 26, 2009, 6:10 AM

Post #3 of 12 (3302 views)
Permalink
Re: manually expire mail in queue [In reply to]

On 5/26/2009 4:23 AM, Oliver Welter wrote:
> Short: Is there a way to remove a message from the queue in a way that
> the sender gets an NDR?

install qmqtool; qmqtool -e <msg#>

qmail-send will then do what's appropriate (possibly generating that NDR
you want) the next time it checks on that message.

> The Long: From time to time I get malformed mails that qmail is unable
> to handle properly (Colons or Whitespace in Headers) and which stay in
> the local queue until they are rejected after 5 days. From my

are you using and older version of vpopmail to manage virtual domains? if
so, this might be fixed by upgrading it instead of having to work around
the problem.

--

Jeremy Kister
http://jeremy.kister.net./


mail at oliwel

May 26, 2009, 11:14 AM

Post #4 of 12 (3324 views)
Permalink
Re: manually expire mail in queue [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Jeremy,

Jeremy Kister schrieb:

> install qmqtool; qmqtool -e <msg#>

Hey looks great - nice replacement/enhancement to qmHandle.

>> The Long: From time to time I get malformed mails that qmail is unable
>> to handle properly (Colons or Whitespace in Headers) and which stay in
>> the local queue until they are rejected after 5 days. From my
>
> are you using and older version of vpopmail to manage virtual domains?
> if so, this might be fixed by upgrading it instead of having to work
> around the problem.

I currently have 5.4.26 installed, so its not that old. The errors a
definitly RFC Viloations

Oliver

- --
Protect your environment - close windows and adopt a penguin!
PGP-Key: 3B2C 8095 A7DF 8BB5 2CFF 8168 CAB7 B0DD 3985 1721
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkocMYIACgkQyrew3TmFFyGmGQCeMp8yh1UfeF538Vo4Be8uQ0UU
Lr0An16gUvc5WWtXmFEqQGR6P3BpS85i
=u9Nt
-----END PGP SIGNATURE-----


feh at fehcom

May 26, 2009, 1:48 PM

Post #5 of 12 (3290 views)
Permalink
Re: manually expire mail in queue [In reply to]

Hi Oliver,

Am 26.05.2009, 19:14 Uhr, schrieb Oliver Welter <mail [at] oliwel>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Jeremy,
>
> Jeremy Kister schrieb:
>
>> install qmqtool; qmqtool -e <msg#>
>
> Hey looks great - nice replacement/enhancement to qmHandle.
>
>>> The Long: From time to time I get malformed mails that qmail is unable
>>> to handle properly (Colons or Whitespace in Headers) and which stay in
>>> the local queue until they are rejected after 5 days. From my
>>
>> are you using and older version of vpopmail to manage virtual domains?
>> if so, this might be fixed by upgrading it instead of having to work
>> around the problem.
>
> I currently have 5.4.26 installed, so its not that old. The errors a
> definitly RFC Viloations

Maybe. But I believe your diagnosis is wrong: qmail is 8 bit clean.

Even RFC (2)822 violating header should not harm (there is one bug
reported dealing with the header line AFIR).
There are, however, some routines which parse the header (token822.c).

Show us the qmail-send logs and perhaps post the email for inspection.

Thanks and regards.
--eh.


>
> Oliver
>
> - --
> Protect your environment - close windows and adopt a penguin!
> PGP-Key: 3B2C 8095 A7DF 8BB5 2CFF 8168 CAB7 B0DD 3985 1721
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkocMYIACgkQyrew3TmFFyGmGQCeMp8yh1UfeF538Vo4Be8uQ0UU
> Lr0An16gUvc5WWtXmFEqQGR6P3BpS85i
> =u9Nt
> -----END PGP SIGNATURE-----
>



--
Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de


mail at oliwel

May 26, 2009, 2:26 PM

Post #6 of 12 (3290 views)
Permalink
Re: manually expire mail in queue [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Erwin,

> I currently have 5.4.26 installed, so its not that old. The errors a
> definitly RFC Viloations
>
>> Maybe. But I believe your diagnosis is wrong: qmail is 8 bit clean.
>
>> Even RFC (2)822 violating header should not harm (there is one bug
>> reported dealing with the header line AFIR).
>> There are, however, some routines which parse the header (token822.c).
>
>> Show us the qmail-send logs and perhaps post the email for inspection.

There is nothing wrong with 8bit, its an unquoted colon in the "From"
Header Line - from qmail-send log (crlf added for readability):

qmail-inject:_fatal:_unable_to_parse_this_line:
/From:_CIRCLECULTURE_Cc:_News_<newsletter [at] circleculture>
/write_to_qmail-inject_failed:_32/system_error_calling_qmail-inject/

The message shows the following line:
From: CIRCLECULTURE Cc: News <newsletter [at] circleculture>

For me it looks like two header lines were joined together but the
interesting question is, if the MUA already breaks it, some MTA in
between broke it, or if its my own SpamAssassin/maildrop MX which messes
up the lines :(

I had a similar problem already last fall
http://www.gossamer-threads.com/lists/qmail/users/135715 were Harald
clearly showed that it is the unquotet colon.

Oliver

- --
Protect your environment - close windows and adopt a penguin!
PGP-Key: 3B2C 8095 A7DF 8BB5 2CFF 8168 CAB7 B0DD 3985 1721
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkocXmsACgkQyrew3TmFFyFylwCfWYC9D3vTbHuuqCI/FWAwHyrs
IJcAn1B4k7GMLPBMAFFRpEauEP7VTsEy
=Etf/
-----END PGP SIGNATURE-----


lists-qmail at maexotic

May 26, 2009, 2:53 PM

Post #7 of 12 (3303 views)
Permalink
Re: manually expire mail in queue [In reply to]

On Tue, May 26, 2009 at 11:26:03PM +0200, Oliver Welter wrote:
> qmail-inject:_fatal:_unable_to_parse_this_line:
> /From:_CIRCLECULTURE_Cc:_News_<newsletter [at] circleculture>
> /write_to_qmail-inject_failed:_32/system_error_calling_qmail-inject/

The message is already in the local queue, right?
So the problem (aside from RFC2822 encoding failure) is probably within
the .qmail file of the user the message is addressed to. It IMHO calls
either qmail-inject directly or /var/qmail/bin/sendmail and tries to get
some information (env-from) from the message on stdin, which fails.
Fix the .qmail file and the problems will be gone.

\Maex


mail at oliwel

May 26, 2009, 3:38 PM

Post #8 of 12 (3300 views)
Permalink
Re: manually expire mail in queue [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Maex,

Markus Stumpf schrieb:
> On Tue, May 26, 2009 at 11:26:03PM +0200, Oliver Welter wrote:
>> qmail-inject:_fatal:_unable_to_parse_this_line:
>> /From:_CIRCLECULTURE_Cc:_News_<newsletter [at] circleculture>
>> /write_to_qmail-inject_failed:_32/system_error_calling_qmail-inject/
>
> The message is already in the local queue, right?
correct

> So the problem (aside from RFC2822 encoding failure) is probably within
> the .qmail file of the user the message is addressed to. It IMHO calls
> either qmail-inject directly or /var/qmail/bin/sendmail and tries to get
> some information (env-from) from the message on stdin, which fails.
> Fix the .qmail file and the problems will be gone.

I use vpopmail with mysql backend, there is only the domains
.qmail-default file which contains simply
"| /usr/local/bin/vdelivermail '' bounce-no-mailbox"
and a single line containing another eMail-Address in the valias table
(in this case the delivery target was just a forward address)

Oliver
- --
Protect your environment - close windows and adopt a penguin!
PGP-Key: 3B2C 8095 A7DF 8BB5 2CFF 8168 CAB7 B0DD 3985 1721
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkocb2IACgkQyrew3TmFFyFPgQCfeu4dxhsGO2U1+OVKmGOML+oh
KikAni5m3B6o9zyUo9YxW1EEm+wqLN8t
=i/eX
-----END PGP SIGNATURE-----


lists-qmail at maexotic

May 26, 2009, 4:56 PM

Post #9 of 12 (3299 views)
Permalink
Re: manually expire mail in queue [In reply to]

On Wed, May 27, 2009 at 12:38:27AM +0200, Oliver Welter wrote:
> .qmail-default file which contains simply
> "| /usr/local/bin/vdelivermail '' bounce-no-mailbox"
> and a single line containing another eMail-Address in the valias table
> (in this case the delivery target was just a forward address)

I had never ever looked at vpopmail before, but checked out a fresh
copy of vpopmail from svn.

Looking at vdelivermail.c shows that they call qmail_inject_open()
in case of a delivery to an email address. This function forks() a
instance of qmail-inject called without any options but only the
destination address.
The message on stdin ("the message") is then copied to qmail-inject
along with a "Delivered-To" line. qmail-inject scans the message, may or
may not mangle with the 2822 headers and hands it off to qmail-queue.

Would they have used qmail-queue directly, all would work smoothly and
the RFC2821.MAILFROM information that is need for qmail-queue can easily
be taken from the environment that qmail-send provides ($SENDER).

Decide for yourself, whether you think this is a bug or a feature.

\Maex


qmail-07 at jeremykister

May 27, 2009, 5:47 PM

Post #10 of 12 (3280 views)
Permalink
Re: manually expire mail in queue [In reply to]

On 5/26/2009 7:56 PM, Markus Stumpf wrote:
> Looking at vdelivermail.c shows that they call qmail_inject_open()
> in case of a delivery to an email address. This function forks() a
> instance of qmail-inject called without any options but only the
> destination address.
[...]
> Would they have used qmail-queue directly, all would work smoothly and
> the RFC2821.MAILFROM information that is need for qmail-queue can easily
> be taken from the environment that qmail-send provides ($SENDER).

That's surprising. That's the same behavior that was stumbled upon and
reported to the vpopmail folk back in 2006*, and i could swear it was
changed to use qmail-queue. I cant find any evidence of the change, so
either i remember wrong, or the change was reverted; that's a discussion
for the vchkpw list.

* http://www.mail-archive.com/vchkpw [at] inter7/msg23402.html

--

Jeremy Kister
http://jeremy.kister.net./


mohsen at pahlevanzadeh

May 28, 2009, 3:11 PM

Post #11 of 12 (3243 views)
Permalink
Re: manually expire mail in queue [In reply to]

please use http://pyropus.ca/software/pymsgauth/
On Tue, 2009-05-26 at 10:23 +0200, Oliver Welter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi All,
>
> I guess this question has a simple answer, but I was unable to find it.
> Short: Is there a way to remove a message from the queue in a way that
> the sender gets an NDR?
> I run qmHandle which allows me to delete a message from the queue but
> this would not inform the sender about the deletion.
>
> The Long: From time to time I get malformed mails that qmail is unable
> to handle properly (Colons or Whitespace in Headers) and which stay in
> the local queue until they are rejected after 5 days. From my
> perspective, local mails should never need more than a second to get
> delivered (as long as system load is fine) and so I am alerted if there
> are mails stuck in the local queue as it usually inidcates a problem.
>
> Any help is appreciated.
>
> Oliver
> - --
> Protect your environment - close windows and adopt a penguin!
> PGP-Key: 3B2C 8095 A7DF 8BB5 2CFF 8168 CAB7 B0DD 3985 1721
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkobpvoACgkQyrew3TmFFyG1VQCfYEgd51FvcKHbxCY4U8+B2S3k
> qekAnjhTiASdEVi+RdvY/beXcs23A1M4
> =wPeb
> -----END PGP SIGNATURE-----


search-web-for-address at pyropus

May 29, 2009, 7:46 AM

Post #12 of 12 (3235 views)
Permalink
Re: manually expire mail in queue [In reply to]

Mohsen Pahlevanzadeh <mohsen [at] pahlevanzadeh> wrote:
> On Tue, 2009-05-26 at 10:23 +0200, Oliver Welter wrote:
> >
> > I guess this question has a simple answer, but I was unable to find it.
> > Short: Is there a way to remove a message from the queue in a way that
> > the sender gets an NDR?
> > I run qmHandle which allows me to delete a message from the queue but
> > this would not inform the sender about the deletion.
>
> please use http://pyropus.ca/software/pymsgauth/

Uh, no. I'm the author of pymsgauth, and it has nothing whatsoever to do with
solving Oliver's problem. And please stop top-posting.

Charles
--
--------------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at: http://pyropus.ca/software/
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
--------------------------------------------------------------------------

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.