Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jan 2017 21:42:21 +0100 (CET)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        FreeBSD questions <freebsd-questions@freebsd.org>
Subject:   Envelope rewrite by sendmail?
Message-ID:  <alpine.BSF.2.20.1701252134520.1006@mail.fig.ol.no>

next in thread | raw e-mail | index | archive | help
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@short.tld. Sendmail, though the aliases mechanism, forwards
  the message to long.name@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.

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+
From owner-freebsd-questions@freebsd.org  Wed Jan 25 21:44:31 2017
Return-Path: <owner-freebsd-questions@freebsd.org>
Delivered-To: freebsd-questions@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6937ACC162E
 for <freebsd-questions@mailman.ysv.freebsd.org>;
 Wed, 25 Jan 2017 21:44:31 +0000 (UTC) (envelope-from cswiger@mac.com)
Received: from mail-in7.apple.com (mail-out7.apple.com [17.151.62.29])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 4ADB6132
 for <freebsd-questions@freebsd.org>; Wed, 25 Jan 2017 21:44:30 +0000 (UTC)
 (envelope-from cswiger@mac.com)
Received: from relay4.apple.com (relay4.apple.com [17.128.113.87])
 by mail-in7.apple.com (Apple Secure Mail Relay) with SMTP id
 4B.D4.14588.4B819885; Wed, 25 Jan 2017 13:29:24 -0800 (PST)
X-AuditID: 11973e16-fa0ae9a0000038fc-b5-588918b435d9
Received: from [17.150.217.18] (Unknown_Domain [17.150.217.18])
 (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by relay4.apple.com (Apple SCV relay) with SMTP id 62.1A.29672.3B819885;
 Wed, 25 Jan 2017 13:29:24 -0800 (PST)
From: Chuck Swiger <cswiger@mac.com>
Message-Id: <05907976-C22E-4654-ADE2-40742929E975@mac.com>
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
Subject: Re: Envelope rewrite by sendmail?
Date: Wed, 25 Jan 2017 13:29:23 -0800
In-Reply-To: <alpine.BSF.2.20.1701252134520.1006@mail.fig.ol.no>
Cc: FreeBSD - <freebsd-questions@freebsd.org>
To: =?utf-8?Q?Trond_Endrest=C3=B8l?= <Trond.Endrestol@fagskolen.gjovik.no>
References: <alpine.BSF.2.20.1701252134520.1006@mail.fig.ol.no>
X-Mailer: Apple Mail (2.3259)
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJLMWRmVeSWpSXmKPExsUi2FAYrrtFojPCYOUKDouXXzexWLxtE3Jg
 8piw/g2bx4xP81kCmKK4bFJSczLLUov07RK4Mvo697MXfAmpu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IcSbklhZlVqUH19UmpNafIhRmoNFSZy3TBKoWiA9sSQ1OzW1ILUIJsvE
 wSnVwLi5reDow7uPt/T/ucx92Wq2VPl8B/cX1ZUV1dGxR86pfNf4yb5R4Iqbc19g67efGUIH
 N19/FM9Qt6j1n3LHtKbKZadXW2i+f77zx6kNDUZ65tnr/Re8kbsTEbhN6yC/07NtVjsU/A4x
 xF8oimoSd5TheH11gVOwseH5Bq7DN759CY7lf7NDhkuJpTgj0VCLuag4EQBVZZGFTAIAAA==
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.23
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Jan 2017 21:44:31 -0000

On Jan 25, 2017, at 12:42 PM, Trond Endrest=C3=B8l =
<Trond.Endrestol@fagskolen.gjovik.no> wrote:
>  A mail messages arrives on the small SMTP server addressed to
>  shorty@short.tld <mailto:shorty@short.tld>. Sendmail, though the =
aliases mechanism, forwards
>  the message to long.name@some.incredible.long.domain.name.tld =
<mailto:long.name@some.incredible.long.domain.name.tld>.
>=20
>  Antispam measures such as SPF will flag the small SMTP server as not
>  allowed to send email on behalf of the originator.

Yes.  You will need the admins of some.incredible.long.domain.name.tld =
<mailto:long.name@some.incredible.long.domain.name.tld>
to agree and whitelist your short.tld mailserver if you want it to be a =
trusted relay.

>  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.

Try not do that, unless both domains belong to you and share a common =
namespace for
delivery including aliases.  Otherwise, =46rom header munging will break =
various things,
most commonly mailing lists and bounce handling processing.

Regards,
--=20
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1701252134520.1006>