I've been using fetchmail and procmail on an old Red Hat server for years to retrieve emails from a POP account and dispatch them (to different recipients) on MS Exchange. It's worked great for many years but now that server is failing and I want to do the same thing on a new Ubuntu Server.
I installed the newest version of fetchmail and procmail and copied my config files from my old server to the new one. Fetchmail works fine and sends the retrieved email to procmail as expected, but procmail cannot find any match So it reverts to sending the email to the address at the bottom of .procmailrc
The funny thing is that when I access the email (sent to the wrong address) it displays Arthur Rimbaud in the To column very correctly Please help me find where my problem could be:
.fetchmailrc
set logfile /home/peewee/.procmail/fetchmail.log
set no bouncemail
poll apop-pro.vtx.ch protocol pop3 username "ch.company.mail"
password
"*******" mda "/usr/bin/procmail -f %F"
.procmailrc
VERBOSE=on
MAILDIR=/home/peewee
PMDIR=/home/peewee/.procmail
LOGFILE=/home/peewee/.procmail/log
:0
* ^TO.*arthur.rimbaud
! arthur.rimbaud@lsmail.company.com
:0
! jacques.rimbaud@lsmail.company.com
log
procmail: Skipped "
"
procmail: No match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?).*arthur.rimbaud
"
procmail: Skipped "
"
procmail: Skipped "
"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi jacques.rimbaud@lsmail.company.com
"
procmail: Executing "/usr/sbin/sendmail,-oi,jacques.rimbaud@lsmail.company.com
"
procmail: Notified comsat: "peewee@:/usr/sbin/sendmail -oi jacques.rimbaud@lsmail.company.com
"
From jacques.rimbaud@outlook.com Mon Mar 15 16:25:39 2021
Subject: Essai B17
Folder: /usr/sbin/sendmail -oi jacques.rimbaud@lsmail.company.com 10632