Operating System - HP-UX
1838307 Members
4489 Online
110125 Solutions
New Discussion

Re: sendmail and relaying

 
Fred Martin_1
Valued Contributor

sendmail and relaying

I've used the cf_gen script, choosing the "relay off" option. Now outsiders can't relay email, but neither can the PC hosts on my own network (they use POP/SMTP on my sendmail server).

I've tried "relay_entire_domain" and "relay_based_on_MX" and still, my PC hosts can't relay.

What am I missing here? All my PC hosts are on the same network; my goal is to stop other networks from relaying mail via my server.

So far anything I've tried also shuts out my own hosts.
fmartin@applicatorssales.com
5 REPLIES 5
Fred Martin_1
Valued Contributor

Re: sendmail and relaying

Ok, it appears that the $=m class macro is the issue - if I choose the "relay_entire_domain" option, it needs a definition through that macro and I'm sure it's not defined.

How do I do that?
fmartin@applicatorssales.com
someone_4
Honored Contributor

Re: sendmail and relaying

what version of sendmail are you using?
I usual vi sendmail.cf and make the changes.
Then stop and start sendmail.

Richard
Fred Martin_1
Valued Contributor

Re: sendmail and relaying

I'm running 8.9.3 ... but I need details on exactly what to change in the cf file. According to the gen_cf script, under "Relay Entire Domain" it says:

Setting this option will allow any host in your domain as defined by the 'm' class macro ($=m) to relay. By default only hosts listed as RELAY in the access db file will be allowed to relay.
fmartin@applicatorssales.com
Fred Martin_1
Valued Contributor

Re: sendmail and relaying

Have been doing some reading.

Ok, so the $m macro is internal. If I run sendmail with -d0.4 it tells me this, among other things:

(subdomain name) $m = com

Surely there must be something wrong with that. If so, perhaps that is my problem? Any ideas here?
fmartin@applicatorssales.com
Fred Martin_1
Valued Contributor

Re: sendmail and relaying

I believe I have solved it.

Using gen_cf I chose options 2 (relay off) and 6 (access db). Moved that new cf file into place, added the few local modifications that I normally require.

Then I created /etc/mail/access, with one line in it:
mydomain.com RELAY

Then I ran the command:
makemap dbm /etc/mail/access \< /etc/mail/access

Then, started and stopped sendmail.

Seems to be OK this way; PCs on my network can now POP/SMTP the sendmail server, and I tried logging in to the server to relay mail from someplace else and got denied.
fmartin@applicatorssales.com