1831219 Members
2978 Online
110021 Solutions
New Discussion

problems with sendmail

 
SOLVED
Go to solution
Lora Ganeva
Regular Advisor

problems with sendmail

I have RedHat7.3 and my problem is that even when I define a host in the access databse, this host cannot connect to tcp 25 to my smtp server.
Any help would be greatly appreciated.
4 REPLIES 4
Pal Szabo_1
Valued Contributor

Re: problems with sendmail

Hi!

The sendmail don't use the access database directly.
I think it was a performance decision.

It uses the compiled access database files:

(usually
dbm format.Defined in the sendmail.cf)

This is the following:
access.pag
access.dir

You should compile the access
database with the following
commands:
1. Edit your access file!
2. # cd /etc/mail
3. # mkdir orig
4. # cp access* ./orig
5. # cat ./access | /usr/sbin/makemap dbm access

It will create the new access.pag and access.dir files.Check the permission of this files:

6. # ls -al access*
7. stop your sendmail or
send them a SIGHUP process


Regards:
Paul
Stuart Browne
Honored Contributor
Solution

Re: problems with sendmail

Actually, it sounds more like Sendmail isn't listening on the network interface that you are trying to connect too.

If you issue 'netstat -ntlp | grep sendmail', and see what IP addresses it's listening on, you should see one looking like '0.0.0.0:25'. If this only says '127.0.0.1:27', then it's configured to only listen on the loopback device.

To change this, check the sendmail.cf for a 'O DaemonPortOptions' line. If this has somethin glike 'Addr=127.0.0.1, name=MTA', then that's the cause. Get rid of the addr part.

If you have a working sendmail.mc file in /etc/mail/, you need to dnl the line "DAEMON_OPTIONS(`port=smtp,Addr=127.0.0.1, Name=MTA')", and re-generate your cf file using 'm4 sendmail.mc > /etc/sendmail.cf'.

Hope this helps.
One long-haired git at your service...
Lora Ganeva
Regular Advisor

Re: problems with sendmail

You are right-that's the reason but even when i changed the line with daemon options and even when I completely removed it It continued listening only on 127.0.0.1..How could I change this?
Stuart Browne
Honored Contributor

Re: problems with sendmail

The configuration file is only read upon the start-up of a sendmail process. Meaning you'll need to re-start the listening daemon for it to take effect.

service sendmail restart

should suffice.
One long-haired git at your service...