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 |
Quote:
Code:
define(`SMART_HOST',`some.host.name') Code:
DOMAIN('yourdomain.com')dnl |
I got my smart host in there ok, but not having luck with the DOMAIN part. I changed yourdomain.com to what I wanted, and got the following error
m4:sendmail.mc:26: cannot open `/usr/share/sendmail-cf/domain/Domain.I.Tried.To.Set.It.As.com.m4': No such file or directory Basically what I'm trying to do is when this server sends an email, rather than it saying it's coming from whoever@localhost.localdomain, I want it to say whoever@SomethingThatMakesSense.something, where I'd be happy with whoever@servername.com or something like that just so we can tell what server it came from. |
Quote:
Quote:
|
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. |
Quote:
Quote:
|
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 |
All times are GMT -5. The time now is 12:23 PM. |