Hello.
I am scratching my head about sendmail for a simple thing:
I have a CentOS 4 box on which I would like to receive e-mails. when I type 'telnet localhost 25' I can connect successfully to the sendmail service. Now if I type: 'telnet 192.168.0.30 25' on the same host the connection is refused. It also refuses connections from another host.
I have edited the /etc/mail/access file and added: 192.168 OK But this doesn't help after a restart.
Does somebody know why the connection is refused ? I can see that behaviour on several CentOS box I have so it seems to be the new default. What parameter should I change to make it be accepted ?
Thank you, Daniel
On 8/5/05, dan1 dan1@edenpics.com wrote:
It also refuses connections from another host.
I have edited the /etc/mail/access file and added: 192.168 OK But this doesn't help after a restart.
Does somebody know why the connection is refused ? I can see that behaviour on several CentOS box I have so it seems to be the new default. What parameter should I change to make it be accepted ?
You will need to edit /etc/mail/sendmail.mc and regenerate a new sendmail.cf Edit and add a line similar to below for your network: DAEMON_OPTIONS(`Port=smtp,Addr=90.0.0.2, Name=MTA')dnl
Generate new cf file by running macro: #m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
Restart sendmail and you should be good. HTH
It also refuses connections from another host.
I have edited the /etc/mail/access file and added: 192.168 OK But this doesn't help after a restart.
Does somebody know why the connection is refused ? I can see that behaviour on several CentOS box I have so it seems to be the new default. What parameter should I change to make it be accepted ?
You will need to edit /etc/mail/sendmail.mc and regenerate a new sendmail.cf Edit and add a line similar to below for your network: DAEMON_OPTIONS(`Port=smtp,Addr=90.0.0.2, Name=MTA')dnl
Generate new cf file by running macro: #m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
Restart sendmail and you should be good. HTH -- Sudev Barar Learning Linux
Thank you Sudev. Nice help. Now it works, I just commented it out like Will suggested it. Kind regards, Daniel
You can actually just edit the sendmail.cf file directly and comment out the Daemon options line......rather than recompiling the sendmail.cf from the M$ macro compiler...
P.
dan1 wrote:
It also refuses connections from another host.
I have edited the /etc/mail/access file and added: 192.168 OK But this doesn't help after a restart.
Does somebody know why the connection is refused ? I can see that behaviour on several CentOS box I have so it seems to be the new default. What parameter should I change to make it be accepted ?
You will need to edit /etc/mail/sendmail.mc and regenerate a new sendmail.cf Edit and add a line similar to below for your network: DAEMON_OPTIONS(`Port=smtp,Addr=90.0.0.2, Name=MTA')dnl
Generate new cf file by running macro: #m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
Restart sendmail and you should be good. HTH -- Sudev Barar Learning Linux
Thank you Sudev. Nice help. Now it works, I just commented it out like Will suggested it. Kind regards, Daniel
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Am Fr, den 05.08.2005 schrieb Sudev Barar um 13:23:
You will need to edit /etc/mail/sendmail.mc and regenerate a new sendmail.cf Edit and add a line similar to below for your network: DAEMON_OPTIONS(`Port=smtp,Addr=90.0.0.2, Name=MTA')dnl
This is wrong, just because it will prevent the MTA listening on localhost, which is important.
Generate new cf file by running macro: #m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
That is too wrong, as the sendmail.cf is located in /etc/mail. Easier to simply run "make -C /etc/mail" while being anywhere in the system, or "make" while "/etc/mail" is cwd.
Restart sendmail and you should be good.
The "service sendmail restart" will btw. make the "make" step unnecessary. So just restarting the daemon through the init script will regenerate the .cf files if there were changes to the .mc files, and generate hashed map files too.
Alexander
On 8/5/05, Alexander Dalloz ad+lists@uni-x.org wrote:
Am Fr, den 05.08.2005 schrieb Sudev Barar um 13:23:
You will need to edit /etc/mail/sendmail.mc and regenerate a new sendmail.cf Edit and add a line similar to below for your network: DAEMON_OPTIONS(`Port=smtp,Addr=90.0.0.2, Name=MTA')dnl
This is wrong, just because it will prevent the MTA listening on localhost, which is important.
Just commenting out that line works also
Yeap, By default it's disabled. You need to enable it. Look at this mail https://www.redhat.com/archives/redhat-list/2001-September/msg02420.html Regards, Marc Picornell de Louvigny On 8/5/05, Dave wintermutecx@gmail.com wrote:
On 8/5/05, Alexander Dalloz ad+lists@uni-x.org wrote:
Am Fr, den 05.08.2005 schrieb Sudev Barar um 13:23:
You will need to edit /etc/mail/sendmail.mc and regenerate a new
sendmail.cf http://sendmail.cf
Edit and add a line similar to below for your network: DAEMON_OPTIONS(`Port=smtp,Addr=90.0.0.2 http://90.0.0.2,
Name=MTA')dnl
This is wrong, just because it will prevent the MTA listening on localhost, which is important.
Just commenting out that line works also _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 8/5/05, Dave wintermutecx@gmail.com wrote:
On 8/5/05, Alexander Dalloz ad+lists@uni-x.org wrote:
Am Fr, den 05.08.2005 schrieb Sudev Barar um 13:23:
You will need to edit /etc/mail/sendmail.mc and regenerate a new sendmail.cf Edit and add a line similar to below for your network: DAEMON_OPTIONS(`Port=smtp,Addr=90.0.0.2, Name=MTA')dnl
This is wrong, just because it will prevent the MTA listening on localhost, which is important.
Just commenting out that line works also _______________________________________________
1. Did I not say ADD and not replace? 2. AFAIK commenting out for 127.0.0.1 will put the machine in relay for all networks and thus open to span and exploits. 3. Interesting to note from Alexander that M4 is regenrated every time sendmail is retstarted.
On Sat, 2005-08-06 at 06:25 +0530, Sudev Barar wrote:
On 8/5/05, Dave wintermutecx@gmail.com wrote:
On 8/5/05, Alexander Dalloz ad+lists@uni-x.org wrote:
Am Fr, den 05.08.2005 schrieb Sudev Barar um 13:23:
You will need to edit /etc/mail/sendmail.mc and regenerate a new sendmail.cf Edit and add a line similar to below for your network: DAEMON_OPTIONS(`Port=smtp,Addr=90.0.0.2, Name=MTA')dnl
This is wrong, just because it will prevent the MTA listening on localhost, which is important.
Just commenting out that line works also _______________________________________________
- Did I not say ADD and not replace?
- AFAIK commenting out for 127.0.0.1 will put the machine in relay
for all networks and thus open to span and exploits. 3. Interesting to note from Alexander that M4 is regenrated every time sendmail is retstarted.
---- 1 - yes, you did 2 - the 'recommended' method was Alexander's method - see... http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ref- guide/s1-email-mta.html 3 - if you read the link above - you will see this referenced
Craig
On 05/08/05, dan1 dan1@edenpics.com wrote:
Hello.
I am scratching my head about sendmail for a simple thing:
I have a CentOS 4 box on which I would like to receive e-mails. when I type 'telnet localhost 25' I can connect successfully to the sendmail service. Now if I type: 'telnet 192.168.0.30 25' on the same host the connection is refused. It also refuses connections from another host.
I have edited the /etc/mail/access file and added: 192.168 OK But this doesn't help after a restart.
Does somebody know why the connection is refused ? I can see that behaviour on several CentOS box I have so it seems to be the new default. What parameter should I change to make it be accepted ?
https://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ref-guide/s1-em... -------------- Important The default sendmail.cf file does not allow Sendmail to accept network connections from any host other than the local computer. To configure Sendmail as a server for other clients, edit the /etc/mail/sendmail.mc file, and either change the address specified in the Addr= option of the DAEMON_OPTIONS directive from 127.0.0.1 to the IP address of an active network device or comment out the DAEMON_OPTIONS directive all together by placing dnl at the beginning of the line. When finished, regenerate /etc/mail/sendmail.cf by executing the following command:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf --------------
Will.
https://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ref-guide/s1-em...
Important The default sendmail.cf file does not allow Sendmail to accept network connections from any host other than the local computer. To configure Sendmail as a server for other clients, edit the /etc/mail/sendmail.mc file, and either change the address specified in the Addr= option of the DAEMON_OPTIONS directive from 127.0.0.1 to the IP address of an active network device or comment out the DAEMON_OPTIONS directive all together by placing dnl at the beginning of the line. When finished, regenerate /etc/mail/sendmail.cf by executing the following command:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Will.
Hello, Will. Thanks a lot. I didn't find that information and past already too long on it.. Now it works flawlessly .. I'm happy ;-)
Best regards, Daniel