send an email with postfix from command line on fedora 22
I have installed Postfix on my Fedora 22.
Following this tutorial http://patscomputerservices.com/setting-up-a-google-relay-host-using-postfix-on-fedora-19/
And tried:
sudo mail -s "Subject: Test email from linux server" myname@myemailaccount.com
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.
Why are you using
sudo
? Sending email doesn't need root and the guide you linked to doesn't use it.Also,
mail
doesn't open an editor. Read themail
man page, and pay particular attention to the "Sending Mail" section. It's not hanging; it's waiting for you to do something.