* Gilles Chehade <gil...@poolp.org> le [21-11-2018 16:31:31 +0100]:
> On Wed, Nov 21, 2018 at 03:22:45PM +0100, Thuban wrote:
> > Hi,
> > I can't figure how to make this "junk" argument to work as 
> > mentioned in The smtpd.conf manpages :
> > 
> >     If the junk argument is provided, the message will be
> >     moved to the Junk folder if it contains a positive X-Spam
> >     header.
> > 
> > 
> > spams detected by spamassassin have multiple X-Spam-* headers, but aren't 
> > placed
> > into Junk folder.
> > 
> > Any advice ?
> > 
> 
> without seeing examples of these headers and your config, it's hard to
> understand what's incorrect ;-)
> 

Sorry, I thought this was quite common.

A spam has these headers when detected by spamassassin : 

        X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
                        ledzep.yeuxdelibad.net
        X-Spam-Flag: YES
        X-Spam-Level: *******************
        X-Spam-Status: Yes, score=19.0 required=5.0 tests=BAYES_99,BAYES_999,


Here is my smtpd.conf, incoming mails are analysed by spamassassin
(dafault configuration).

        table aliases file:/etc/mail/aliases
        table domains file:/etc/mail/domains
        table passwd passwd:/etc/mail/passwd
        table virtuals file:/etc/mail/virtuals

        pki acmecert key "/etc/ssl/acme/private/yeuxdelibad.net.key"
        pki acmecert cert "/etc/ssl/acme/yeuxdelibad.net-fullchain.pem"

        ## LISTEN ##
        # envelopes signed by dkimproxy
        listen on lo0 port 10028 tag DKIM
        # envelopes checked by spamassassin
        listen on lo0 port 10026 tag NOSPAM
        # local
        listen on lo0
        # incoming
        listen on egress tls pki acmecert tag INCOMING
        # sending
        listen on egress port submission tls-require pki acmecert auth <passwd> 
tag OUTGOING

        ## ACTIONS ##
        action "relay" relay
        action dkimproxy relay host smtp://127.0.0.1:10027
        action spamassassin relay host smtp://127.0.0.1:10025

        action "local_mbox" mbox alias <aliases>
        action virtual_maildir maildir 
"/var/_vmail/%{dest.domain}/%{dest.user}/Maildir" junk virtual <virtuals>

        ## MATCH ##
        match for local action local_mbox

        match tag NOSPAM from any for domain <domains> action virtual_maildir
        match from any for domain <domains> action spamassassin

        match tag DKIM for any action "relay"
        match auth tag DKIM from any for any action "relay"

        match auth from any for any action dkimproxy
        match for any action dkimproxy

Reply via email to