Send an email to 163 in ubuntu

Source: Internet
Author: User

Environment: ubuntu12.04

I. Install software

Apt-get install sendmail

Apt-get install sendmail-cf (This software has been installed in the previous step)

Apt-get install mailutils

Check whether the installation is successful: Enter ps aux | grep sendmail on the terminal.

Root 23905 0.0 0.2 15104 2240? Ss sendmail: MTA: accepting connections
Hadoop 26100 0.0 0.0 4368 828 pts/2 S + grep -- color = au
To sendmail

Sendmail is successfully started.

Ii. Configuration

Vi/etc/mail/sendmail. mc

Modify: DAEMON_OPTIONS ('family = inet, Name = MTA-v4, Port = smtp, Addr = 0.0.0.0) dnl

Generate a new configuration file:

Cd/etc/mail

Mv sendmail. cf sendmail. cf ~ Backup

M4 sendmail. mc> sendmail. cf

3. Send email

Here I used a QQ mailbox, which is too pitfall.

Echo "body" | mail-s subject 12345@qq.com

No email was received. View/var/log/syslog and find DSN: Service unavailable. The domain name is incorrect on the network. Modify the host name.

Solution is to modify the/etc/hosts inside the first line: 127.0.0.1 gitlab.youdomain.com localhost ubuntu1204-dell #127.0.0.1 localhost. localdomain localhost ubuntu1204-dell do not restart, and then observe/var/logs/syslog log, the problem is solved, I did not solve here, and then modified the Host Name and hosts corresponding, the error is the same after restart, but relay = mx3.qq.com is found. [183.62.125.199]. It indicates that the email has been sent but is returned. You can only change it to the 163 email address.

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.