Package: procmail
Version: 3.24-1
Severity: normal
I am very happy to see procmail upstream is now active again!
Excellent news! I am a long time user and have quite a few mail
filtering rules.
The recent upgrade to 3.24 broke using a pipe action to set a variable
using stdin. Reverting to 3.22 restores correct functioning.
For example due to UTF-8 subject encoding one might find a subject
with this contrived and constructed example.
Subject: =?utf-8?q?test-list_post_from_rwp=40proulx=2Ecom_require?=
=?utf-8?q?s_approval?=
I use the following idiomatic procmail expression to decode that
subject and place it into a SUBJECT variable. This following from my
.procmailrc file.
# If the subject is encoded and needs decoding then...
# extract the subject, decode it, store in the SUBJECT variable.
:0h
* ^Subject:.*=\?
SUBJECT=|formail -cXSubject: | perl -MEncode -pe
'Encode::from_to($_,"MIME-Header","UTF-8");'
# Store all remaining cases of Subject: into $SUBJECT.
# E - only execute this recipe if previous recipe was not executed.
:0hE
SUBJECT=|formail -cXSubject:
# Here forward SUBJECT contains the decoded text.
# Match it using the variable ?? syntax.
# * SUBJECT ?? ^Subject: blah blah blah
Then I use it like this following to handle Mailman messages.
:0
* ^X-BeenThere:
* SUBJECT ?? ^Subject: .*mailing list memberships reminder$
mailman-reminders/
:0
* ^X-List-Administrivia: yes
{
:0
* 1^0 SUBJECT ?? ^Subject: Auto-discard notification
* 1^0 SUBJECT ?? ^Subject: El envio a [-a-zA-Z0-9]+
de.*precisa.*de.*aprobacion
* 1^0 SUBJECT ?? ^Subject: Uncaught bounce notification
* 1^0 SUBJECT ?? ^Subject: [-a-zA-Z0-9]+ post from
* 1^0 SUBJECT ?? ^Subject: [-a-zA-Z0-9]+ subscription notification
* 1^0 SUBJECT ?? ^Subject: [-a-zA-Z0-9]+ unsubscribe notification
list-administrivia/
}
Unfortunately in 3.24 this functionality is broken. I see in the
Testing migration "excuses" this "Too young, only 4 of 5 days old".
Should severity be "important" in order to keep Testing from breaking?
Some experiments show to try to bound the condition. It's around the
use of stdin to the sub-process. This following works. This does not
use stdin.
SUBJECT=|echo hello
SUBJECT=|echo hello | tee /tmp/pt.rwp.debug
SUBJECT=|sh -c "echo hello | tee /tmp/pt.rwp.debug"
But this fails. (Using a cat| pipe to ensure $SHELLMETAS are seen.)
This fails to process stdin.
SUBJECT=|tee /tmp/pt.rwp.debug
SUBJECT=|cat | tee /tmp/pt.rwp.debug
SUBJECT=|sh -c "tee /tmp/pt.rwp.debug"
SUBJECT=|sh -c "cat | tee /tmp/pt.rwp.debug"
Thank you for maintaining procmail! :-)
Bob
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-1-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages procmail depends on:
ii libc6 2.36-8
Versions of packages procmail recommends:
ii postfix [mail-transport-agent] 3.7.3-2+b1
procmail suggests no packages.
-- no debconf information