0

I've tried searching but all of the results seem to be about setting up an actual mail server. I just want the simplest solution.

I've added my email address to the bottom of /etc/aliases.

I've had the server a week or more now, and I note that /var/spool/mail/root doesn't exist? Why would that be, I feel there should be a smattering of emails in there by now. /var/spool/mail/codemonkey does exist (but is empty).

I (optimistically) tried dnf install mail, but that package doesn't exist. a dnf search shows sendmail and mailx, along with a million other things. What's the right package? Thanks

Codemonkey
  • 1,086
  • 4
  • 19
  • 41
  • Did you run `newaliases` after you updated your /etc/aliases file? Have you checked your logs (/var/log/mail and /var/log/messages)? Sendmail is probably going to be your "fastest and simplest", btw. – David W Nov 20 '20 at 10:50
  • I was about to edit the question to add postfix into the mix. But of mailx/postfix/sendmail you think the latter is the right choice? Why can't I find any eli5 tutorial outlining this crucial server-setup step? `newaliases` gives me `command not found` - I'll google that now. `/var/log/mail` doesn't exist, but I do have `/var/log/maillog` which has some entries. – Codemonkey Nov 20 '20 at 10:54
  • OK, `sendmail` installed, `newaliases` (comes as part of sendmail, I now know) run. Anything else? How can I test it's working? – Codemonkey Nov 20 '20 at 10:55
  • `sendmail me@mydomain.com < test` gives `stat=Deferred: Connection refused by [127.0.0.1]` in `/var/log/maillog` – Codemonkey Nov 20 '20 at 10:59

1 Answers1

1

Please try the following:

echo "Subject: sendmail test" | sendmail -v me@domain.com

This will give you a verbose output of sendmail.

  • I appreciate you taking the time to respond, but I gave up with sendmail, installed postfix and it worked essentially immediately. – Codemonkey Nov 24 '20 at 08:35