In the previous episode (26.01.2001), Brian Longwe <[EMAIL PROTECTED]>
said:
>If I knew how to write perl I probably wouldn't be asking....thanks for
the tip anyway
here is an idea (not necessarily guru-approved but maybe worth a thought):
a ~/.qmail file catches every mail for the user and sends the mail to a
shell script:
#~/.qmail
./filter
#/var/qmail/alias/.qmail-devnul
#
#~/.qmail-real
./Maildir/
#!/bin/bash
#~/filter
cat > /tmp/to$RECIPIENT.txt
if [ "$(grep 'Subject: whatever' /tmp/to$RECIPIENT.txt)" = "Subject:
whatever" ]
then
cat "/tmp/to$RECIPIENT.txt" | qmail-inject devnul
else
cat "/tmp/to$RECIPIENT.txt" | qmail-inject $USER-real
fi
rm -f /tmp/to$RECIPIENT.txt
/var/qmail/alias/.qmail-devnul will delete every mail sent to devnul
and you could add further commands to the "then" part, like
qmail-inject -a [EMAIL PROTECTED] $SENDER < your.readymade.reply
in order to inform the sender ...
i enjoyed experimenting to make this, hope it helps :)
cheers
wolfgang