[CentOS] configuring sendmails domain

Wed Nov 14 03:48:19 UTC 2007
Les Mikesell <lesmikesell at gmail.com>

Jerry Geis wrote:
>>
>> ----- Original Message ----- From: "Jerry Geis" <geisj at 
>> pagestation.com <http://lists.centos.org/mailman/listinfo/centos>> To: 
>> "CentOS ML" <centos at centos.org 
>> <http://lists.centos.org/mailman/listinfo/centos>> Sent: Wednesday, 
>> November 14, 2007 12:11:02 PM (GMT+1000) Australia/Brisbane Subject: 
>> [CentOS] configuring sendmails domain
>> I tried editing sendmail.cf and changing the Dj line to X.com so any 
>> email originating from my machine would be X.com not m.X.com where m 
>> is machine name.
>> I typed make in the /etc/mail directory and did service sendmail restart.
>> This did not work. email still shows as m.X.com
>> What am I missing so as to NOT have the machine name in the email 
>> address. I just want the domain.
>> Thanks,
>> Jerry _______________________________________________ CentOS mailing 
>> list CentOS at centos.org 
>> <http://lists.centos.org/mailman/listinfo/centos> 
>> http://lists.centos.org/mailman/listinfo/centos
>> -- 
>> This message has been scanned for viruses and dangerous content by 
>> MailScanner, and is believed to be clean.
>>
>>
>>
>> Editing the .cf file is not the way to do this sort of thing. Ensure 
>> you have the sendmail-cf package installed and make your changes to 
>> the /etc/mail/sendmail.mc file and then type 'make' to build the new 
>> .cf. Then restart sendmail.
>>
>> Incidentally, the .mc file has the necessary parameters in it that you 
>> may be looking for;
>>
>> dnl MASQUERADE_AS(`mydomain.com')dnl dnl # dnl # masquerade not just 
>> the headers, but the envelope as well dnl # dnl 
>> FEATURE(masquerade_envelope)dnl dnl # dnl # masquerade not just 
>> @mydomainalias.com, but @*.mydomainalias.com as well dnl # dnl 
>> FEATURE(masquerade_entire_domain)dnl dnl # dnl 
>> MASQUERADE_DOMAIN(localhost)dnl dnl 
>> MASQUERADE_DOMAIN(localhost.localdomain)dnl dnl 
>> MASQUERADE_DOMAIN(mydomainalias.com)dnl dnl 
>> MASQUERADE_DOMAIN(mydomain.lan)dnl
>>
>>   
> I changed all the above to my X.com domain removed the dnl's on the line
> did a make in the /etc/mail directory, did service sendmail restart
> and I still get m.X.com and not just X.com
> 
> What am I still missing something? Thanks,

Did your send your test email as root?  Either use a different login or 
comment out the EXPOSED_USER(`root')dnl line and restart sendmail with 
'service sendmail restart' (which will automatically rebuild sendmail.cf).

-- 
   Les Mikesell
    lesmikesell at gmail.com