On Fri, Nov 08, 2024 at 10:25:27PM -0800, Randy Bush via Postfix-users wrote:
> >> Fairly new at trying a scaled postfix install, so I assume it is my
> >> lack of clue.  Trying to use milter_header_checks to reject all marked
> >> spam on debian 12 running `mail_version = 3.7.11`
> >> 
> >>     milter_header_checks = regexp:/etc/postfix/milter_header_checks
> > 
> > Was it definitely the milter that added the header you're trying to act
> > on?
> 
> well, i have seen two `^X-Spam` markings
> 
>     X-Spam: Yes
>     X-Spam-Flag: YES
> 
> which is why my regexp was `/^X-Spam.*YES/`.  i believe, but do not
> know, that the first is the mark of rspamd.  no idea about the other.
> 
> > Was the milter actually running (listening on port 11332 and processing
> > requests) at the time that the messages in question were delivered?
> 
> well, i do nto have a time machine, but ...
> 
>     # lsof -i :11332
>     COMMAND    PID    USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
>     rspamd  113457 _rspamd   67u  IPv4 24865670      0t0  TCP localhost:11332 
> (LISTEN)
>     rspamd  113459 _rspamd   67u  IPv4 24865670      0t0  TCP localhost:11332 
> (LISTEN)

If you also emply header checks, you may find that the headers in
question were already present before hitting your milter:

    # I generally use "pcre" rather than "regexp", and 
    #
    header_checks = regexp:{ {/^X-Spam(-Flag)?:[[:blank:]]*YES/ REJECT} }
    mime_header_checks =
    nested_header_checks =

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to