procmail
[Top] [All Lists]

Re: setting up an autoreply

1998-08-04 13:09:11
On Tue, Aug 04, 1998 at 12:54:09PM -0500, webgrrls(_at_)xsite(_dot_)net wrote:
Isn't this really what I'm trying to do? Since I am searching for a
subject line of:
      [admin] subscribe
my recipe would look like this:

          * !^From +webgrrls
          * !^Subject:.*Chicago Webgrrls Listserv FAQ
          * !^FROM_DAEMON
          * ^Subject:.*[admin] subscribe
          | (formail -r ; cat info_file) | $SENDMAIL -oi -t

Does the * in "^Subject:.*[admin] subscribe" act like a wild card, or does
it have another function here? i.e. the recipe as above would catch and
reply to messages with "Re: [admin] subscribe" in the subject line? Since
I would not want this to happen, could I delete the *?

In regular expressions, a * means "the previous character repeated zero or more
times." In this case the previous character was . which in a regular expression
matches any character except for a newline. So "^Subject:.*[admin] subscribe"
means "'Subject:' at the beginning of a line, followed by zero or more
non-newline characters, followed by '[admin] subscribe'." In other words, if
the subject of the message contains the text "[admin] subscribe" then this
expression will match. Note that it will match if the subject is "Re: [admin]
subscribe" or "Don't you dare send me that [admin] subscribe message again."
You may want to change the . to a space, so that it'll match only if the
subject starts with "[admin] subscribe" (allowing for any number of leading
spaces).

By the way, when I first saw your message and your 
webgrrls(_at_)xsite(_dot_)net address,
I very nearly dismissed it as spam from a porn site. You might consider using a
different address, or at least concealing it with your real name.

Chris Johnson

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