Linux mail to QQ email __linux

Source: Internet
Author: User
Tags auth

Because of some security settings for QQ mailboxes, mail messages delivered by this machine mail command

The SMTP server is localhost SendMail or postfix.

So the message from IS from Localhost.localdomain Mail

QQ all refused.

and returns a 550 error

The Mail command is configured to send mail using a remote QQ SMTP server and log in with a QQ mailbox

1. Configure the sending environment

# cat/etc/mail.rc |grep-v-E "^#|^$"
set hold
set append
set ask
set CRT
set dot
set keep
se T Emptybox
set indentprefix= ">"
set quote
set Sendcharsets=iso-8859-1,utf-8
set ShowName
Set Showto
set Newmail=nopoll
set Autocollapse
ignore received
in-reply-to Message-id references Ignore mime-version content-transfer-encoding
fwdretain subject date from to
set Bsdcompat
set from= 994414615\ @qq. com from
set smtp-auth-user=994414615\ @qq. com smtp-auth-passwo Rd=youpassword smtp-auth=login//Login QQ SMTP server username and password

Note: The From item and the QQ in the user item in the configuration file can not be canceled, or the shell

The @ is treated as a special character.


2. Send command

# echo "A test mail to QQ mail server\!\!" | Mail-s Caiwenguang

Can use QQ mailbox to receive alarm mail, so if QQ online can have mail can be prompted at any time.

After yesterday's test, you intend to apply this to the server, resulting in an error thrown in the Maillog

Mar 14:43:26 Web-server01 sendmail[30245]: s2v6hp11030245:to=eot,, Ctladdr=root (0/0), delay= 00:00:00, xdelay=00:00:00, Mailer=relay, pri=60079, relay=[] [], dsn=4.0.0, stat=deferred: Connection refused by []
Mar 14:46:32 Web-server01 sendmail[30255]: S2v6kwzt030255:from=root, size=77, Class=0, Nrcpts=1, msgid=< 201403310646.s2v6kwzt030255@localhost.localdomain> a relay=root@localhost.

Depressed ...

After several twists and turns found RHEL5.4 on the Mail command and SendMail have this inextricably linked

Simply unload the SendMail and mailx8.1 install the new MAILX package

Yum Remove SendMail

Install a new MAILX package


# make

# Make Install Ucbinstall=/usr/bin/install

test-d/usr/local/bin | | Mkdir-p/usr/local/bin
/usr/bin/install-c MAILX/USR/LOCAL/BIN/MAILX
test-d/usr/local/share/man/man1 | | Mkdir-p/usr/local/share/man/man1
/usr/bin/install-c-M 644 mailx.1/usr/local/share/man/man1/mailx.1
test-d/etc | | Mkdir-p/etc
Test-f/etc/nail.rc | | \
/usr/bin/install-c-M 644 nail.rc/etc/nail.rc//This configuration file

View the modified configuration file

# cat/etc/nail.rc |grep-ve "^#|^$"
Set hold
Set Append
Set Ask
Set dot
Set Keep
Set Emptybox
Set indentprefix= ">"
Set Quote
Set Sendcharsets=iso-8859-1,utf-8
Set ShowName
Set Showto
Set Newmail=nopoll
Set Autocollapse
Ignore received in-reply-to Message-id references
Ignore Mime-version content-transfer-encoding
Fwdretain subject date from to
Set Bsdcompat
Set from=994414615\ @qq. com
Set smtp-auth-user=994414615\ @qq. com smtp-auth-password=youpassword smtp-auth=login

Test again

# echo ' This is a test Mail,hello cai\! ' | /usr/local/bin/mailx-s Testmail

Successfully sent ...


An essay on the Lost Small Operation dimension

Author: John

Reprint please indicate the source

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.