Ask Your Question

send an email with postfix from command line on fedora 22

asked 2015-08-12 17:01:07 -0500

lindsaymacvean gravatar image

I have installed Postfix on my Fedora 22.

Following this tutorial

And tried:

sudo mail -s "Subject: Test email from linux server"

I think its supposed to open an editor for the email but nothing happens it just hangs.

I'm not an expert at debugging these issues, I have tried playing with journalctl but there doesnt seem to be any messages emitted on there when I am starting, restarting postfix, or trying mail.

Any suggestions towards helping debug this issue would be really appreciated.

edit retag flag offensive close merge delete


Why are you using sudo? Sending email doesn't need root and the guide you linked to doesn't use it.

sideburns gravatar imagesideburns ( 2015-08-12 18:05:44 -0500 )edit

Also, mail doesn't open an editor. Read the mail man page, and pay particular attention to the "Sending Mail" section. It's not hanging; it's waiting for you to do something.

larsks gravatar imagelarsks ( 2015-08-12 21:16:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-08-12 23:42:58 -0500

linux.alder gravatar image

It should "appear" to hang. But it is waiting for input (your message). After you enter the above command, start typing your message, when you are done with your message type Ctrl-D.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-08-12 17:01:07 -0500

Seen: 1,324 times

Last updated: Aug 12 '15