Re: Outbound Mail Header
Kees Theunissen wrote:
> J.R0wan > wrote:
>> The customer only wants the host name, not the fqdn as two companies
>> are having email sent out, the identity of the new company
>> (sales@fqdn2.com) needs to be different from the identity of the
>> existing company which shows in the header below as pegasus.fqdn.com.
>>
>> The customer just wants the hostname, pegasus rather than the
>> pegasus.fqdn.com.
>
> So be it.
>
> Add the following line to your sendmail.mc file and generate a new
> sendmail.cf.
>
> MASQUERADE_AS(`pegasus')dnl
>
> This should be placed somewhere in the middle of your sendmail.mc,
> before the "MAILER" lines.
> This will rewrite all occurrences of the sender address in the message
> headers. If you also want to rewrite the envelope sender add also
> the line:
>
> FEATURE(`masquerade_envelop')dnl
>
> Finally, if local recipient addresses in the message headers should
> also be rewritten, you should also use:
>
> FEATURE(`allmasquerade')dnl
>
> This will do what you asked for. I'm not sure if the effect is what
> you expect it to be. I'm quite sure this will need special processing
> at the receiving end, but maybe has your customer such special
> processing configured.
> In short:
> -- external mail servers, without special configuration, will reject
> your messages because the sender is invalid.
> -- internal relays or receiving servers, without special configuration,
> will either reject the invalid sender address or recognize the
> host name and convert it to a FQDN. :-(
>
>
> A final note: using MASQUERADE_AS will masquerade all mail origin
> from your server, even output of cron jobs and things like that.
> It is possible to apply such rewriting to a limited set of sender
> addresses. Look for 'genericstable' in cf/README if you want to do
> so, and just ask for if you need with that.
> The need for special handling of your messages at the receiving end
> will be the same as mentioned above if you decide to use
> 'genericstable', for you'll still be generating invalid sender
> addresses.
>
>
> Regards,
>
> Kees.
>
Well I made the changes to sendmail.mc, made a new sendmail.cf and
restarted sendmail. After that I sent a test message but it is still
laced with the fqdn.
*** changes from sendmail.mc
MASQUERADE_AS(`pegasus')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MAILER(smtp)dnl
*****
From - Thu Apr 26 11:46:35 2007
X-Account-Key: account4
X-UIDL: 4630c8ec00000001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <root@pegasus.fqdn.com>
Received: from pegasus.fqdn.com (customer's public IP [x.x.x.x])
by myserver (8.12.8/8.12.8) with ESMTP id l3QFhVld004764
for <>; Thu, 26 Apr 2007 11:43:31 -0400
Received: from pegasus.fqdn.com (localhost.localdomain [127.0.0.1])
by pegasus.fqdn.com (8.12.8/8.12.8) with ESMTP id l3QFhVp6019703
for <myemailaddressremoved>; Thu, 26 Apr 2007 11:43:31 -0400
Received: (from root@localhost)
by pegasus.fqdn.com (8.12.8/8.12.8/Submit) id l3QFhV8i019701
for myemailaddressremoved; Thu, 26 Apr 2007 11:43:31 -0400
Date: Thu, 26 Apr 2007 11:43:31 -0400
From: root <root@pegasus.fqdn.com>
Message-Id: <200704261543.l3QFhV8i019701@pegasus.fqdn.com>
To: myemailaddressremoved
Subject: test
X-MailScanner-Information: Please contact the ISP for more information
X-MailScanner: Found to be clean
X-MailScanner-SpamScore: sss
X-Spam-Status: No, hits=3.9 required=5.0
tests=RCVD_IN_OSIRUSOFT_COM,SPAM_PHRASE_00_01,X_OS IRU_OPEN_RELAY
version=2.44
X-Spam-Level: ***
Status:
test
|