cancel
Showing results for 
Search instead for 
Did you mean: 

sendmail and DS

SOLVED
Go to solution
Fred Martin_1
Valued Contributor

sendmail and DS

Ok I'm drawing a complete blank on this, this afternoon. In my sendmail.cf file, I have null for DS.

I understand that DS is the relay to which sendmail should forward email, if it is determined not to be local.

So where does it go if DS is null?

Also: My PCs POP in to this server to get email. There's no guarantee that they are using my sendmail server to send mail, right? i.e. they can configure the mail client to use some other mail server for SMTP, and mine for POP3. Is that correct?
fmartin@applicatorssales.com
5 REPLIES
Steven E. Protter
Exalted Contributor
Solution

Re: sendmail and DS

When DS is not set.

sendmail tries to resolve the DNS entry of the domain name of the mail, directly connect to the mail server on port 25 and deliver the mail.

You can see this happen with the following test:

sendmail -v -d8.99 -d38.99 someone@outside.net

type some text

.


You will see it happen before your eyes.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Schussele
Honored Contributor

Re: sendmail and DS

HI Fred,

Well you can use ruleset 0 to deliver all local domain mail directly IF you have $m macro defined. That's what defines the local domain and it's defined internally from the $j macro.
Also sendmail always checks for DNS MX records for all hosts & will use them if the $S macro (smart relay) is not defined. So DNS may be getting the job done for you as well.
There are several other reasons that involve UUCP, X400 and ldap as well.
SMTP is extremely powerful, customizable and flexible as well w/o having to use the smart relay.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Fred Martin_1
Valued Contributor

Re: sendmail and DS

Gents, thanks that's exactly right I guess. Steven, the test does make it obvious, it goes right to DNS and looks it up.

So - if I do set the DS macro, I assume that the DNS thing will never happen, and that sendmail will just use the DS host to attempt to deliver?

I'm about to install an anti-spam gateway and it will expect outbound mail to be forewarded it it, for evaluation.

That's why I asked the question about my PC users - they use Eudora mostly. If they set the SMPT server to be some open relay out on the internet someplace, then the outbound mail will go right by my anti-spam gateway.

If that's the case I can block it at my regular firewall (i.e. no mail leaves unless it comes from the anti-spam gateway).
fmartin@applicatorssales.com
Steven E. Protter
Exalted Contributor

Re: sendmail and DS

The DNS thing will not happen after DS is set and the sendmail daemon is stopped and started.

Then the test results from my test(given to me by hp years ago) will show no lookup, but acceptance by the relay server.

Whatever server you point to will have to explicitly allow relay.'

I do it this way:

DS
[ip_address]

DS
[192.168.0.4]

Others use hostname.

DShostname

My way works when the DNS server is offline but will be broken if the ip addy of the relay server is changed.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Fred Martin_1
Valued Contributor

Re: sendmail and DS

Thanks
fmartin@applicatorssales.com