View previous topic :: View next topic |
Author |
Message |
hitchhiker04 n00b
Joined: 19 May 2005 Posts: 20
|
Posted: Fri Jun 17, 2005 8:59 pm Post subject: ssmtp / mail problem |
|
|
I'm having trouble sending mail to root
Code: | # /etc/logcheck/logcheck.sh
send-mail: Cannot open mail:25
Can't send mail: sendmail process failed with error code 1 |
I check using telnet and nmap, it appears that the smtp port is not open
Code: | # telnet localhost 25
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused |
So anyone know how to fix this? |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Fri Jun 17, 2005 10:48 pm Post subject: |
|
|
Your default Gentoo install includes a packages called ssmtp. What this does is install a /usr/sbin/sendmail binary which accepts email from scripts, binaries, etc. If you've configured it correctly it'll then send the mail to your ISP's mail server for relaying. ssmtp cannot deliver mail locally. I'd guess that your program is trying to connect to port 25 which is empty since ssmtp is not a daemon or that ssmtp is not configured so when your program attempts to use /usr/sbin/sendmail it throws errors.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
hitchhiker04 n00b
Joined: 19 May 2005 Posts: 20
|
Posted: Fri Jun 17, 2005 11:05 pm Post subject: |
|
|
Im trying to configure /etc/ssmtp/ssmtp.conf
the default had " mailhub = mail", i think this is one of the problems but what do i change it to? |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Fri Jun 17, 2005 11:48 pm Post subject: |
|
|
mailhub is going to be the name of the server that is actually going to relay the mail. If you run your own mail server put that in your config. Or say if you're using an earthlink connection than it maybe smtp.earthlink.com or something similar. You'll need to consult your ISP to find the name of their smtp server.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
|