procmail
[Top] [All Lists]

Re: income mail ... to a script

2002-08-29 12:08:17
At 20:52 2002-08-29 +0300, Oren Gozlan did say:
I have this procmailrc that i want him to send all incomming e-mail to the Perl script and and dump the orig mail to /dev/null.

i think i make it right ... but it is not working ...

You know, it'd help a teensy bit if you described how it isn't working - what you believe it SHOULD do, and what it IS doing.

Also, I recall having provided input on an obscenely similar topic just a few days ago, and there was ZERO reply from you either to my followup or to the other member who replied to you onlist. Please take a few minutes and READ those messages, as they made specific recommendations which are not reflected in the material you've posted here. Your subject was "For all incomming messages ...". BTW - if this is a continuation of that same topic, it might help if you were to continue it under the original thread - or even post replies to the two responses you received.

###############
My procmailrc
###############
:0 f
| /root/"MyPerl"

1. 'f' is for FILTER - which means the message passes into the script and the output of the script passed along to the rest of your .procmailrc as THE MESSAGE. If you want to "deliver" the message to your script, then deliver

2. Is your script REALLY named "MyPerl" - with quotes?

3. Looks like you may be running this from a root account (or is the script located in the root homedir for just anyone to use?). Either way, this isn't a good way to retain security on your host. Consider forwarding (aliasing) root email to a non-privledged account.

4. As I advise EVERYBODY with procmail issues, the first step to resolving your procmail issues is to enable VERBOSE logging during testing. I also strongly advise that new filters be run under a sandbox to test them, rather than on live email.

[snip - perlstuff]

Perl isn't the topic of this list (procmail isn't written in it either), so if you have a Perl question, you should endeavour to ask that in a forum which covers Perl. From a brief examination of your Perl script though, it doesn't appear as if it READS the piped message, nor does it output anything to stdout (which implies that 'f' isn't the flag you should really be using, because the script doesn't "filter" - it take an action which is simply triggered by having received an email, and it does nothing with the actual CONTENT of that message). I'm a bit perplexed why you don't just send a message from within the procmail script, but apparently you're connecting to a specific smtp server, so if that's really necessary, I can understand the need for the perl script.

The following is likely a more appropriate way to invoke the script which you are using, given the nature of the operations you're performing (or not) with the passed message:

:0i
| /path/script


Whatever happened to the need to emit something to the log?

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>