Re: conditional qconfirm-check based on "To" field?

Chris Wilkes <[email protected]>
Newsgroups gmane.comp.misc.pape.general
Message-ID <[email protected]>
On Tue, Jan 27, 2004 at 05:27:53PM -0500, Toby Betts wrote:
> Chris Wilkes wrote:
> 
> >Do you want the following to happen:
> >1. If you're in the To: or Cc: field then deliver normally
> >2. Otherwise process the email through qconfirm?
> >
> >You should be able to use the condtomaildir program from
> >    http://www.superscript.com/qtools/intro.html
> >like so:
> >
> >  | condtomaildir ./Maildir/ iftocc [email protected]
> >  | qconfirm-check -d homedir/.qconfirm
> >  ./Maildir/
> 
> Interesting. This can certainly work for static delivery to a single 
> ./Maildir/. It won't deliver to another program, though. Can you think 
> of a way to substitute, say "|preline maildrop" instead of delivering 
> them to a Maildir-style directory?

You can use qmail's condredirect, something like this:

  cat .qmail
    | condredirect okaddress-good iftocc [email protected]
    | qconfirm-check -d homedir/.qconfirm
    ./Maildir/
  cat .qmail-good
    # do something else
    ./Maildir/

Which says "If you're in the To or Cc: put this back in the queue and
deliver to okaddress-good" which is then picked up by your .qmail-good
script.

Chris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.