How to set DJ and DS in sendmail.mc rather than sendmail.cf manually
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to set DJ and DS in sendmail.mc rather than sendmail.cf manually
The only way I know how to configure these two settings for sendmail is to directly edit the sendmail.cf, so I wanted to finally learn how to do it the proper way by editing the .mc then making the cf. My only problem is, i'm not finding a document or chart to match up what i have to change in the mc to get the desired result in the cf.
# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
Dj MyDomainGoesHere.com
# "Smart" relay host (may be null)
DSrelay.goes.here
The only way I know how to configure these two settings for sendmail is to directly edit the sendmail.cf, so I wanted to finally learn how to do it the proper way by editing the .mc then making the cf. My only problem is, i'm not finding a document or chart to match up what i have to change in the mc to get the desired result in the cf.
# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
Dj MyDomainGoesHere.com
# "Smart" relay host (may be null)
DSrelay.goes.here
Right...and from the sendmail documentation link provided in the first response:
Quote:
Originally Posted by Sendmail Documentation about Domains
# To create your own configuration file,
# create an appropriate domain file in ../domain, change the
# `DOMAIN' macro below to reference that file, and copy the result
# to a name of your own choosing.
...and....
*******************************************************************
*** BE SURE YOU CUSTOMIZE THESE FILES! They have some ***
*** Berkeley-specific assumptions built in, such as the name ***
*** of their UUCP-relay. You'll want to create your own ***
*** domain description, and use that in place of ***
*** domain/Berkeley.EDU.m4. ***
*******************************************************************
So, the domain file doesn't exist, because you haven't created it yet, following the instructions and sample files provided with Sendmail.
Sorry, guess I didn't write my question right/out fully. I see the sample domain files, but do I just vi them, or is there some make type utility I need to use for here too?
Also, can I just take the generic.m4, rename it and add
DOMAIN(mydomain.whatever)dnl
and that should work? I think it would but obviously I'm not sure on this.
Sorry, guess I didn't write my question right/out fully. I see the sample domain files, but do I just vi them, or is there some make type utility I need to use for here too?
Nope, just edit them, and when you do the m4 build on your main file, it'll churn through things, if I remember correctly.
Quote:
Also, can I just take the generic.m4, rename it and add DOMAIN(mydomain.whatever)dnl and that should work? I think it would but obviously I'm not sure on this.
OK, think I did that ok, make no longer complains. Send a test email, but the domain part still came through as localhost.localdomain. So I look in my sendmail.cf and I don't have the DJ. In my .mc I have
DOMAIN(`NameIWant')dnl
where NameIWant matches the name of the .m4 I just did.
Is there maybe another way to set domain via the mc?
actually, think I may have gotten it, although i'm not sure why. I added a
define(`confDOMAIN_NAME', `MyServer.com')dnl
and now the domain part comes through as MyServer.com
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.