Ask Your Question

Fedora 23: mail command not working

asked 2016-03-30 09:09:58 -0600

Michal Huniewicz gravatar image

On Fedora 21, I had a simple script for sending emails

mail -a /tmp/attachment.txt -s "..."

On Fedora 23, this no longer works.

No configuration file found at /home/mike/.esmtprc or /etc/esmtprc

I created the file and assigned correct permissions to it.

hostname = localhost:25

(That's what Fedora 21 would send emails from: mike@localhost.localdomain. )

Well, now I'm getting

SMTP server problem Connection refused

Question: how do I get the mail command to work on Fedora 23?

I've also tried installing postfix, but to no avail:

SMTP server problem SMTP server dropped connection
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2016-03-30 12:09:53 -0600

Michal Huniewicz gravatar image

Okay, seems like Fedora 21 must have had an email server running by default, but Fedora 23 does not.

In my


I had to add

hostname = [SMTP SERVER THAT WORKS]:25
mda "/usr/bin/procmail -d %T"

And that worked. Thanks everyone anyway!

edit flag offensive delete link more



that is correct, Fedora 23 does not include an email server by default.

aeperezt gravatar imageaeperezt ( 2016-03-30 12:16:35 -0600 )edit

answered 2016-03-30 10:41:43 -0600

aeperezt gravatar image

Fedora Workstation does not include any smpt server and mail tool if you needed you need to install packages like:

sudo install mailx postfix

Hope it helps

edit flag offensive delete link more


Already done that! I've got to stage where there are no errors, and it says

Connected to MTA
From mike@mikes: 250 Ok
To 250 Ok
Message data: .
Message sent: 250 Ok: queued as 48D4C6018E
Disconnected to MTA

But not email is sent.

Michal Huniewicz gravatar imageMichal Huniewicz ( 2016-03-30 10:43:24 -0600 )edit

if it say sent then you need to check on the email server and client on the destination address there are many rules that will send it to spam or junk folder specially if your machine does not have a proper revert dns address, and some other stuff did you sent to your self in the same machine to check it works?

aeperezt gravatar imageaeperezt ( 2016-03-30 10:49:32 -0600 )edit

Thing is, it worked with Fedora 21, so my assumption is, this gets lost somewhere within my system...

Michal Huniewicz gravatar imageMichal Huniewicz ( 2016-03-30 10:58:52 -0600 )edit

OK, so I'm getting

Host or domain name not found. Name service error for name=mikes
Michal Huniewicz gravatar imageMichal Huniewicz ( 2016-03-30 11:28:12 -0600 )edit

answered 2016-03-30 11:15:37 -0600

cialu gravatar image

You need to create a ~/.mailrc file with these lines:

set smtp=smtps://
set smtp-auth=login
set smtp-auth-password=userpassword
set ssl-verify=ignore
set nss-config-dir=/home/user/.mozilla/firefox/xxxxxxxx.default/

In this example, I suppose use of Gmail for SMTP and have Firefox (check your xxxxxxxx number) installed for certN.db and keyN.db files. You can change these values in base of your configuration.

edit flag offensive delete link more


I tried that, got Error initializing NSS: Unknown error -8015.

Either way, didn't need to do it with Fedora 21...

Michal Huniewicz gravatar imageMichal Huniewicz ( 2016-03-30 11:24:52 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-03-30 09:09:58 -0600

Seen: 4,605 times

Last updated: Mar 30 '16