Hi,

> >> Example:
> > >>
> > >> /etc/postfix/main.cf:
> > >>     smtpd_milters = inet:127.0.0.1:9999
> > >>
> > >> /etc/mail/milter-regex.conf:
> > >>     reject
> > >>     header /From/ /^user@baddom\.tld$/i and envrcpt /@example\.com$/i
> > >
> > It looks like this is the place to start?
> > https://github.com/milter-regex/milter-regex/tree/main


Just for completeness, I needed this to make it work. Notice the reject
message and <> to match the header.

reject "bad email"
header /From/ /^<[email protected]>$ and envrcpt /@example.com>$/i

syslog: mail-lf1-f42.google.com [209.85.167.42]: cb_envfrom('<
[email protected]>')
syslog: mail-lf1-f42.google.com [209.85.167.42]: macro {mail_addr} =
[email protected]
syslog: mail-lf1-f42.google.com [209.85.167.42]: cb_header('Received-SPF',
'Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.42; helo=
mail-lf1-f42.google.com; [email protected]; receiver=baddom.tld
')
syslog: mail-lf1-f42.google.com [209.85.167.42]: cb_header('From', 'Alex
<[email protected]>')
syslog: mail-lf1-f42.google.com [209.85.167.42]: REJECT: bad address, HELO:
mail-lf1-f42.google.com, FROM: <[email protected]>, RCPT: <[email protected]>,
From: Alex <[email protected]>, To: , Subject:

alex
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to