# sendmail:can't open the smtp port(25) on mail

## chrisp

The thing is, I'm not trying to send any mail. I have a DSL modem/router/firewall/hub box and yet if you leave gentoo logged in for a minute or two these messages start appearing, but only on one machine, the other one is fine. I am deeply confused, and somewhat concerned, any help would be greatly appreciated.  :Confused: 

----------

## Celtic

I have the same problem with my gentoo. It appeared when i fresh installed 1.4_rc1. Havent figured out yet what is causing it.   :Confused: 

/usr/sbin/sendmail: can't open the smtp port (25) on mail is the message that appears.

----------

## Celtic

-update-

The message only appears to root and dead.letter file in /root show MANY /bin/sh: root: command not found messages.

-update2- 

it has something to do with cron

----------

## Eagle-Eye

 *Celtic wrote:*   

> /usr/sbin/sendmail: can't open the smtp port (25) on mail is the message that appears.

 

The errormessage is probably from the mail wrapper net-mail/ssmtp. You just have to configure it in /etc/ssmtp/ssmtp.conf or exchange it with sendmail or some other MTA. (The error message probably appears when cron is trying to send you some information.)

----------

## chrisp

Ahh well at least I'm not alone, and it's not any external influence.

Thanks.

----------

## mglauche

cron sends status updates per email (errors, warnings, etc)

So basicly if you have cron running, you should have some working email setup.

From what it sounds you are using ssmtp, which is a very simple sendmail replacement that sends mail to a predefined email-gateway.

You could either configure ssmtp, or install some local MTA like postfix, so that the email is delivered locally.

----------

## Celtic

 :Smile:   I installed and configured postfix and the message disappeared. Thx.

----------

## toskala

yes, of course it vanishes as soon you conf your mta correctly.

another way of getting rid of the messages is to redirect all output to /dev/null. add "1>&2>/dev/null" at each end of your crontab commands. should do the trick

----------

## aheld

If you don't install a full email server you get ssmtp 

ssmtp is a simple mail sending program that emulates the sendmail for use from the command line.

you should edit /etc/ssmtp to get this working properly.

In /etc/ssmtp/ssmtp.conf you can set the mailhub of the 'smart' mailer that can send the message.

set /etc/ssmpt/revaliases to set root to a real email address

edit /etc/aliases to change root to an external email address that you check

----------

## carrett

 *mglauche wrote:*   

> cron sends status updates per email (errors, warnings, etc)
> 
> So basicly if you have cron running, you should have some working email setup.
> 
> From what it sounds you are using ssmtp, which is a very simple sendmail replacement that sends mail to a predefined email-gateway.
> ...

 

what do i put for mailhub if i just want it mailed locally? i've tried my hostname, localhost and 127.0.0.1 but all of them cause that annoying error message, just with the different names i typed instead of mail, so:

sendmail: Cannot open 127.0.0.1:25

something like that.

so, what should i put?

----------

## PowerFactor

If you want't local delivery you need to install a real mta, ssmtp cant do it.

----------

## mastergara

I am also seeing this error message post-install on 1.4 RC4. Since this is something I have not configured, and do not want running on my system, how do I go about disabling this, and not just ignoring the fact that sendmail is attempting to send something out on my system.?

----------

