Hi all, I am trying to setup a mail server using postfix (virtual_mailboxes), spamassassin and dovecot, along with SQL where appropriate. From my research so far I realized that, for several reasons, it is required for me to use dovecot LDA instead of maildrop, local, procmail or other alternatives. My configuration was working flawlessly, until spamassassin per-user configuration came to play. If I just wanted an MTA anti-spam gateway, I could directly call spamassassin via master.cf, or through some helper "content-filter-application" (like amavis or amavisd-new), and everything would work just fine (I tried and tested many such configurations with success). But when antispam per user preferences became my concern (Bayesian filters and classifier), I realized that spamd should be called by the LDA. With procmail this was a trivial issue, with dovecot-lda I was unable to find any solution on the web or other documentation. So my question is as follows: Is there a way to call spamc from dovecot-LDA (and/or dovecot-sieve), or is there an alternate way to do this for a site with virtual mailboxes configured with dovecot-lda? Thank you all in advance, regards, -- George Mamalakis IT Officer, Department of Electrical and Computer Engineering, Aristotle Univ. of Thessaloniki, Greece
Egbert Jan van den Bussche
2008-Jun-02 13:26 UTC
[Dovecot] spamassassin, postfix with dovecot lda?
George Mamalakis wrote:> Hi all, > > I am trying to setup a mail server using postfix (virtual_mailboxes), > spamassassin and dovecot, along with SQL where appropriate. From my > research so far I realized that, for several reasons, it is required > for me to use dovecot LDA instead of maildrop, local, procmail or > other alternatives. > > My configuration was working flawlessly, until spamassassin per-user > configuration came to play. If I just wanted an MTA anti-spam gateway, > I could directly call spamassassin via master.cf, or through some > helper "content-filter-application" (like amavis or amavisd-new), and > everything would work just fine (I tried and tested many such > configurations with success). But when antispam per user preferences > became my concern (Bayesian filters and classifier), I realized that > spamd should be called by the LDA. With procmail this was a trivial > issue, with dovecot-lda I was unable to find any solution on the web > or other documentation. > > So my question is as follows: > Is there a way to call spamc from dovecot-LDA (and/or > dovecot-sieve), or is there an alternate way to do this for a site > with virtual mailboxes configured with dovecot-lda? > > Thank you all in advance, > > regards, >Hi George. You seem to have a similar setup as I have here. I found www.postfixvirtual.net most useful! Do have a look there. I just had a 12 hour fight to get all running again after a upgrade from Mandriva 2008.0 to 2008.1. That should have been trivial but I had all sort of issues with amavisd missing perl modules. Well, finally solved that one again. Egbert Jan (NL)
George Mamalakis <mamalos at eng.auth.gr> writes:> So my question is as follows: > Is there a way to call spamc from dovecot-LDA (and/or > dovecot-sieve), or is there an alternate way to do this for a site > with virtual mailboxes configured with dovecot-lda?Hello, I am currently running a similar setup, with spamc called per user at delivery time, from postfix. I use the following settings (on a Debian Etch system, so installation paths must be adapated). - dovecot's deliver binary must be set setuid root, - /etc/postfix/main.cf: mailbox_transport = dovecot dovecot_destination_recipient_limit = 1 - /etc/postfix/master.cf: # # dovecot # dovecot unix - n n - 1 pipe flags=Rh user=dovecot argv=/usr/bin/spamc -u ${user} -e /usr/lib/dovecot/deliver -d ${user} -f ${sender} -- Nicolas