spamc during dovecot-smtp delivery?
madduck at madduck.net
madduck at madduck.net
Thu Mar 17 10:17:08 UTC 2016
[cc'ing the list for posterity]
also sprach Tolbert, Joshua P <jtolbert at illinois.edu> [2016-03-16 21:46 +0100]:
> I’ve been working on a Postfix/Dovecot/sieve mail server migration
> (from Sendmail/Dovecot/procmail) and ran in to a similar problem
> to one you talked about a while ago on the dovecot mailing lists.
> Did you ever find a good solution for running spamc as the
> destination user in sieve? If you did, mind sharing? Thanks!
I've never had a problem again since upgrading to Debian jessie, but
I also think that the problem's solution was installing a NSS cache,
because the deadlocks seemed to take place between Spamassassin and
libnss-pgsql2.
Transport from Postfix to Dovecot is lmtp:unix:private/dovecot-lmtp
(no idea how to do that with Sendmail or why you'd want to use
Sendmail) and then Dovecot's sieve is configured to run a filter
using /etc/dovecot/sieve.before.d:
require [ "vnd.dovecot.filter"];
filter "spamc" [ "--no-safe-fallback" ];
which is enabled in conf.d/90-sieve.conf with
sieve_before = /etc/dovecot/sieve.before.d
sieve_global_extensions = +vnd.dovecot.filter
sieve_plugins = sieve_extprograms
and in conf.d/90-sieve-extprograms.conf
sieve_filter_bin_dir = /etc/dovecot/sieve-filter
and then I made a simple symlink from
/etc/dovecot/sieve-filter → /usr/bin/spamc
Spamassassin starts with
--create-prefs --helper-home-dir --allow-tell
and the final step is to integrate the mail user database (vmm in my
case) with libnss to provide spamassassin with a way to identify
home directories. I use libnss-pgsql2. The /etc/nss-pgsql.conf file I use is
available here:
http://bugs.debian.org/818465
A successful delivery then looks like this:
postfix/smtpd[29778]: connect from mail1.smtp.mailserver4.de[62.216.179.241]
postfix/smtpd[29778]: 6D2F74024E: client=mail1.smtp.mailserver4.de[62.216.179.241]
postfix/cleanup[32593]: 6D2F74024E: message-id=<xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx at xxxxxxxxxxxxxxxxxxxxx>
postfix/smtpd[29778]: disconnect from mail1.smtp.mailserver4.de[62.216.179.241]
dovecot: lmtp(3570): Connect from local
spamd[2140]: spamd: connection from localhost [::1]:57032 to port 783, fd 6
spamd[2140]: spamd: setuid to xxxxxxx%yyyyyyyyyy.zz succeeded
spamd[2140]: spamd: processing message <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx at xxxxxxxxxxxxxxxxxxxxx> for xxxxxxx%yyyyyyyy.zz:70032
spamd[2140]: spamd: clean message (-1.9/5.0) for xxxxxxx%yyyyyyyy.zz:70032 in 3.0 seconds, 10222 bytes.
spamd[2140]: spamd: result: . -1 - BAYES_00,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE scantime=3.0,size=10222,user=xxxxxxx%yyyyyyyy.zz,uid=70032,required_score=5.0,rhost=localhost,raddr=::1,rport=57032,mid=<xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx at xxxxxxxxxxxxxxxxxxxxx>,bayes=0.000000,autolearn=ham autolearn_force=no
dovecot: lmtp(3570, xxxxxxx at yyyyyyyy.zz): copy from (file): box=INBOX, uid=30613, msgid=<xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx at xxxxxxxxxxxxxxxxxxxxx>, size=10945
dovecot: lmtp(3570, xxxxxxx at yyyyyyyy.zz): QLZ6IoJ/6lbyDQAARsnb6w: sieve: msgid=<xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx at xxxxxxxxxxxxxxxxxxxxx>: stored mail into mailbox 'INBOX'
postfix/lmtp[3569]: 6D2F74024E: to=<xxxxxxx at yyyyyyyy.zz>, orig_to=<aaaaaa at bbbbbbb.zz>, relay=ambassador.madduck.net[private/dovecot-lmtp], delay=5, delays=2/0.02/0.01/3, dsn=2.0.0, status=sent (250 2.0.0 <xxxxxxx at yyyyyyyy.zz> QLZ6IoJ/6lbyDQAARsnb6w Saved)
dovecot: lmtp(3570): Disconnect from local: Successful quit
Hope this helps…
--
@martinkrafft | http://madduck.net/ | http://two.sentenc.es/
"the public is wonderfully tolerant.
it forgives everything except genius."
-- oscar wilde
spamtraps: madduck.bogus at madduck.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: digital_signature_gpg.asc
Type: application/pgp-signature
Size: 1107 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
URL: <http://dovecot.org/pipermail/dovecot/attachments/20160317/0375554d/attachment.sig>
More information about the dovecot
mailing list