Installing and configuring SendMail

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.