I have installed postfix and start postfix service .
I can send email from user root to user debian8 by telnet command.
root@pengsir:/home/debian8# telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 pengsir.hfi ESMTP Postfix (Debian/GNU)
ehlo mail
250-pengsir.hfi
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:<root>
250 2.1.0 Ok
rcpt to:<debian8>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
this is a test mail send from root
.
250 2.0.0 Ok: queued as CA53CF82C3
quit
221 2.0.0 Bye
Connection closed by foreign host.
Let’s change user debian8 to receive the email.
root@pengsir:/home/debian8# su debian8
debian8@pengsir:~$ mail
Mail version 8.1.2 01/15/2001. Type ? for help.
"/var/mail/debian8": 1 messages 1 new 1 unread
N 1 root@pengsir.hfi Wed Aug 19 10:10 13/441
& 1
Message 1:
From root@pengsir.hfi Wed Aug 19 10:10:56 2015
X-Original-To: debian8
Date: Wed, 19 Aug 2015 10:10:23 +0800 (HKT)
From: root@pengsir.hfi
this is a test mail send from root
& quit
It is strange that i can not send email with mail or mailx command.
mail -s 'test_for_postfix' debian8@pengsir.hfi
mailx -s 'test_for_postfix' debian8@pengsir.hfi
It look like that the cursor will be stop in the console forever ,no error info putput when to execute the two commands.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I got the answer: input something and press ctrl+d and input something for cc , then press enter.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.