You are not logged in.

#1 2014-09-30 20:28:56

nbd
Member
Registered: 2014-08-04
Posts: 389

[SOLVED]How to send email to a local user?

I have installed Mutt, msmtp, procmail and I can send and receive emails to/from remote hosts and I'd like to send email locally also (to the recipients on the same machine as the sender).

When I try to send email to a local user from the root account -

echo "Test message" | mail -s "Test subject" localuser

then I get an error that connection to the port 25 is refused. Because the /etc/msmtprc file contains the 'localhost' as the default account's host, and on the local host I don't have a mail server listening on 25 port running.

When I try to send email from a non-root account which has in /$HOME/.msmtprc file a real email account on a remote server, then of course there is an error that the domain for the email address 'localuser' is not recognized.

How can sending email to local users be enabled?

Last edited by nbd (2014-09-30 22:33:37)


bing different

Offline

#2 2014-09-30 20:46:20

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: [SOLVED]How to send email to a local user?

Install postfix.  Configure it for local mail.  If your machine can be seen from the internet, be sure you check to ensure you are not an open relay.  Out of the box, sendmail should be safe, but I think you have to enable local mail.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2014-09-30 20:52:20

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: [SOLVED]How to send email to a local user?

Offline

#4 2014-09-30 21:04:13

nbd
Member
Registered: 2014-08-04
Posts: 389

Re: [SOLVED]How to send email to a local user?

If I understand correctly, postfix it's a constantly running daemon. Seems to be an overhead for delivering only from time to time sent messages.

ewaller wrote:
> Out of the box, sendmail should be safe, but I think you have to enable local mail.

Currently I have msmtp-mta installed, which is described as having sendmail functionality. If I install sendmail - will it be possible to send local email without running email daemons?


bing different

Offline

#5 2014-09-30 22:32:53

nbd
Member
Registered: 2014-08-04
Posts: 389

Re: [SOLVED]How to send email to a local user?

Exim seems the right tool.


bing different

Offline

Board footer

Powered by FluxBB