Hi all,
Got called in to help with a business that is having mail problems. Took a while to figure out what was actually happening. Basically the system uses fetchmail - postfix - procmail to deliver mail locally from a 'catch all' email address at an ISP. The problem is that when an email is sent with multiple recipients and fetchmailed to the box in question, procmail only seems to filter the first message, the rest do not get delivered to the users maildir? Every address seems to work fine when one mail is sent into the system at a time. I have spent hours trying to figure this out and have nothing to go on right at the moment.
Any suggestions?
More info-:
The ~/procmail.log file is showing that the 2nd and subsequent emails of a multi-recipient email are not being filtered. So I know they are not just failing the matching on the regex.
The rule I am using in /home/mainmailuser/.procmailrc (from memory) is:
:0
* ^(X-Original-To|Delivered-To|for|TO|to).*someone@thedomain.com
! someone@localhost
This rule is basically duplicated 6 times to cover all users accounts.
I had a test system set up on Gentoo using exactly this system and did not get this problem (the system in question is running Mandrake 9.2). So I think the rc rule is OK.
Could it have something to do with filelocking??
Any help would be greatly appreciated.