Viktor,

What I'm looking for is the envelope recipient. I need a way to force an 
unqualified to address to a domain I can blackhole. I've got an application 
that feeds into these systems that will allow its users to enter badly formed 
email addresses. What I want to do is to just swallow those in postfix. What I 
was attempting to do, was get the envelope to to be forced to @blackhole.local, 
and then I just discard that w/ a transport map.

Is there a way to accomplish that?


________________________________
From: owner-postfix-us...@postfix.org <owner-postfix-us...@postfix.org> on 
behalf of Viktor Dukhovni <postfix-us...@dukhovni.org>
Sent: Sunday, January 29, 2023 2:28 PM
To: postfix-users@postfix.org <postfix-users@postfix.org>
Subject: Re: append_dot_mydomain, how to make it work

On Sun, Jan 29, 2023 at 06:32:12PM +0000, Sean Hennessey wrote:

> That was one of my test cases. I just tried it again;
>
> $ postconf |
>   grep -E 
> "append_at_my|remote_header_rewrite|local_header_rewrite|inet_interfaces"
> append_at_myorigin = yes
> inet_interfaces = all
> local_header_rewrite_clients =
> remote_header_rewrite_domain = blackhole.local

Note the string "_header_" in the last two parameters.

> 220 postfix-warming-c.us-east-2.compute.internal ESMTP Postfix (Ubuntu)
> helo me
> 250 postfix-warming-c.us-east-2.compute.internal
> mail from:<sean.hennes...@mercurygate.com>
> 250 2.1.0 Ok
> rcpt to:<x>
> 250 2.1.5 Ok
> data
> 354 End data with <CR><LF>.<CR><LF>
> .
> 250 2.0.0 Ok: queued as ADA723FAB4

You're submitting an empty message (no headers), with an unqualified
*envelope* recipient address.  And you log samples in any case only
provide evidence of the resulting envelope.

> Jan 29 18:24:29 postfix-warming-c postfix/local[16927]: ADA723FAB4:
>   to=<x...@postfix-warming-c.us-east-2.compute.internal>,
>   orig_to=<x>,
>   relay=local, delay=6.8, delays=6.8/0/0/0.01,
>   dsn=5.1.1, status=bounced (unknown user: "x")

The envelope recipient was qualified with @$myorigin as configured.  If
you were expecting something else, you've misinterpreted the
documentation.

--
    Viktor.

Reply via email to