"Mike Usmar" <[EMAIL PROTECTED]> writes:
> Hi again,
>
> So just to confirm, there is no code/commands that can pipe a message
> through an external program, and catch the message back with changes made to
> it?
That's correct.
> Just like how the 'xfilter' command works in my maildrop .mailfilter, which
> pipes the message to the external program, and the output from that program
> replaces the current message being delivered.
>
> .mailfilter:
> xfilter "/usr/bin/spamassassin"
>
>
> Is there a way to duplicate this in tmda, maybe something like having my
> "filter" file like this:
>
> -------------------------------------------------------------------
> from-cdb /etcmail/tmda/actrix_whitelist.cdb ok
> from-cdb /etcmail/tmda/actrix_blacklist.cdb bounce
> from-file -autocdb ~/.tmda/whitelist ok
> from-file -autocdb ~/.tmda/blacklist bounce
> # deliver all other mail (aka pending) to spamassassin
> from * deliver=|/usr/local/bin/spamassassin
This won't work because now every message not matched by a previous
rule is considered "good" by TMDA -- that is, no confirmations will
ever be sent -- and furthermore, every message that isn't matched by a
previous rule will be completely lost.
> or if that doesn't work, the above last 2 lines could be replaced by
> something like:
>
> # deliver all other mail (aka pending) to procmail & spamassassin procmailrc
> file
> from * deliver=|/usr/bin/procmail .tmda-sa-rc
> -------------------------------------------------------------------
>
>
> Then in my .tmda-sa-rc file:
> -------------------------------------------------------------------
> # TMDA SpamAssassin procmailrc file - .tmda-sa-rc
>
> # Filter all mail (pending items already missed by white/black lists)
> through SpamAssassin:
> :0fw: spamassassin.lock
> | spamassassin
>
> :0e
> {
> EXITCODE=$?
> }
>
> # Move all mail to tmda pending (not quite right, delivers to maildir
> format, rather than pending dir)
> DEFAULT=/usr/home/m/i/mike/.tmda/pending/
> --------------------------------------------------------------------
This could sort of work, although setting EXITCODE won't do anything,
as TMDA doesn't pass the exit code of the delivery program back to the
MTA. In most cases that's probably not a problem, since spamassassin
is probably not returning errors that are meaningful to an MTA. No
confirmation requests will ever be sent by TMDA using this technique,
however.
> Using the above setup with tmda delivering all pending items back to a
> second procmail process, and through spamassassin, and then to the pending
> folder, actually works, however in the last step
> (DEFAULT=/usr/home/m/i/mike/.tmda/pending/) this creates maildir folders in
> my pending folder: cur, new & tmp, and puts the pending in the new dur.
> Is it possible using procmail to just move the msg to a folder, rather than
> a maildir?
I don't know about that, but if it can't, that's definitely a
problem. Neither tmda-pending nor tmda-cgi will be able to display
the contents of your pending/ queue.
> Secondly, I know that calling procmail a second time will create more load
> on the server (eg processing a msg twice), but is there is any other way
> around this for now? And would this load increase be less/more than the load
> increase if I actually passed every msg through SpamAssassin before it gets
> to TMDA, rather than using SpamAssassin on msgs that only get to pending.
The spamassassin program is a fairly heavy load. Have you considered,
instead, running spamd and using spamc from procmail to pass the
message to spamd? You could run that for every message with very little
extra overhead before passing the message to TMDA.
Tim
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users