procmail
[Top] [All Lists]

Re: Use of B ?? and $MATCH

2005-10-21 15:22:09
On Fri, 21 Oct 2005 20:49:05 +0200 "Ruud H.G. van Tol" 
<rvtol(_at_)isolution(_dot_)nl> wrote:

{ VMDATE="Date- $MATCH $NL" }

No need to leave a space between $MATCH and $NL.

Actually, I can drop the $NL now that I'm not actually using it to pad the temp 
file.

Look in `man procmailex` for echo:

       |(echo "I received your mail,"; \
      echo "but I won't be back until Monday."; \
      ) | $SENDMAIL -oi -t

I hadn't even considered grouped concatenated echo commands piped directly
to sendmail.

Revised recipe (getting shorter):

#Vonage stuff
:0
* ^From:(_dot_)*14095551212(_at_)vm\(_dot_)vonage\(_dot_)com
* B ?? Date:\/.* [AP]M
{ VMDATE="Date- $MATCH" }
:0
* ^From:(_dot_)*14095551212(_at_)vm\(_dot_)vonage\(_dot_)com
* B ?? From:\/.*\)
{ VMFROM="From- $MATCH" }
:0
* ^From(_dot_)*14095551212(_at_)vm\(_dot_)vonage\(_dot_)com
* ! ^X-loop: gvl2(_at_)example(_dot_)tld
{
:0c
|(echo "Subject: Voicemail";\
echo $VMDATE;\
echo $VMFROM;\
)|/usr/sbin/sendmail -oi 4095552121(_at_)messaging(_dot_)sprintpcs(_dot_)com
}


It still gives me this error even though it works. Should I use the "i"
flag to stop that even though it's not  specifying a pipe that was closed
early or other such specific error message?

procmail: Error while writing to "(echo "Subject: Voicemail";\
echo $VMDATE;\
echo $VMFROM;\
)|/usr/sbin/sendmail -oi 4095552121(_at_)messaging(_dot_)sprintpcs(_dot_)com"
procmail: Assigning "LASTFOLDER=(echo "Subject: Voicemail";\
echo $VMDATE;\
echo $VMFROM;\
)|/usr/sbin/sendmail -oi 4095552121(_at_)messaging(_dot_)sprintpcs(_dot_)com"

G2


____________________________________________________________
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

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