Operating System - Linux
1827877 Members
1689 Online
109969 Solutions
New Discussion

sendmail configurations -- plz help

 
SOLVED
Go to solution
Maaz
Valued Contributor

sendmail configurations -- plz help

Dear Gurus

os = rhel
mta = sendmail 8.13.x
mail server ip = 10.0.0.1/8
domain name = abc.com


# cat /etc/mail/local-host-names
abc.com


# cat /etc/mail/access
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY

10 RELAY # i add this line '10' is the net-id of my lan
abc.com RELAY # i add this line 'abc.com' is my email & dns domain

# cd /etc/mail
# make


in sendmail.mc
DAEMON_OPTIONS(`Port=smtp,Addr=10.0.0.1, Name=MTA')dnl

# service sendmail start


I m running sendmail with just the configurations above... and rest are the defaults

Questions:

1) does my mail server is an Open-Relay ?
2) in access file i have added last two lines ... if i did right ? i dont know the reason to add these two lines in access file(i have followed the "insructions manuals" designed by an x-admin).

So plz any can explain me the roles of these two lines in /etc/mail/access i.e

10 RELAY
abc.com RELAY

Regards
Maaz



5 REPLIES 5
Alexander Chuzhoy
Honored Contributor
Solution

Re: sendmail configurations -- plz help

10 RELAY
abc.com RELAY

means:
e-mail that came from 10.x.x.x addresses can be relayed anywhere
also
email that came from *.abc.com can be realyed to any domain.


as for open relay question:
by default relaying is closed. In order to make your server open relay (to relay any incoming mail anywhere-highy unsecure and should be done only for testing purposes)
add a line to /etc/mail/sendmail.mc
FEATURE(`promiscuous_relay')
then execute
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
service sendmail restart
Maaz
Valued Contributor

Re: sendmail configurations -- plz help

Dear Alexander Chuzhoy Millions Thanks

so in my case is there any need to add these two lines ?

and instead of 'RELAY' if i use 'OK' as
10 OK
abc.com OK

results ? consequence ?

Regards
Maaz
Alexander Chuzhoy
Honored Contributor

Re: sendmail configurations -- plz help

here's a brief-found in the internet
OK Accept mail even if other rules in the running ruleset would reject it, for example,if the domain name is unresolvable.

RELAY Accept mail addressed to the indicated domain or received from the indicated domain for relaying through your SMTP server. RELAY also serves as an implicit OK for the other checks.

REJECT Reject the sender or recipient with a general purpose message.

DISCARD Discard the message completely using the discard mailer. This only works for sender addresses (i.e., it indicates that you should discard anything received from the indicated domain).


For example:
cyberspammer.com 550 We don't accept mail from spammers
okay.cyberspammer.com OK
sendmail.org OK
128.32 RELAY


Best regards
Maaz
Valued Contributor

Re: sendmail configurations -- plz help

so what u Gurus Suggests... in my case should i add/append/remain these two lines in my /etc/mail/access(plz check/see my first post in this thread for config details)


10 RELAY
abc.com RELAY

Regards
Maaz
Geoff Wild
Honored Contributor

Re: sendmail configurations -- plz help

Well - that depends - do you want everyone in the class A 10.x.x.x pool to be able to use your sever to relay mail through?

I highly doubt it - I know I wouldn't want that!

If you just want to accept mail from 10.x.x.x - then make it:

10 OK
abc.com RELAY

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.