From owner-freebsd-questions@freebsd.org Thu Jan 26 07:33:34 2017 Return-Path: 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 CB9A7CC2F88 for ; Thu, 26 Jan 2017 07:33:34 +0000 (UTC) (envelope-from bah@bananmonarki.se) Received: from feeder.usenet4all.se (1-1-1-38a.far.sth.bostream.se [82.182.32.53]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47B09D2A for ; Thu, 26 Jan 2017 07:33:31 +0000 (UTC) (envelope-from bah@bananmonarki.se) Received: from [10.0.0.3] (testbox.usenet4all.se [10.0.0.3]) by feeder.usenet4all.se (8.13.1/8.13.1) with ESMTP id v0Q7Vt1P003164; Thu, 26 Jan 2017 08:31:56 +0100 (CET) (envelope-from bah@bananmonarki.se) Subject: Re: Envelope rewrite by sendmail? To: =?UTF-8?Q?Trond_Endrest=c3=b8l?= , FreeBSD questions References: From: Bernt Hansson Message-ID: <741c3823-bc0a-f59b-d828-9afc8be9bacf@bananmonarki.se> Date: Thu, 26 Jan 2017 08:31:14 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jan 2017 07:33:34 -0000 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@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. > http://www.sendmail.org/~ca/email/doc8.12/cf/m4/masquerading_relaying.html