Hello, I am trying to discard the message after the DISCARD I add a message
which I use for informational purposes in the system.

Example:

/^To.*gus...@gmail.com/                         DISCARD BLABLA001

Aug 10 10:40:22 smarthost01-ded postfix/cleanup[9766]: 13F1D60065: warning:
header From: Higiene Empresarial <sa...@higienempresarial.com.ar> from
vps-110
7836-x.dattaweb.com[179.43.124.100]; from=<ggonza...@ambitecnica.com.ar>
to=<gus...@gmail.com> proto=SMTP helo=<vps-1107836-x.dattaweb.com>
Aug 10 10:40:22 smarthost01-ded postfix/cleanup[9766]: 13F1D60065: warning:
header Subject:
=?utf-8?Q?Protocolo_Covid-19_-_F=C3=B3rmulas_potenciadas_de_=C
3=BAltima_generaci=C3=B3n?= from vps-1107836-x.dattaweb.com[179.43.124.100];
from=<ggonza...@ambitecnica.com.ar> to=<gus...@gmail.com> proto=SMTP
helo=<vp
s-1107836-x.dattaweb.com>
Aug 10 10:40:22 smarthost01-ded postfix/cleanup[9766]: 13F1D60065:
message-id=<
kpgyiziuplesktdhfog0oglqz8pdo8e9mjc5mva...@fm01.beneficiosnuthost.com>
Aug 10 10:40:22 smarthost01-ded postfix/qmgr[16663]: 13F1D60065: from=<
ggonza...@ambitecnica.com.ar>, size=6160, nrcpt=1 (queue active)
Aug 10 10:40:23 smarthost01-ded postfix/smtp[1438]: 13F1D60065: to=<
gus...@gmail.com>, relay=gmail-smtp-in.l.google.com[172.217.192.27]:25,
delay=1.7, del
ays=0.11/0/0.8/0.81, dsn=2.0.0, status=sent (250 2.0.0 OK  1597066823
h71si11798516pgc.228 - gsmtp)
Aug 10 10:40:23 smarthost01-ded postfix/qmgr[16663]: 13F1D60065: removed

I think the syntax is fine since I use the same for other recipients.

Regards,

El sáb., 8 de ago. de 2020 a la(s) 13:52, Viktor Dukhovni (
postfix-us...@dukhovni.org) escribió:

> On Sat, Aug 08, 2020 at 01:00:20PM -0300, SysAdmin EM wrote:
>
> > I'm trying to block a recipient's address (To:) but it doesn't work.
>
> Please be more precise about what you mean by "block".  Are you
> trying to:
>
>    1. REJECT the recipient in incoming SMTP deliveries
>
>    2. REJECT messages where that recipient is one of the possibly
>       many recipients of the message.
>
>    3. Silently discard messages where that recipient is one of the possibly
>       many recipients of the message.
>
> > # main.cf
> > header_checks = regexp:/etc/postfix/header_checks
>
> Why are you trying to use header_checks and NOT an access(5)
> table with "check_recipient_access"?
>
> > /^To.*gus...@gmail.com/                         DISCARD
>
> Since you don't operate gmail.com, this is likely a remote recipient
> that you don't want your local users to send email to.  How do your
> local users submit outbound email, is it via SMTP, or are they logged
> into the Postfix server and sending email (indirectly) via the
> sendmail(1) command (invoked via mail(1), Pine, Mutt, ...).
>
> --
>     Viktor.
>

Reply via email to