Link to home
Start Free TrialLog in
Avatar of sthay
sthayFlag for Cambodia

asked on

Sendmail add the hostname as a prefix to the domain name

Dear Experts,

I have my sendmail configured, and it works almost perfectly in my labs except:

1. when I sent from user1 to a user let's say user2@domain.com, the recipient received as from user1@SERVER.domain.com instead of user1@domain.com.

2. In my second scenario is that I configured my sendmail to use my ISP smart host(mail.DomainA.com) for relaying mail while my local coporated mail is mail.DomainB.com.

Now, whenever I sent a mail to out side world from my LAN, the recipients received my message as from the ISP domain name i.e user@DomainA.com instead of appearing from my original address which is user@DomainB.com.

Is that something to do with "MASQUERADE_AS, MASQUERADE_DOMAIN or MASQUERADE_ENVELOP" at my ISP?

Thanks very much in advance,
Avatar of kenfcamp
kenfcamp
Flag of United States of America image

check your sendmail localhosts file if you don't see a listing for 'domain.com' try adding one.

Every "actual" domain should have a listing in this file

Depending on the version of Sendmail you're using it should be located in /etc/mail
Avatar of sthay

ASKER

Dear Kenfcamp,

Thanks for the advise. Do you mean that I have to check /etc/mail/local-host-names file? FYI, in my file, there is "domain.com" listed.

Do you also have any suggestion on my second scenario?

Thanks so much again.

Rgds,
PS. My sendmail is came with RH 7.3.
ASKER CERTIFIED SOLUTION
Avatar of samri
samri
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sthay

ASKER

1. I worked out at my own regarding the first scenario. My DNS wasn't working properly so that's why sendmail added my hostname as a prefix to the domain name i.e. @hostname.domain.com.

2. Samri has given me the right answer to my second scenario. I am happy to award him a point. Thanks also to Kenfcamp who also contributed an advise.

Regards,
Avatar of sthay

ASKER

1. I worked out at my own regarding the first scenario. My DNS wasn't working properly so that's why sendmail added my hostname as a prefix to the domain name i.e. @hostname.domain.com.

2. Samri has given me the right answer to my second scenario. I am happy to award him a point. Thanks also to Kenfcamp who also contributed an advise.

Regards,
thanks.

I tought that Masquerading could have taken care problem #1 too.