Re: Body check failing?

Andreas Schamanek <[email protected]> Sun, 29 Oct 2017 17:23:21 +0100 (CET)
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
On Sun, 29 Oct 2017, at 14:27, Jostein Berntsen wrote:

> On 29.10.17,06:03, @lbutlr wrote:
> > :0 B
> >     * Driveway
> >     {
> >       FOTO=3D"DRVE_${DATE}"
> >     }

> :0 =

> * B ?? Driveway
>    {
>        FOTO=3D"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=3D"DRVE_${DATE}"
    }
    :0 B
    * Garage
    {
      FOTO=3D"GARG_${DATE}"
    }

LOG=3D"FOTO=3D$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=3Don DEFAULT=3D/dev/null < tmp.msg
procmail: [1158] Sun Oct 29 17:17:23 2017
procmail: Assigning "DEFAULT=3D/dev/null"
procmail: Rcfile: "/home/schamane/tmp.rc"
procmail: Assigning "MAILDIR=3D/home/schamane"
procmail: No match on "Driveway"
procmail: Match on "Garage"
procmail: Assigning "FOTO=3DGARG_"
procmail: Assigning "LOG=3DFOTO=3DGARG_
"
FOTO=3DGARG_
procmail: Assigning "LASTFOLDER=3D/dev/null"
procmail: Opening "/dev/null"
>From foo@bar  Sun Oct 29 17:17:23 2017
  Folder: /dev/null						132


-- =

-- Andreas

    :-)