smtpd new "relay as" syntax?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

smtpd new "relay as" syntax?

Paul B. Henson
I just upgraded to OpenBSD 6.4, and I'm trying to figure out how to do
this with the new syntax:

accept from local for any relay via smtp://smtp.domain.com as "@domain.com"

This would rewrite the outbound message to masquerade as being from the
TLD rather than a specific machine. Right now I've got:

action local_relay relay host smtp.domain.com
match from local for any action local_relay

But this doesn't do the rewriting. The only thing I see in the man page
talks about 'senders <users> [masquerade]' which seems to be for
authenticated users.

Am I missing something obvious?

Thanks...

Reply | Threaded
Open this post in threaded view
|

Re: smtpd new "relay as" syntax?

trondd-2


On October 31, 2018 5:31:44 PM EDT, "Paul B. Henson" <[hidden email]> wrote:

>I just upgraded to OpenBSD 6.4, and I'm trying to figure out how to do
>this with the new syntax:
>
>accept from local for any relay via smtp://smtp.domain.com as
>"@domain.com"
>
>This would rewrite the outbound message to masquerade as being from the
>TLD rather than a specific machine. Right now I've got:
>
>action local_relay relay host smtp.domain.com
>match from local for any action local_relay
>
>But this doesn't do the rewriting. The only thing I see in the man page
>talks about 'senders <users> [masquerade]' which seems to be for
>authenticated users.
>
>Am I missing something obvious?
>
>Thanks...

Mail-from in the action options, I believe.

Reply | Threaded
Open this post in threaded view
|

Re: smtpd new "relay as" syntax?

Paul B. Henson
On Wed, Oct 31, 2018 at 08:07:09PM -0400, TronDD wrote:

> Mail-from in the action options, I believe.

Ah, yes; that seems to work, thanks. The previous implementation was
documented as:

If the as parameter is specified, smtpd(8) will rewrite
the sender advertised in the SMTP session.  address may
be a user, a domain prefixed with `@', or an email
address, causing smtpd(8) to rewrite the user-part, the
domain-part, or the entire address, respectively.

whereas this just said:

mail-from mailaddr
        Use mailaddr as the MAIL FROM address within the SMTP
        transaction.

It wasn't clear it would do the same rewriting functionality, I thought
at first it just took a single email address.