From: Subject: Re: formail: how to prefix subject? Date: Thu, 18 Apr 2002 18:14:16 +0200 MIME-Version: 1.0 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/1999-02/msg00093.html X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Re: formail: how to prefix = subject?
[Date=20 Prev][Date=20 Next] [Thread=20 Prev][Thread=20 Next] [Date=20 Index][Thread=20 Index][Top= &Search][Original]=20

Re: formail: how to prefix subject?


  • From: Christopher Neill <chris@verio.net>=20
  • To: mathias@staff.singnet.com.sg= ,=20 procmail@informatik.rw= th-aachen.de=20
  • Date: Fri, 19 Feb 1999 11:33:04 -0500=20
  • Message-ID: <http://www.rosat.mpe-garching.mpg.de/mailing-lists/proc= mail/1999-02/msg00093.html>=20

On Fri, Feb 19, =
1999 at 04:12:43PM +0800, Mathias Koerber wrote:
> On building an autoreply facility with procmail/formail, I
> am wondering how to generate a subject line which
> includes the original subject using (was: old subject) or similar?
>=20
> ie, to a mail with=20
> 	Subject: Hello
> I want to reply with:
> 	Subject: Thanks (was: Hello)
>=20
> Does anyone have an idea how to do this using formail?
>=20
> If not I'll have to fall back to perl...
>=20
> Any help is appreciated
>=20

This is from my default rc.local.s20 recipies that I use for =
SmartLists.. It also (pre|ap)pends the body of (header|trailer).txt

lists@binky [11:31am](1):2:/var/lists> more cincyrave/rc.local.s20=20
# RC file to insert a topic into the subject, or insert
# a header or append a trailer

# If the variable "topic" is defined, and non-null, it will
# be inserted into the subject: (ie: Subject: [$topic] blah blah...).
# Contributed by Carlos Garcia <cgarcia@isabel.dit.upm.es>

# If the file "submit-header.txt" exists, it will be prepended
# to all submitted mail.

# If the file "submit-trailer.txt"  exists, it will be appended
# to all submitted mail. =20

# The variables $list, $domain, $listmaster, and $maintainer will
# all be substituted into the header or trailer.

topic=3D$list             #uncomment and posibly modify if you want
                        # a [topic] in your subjects.

:0 fh
* !$${topic:+!}
* $!^Subject:.*\\[${topic}\\].*
* ^Subject:\/.*
|formail -I "Subject: [$topic]$MATCH"


:0 fb
* ? test -r header.txt
| sed   -e "s/\$listmaster/$listmaster/g" \
        -e "s/\$maintainer/$maintainer/g" \
        -e "s/\$domain/$domain/g" \
        -e "s/\$list/$list/g" \
      <header.txt ; \
  cat -

:0 fb
* ? test -r trailer.txt
| cat - ; \
  sed   -e "s/\$listmaster/$listmaster/g" \
        -e "s/\$maintainer/$maintainer/g" \
        -e "s/\$domain/$domain/g" \
        -e "s/\$list/$list/g" \
      <trailer.txt

--=20
Christopher M. Neill    chris@verio.net         http://www.verio.net/                 =

*** Views expressed are mine and not necessarily those of Verio, or of   =
            =20
*** any sane individual, for that matter ;)     =20


References to:=20
http://www.rosat.mpe-garching.mpg.de/mailing-lists/proc= mail/1999-02/msg00081.html

[Date=20 Prev][Date=20 Next] [Thread=20 Prev][Thread=20 Next] [Date=20 Index][Thread=20 Index][Top= &Search][Original]=20