[Dovecot] spamassassin, postfix with dovecot lda?
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
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)
Hi Egbert,
thank you for your reply. I searched www.postfixvirtual.net, as you
suggested, with no luck. Their configuration differs significantly from
mine, since they are using CYRUS libraries in general, and not dovecot.
Moreover, the configuration that is proposed uses a vmail user (or some
general-mail-user) which is not something I would like to adhere into my
configuration. I would like each user to have their own preferences,
quotas, permissions, etc as far as their email is concerned. Lastly, the
idea of using maildrop for local delivery instead of dovecot-lda passed
through my mind, but when i tried to combine it with my configuration
it didn't work; it probably needed cyrus libraries and not dovecot
libraries. I think that if i manage to set it up correctly (if feasible,
of course), then I would have found my solution.
Thanks again,
Egbert Jan van den Bussche wrote:
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
George Mamalakis <mamalos@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
Hello Nicolas,
I tried the mailbox_transport = dovecot directive, with no luck, since I was using virtual mailboxes, where virtual_transport is responsible for delivery. What really helped, though, was the dovecot line in master.cf, which after a few tweaks allowed me to make things work eventually!
Thank you again for your help,
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}
-- George Mamalakis
IT Officer Electrical and Computer Engineer (Aristotle Un. of Thessaloniki), MSc (Imperial College of London)
Department of Electrical and Computer Engineering Faculty of Engineering Aristotle University of Thessaloniki
participants (3)
-
Egbert Jan van den Bussche
-
George Mamalakis
-
Nicolas KOWALSKI