On Sun, 29 Oct 2017, at 14:27, Jostein Berntsen wrote:
On 29.10.17,06:03, @lbutlr wrote:
:0 B
* Driveway
{
FOTO="DRVE_${DATE}"
}
:0
* B ?? Driveway
{
FOTO="DRVE_${DATE}"
}
This is equivalent. In fact, @lbutlr's recipe works fine for me, see
transcript. Perhaps the message body is MIME encoded or similar so
that procmail's regex does not match the raw body content?
## Shell transcript
@W:~$ cat tmp.rc
:0 B
* Driveway
{
FOTO="DRVE_${DATE}"
}
:0 B
* Garage
{
FOTO="GARG_${DATE}"
}
LOG="FOTO=$FOTO
"
@W:~$ cat tmp.msg
From foo@bar Sun Oct 29 17:12:53 2017
From: me
Dear user,
SurvStation has detected motion from the following camera(s): Garage.
@W:~$ procmail -f - tmp.rc -m VERBOSE=on DEFAULT=/dev/null < tmp.msg
procmail: [1158] Sun Oct 29 17:17:23 2017
procmail: Assigning "DEFAULT=/dev/null"
procmail: Rcfile: "/home/schamane/tmp.rc"
procmail: Assigning "MAILDIR=/home/schamane"
procmail: No match on "Driveway"
procmail: Match on "Garage"
procmail: Assigning "FOTO=GARG_"
procmail: Assigning "LOG=FOTO=GARG_
"
FOTO=GARG_
procmail: Assigning "LASTFOLDER=/dev/null"
procmail: Opening "/dev/null"
From foo@bar Sun Oct 29 17:17:23 2017
Folder: /dev/null 132
--
-- Andreas
:-)
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de
https://mailman.rwth-aachen.de/mailman/listinfo/procmail