Score:0

Can't send email on ubuntu with mail command

mp flag

on my ubuntu server (DigitalOcean droplet) I'm trying to send an email for first time.

I downloaded mailutils and mailx with following command:

sudo apt install mailutils -y

On configuration screen I chose default options: Internet site and then name sender as my droplet name.

To send email I do the following (replacing [email protected]):

echo "Hello world" | mail -s "Test" [email protected]

But nothing happens, I get no error message or anything, I checked my inbox and spam folders but nothing is there...

I also don't know where mail logs are placed on my system, I haven't found anything... Please help me.

I followed this turorial: https://www.digitalocean.com/community/tutorials/send-email-linux-command-line

cn flag
As your question is tagged with Ubuntu, the logs for mail are `/var/log/mail.log` and `/var/log/messages`. Tail the logs when using the `mail` command and add their output to the question.
gabogabans avatar
mp flag
None of these log files exist on my server
cn flag
`/var/log/syslog`. I don't know what release of Ubuntu you have but `/var/log/mail.log` exists on 22.04. Perhaps your system has `/var/log/maillog`.
gabogabans avatar
mp flag
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-197-generic x86_64) @Nasir Riley
AWM avatar
cn flag
AWM
@gabogabans: Did you ever figure this out? I have the same issue. Thanks in advance.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.