I first installed sendmail on ubuntu 17.04 by running
sudo apt-get install sendmail and then I made sure that the hostname of my machine was added to
/etc/hosts/ right after
localhost like this:
127.0.0.1 localhost myhostname
I then ran
sudo sendmailconfig and answered yes to all the questions. I'm now trying to send some mail. I do this:
echo "Subject: sendmail test" | sendmail -v firstname.lastname@example.org
Sendmail prints the following:
ole@mki:~$ echo "Subject: sendmail test" | sendmail -v email@example.com WARNING: local host name (localhost) is not qualified; see cf/README: WHO AM I? firstname.lastname@example.org... Connecting to [127.0.0.1] via relay... 220 localhost ESMTP Sendmail 8.15.2/8.15.2/Debian-8ubuntu1; Mon, 14 Aug 2017 14:28:56 -0500; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1] >>> EHLO localhost 250-localhost Hello localhost [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-EXPN 250-VERB 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-AUTH DIGEST-MD5 CRAM-MD5 250-DELIVERBY 250 HELP >>> VERB 250 2.0.0 Verbose mode >>> MAIL From:<ole@localhost> SIZE=23 AUTH=ole@localhost 250 2.1.0 <ole@localhost>... Sender ok >>> RCPT To:<email@example.com> >>> DATA 250 2.1.5 <firstname.lastname@example.org>... Recipient ok 354 Enter mail, end with "." on a line by itself >>> .
I'm not sure what I'm supposed to do at this point. I tried putting a "." on a line by itself and returning but nothing happens. If I press
ctrl C I get the prompt back buy the email does not appear in my gmail inbox. Thoughts?