Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot, bind-address mysql multiple, sanibleone xxxx, ftp://192.168.100.100/, www.xxxcon

Links

XODOX
Impressum

#1: Wierd problem. masquerade, except to a certain domain.

Posted on 2005-09-21 12:49:28 by steve0504

Hi,

I'm trying to get mail working for a client, and I'm running into
problems. I don't really know much about sendmail (but a lot more than
I did a few weeks ago) and I seem to know more than the rest of the
Unix team here... so I've been lumbered with the problem.

I posted about this a few weeks ago, and we've got a lot further with
the issues but still haven't quite cracked it.

The original problem was that mails where not getting sent to external
domains, so for example mails from companyname.local where being
rejected by the remote exchange server (because there is no such domain
as companyname.local). To get around this problem we switched on
masquerading and envelope masquerading, so it now appears to come from
companyname.com.

So, I can now send mails to steve.button@uk.ibm.com from the unix
servers.

All is hunkydorey now.... except, it's now broken when sending mails
TO: anything@companyname.com. These WHERE being rejected by our smart
host... so I changed the smart host (which points to the exchange
server) to use MAIL_HUB(`exchange_server') as well as
SMART_HOST(`exchange_server).

This means the mails are now flowing out to the exchange server.

When I get the Wintel guys to look at the exchange logs they see the
mails as now appearing to be TO:
username@exchange_server.companyname.local.

And that's the wierd bit!!

I guess my question is, how can I get sendmail to masquerade
everything, EXCEPT mails to companyname.com.

I have tried many different masquerade, limited_masquerade and
allmasquerade options but nothing seems to quite hit the spot.

Help??

Steve Button.

Report this message

#2: Re: Wierd problem. masquerade, except to a certain domain.

Posted on 2005-09-21 18:00:13 by steve0504

Is it something I said ?

;-(

We're really stuck with this one, and the end client is getting fed up.
Any suggestions / pointers would be much appreciated.

Report this message

#3: Re: Wierd problem. masquerade, except to a certain domain.

Posted on 2005-09-21 18:23:49 by Andrzej Adam Filip

"Steve" <steve0504@pointers-uk.net> writes:

> [...]
> All is hunkydorey now.... except, it's now broken when sending mails
> TO: anything@companyname.com. These WHERE being rejected by our smart
> host... so I changed the smart host (which points to the exchange
> server) to use MAIL_HUB(`exchange_server') as well as
> SMART_HOST(`exchange_server).
>
> This means the mails are now flowing out to the exchange server.
>
> When I get the Wintel guys to look at the exchange logs they see the
> mails as now appearing to be TO:
> username@exchange_server.companyname.local.
>
> And that's the wierd bit!!
>
> I guess my question is, how can I get sendmail to masquerade
> everything, EXCEPT mails to companyname.com.
>
> I have tried many different masquerade, limited_masquerade and
> allmasquerade options but nothing seems to quite hit the spot.
>
> Help??

I suspect you have configured companyname.com as local email domain
echo '$=w' | sendmail -bt

Your MAIL_HUB definition relays messages to local email domains to
exchange_server but uses exchange_server as envelope recipient domains
[replaces original envelope recipient domain]

I suggest using mailertable and access entries instead of MAIL_HUB
1) add the following entries to mailertable and access and recompile the
tables/maps using makemap.

mailertable:
companyname.com esmtp:exchange_server

access:
to:companyname.com RELAY

2) remove companyname.com from list of local email domains
Remove the domain from /etc/mail/local-host-names and HUP (or restart)
sendmail daemon

3) if companyname.com is reported as local domain use
DontProbeInterfaces option


URL(s):
http://www.sendmail.org/m4/tweaking_config.html#confDONT_PRO BE_INTERFACES
--
Andrzej [en:Andrew] Adam Filip anfi@priv.onet.pl anfi@xl.wp.pl
http://www.sendmail.org/faq/ http://anfi.homeunix.net/sendmail/

Report this message

#4: Re: Wierd problem. masquerade, except to a certain domain.

Posted on 2005-09-22 11:52:32 by steve0504

I will try your suggestions, but in the mean time here's all the
(modified for security) lines from my .mc file used to generate the
sendmail.cf....

divert(0)dnl
VERSIONID(`@(#)main.mc 1.5 (Sun) 08/10/00')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
MASQUERADE_AS(`companyname.com')dnl
define(`SMART_HOST', `exchange_server.companyname.local')dnl
FEATURE(`masquerade_envelope')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl

And (again slightly modified) sendmail -bt output...

> $=w
companyname.com
[10.xxx.xxx.33]
loghost
localhost
sunC13
[127.0.0.1]
sunC13.companyname.local

Thanks,

Steve

Report this message

#5: Re: Wierd problem. masquerade, except to a certain domain.

Posted on 2005-09-22 14:02:33 by steve0504

Hi,

I tried the suggestions exactly as above and it's fixed all the
problems. *FANTASTIC*. We can now send emails to comapanyname.com AND
to other internet addresses.

Not exactly sure what I've done here to achieve this, but I'll keep
reading the sendmail cf/README to understand exactly what these files
are doing (I can guess of course, but would like to know exactly.)

Many thanks,

Steve

Report this message