0

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
tripleee
  • 175,061
  • 34
  • 275
  • 318
jgarbi
  • 1
  • 1
    Looks like you have DOS line endings in your file. Don't use a Windows editor, and use `dos2unix` or similar to fix the file you already broke. – tripleee Mar 16 '21 at 10:09
  • As an aside, you probably mean `^TO_arthur\.rimbaud` – tripleee Mar 16 '21 at 10:10
  • (If you didn't edit this file on Windows, maybe you used a really old `ftp` client and copied it via a Windows machine? Hard to see how you could end up with DOS line feeds if you used `sftp` between two U*x machines.) – tripleee Mar 16 '21 at 10:19

0 Answers0