This part gets me a 'From' address that I can use to search a database of authorized users. Then, some time later, I do this:until ($FromAddress =~ /From/i) { $FromAddress = <STDIN> }
Now, the problem is this. When I take a message in a text file and pipe it to my script, everything works just fine. However, when I pipe it from a mail server alias, the MIME::Parser never gets any data. The From: checker gets the data fine. To check the alias, I changed it to pipe to the command "cat - > some.file". The entire message, including MIME data, was found in some.file. In fact, when I turned around and did "cat some.file | perl MyCommand.pl", everything worked fine! But no matter what I do, nothing ever gets to the Mime Parser. I can tell this by examining the directory that Mime::Parser creates: the message text is 0 bytes and no attachments get detached. I know this is not a file permission error because, when I change file permissions so that the output directory is not writeable, I get a bounce message from my mail server. I'm using PostFix. Anyone know what might be going on? Thanks, SMmy $parser = new MIME::Parser; my $entity = $parser->parse(\*STDIN) or debug_parser();
In reply to Odd MIME::Parser STDIN behavior by SpritusMaximus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |