Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Stripping TLD from env rcpt and To-header

7 views
Skip to first unread message

Vesa-Matti Kari

unread,
Nov 5, 2020, 9:40:06 AM11/5/20
to

Hello!

I am new to Postfix, so sorry if this question is quite
elementary. Is it possible to strip off top level domain
from envelope recipient and To-header?

For example:

f...@example.com.s -> f...@example.com
b...@gmail.com.s -> b...@gmail.com

Thanks for any help.

Best regards,
vmk
--
************************************************************************
Tietotekniikkakeskus / Helsingin yliopisto
IT department / University of Helsinki
************************************************************************

Vesa-Matti Kari

unread,
Nov 5, 2020, 9:53:54 AM11/5/20
to
Vesa-Matti Kari <vmk...@cc.helsinki.fi> wrote:
> Is it possible to strip off top level domain
> from envelope recipient and To-header?
>
> For example:
>
> f...@example.com.s -> f...@example.com
> b...@gmail.com.s -> b...@gmail.com

Ah, I got it working almost immediately after posting
my question. In main.cf, I have:

canonical_maps = regexp:/etc/postfix/rewrite

and rewrite has simply:

/^(.*)@(.*)\.s$/ ${1}@${2}

Seems to work fine.
0 new messages