Masquerading domain in SMTP Helo

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

robylinux

Masquerading domain in SMTP Helo

Postby robylinux » Fri Mar 09, 2007 2:26 pm

Hi,

I would masquerade my Fdqn hostname (changing it with an another hostmame) when my server estabilishes an Smtp connection with an another mailserver.How can i do it??

Roberto Bolletta

lei
Posts: 30
Joined: Mon Feb 26, 2007 11:35 am

Postby lei » Fri Mar 09, 2007 8:04 pm

yeah same problem for me. something with SMART_HOST define but i dont know where exactly.

GCamp
Posts: 29
Joined: Wed Mar 07, 2007 5:32 pm
Location: New Paris, IN

Postby GCamp » Fri Mar 09, 2007 9:55 pm

I just went through masquerading my domaine name today. What is involved is editing the /etc/mail/linux.mc file which in turn is used to create the /etc/sendmail.cf file. I found it easier to utilize an administrator utility called Webmin. This utility can be downloaded from www.webmin.com.

Before doing anything make a backuo of the /etc/sendmail.cf and the /etc/mail/linux.mc files

Open Webmin and login with root.
From the left hand tree view expand "Servers"
Click on sendmail configuration
From the Sendmail Configuration screen select the "Sendmail M4 Configuration" option
The first screen lists the relevent entries in the linux.mc file. scroll to the bottom of the screen and click "Edit File Manually"

About 3/4 down the screen look for the following entries

Code: Select all

