Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i'm really new to sendmail and i'm trying to configure it properly as my server mta.
First of all i'm trying to accomplish some easy tasks as for example masquerade the domain name to show the one i need. I mean, i would like the from field of the email to show foo@myDomain.com
In order to do that i first try with the following, but didn't worked:

define(`confDOMAIN_NAME', `myDomain.com')dnl
FEATURE(`relay_entire_domain')dnl

Should this worked?

As it didn't worked for me, then i tried:

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

Last block worked fine, but i still think the first one should have worked.

Could someone point what's the error on the first block?
Should have it worked?
Is the syntax obsolete? Lastly, could someone tell what's the difference between the first and the last block? Thanks in advanced :)

PD: Byusing confMAILER_NAME satement should i be able to set a default user name, i.e. myUser@....

share|improve this question
    
can you clarify what you mean with a "default username" ? –  Marco Bizzarri Jul 30 '11 at 14:24
add comment

migrated from stackoverflow.com Jul 30 '11 at 14:01

This question came from our site for professional and enthusiast programmers.

2 Answers

The first block is saying that you should relay the hosts in your domain, as you can check in the sendmail documentation.

The second block, instead, talks about masquerading; you're asking to masquerade both the domain in your message headers and those in the envelope.

share|improve this answer
add comment

The second block is what you use to masquerade the "from" domain. The first block controls the HELO response of the server. Say the server's actual hostname is host1.abc.net. Configuring define(confDOMAIN_NAME', abc.net')dnl will present the sending server's name as abc.net.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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