1833712 Members
2041 Online
110063 Solutions
New Discussion

about sendmail

 
tuhin
Occasional Advisor

about sendmail

my HOSTNAME=ns.lx01.com
and dns has MX 10 ns.lx01.com
my sendmail only configure with Cwlocalhost.
do i need to chainge it to Cwlx01.com?
and other setting is ok.

5 REPLIES 5
Plenty Groover
New Member

Re: about sendmail

I'm just learning the same myself, but I believe that you are correct in having to change your sendmail.cf file to show Cw lx01.com. Otherwise you would have to give the FQDN including the host name for the mail server.
You can never be more than you wish to be...
Kasper Haitsma
Trusted Contributor

Re: about sendmail

Hello,

w holds the values, that this_host_accepts_mail_for

if mail for your domain (lx01.com) should also be accepted by this host, 'lx01.com' needs to be included into 'w'. Also aliases if you have them, like mail.lx01.com. I suggest to leave 'Cwlocalhost' alone, and add the following to /etc/mail/local-host-names

ns
ns.lx01.com
# the following 3 only when applicable
lx01.com
mail
mail.lx01.com

local-host-names is referenced from sendmail.cf by the line:
Fw/etc/mail/local-host-names

local-host-names == sendmail.cw on hp-ux

You can test if sendmail sees the correct values by starting sendmail in test mode:
sendmail -bt
> $=w #should return all the values sendmail holds for 'w'
ns
ns.lx01.com
localhost
[127.0.0.1]
[IP for ns.lx01.com]
> D #to exit test harnas

The next bit is from sendmail.cf on hp-ux explaining the Class 'w':

Aliases for Local Host (class w): This configuration will automatically recognize that mail to users at the local host or any of its host name aliases or CNAMEs should be delivered locally. Other host names that you wish to recognize as local can be added to class w as either a simple class definition (Cw) or a file class (Fw). Any names added to class w must be canonical names. For example, by default, only the server of an nfs cluster runs the sendmail daemon, and mail from the clients is sent out with headers indicating that it originated on the server. However, you might want the server also to accept mail addressed to users at the clients. You could have nameserver MX records directing mail for the clients to the server, and make the server recognize the clients' host names as local. By default class W is defined in 2 stages. Using Cw to add the name "localhost" to class w and then adding the names listed in the file "/etc/mail/sendmail.cw" to class w using Fw. To add other hostnames to class w just add the names as new lines in the file sendmail.cw.


Hth
It depends
tuhin
Occasional Advisor

Re: about sendmail

kasper,

thanks for ur mail, its help me to confirm my dns settings and sendmail config.

pls help to sold this,

my dns master DB has A record,
localhost 127.0.0.1
this will localhost.lx01.com, right.

my q is do i need this localhost without (.)
or i have to give a (.) at the end, like,
localhost. 127.0.0.1



Sachin Patel
Honored Contributor

Re: about sendmail


Hi Tuhin,
You can add that as

localhost IN A 127.0.0.1

Sachin
Is photography a hobby or another way to spend $
tuhin
Occasional Advisor

Re: about sendmail

sachin and kasper,

thankyou for ur replay.
sorry for another quistion,
i have some Hesitation,
say i have my real domain registion (ns.lx01.com).
my hosts name is set to only with
127.0.0.1 localhost 102.100.1.12 ns.lx01.com
ans its dns entry is,
@ IN SOA ns root (...)
IN NS ns
IN MX 10 mail
ns IN A 102.100.1.12
mail IN CNAME ns #(**)

now, can i use this CNAME mail.lx01.com.

and do i need to add aliases name to my hosts file say
(102.100.1.12 ns.lx01.com mail.lx01.com).
plse help me to understand this.