2

I followed the instructions from NixCraft site and try to masquerade my emails with the following configuration:

MASQUERADE_AS(example.com)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(example.com)dnl

and added the following also:

MASQUERADE_DOMAIN(localhost)dnl
MASQUERADE_DOMAIN(localhost6.localdomain6)dnl
MASQUERADE_DOMAIN(mail.server)dnl

I did a test with:

$ echo "Subject: test
From: no-reply@example.com
test" | sendmail -v -fuser@example.com -O NoRecipientAction=add-to check-auth@verifier.port25.com

and this is what I receive in the header:

Return-Path: <user@example.com>
Received: from mail.server (my.ip.add.ress) by verifier.port25.com id abcd1234 for <check-auth@verifier.port25.com>; Sun, 29 Jun 2014 01:23:45 -0400 (envelope-from <user@example.com>)
.....
Received: from mail.server (localhost6.localdomain6 [127.0.0.1])
    by mail.server (8.14.8/8.14.8) with ESMTP id s5T5XgSa003053
    (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
    for <check-auth@verifier.port25.com>; Sun, 29 Jun 2014 12:34:56 +0800
Received: (from root@localhost)
    by mail.server (8.14.8/8.14.8/Submit) id s5T5XfHR003052
    for check-auth@verifier.port25.com; Sun, 29 Jun 2014 12:34:56 +0800

As can be observed, mail.server, localhost and localhost6.localdomain6 are still showing up in the Received line. What more should I do to get Sendmail masquerading to work properly.

1

You may change "this host email name" (used in Received headers) defining confDOMAIN_NAME.
https://www.sendmail.org/~ca/email/doc8.12/cf/m4/whoami.html

By default sendmail's masquerading changes only header sender (e.g. From: header). It may be configured to change envelope sender (MAIL FROM: in SMTP session) and/or header recipients (e.g. To: and Cc: headers). AFAIK it does not change in anyway Received: headers.
https://www.sendmail.org/~ca/email/doc8.12/cf/m4/masquerading_relaying.html

| improve this answer | |
  • Thanks for your answer. But if this is true, then what does the settings MASQUERADE_DOMAIN(localhost)dnl and MASQUERADE_DOMAIN(localhost.localdomain)dnl do? – Question Overflow Jun 30 '14 at 7:18
  • MASQUERADE_DOMAIN adds domain to list of email address domains to be rewritten by masquerading, see sendmail.com/sm/open_source/docs/m4/masquerading_relaying.html – AnFi Jun 30 '14 at 8:45
  • Yes, I read that already, so what is specifically masqueraded in the email by adding those two lines? – Question Overflow Jun 30 '14 at 10:08
  • "By default sendmail's masquerading changes only header sender (e.g. From: header). It may be configured to change envelope sender (MAIL FROM: in SMTP session) and/or header recipients (e.g. To: and Cc: headers)" – AnFi Jun 30 '14 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.