Hi Feargal - > Christian Warden suggested using the -m flag of dbmail-smtp > to deliver it to a seperate mailbox. I wasn't actually aware > of that option as it's not mentioned in the man page, and it > does the job pretty well (although it'll hurt my head to > figure out the sendmail config...).
Re: your sendmail hassles, we use a small perl wrapper script (albeit crude) which pipes the message through to the dbmail-smtp program and calls dbmail-smtp with appopriate args. Sendmail -> wrapper -> dbmail-smtp (flags) The wrapper basically reads in stdin in, caching the header parts (look for the first blank line), and then if that has X-Contains-Spam, etc -- changes $mailbox from "inbox" to "spam"... Then opens "dbmail-smtp -m $mailbox" as a pipe, outputs the cached headers and then streams <stdin> from then on to the pipe. Thus only the headers are cached and you move your 'filtering' intelligence to this wrapper program rather than sendmail/dbmail. The perl interpreter overhead is there, which isn't great, and you need to make sure you return the exit codes to sendmail if dbmail-smtp barfs, etc. As a plus though, because it's perl - you can pretty much do anything you want in terms of filtering capabilities... /Mark