FEATURE(`always_add_domain')dnl
dnl
dnl  Specify the sender email address for all outgoing mail from the local
dnl  machine. Most people also want to use "masquerade_envelope" to also
dnl  change the envelope addresses.
dnl  Use "allmasquerade" to also change the recipient address. Don't use
dnl  this feature, if you don't have the full /etc/aliases and the full
dnl  /etc/passwd on your host.
dnl
dnl MASQUERADE_AS(`domain_name")dnl
dnl FEATURE(`masquerade_envelope')dnl
dnl FEATURE(`allmasquerade')dnl
dnl FEATURE(`no_local_masquerading')dnl
dnl
dnl  Normally, any hosts decided as locally are masqueraded.  If
dnl  the feature limited_masquerade is used, only the hosts listed in
dnl  MASQUERADE_DOMAIN() are masqueraded.  This is useful if you have
dnl  several domains with disjoint namespaces hosted on the same machine.
dnl
dnl MASQUERADE_DOMAIN(`masq_domain_name")dnl
dnl FEATURE(`limited_masquerade')dnl
dnl


Make the following changes

Code: Select all

FEATURE(`always_add_domain')dnl
dnl
dnl  Specify the sender email address for all outgoing mail from the local
dnl  machine. Most people also want to use "masquerade_envelope" to also
dnl  change the envelope addresses.
dnl  Use "allmasquerade" to also change the recipient address. Don't use
dnl  this feature, if you don't have the full /etc/aliases and the full
dnl  /etc/passwd on your host.
dnl
MASQUERADE_AS(`desired_domain_name')dnl
dnl FEATURE(`masquerade_envelope')dnl
dnl FEATURE(`allmasquerade')dnl
FEATURE(`no_local_masquerading')dnl
dnl
dnl  Normally, any hosts decided as locally are masqueraded.  If
dnl  the feature limited_masquerade is used, only the hosts listed in
dnl  MASQUERADE_DOMAIN() are masqueraded.  This is useful if you have
dnl  several domains with disjoint namespaces hosted on the same machine.
dnl
MASQUERADE_DOMAIN(`old_domain_name')dnl
dnl FEATURE(`limited_masquerade')dnl
dnl


Once your edits are made click "Save" - You will be returned to the Linux.mc display screen.

Click on the "Rebuild Sendmail Configuration" button.

Once the rebuild is completed, return to sendmail configuration page.

Stop and then Start Sendmail

Test by sending an email to someone and see if the desired domaine name appears in the From address.

This process worked for me, individual mileage may vary.
GCamp

robylinux

Postby robylinux » Mon Mar 12, 2007 12:30 pm

Thanks for your answer Gcamp,but I tried to modify the mc file all the possibilities options ( i also tried to apply the examples I found in the sendmail documentation) but the problem remains....

Somebody help me!!
It is a SERIOUS problem for a mailserver!!!

Roberto Bolletta

kanderson

Postby kanderson » Mon Mar 12, 2007 2:49 pm

Are you looking to change what Scalix says it's hostname is when you receive email, or are you looking to change what Sendmail says the hostname is when it sends mail?

Kev.

interways2
Posts: 45
Joined: Wed Jan 10, 2007 11:59 am

Postby interways2 » Tue Mar 13, 2007 4:07 am

I'd also be interested in how I can change what sendmail says when sending a mail.

How can I do that?

Thanks

Chris

kanderson

Postby kanderson » Tue Mar 13, 2007 4:48 am

This isn't sendmail, this is Scalix, but the link here should help...

http://www.scalix.com/wiki/index.php?ti ... P_Greeting

I believe the details for sendmail are already in this thread.

Kev.

robylinux

Postby robylinux » Tue Mar 13, 2007 3:41 pm

this is the header that I get by sending an email:

Return-Path: <alex@atfservice.it>
Received: from mediaspot.net ([213.203.178.91])
by mail.mediaspot.net
with hMailServer ; Tue, 13 Mar 2007 20:18:13 +0100
X-EW-Sign: 0F4EF85F73F7F6F9A2CB011C2AB51897
Received: from servermail.atf.locale (localhost [127.0.0.1])
by servermail.atf.locale (8.13.1/8.13.1) with ESMTP id l2DJCceX006707
for <roberto@mediaspot.net>; Tue, 13 Mar 2007 20:12:39 +0100
Received: from servermail.atf.locale (servermail.atf.locale [192.168.0.135])
by servermail.atf.locale (Scalix SMTP Relay 11.0.2.15)
via ESMTP; Tue, 13 Mar 2007 20:12:38 +0100 (CET)
Date: Tue, 13 Mar 2007 20:12:38 +0100
From: alex <alex@atfservice.it>
To: roberto@mediaspot.net
Message-ID: <28900573.151173813158866.JavaMail.root@servermail.atf.locale>
Subject: *** SPAM *** N/A ***AIO
X-MSMail-Priority: medium
x-scalix-Hops: 1
X-Mailer: Scalix 11.0.2.23
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_3_4751287.1173813158865"
X-Virus-Scanned: ClamAV 0.90.1/2691/Fri Mar 2 00:24:05 2007 on servermail.atf.locale
X-Virus-Status: Clean
X-Spam-Status: No, score=0.6 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,
HTML_SHORT_LENGTH,MISSING_MIMEOLE autolearn=no version=3.1.8
X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on
servermail.atf.locale


I want that Scalix occurs to the other servers as "mail.atfservice.it" instead servermail.atf.locale (localhost [127.0.0.1]).

How can i do it? :?: :?: :roll:

GCamp
Posts: 29
Joined: Wed Mar 07, 2007 5:32 pm
Location: New Paris, IN

Postby GCamp » Tue Mar 13, 2007 9:52 pm

You might try changing the /etc/mail/linux.mc to the following and then rebuilding the config file.

Code: Select all

FEATURE(`always_add_domain')dnl
dnl
dnl  Specify the sender email address for all outgoing mail from the local
dnl  machine. Most people also want to use "masquerade_envelope" to also
dnl  change the envelope addresses.
dnl  Use "allmasquerade" to also change the recipient address. Don't use
dnl  this feature, if you don't have the full /etc/aliases and the full
dnl  /etc/passwd on your host.
dnl
MASQUERADE_AS(`mail.atfservice.it')dnl
dnl FEATURE(`masquerade_envelope')dnl
dnl FEATURE(`allmasquerade')dnl
FEATURE(`no_local_masquerading')dnl
dnl
dnl  Normally, any hosts decided as locally are masqueraded.  If
dnl  the feature limited_masquerade is used, only the hosts listed in
dnl  MASQUERADE_DOMAIN() are masqueraded.  This is useful if you have
dnl  several domains with disjoint namespaces hosted on the same machine.
dnl
MASQUERADE_DOMAIN(`servermail.atf.locale')dnl
dnl FEATURE(`limited_masquerade')dnl
dnl
GCamp

jaime.pinto
Scalix Star
Scalix Star
Posts: 709
Joined: Fri Feb 23, 2007 6:50 pm
Location: Toronto - Canada

Postby jaime.pinto » Tue Mar 13, 2007 10:33 pm

Received: from servermail.atf.locale (localhost [127.0.0.1])
by servermail.atf.locale (8.13.1/8.13.1) with ESMTP id l2DJCceX006707
for <roberto@mediaspot.net>; Tue, 13 Mar 2007 20:12:39 +0100
Received: from servermail.atf.locale (servermail.atf.locale [192.168.0.135])
by servermail.atf.locale (Scalix SMTP Relay 11.0.2.15)


There is little that either scalix or MASQUERADE_AS can do about this part.

You need a combination of 2 things:

1) edit the DNS entries on the name server to resolve the 192.168.0.135 to the name you want it to be. Since 192.168.x.x is a blessed network, I'm assuming you are hosting the server behind a firewall and redirecting the ports. So try option 2.
2) edit /etc/hosts and put an entry of the form
192.168.0.135 mail.atfservice.it mail

Let us know what happens.
Jaime

You also need to deal with the servermail.atf.locale entry, which also most likely also comes from /etc/hosts. Something like this
127.0.0.1 servermail.atf.locale

This can be a little trick when changed, because it may break part of the server that relies or uses the "servermail.atf.locale" string. But if you must, try this:
127.0.0.1 mail.atfservice.it servermail.atf.locale


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 9 guests

cron