Public bug reported:

This procmail recipe was working in ubuntu 20.04 (procmail package
3.22-26 amd64)

:0
* ^X-Google-DKIM-Signature:
SENDER=| formail -cXFrom: | head -1 | formail -rtzxTo:
:0 af
| /usr/bin/formail -I "Message-ID:" -I "X-Gm-message-State:" -I 
"X-Google-DKIM-Signature:"
:0 a
! $SENDER

It sends the incoming email back to a gmail sender stripped of certain
gmail headers.

It broke when we upgraded to ubuntu 24.04 (procmail package
3.24-1ubuntu2 amd64) sending email to foo@bar rather than the sender
which of course bounced

When failing, procmail logs messages like this: (set a LOGFILE,
VERBOSE=yes, LOGABSTRACT=yes )

procmail: Match on "^X-Google-DKIM-Signature:"
procmail: Assigning "SENDER="
procmail: Executing " formail -cXFrom: | head -1 | formail -rtzxTo:"
procmail: Executing 
"/usr/bin/formail,-I,Message-ID:,-I,X-Gm-message-State:,-I,X-Google-DKIM-Signature:"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi foo@bar"
procmail: Notified comsat: "reflect@:/usr/sbin/sendmail -oi foo@bar"
From jvan...@umich.edu  Fri Jan 24 15:13:33 2025
 Subject: test4
  Folder: /usr/sbin/sendmail -oi foo@bar                           2789
procmail: Executing "/usr/sbin/sendmail,-oi,foo@bar"

(note foo and bar and certainly foo@bar do not occur anywhere in our
config and the assign SENDER= is not assigning anything to sender.  My
assumption is that the foo@bar is a result of SENDER being an empty
variable.

piping a sample email through 
formail -cXFrom: | head -1 | formail -rtzxTo: 
on the command line correctly extracted the sender jvan...@umich.edu in this 
case.

I have a workaround (rewrote recipe to this:)
SENDER=`formail -cXFrom: | head -1 | formail -rtzxTo:`
:0 f
* ^X-Google-DKIM-Signature:
| /usr/bin/formail -I "Message-ID:" -I "X-Gm-message-State:" -I 
"X-Google-DKIM-Signature:"
:0 a
! $SENDER

and that works.

lsb_release -rd
No LSB modules are available.
Description:    Ubuntu 24.04.1 LTS
Release:        24.04

apt-cache policy procmail
procmail:
  Installed: 3.24-1ubuntu2
  Candidate: 3.24-1ubuntu2
  Version table:
 *** 3.24-1ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu noble/main amd64 Packages
        100 /var/lib/dpkg/status

** Affects: procmail (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2096676

Title:
  procmail =| action assignment not working

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


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to