Open terminal under Ubuntu
Input: sudo apt-get install SendMail
General installation is complete Karma
Stay with me. Enter the/etc/mail/directory input: M4 SENDMAIL.MC > Sendmail.cf meaning to follow. mc File Generation SENDMIAL.CF File
Input a command: PS aux | grep sendmail
Root 5721 0.0 0.0 11496 2136? Ss 23:31 0:00 sendmail:MTA:accepting connections gateman 5836 0.0 0.0 4020 768 PTS/1 s+ 23:42 0:00 grep--color=auto SendMail
If you see an information sister, it indicates that the SendMail server has been started.
Under test: Input: Sendmail-s test nvd11@163.com < Past1.txt
Error: Warning:runasuser for MSP ignored, check group IDs (egid=1000, want=127) can not ChDir (/var/spool/mqueue-client/): Pe Rmission denied program mode requires special privileges, e.g., Root or Trusteduser.
Surf the Internet, SendMail by default, only let the root use ...
Information indicates that non-root users cannot access/var/spool/mqueue-client/as long as the/var/spool/mqueue-client permission is changed
sudo chmod a+rwx/var/spool/mqueue-client/
Follow-up restart SendMail services: sudo service sendmail restart
Try again: Sendmail-s Test nvd11@163.com < Past1.txt
Check the mailbox OK.
====================================== Below is a D sendmail command usage for online excerpt:
Common ways to send mail are as follows:
1. How to write general mail: mail flynewton@gmail Edit cc object, message subject, message body, press ctrl-d end
2. Quick send: echo "Message body" | Mail-s Mail Subject flynewton@gmail.com
3. Send the file content as the message body: mail-s test flynewton@gmail.com < Test.txt
4. Send mail with attachments: uuencode attachment name Attachment display Name | Mail-s Mail Subject send address
Example: Uuencode test.txt test.txt | Mail-s Test flynewton@gmail.com
----------------------------------------
After setting up sendmail in Ubuntu, using the above command, test success, third in English environment, also can send the Chinese content txt document, and in the external inbox normal display
Environment is a self-built internal domain name that can be sent externally to the mail
However, the message cannot be sent externally, because the domain name is private and cannot be found on the public web.