Linux send and receive mail
1. First make sure your Linux server is able to ping through www.baidu.com
Ping www.baicu.com
2. Apply for a @163.com personal email
3. After entering the mailbox, make the following settings.
1. Home electric shock Settings, click Pop3/smtp/imap Settings.
2. Select all of the options under the mayors. Then set an authorization password for yourself. This password is well-written and will be used later.
4. In Linux, append the following command to the
/etc/mail.rc file at the end.
# Send Email
Set from= here to fill in the email address
Set smtp=smtp.163.com:25
Set Smtp-auth=login
# Authorized users
Set smtp-auth-user= "Fill in the email address here."
# Authorization Password
Set smtp-auth-password= here to fill in the authorization password set in the mailbox.
# Ignore Validation
Set Ssl-verify=ignore
Set Nss-config-dir=/etc/maildbs
5. Finally use the test command echo "content free" |mail-s [email protected]
6. If you want to send an attachment, you can also
echo "This is a message with attachments" |mail-s "Test Mail"-a file.txt [email protected]
To test. The above is the process of using Linux to send mail to your personal 163 mailbox.
How to send mail to 163 mailboxes in Linux