Envelope rewrite by sendmail?

Bernt Hansson bah at bananmonarki.se
Thu Jan 26 07:33:34 UTC 2017


On 2017-01-25 21:42, Trond Endrestøl wrote:
> Hi,
>
> I have users with email addresses ending in a long suffix.  Combine
> this with long names in front of the @ sign, and it immediately gets
> very tedious to type an email address.
>
> We have a shorter domain name, and I was thinking of creating a small
> SMTP server to serve this short domain name and simply forward email
> to the main SMTP server.
>
> It is not possible to switch the main SMTP server to serve the short
> domain name.
>
> Here's an example:
>
>    A mail messages arrives on the small SMTP server addressed to
>    shorty at short.tld. Sendmail, though the aliases mechanism, forwards
>    the message to long.name at some.incredible.long.domain.name.tld.
>
>    Antispam measures such as SPF will flag the small SMTP server as not
>    allowed to send email on behalf of the originator.
>
>    Thus, prior to forwarding each message, the small SMTP server will
>    need to masquerade as the originator and rewrite the envelope's from
>    address to an address within the short.tld domain.
>
> Can this be accomplished using sendmail? Would the short address of
> the receiver suffice or should I use a fixed address regardless of the
> originator and/or the ultimate receiver?
>
> The OS on the small SMTP server will be FreeBSD 11.
>
> Any pointers are appreciated.
>
http://www.sendmail.org/~ca/email/doc8.12/cf/m4/masquerading_relaying.html


More information about the freebsd-questions mailing list