Qmail
[Top] [All Lists]

Re: Conditional piping to autorespond in .qmail

To: qmail@list.cr.yp.to
Subject: Re: Conditional piping to autorespond in .qmail
From: Kyle Wheeler <kyle-qmail@memoryhole.net>
Date: Mon, 12 Mar 2007 08:57:25 -0600
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-qmail@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list qmail@list.cr.yp.to
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=hCiigpeVjIQU+KT4FcJLDHrllMWdii2tOVwyHHsuTuWdec2N36rCmo9HaPlZWUldT+FjycyuwDZT8Sbce3slbPjqmk3tTVkClMT3fflsSFuuXTTKEFUbUR6Ha0dOSzZtHCy9PdLkDCdl5yzc/T7LuZmnM2c9cYe0fbGOG11UUKY= ;
Domainkey-status: good
In-reply-to: <33000.206.162.148.196.1173703699.squirrel@secure.omninux.com>
Mail-followup-to: qmail@list.cr.yp.to
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
References: <33000.206.162.148.196.1173703699.squirrel@secure.omninux.com>
User-agent: Mutt/1.5.14 (2007-03-06)
On Monday, March 12 at 08:48 AM, quoth Renaud:
- Qmail not forward the mail to autorespond when the spam flag is set

That's easy. Put this in your .qmail file:

    |grep -q '^X-Spam-Flag: Yes' && exit 99 || exit 0
    |/usr/bin/autorespond time num message dir

(of course, the second line should be whatever autorespond command you are currently using).

Or, if you wanted to be a little more robust about it:

    |awk '/^X-Spam-Flag:/{exit 99} /^$/{exit 0}'
    |/usr/bin/autorespond time num message dir

~Kyle
--
Men, as an organization, are getting more women than any other group working anywhere in the world. Wherever women are, we have men looking into it.
                                                     -- Jerry Seinfeld

Attachment: pgpANMKKIAjFG.pgp
Description: PGP signature

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