Re: procmail autoreply script?
On Fri, 4 Dec 1998, Felix K.K. Chang wrote:
> Hello all,
>
> I use a procmail/fetchmail/smail combination. I know that exim is
> the recommended mta now, but I do not want to change right now.
> I was wondering if someone could help me with the following problem.
>
> I have a mail address at xxx@yyy. This address will be obsolete
> within a few weeks so I want to reply to people who use that
> address that I have a different setup. I may not use a .forward file,
> btw.
>
> I basically want a procmail entry that sends the mail to my inbox as
> usual
> but also replies to the sender with some message like 'please use
> address
> www@zzz instead of xxx@yyy'
>
> Can some procmail guru help me with this? I find the procmail docs
> somewhat unclear.
Install the procmail-lib package. Has many good examples. I use this for
my pgp reply script:
:0
* ^Subject:.*pgpkey
* ! ^FROM_DAEMON
* $ ! ^X-Loop: $MY_ADDR
{
# Save a copy just in case
:0 c:
pgp.requests
:0 fhw
| formail -rI"Subject: PGP Key Request: Michael Beattie <mickyb@es.co.nz>" \
-I"From: Michael Beattie <$MY_ADDR>" \
-I"Precedence: junk" \
-I"X-Loop: $MY_ADDR" \
-I"Mime-Version: 1.0" \
-I"Content-Type: application/pgp; format=keys-only" \
-I"Content-Description: PGP Key: Michael Beattie <mickyb@es.co.nz>" \
-I"Content-Transfer-Encoding: 7bit"
:0 fbw
| cat - ; sh -c "pgp -kxaf $MY_ADDR 2>/dev/null"
:0 efbw
| cat - ; echo "Sorry, my PGP key is not available at the moment."
:0 w
* > 1
! -oi -t
}
HTH,
Michael Beattie (mickyb@es.co.nz)
PGP Key available, reply with "pgpkey" as subject.
-----------------------------------------------------------------------------
"Game over, man! GAME OVER!!!"
-----------------------------------------------------------------------------
Debian GNU/Linux.... Ooohh You are missing out!
Reply to: