[Dovecot] How to use filters with the LDA?
Hi,
I am trying to deploy dovecot LDA and liking it so far. However, I need to pass the message through some filters before it's delivered to the user (e.g. spamc). I realise I can just set up a chain (postfix delivers to spamc, pipes to foo, pipes to bar, pipes to deliver), but there's no reliable error handling with that approach.
Furthermore, I cannot seem to figure out whether sieve can pass messages through external filters, or how you'd do that.
How do people approach this?
What would be really sweet is an LDA plugin that can call arbitrary filters for each message it processes. Has something (obvious) like this been done?
Thanks,
-- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
spamtraps: madduck.bogus@madduck.net
"doesn't he know who i think i am?" -- phil collins
martin f krafft wrote:
Hi,
I am trying to deploy dovecot LDA and liking it so far. However, I need to pass the message through some filters before it's delivered to the user (e.g. spamc). I realise I can just set up a chain (postfix delivers to spamc, pipes to foo, pipes to bar, pipes to deliver), but there's no reliable error handling with that approach.
I do this using postfix, dspam via LMTP and deliver, and it does indeed have reliable error handling.
Furthermore, I cannot seem to figure out whether sieve can pass messages through external filters, or how you'd do that.
How do people approach this?
Nope, unfortunately sieve does not provide for piping to an external program.
What would be really sweet is an LDA plugin that can call arbitrary filters for each message it processes. Has something (obvious) like this been done?
I don't believe this has been coded, but the new deliver uses sieve as a plugin, so I don't see why this shouldn't be possible. You could always write one ;)
also sprach Peter Fern <dovecot@obfusc8.org> [2006.06.28.1101 +0200]:
I am trying to deploy dovecot LDA and liking it so far. However, I need to pass the message through some filters before it's delivered to the user (e.g. spamc). I realise I can just set up a chain (postfix delivers to spamc, pipes to foo, pipes to bar, pipes to deliver), but there's no reliable error handling with that approach.
I do this using postfix, dspam via LMTP and deliver, and it does indeed have reliable error handling.
Yeah, but this is not per-user, right? dspam does not need per-user because of it's cookie support, but I have some filters here that aren't this "smart".
What would be really sweet is an LDA plugin that can call arbitrary filters for each message it processes. Has something (obvious) like this been done?
I don't believe this has been coded, but the new deliver uses sieve as a plugin, so I don't see why this shouldn't be possible. You could always write one ;)
Ha! Thanks for the confidence in my coding skills.
Does the sieve plugin use libsieve or the sieve binary?
-- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
spamtraps: madduck.bogus@madduck.net
"i like .net for the same reason i like gentoo. it keeps all the people with no clue from writing c code, which is much harder for me to identify and eliminate from my systems. in the same way that gentoo gives those people a place to be that isn't in debian" -- andrew suffield
martin f krafft wrote:
also sprach Peter Fern <dovecot@obfusc8.org> [2006.06.28.1101 +0200]:
I am trying to deploy dovecot LDA and liking it so far. However, I need to pass the message through some filters before it's delivered to the user (e.g. spamc). I realise I can just set up a chain (postfix delivers to spamc, pipes to foo, pipes to bar, pipes to deliver), but there's no reliable error handling with that approach.
I do this using postfix, dspam via LMTP and deliver, and it does indeed have reliable error handling.
Yeah, but this is not per-user, right? dspam does not need per-user because of it's cookie support, but I have some filters here that aren't this "smart".
Correct, dspam is a little smarter than your average filter, if you're attached to your current filters, perhaps look into amavis and see if it will do the job for you?
What would be really sweet is an LDA plugin that can call arbitrary filters for each message it processes. Has something (obvious) like this been done?
I don't believe this has been coded, but the new deliver uses sieve as a plugin, so I don't see why this shouldn't be possible. You could always write one ;)
Ha! Thanks for the confidence in my coding skills.
Does the sieve plugin use libsieve or the sieve binary?
It's a version of libsieve, but there's no reason a plugin couldn't call an external tool, like the original dspam plugin for imap if you're looking for an example.
participants (2)
-
martin f krafft
-
Peter Fern