Mailing List Archive

exim 4.97.1 exiqgrep - line mismatch => broke munin
Hi all,

Fedora pushed an exim 4.97.1 update last night and now exiqgrep -cz
shows this error message, which breaks the munin plugin für the mailqueue.

[~]# mailq
 9h  2.2K 1rO3sE-005JbF-1D-H <> *** frozen ***
          xxxxxx@xxxxxxxxxxxxxxxx.de

[~]# exiqgrep -cz
Line mismatch:  9h  2.2K 1rO3sE-005JbF-1D-H <> *** frozen ***

because:

# exim -bpu
 9h  2.2K 1rO3sE-005JbF-1D-H <> *** frozen ***
          xxxxxx@xxxxxxxxxxxxxxxx.de

but according to the perl code should be:

 9h  2.2K 1rO3sE-005JbF-1D-H <x@xxxx.xx>

"collect" subroutine in exiqgrep has this REGEXP:

                #Should be 1st line of record, if not error.
                if ($line =~ /^\s*(?<age>\w+)
\s+(?<size>(?:\d+(?:\.\d+)?[A-Z]?)?)
\s*(?<msgid>(?:\w{6}-\w{6}-\w{2}|\w{6}-\w{11}-\w{4}))     # old, 2023
msgid formats
                              \s+(?<from><.*?>)/x) {


which does not seem to be correct:

a) if the exim mailqueue is read line by line, <FROM> will be in a
different line, as the rest of the issue.

b) "<> *** frozen ***" is not handled, but i'm no expert in perl regexp
magic foo ;)


Any quick fix for exiqgrep available i can apply and give to the exim
maintainer @ fedora?


best regards,
Marius

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: exim 4.97.1 exiqgrep - line mismatch => broke munin [ In reply to ]
There is a tool for converting old message-ids to new ones.
Or you wait until all messages with the old IDs are out of the queue.

Best,


Niels

> On Jan 12, 2024, at 09:17, Cyborg via Exim-users <exim-users@lists.exim.org> wrote:
>
> ?Hi all,
>
> Fedora pushed an exim 4.97.1 update last night and now exiqgrep -cz shows this error message, which breaks the munin plugin für the mailqueue.
>
> [~]# mailq
> 9h 2.2K 1rO3sE-005JbF-1D-H <> *** frozen ***
> xxxxxx@xxxxxxxxxxxxxxxx.de
>
> [~]# exiqgrep -cz
> Line mismatch: 9h 2.2K 1rO3sE-005JbF-1D-H <> *** frozen ***
>
> because:
>
> # exim -bpu
> 9h 2.2K 1rO3sE-005JbF-1D-H <> *** frozen ***
> xxxxxx@xxxxxxxxxxxxxxxx.de
>
> but according to the perl code should be:
>
> 9h 2.2K 1rO3sE-005JbF-1D-H <x@xxxx.xx>
>
> "collect" subroutine in exiqgrep has this REGEXP:
>
> #Should be 1st line of record, if not error.
> if ($line =~ /^\s*(?<age>\w+)
> \s+(?<size>(?:\d+(?:\.\d+)?[A-Z]?)?)
> \s*(?<msgid>(?:\w{6}-\w{6}-\w{2}|\w{6}-\w{11}-\w{4})) # old, 2023 msgid formats
> \s+(?<from><.*?>)/x) {
>
>
> which does not seem to be correct:
>
> a) if the exim mailqueue is read line by line, <FROM> will be in a different line, as the rest of the issue.
>
> b) "<> *** frozen ***" is not handled, but i'm no expert in perl regexp magic foo ;)
>
>
> Any quick fix for exiqgrep available i can apply and give to the exim maintainer @ fedora?
>
>
> best regards,
> Marius
>
> --
> ## subscription configuration (requires account):
> ## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
> ## unsubscribe (doesn't require an account):
> ## exim-users-unsubscribe@lists.exim.org
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
Re: exim 4.97.1 exiqgrep - line mismatch => broke munin [ In reply to ]
Am 12.01.24 um 09:28 schrieb Niels Kobschätzki:
> There is a tool for converting old message-ids to new ones.
> Or you wait until all messages with the old IDs are out of the queue.
>
>
It's not the message ids.

it's this => \s+(?<from><.*?>)  part of the regexp.

As soon as you remove that part, it works again.

best regards,
Marius

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: exim 4.97.1 exiqgrep - line mismatch => broke munin [ In reply to ]
On 1/12/24 08:14, Cyborg via Exim-users wrote:
> [~]# mailq
>  9h  2.2K 1rO3sE-005JbF-1D-H <> *** frozen ***
> xxxxxx@xxxxxxxxxxxxxxxx.de

They need to pick up commit 1d19531abc45 at the very least:

Date: Sun Nov 19 11:31:45 2023 +0000
Support old-format message_id spoolfiles for mailq / -bp. Bug 3050
Broken-by: 46a36afae41f


If they're not willing to do that, and reissue the exim binary, a hack in the perl
of exiqgrep is feasible...

\s*(?<msgid>(?:\w{6}-\w{6}-\w{2}|\w{6}-\w{11}-\w{4})) # old, 2023 msgid formats
becomes
\s*(?<msgid>(?:\w{6}-\w{6}-\w{2}|\w{6}-\w{11}-\w{4}))(?:-H)? # old, 2023 msgid formats

(I've not tested this)




9h 2.2K 1rO3sE-005JbF-1D-H <> *** frozen ***
xxxxxx@xxxxxxxxxxxxxxxx.de

> a) if the exim mailqueue is read line by line, <FROM> will be in a different line, as the rest of the issue.

If you're talking about "xxxxxx@xxxxxxxxxxxxxxxx.de", that is a recipient. The sender was <>.

b) "<> *** frozen ***" is not handled, but i'm no expert in perl regexp magic foo ;)

\s+(?<from><.*?>) matches the <> (though the ? is pointless, given the *)
and then " *** frozen ***" is just ignored, by this RE. There's a specific RE
for that a few lines later.
--
Cheers,
Jeremy


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: exim 4.97.1 exiqgrep - line mismatch => broke munin [ In reply to ]
Hello!

On Fri, 12 Jan 2024 at 10:40:45 (+0000), Jeremy Harris via Exim-users wrote:

> \s+(?<from><.*?>) matches the <> (though the ? is pointless, given the *)

Out of scope of the thread: it's actually not pointless as it limits
capture group, roughly saying, to `<[^>]*>' (the `?' makes `.*' be non-greedy).

--
George L. Yermulnik
[YZ-RIPE]

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: exim 4.97.1 exiqgrep - line mismatch => broke munin [ In reply to ]
Am 12.01.24 um 11:40 schrieb Jeremy Harris via Exim-users:
>
> If they're not willing to do that, and reissue the exim binary, a hack
> in the perl
> of exiqgrep is feasible...
>
> \s*(?<msgid>(?:\w{6}-\w{6}-\w{2}|\w{6}-\w{11}-\w{4}))     # old, 2023
> msgid formats
> becomes
> \s*(?<msgid>(?:\w{6}-\w{6}-\w{2}|\w{6}-\w{11}-\w{4}))(?:-H)?     #
> old, 2023 msgid formats
>
> (I've not tested this)

Works. Thx Jemery and all others.

Best regards,
Marius


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/