exiqgrep fails to parse output of exim4 -bp if the mail message is less than 1k

Bug #1006293 reported by Milton Ngan
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
exim4 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

If you have a message in the queue that is less than 1k in size, exiqgrep will fail with a message like this:

Line mismatch: 2m 719 1SZe77-00047t-V9 <email address hidden>

The problem is that the regular expression requires there to be a suffix on the size. Based on the previous implementations of exiqgrep, it looks like a ? is missing after the [A-Z].

- if ($line =~ /^\s*(\w+)\s+((?:\d+(?:\.\d+)?[A-Z])?)\s*(\w{6}-\w{6}-\w{2})\s+(<.*?>)/) {
+ if ($line =~ /^\s*(\w+)\s+((?:\d+(?:\.\d+)?[A-Z]?)?)\s*(\w{6}-\w{6}-\w{2})\s+(<.*?>)/) {

Revision history for this message
Chuck Short (zulcss) wrote :

Which version is this with?

Thanks
chuck

Changed in exim4 (Ubuntu):
status: New → Incomplete
Revision history for this message
Milton Ngan (1-milton) wrote : RE: [Bug 1006293] Re: exiqgrep fails to parse output of exim4 -bp if the mail message is less than 1k

12.04 LTS.

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Chuck Short
Sent: Wednesday, May 30, 2012 12:11 PM
To: Milton Ngan
Subject: [Bug 1006293] Re: exiqgrep fails to parse output of exim4 -bp if the mail message is less than 1k

Which version is this with?

Thanks
chuck

** Changed in: exim4 (Ubuntu)
       Status: New => Incomplete

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1006293

Title:
  exiqgrep fails to parse output of exim4 -bp if the mail message is
  less than 1k

Status in “exim4” package in Ubuntu:
  Incomplete

Bug description:
  If you have a message in the queue that is less than 1k in size,
  exiqgrep will fail with a message like this:

  Line mismatch: 2m 719 1SZe77-00047t-V9 <email address hidden>

  The problem is that the regular expression requires there to be a
  suffix on the size. Based on the previous implementations of exiqgrep,
  it looks like a ? is missing after the [A-Z].

  - if ($line =~ /^\s*(\w+)\s+((?:\d+(?:\.\d+)?[A-Z])?)\s*(\w{6}-\w{6}-\w{2})\s+(<.*?>)/) {
  + if ($line =~ /^\s*(\w+)\s+((?:\d+(?:\.\d+)?[A-Z]?)?)\s*(\w{6}-\w{6}-\w{2})\s+(<.*?>)/) {

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/exim4/+bug/1006293/+subscriptions

Revision history for this message
Dominik Schramm (dominik-schramm-a) wrote :

exiqgrep is containted in package exim4-base.

The affected version is 4.76-3ubuntu3.

This is fixed in upstream Exim version 4.77; compare the regular expression:

upstream v4.76: $line =~ /^\s*(\w+)\s+((?:\d+(?:\.\d+)?[A-Z])?)\s*(\w{6}-\w{6}-\w{2})\s+(<.*?>)/
upstream v4.77: $line =~ /^\s*(\w+)\s+((?:\d+(?:\.\d+)?[A-Z]?)?)\s*(\w{6}-\w{6}-\w{2})\s+(<.*?>)/

-- note the optional size suffix in the later version: [A-Z]?

Changed in exim4 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel Bond (daniel-bond) wrote :

Is there any chance of this being fixed via StableReleaseUpdates ( https://wiki.ubuntu.com/StableReleaseUpdates ) ? Or perhaps it would be better to request a backport for it?

On a busy production Exim4 server, there will almost allways be an email in queue, with a size less than 1K. This makes exiqgrep not work, which again makes monitoring with munin not work. Without monitoring, 12.04 is not ideal for running production Exim server.

Revision history for this message
Andreas Metzler (k-launchpad-downhill-at-eu-org) wrote :

Just to be crystal-clear: This was fixed upstream in 4.77. 196f5966a092d873df256956f6f88d4b5d3cb803

Revision history for this message
Rarylson Freitas (rarylson) wrote :

I had the same problem. When I read the source-code of the exiqgrep (exim-base package), I realized a question character was missing, and I applied the same patch.

I'm using the 4.76-3ubuntu3 version too.

So I was going to report the patch when I discovered that this bug was fixed in new versions (4.77).

Is it possible to apply this patch to the Ubuntu 12.04 eximqgrep release?

Revision history for this message
Rarylson Freitas (rarylson) wrote :

It seems that this bug is not more present in Ubuntu 14.04 (exim4-base version 4.82-3ubuntu2).

However, we've really liked if the Ubuntu Team merged this simple fix in the Ubuntu 12.04 LTS. It isn't good to be obligated to update the distribution just because only some fixes are merged in the old long-term-supported version.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.