Thanks for your reply...I have tried this but procmail doesn't appear to be looking at these messages because they are not destined for a local user...
I have local_procmail defined in my sendmail.mc as a feature. When I send a message to a local user, your code works fine just like it should. But for the relayed message the program is sending, it's not being forwarded.
I'll try and explain it in an example:
mason.com (customers domain)
foo.com (another customers domain)
test.com (my linux box's domain)
So the program sends email from mason.com to foo.com using my mail server as the relay...I have the sending computers IP address in my sendmail access file and set to RELAY. It works fine. I added your procmail code to my /etc/procmailrc. Messages from firstname.lastname@example.org
are sent to foo.com, but they do not got forwarded to email@example.com
. However if I send a message from firstname.lastname@example.org
, they get forwarded to email@example.com
no problem. I hope that makes sense