[prev in list] [next in list] [prev in thread] [next in thread]
List: qmail
Subject: Re: preline -f
From: Han <han () mijncomputer ! nl>
Date: 2002-04-28 6:54:30
[Download RAW message or body]
Han (han@mijncomputer.nl) wrote:
>
> Could somebody explain to me what the disadvantage of using the -f
> option for preline when delivering to procmail?
>
> ie
>
> $ cat .qmail
> |preline -f /usr/local/bin/procmail
Ok since you are all so convinced it has no disadvantages: I rewrote
Henning Brauwers qsecretary-autoreply scripts so they support/use procmail.
First of all let your MTU use qsecretarywrapper when mailing to the
qmail list:
For mutt that would be:
folder-hook qmail set sendmail="~/.mutt/qmailsecretarywrapper"
This is the qmailsecretary wrapper script:
#!/bin/sh
auth=`dd if=/dev/urandom ibs=6 count=10 2>/dev/null | sha1`
touch ~/tmp/$auth
export QMAILINJECT=i
( echo "X-qs-auth: $auth" ; cat ) | /var/qmail/bin/qmail-inject $*
Next in line comes .qmail which has to contain:
|preline -f /usr/local/bin/procmail
Then you should add this recipy to your .procmailrc:
:0
* ^From. "The qsecretary program" \<list-qmail-notbulkmail-[0-9a-f]*@list\.cr\.yp\.to\>
| ~/.mutt/qmailsecretaryreply
And finally there is the qmailsecretaryreply-script:
#!/bin/sh
RECIPIENT=`/usr/local/bin/822field from | cut -d"<" -f2|cut -d">" -f1`
AUTH=`cat | grep \^X-qs-auth: | sed 's/^X-qs-auth: \([a-f0-9]*\)/\1/'`
if [ -f ~/tmp/$AUTH ]; then
rm ~/tmp/$AUTH
echo "Mellon" | mail $RECIPIENT
else
echo "Someone is trying to forge something I think" | mail `whoami`
fi
I keep a copy of those script and settings on:
http://www.xs4all.nl/~hanb/dot-mutt
Cya, Han.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic