1
1
I have been struggling with mail function in Ubuntu. My goal is to send a test email from a terminal with a command:
echo "msg" | mail -s subject sample@domain.com.
I have tried to install sendmail
, but figured out that it could send if I rely on rely server(google smtp). I have tried to install exim4
, but in logs provides this data:
2015-11-10 19:09:03 1ZwCPm-00015C-TP <= root@localhost U=root P=local S=788
2015-11-10 19:09:03 1ZwCPm-00015C-TP ** localhost@localdomain <root@localhost>: Unrouteable address
2015-11-10 19:09:03 1ZwCPm-00015C-TP => /var/mail/mail (root@localhost) <root@localhost> R=mail4root T=address_file
2015-11-10 19:09:03 1ZwCPn-00015H-4o <= <> R=1ZwCPm-00015C-TP U=Debian-exim P=local S=1607
2015-11-10 19:09:03 1ZwCPm-00015C-TP Completed
I have no experience before configuring mail servers. Is it possible to do such action without having FQDN and domain name? Where do I start my investigation on such topic?
Is this possible if I don't want to rely on relayhost? – qop – 2015-11-11T19:30:22.467
relayhost
is the host through which you will send your messages. If you don't want to use a Gmail account, you'll need to specify a different provider and configure your client so it will allow you sending e-mails. – nKn – 2015-11-11T19:36:06.353I cannot create my own host? – qop – 2015-11-11T19:36:45.320
Sure, for that you should configure your own e-mail server. For allowing it to work correctly, you should use a real DNS host so your outgoing e-mails are not marked as spam. You can start here: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-postfix-e-mail-server-with-dovecot
– nKn – 2015-11-11T19:40:16.550