Mail in Linux

Source: Internet
Author: User

1. Install the mail transmission agent
Sudo apt-Get install sendmail
Sudo apt-Get install sendmail-cf
2. Install mailutils
Otherwise, you cannot use the MAIL command.
3. Configuration
By default, Sendmail only sends emails to local users. Only by extending Sendmail to the Internet can it become a real mail server.
VI/etc/mail/sendmail. MC
Daemon_options ('family = Inet, name = MTA-v4, Port = SMTP, ADDR = 127.0.0.1 ') DNL
CD/etc/mail
# Mv sendmail. cf sendmail. cf ~ // Make a backup
# M4 sendmail. MC> sendmail. cf
If the following problem occurs:
* ** Error: feature () shocould be before mailer ()
* ** Mailer ('local') must appear after feature ('ways _ add_domain ') *** error: feature () shocould be before mailer ()
* ** Mailer ('local') must appear after feature ('allmasquerade ') *** error: feature () shocould be before mailer ()
Solution:
Modify the last few lines of sendmail. MC
VI/etc/mail/sendmail. MC
Add
Mailer_definitions
Mailer ('local') DNL
Mailer ('smtp ') DNL
Put it at the end of the document
3. restart Sendmail.
Service Sendmail restart
View:
Netstat-tlunp | grep 25
TCP 0 0 0.0.0.0: 25 0.0.0.0: * listen
4. send an email

Mail xx@qq.com-s "theme" <mail content .txt

But I don't know why I can't send 163.com emails?


Related Article

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.