procmail
[Top] [All Lists]

Piping a message to a script, but it doesn't run

2009-03-25 20:48:16
I'm unable to pipe messages to my script.  My recipe is:

        :0
        * ^TO_address(_at_)domain(_dot_)com
        |/path/to/script.pl

But my script doesn't actually run. The script (in its test form) is supposed to create a "test.txt" file no matter what input it's passed, but the file never gets created. The script runs fine from the command line and creates the file properly. My .procmail log says:

procmail: Assigning "LASTFOLDER=/path/to/script.pl"
procmail: Executing "/path/to/script.pl"
procmail: Notified comsat: "user@:/path/to/script.pl"
From MAILER-DAEMON  Wed Mar 25 19:02:44 2009
 Subject: Undelivered Mail Returned to Sender
  Folder: /path/to/script.pl               2751

In case this matters, the reason the From: is MAILER-DAEMON is that I'm trying to store messages so my bounce parser can go through them. The reason I don't just save the file directly is that I can't trust that the email address in the bounce message is the one I sent to. (The user might have a forward set up.) I set the Reply-To: of messages I send from my mailing list to "bounces+user-at- domain(_at_)mydomain(_dot_)com", so I can identify which address ultimately resulted in the bounce. My script will then save the message with the email address as the filename, so my bounce parser can know what address bounced and I can remove the correct address.

In fact, I would be happy to bypass my script altogether, if I could get procmail to just save the file somewhere with the Reply-To address as the filename, but I couldn't figure out how to do that either.

Thank you for your help,  -MBJ-
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail