Hi guys,

I am using procmail and formail to parse email and pass the generated values to 
a perl script. 

Here is my .procmailrc

PATH=/bin:/usr/bin
MAILDIR=$HOME/Mail
LOGFILE=/home/sms/procmail.log
VERBOSE=yes

SHELL=/bin/bash

TO=`formail -xTo:`
SUBJECT=`formail -xSubject: | expand | sed -e 's/^[ ] *//g' -e 's/[ ] *$//g'`
SENDER=`formail -xFrom: | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
BODY=`formail -I ""`
SENDER=`formail -rtzxTo:`
:0
| perl /home/sms/massms/newsms.pl $SENDER $TO $BODY $SUBJECT  >> 
/home/sms/massms/maillog.txt

Whenever
I try to send an email, The sender and the recipient parts are passed
successfully. However when I have a message such as follows, the Body part is 
not passed to my perl script:

Subject: Hi there this is a Test
Message: hello this is a test, 

With this message, the passed values to my perl script would be Subject: Hi and 
Body: there..

whenever
a space is detected in the subject of the email, it parses the subject
and assigns the other part of the subject as the body. With this, the
whole body of the email is not passed to my perl script...

Could anyone please point out what could be the problem with my procmail script?

Thank you so much in advance,
joyce 



      
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
http://lists.linux.org.ph/mailman/listinfo/plug
Searchable Archives: http://archives.free.net.ph

Reply via email to