procmail
[Top] [All Lists]

Re: Inserting info to mail body

2001-02-15 19:31:34
"Carlos Eduardo R. L. de Miranda" <consultor(_at_)linuxbr(_dot_)com(_dot_)br> 
writes:
I've received suggestions to make the recipe to work but it's not working
yet.
I need to add the fields Variables From/Subject/to on the body of the
filtered mail.
The recipe can catch the mail and SUBJ_, FROM_ and TO_ are populating.
The second part is where the problem exists.
The variables aren't expanding and |$SENDMAIL $SENDMAILFLAGS -t command line
is skipped.

Actually, the log will show the unexpanded variable whenever the shell
is used to perform the command execution.  The real problem is that
you are missing the backslash at the end of the line that contains the
"cat" command:

...
 :0 fhw
 |  ( formail -I"To: rivellis(_at_)terra(_dot_)com(_dot_)br"; \
   echo "===== Filtered email - (stop.rc) ====="; \
   echo "Subject: $SUBJ_"; \
   echo "From   : $FROM_"; \
   echo "To       : $TO_"; \
   echo "======================================" ; \
   cat -  )
             ^^ add a backslash here
 |  $SENDMAIL $SENDMAILFLAGS -t


Philip Guenther
_______________________________________________
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>