I have some meals that are sent to a custom email address. I have no control
over how the emails are formed (they are from a remote device) but the part of
the email that is important is in the body, so I tried this to put the
information in the more accessible subject:
VERBOSE=ON
:0
* ARG ?? ^^alert^^
{
TRAP='mv "$LASTFOLDER" "${LASTFOLDER}:2,S"'
SUBJECT=`formail -I ""`
:fwh
| formail -I"Subject: $SUBJECT”
# Send an SMS alert
INCLUDERC=$HOME/.sms_procmail
:0
.alerts/
}
VERBOSE=OFF
ARG = alert TO = kreme+alert(_at_)kreme(_dot_)com FROM = device@remote.device
procmail: [35385] Sun Oct 4 20:35:40 2015
procmail: Match on "^^alert^^"
procmail: Assigning "TRAP=mv "$LASTFOLDER" "${LASTFOLDER}:2,S""
procmail: Executing "formail,-I,"
procmail: Assigning "SUBJECT=
Alert Text is here, and yes a blank line is part of the alert text"
procmail: Match on "| formail -I"Subject: $SUBJECT""
procmail: Extraneous filter-flag ignored
So, I am doing something wrong in the :fw, I guess. I did look up how to do
this, not trusting my memory, but that matches what I found
procmail: Assigning "LASTFOLDER=INCLUDERC=/home/kreme/.sms_procmail"
procmail: Opening "INCLUDERC=/home/kreme/.sms_procmail"
procmail: Error while writing to "INCLUDERC=/home/kreme/.sms_procmail”
That seems odd.
procmail: Assigning "LASTFOLDER=.alerts/new/1444012540.35385_1.mail.covisp.net"
procmail: Notified comsat:
"kreme@0:/home/kreme/Maildir//.alerts/new/1444012540.35385_1.mail.covisp.net"
procmail: Assigning "EXITCODE=0"
procmail: Executing
"mv,.alerts/new/1444012540.35385_1.mail.covisp.net,.alerts/new/1444012540.35385_1.mail.covisp.net:2,S"
I have other recipes that call the sms_procmail file and send messages properly.
What did I miss?
--
"Making music should not be left to the professionals." - Michelle
Shocked
____________________________________________________________
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