Linux setup mail server

Steps to set up an SMTP server under linux and use the mail command to send emails:

1.vi /etc/mail.rc

set [email protected] #Default     user email address for sending emails
set smtp=aa.smtp.xx.cn #Select the default public email domain name for sending emails     set
smtp -auth-user= [email protected] #Default The user who sends out emails
set smtp-auth-password=123456 #corresponding to the password of the default user
set smtp-auth=login #login is used by default

 

2.vi /etc/hosts add the ip corresponding to the email address

10.0.0.123   [email protected]

 

3. Test email sending

echo ""mailbox test" | mail -s "mailbox test"  [email protected]

Mail can be received normally!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326643803&siteId=291194637