Common Errors in Email Construction

Errors encountered in sending emails through the client, some experience in solutions

Error 504 5.5.2

错误信息:Please check the email <[email protected]>, server reply: 504 5.5.2 <DESKTOP-8NP2UMV>: Helo command rejected: need fully-qualified hostname

 

wrong reason:

The helo information of the mail sending client is not the full FQDN name, the general mail client is sent using the host name

For the server, we generally do not set it to the form of fqdn on the computer

Solution: Fix the postfix configuration file /etc/postfix/main.cf

Find helo authentication information smtpd_helo_restrictions comment out the following line

reject_non_fqdn_helo_hostname

 

Error 450 4.7.1

错误信息:Please check the email <[email protected]>, server reply: 450 4.7.1 <DESKTOP-8NP2UMV>: Helo command rejected: Host not found

 

The reason is the same as the previous error. If your host is fqnd but the reverse PTR cannot be resolved, it is

For this error, when the client sends a help message, the server will perform a reverse view through the client's IP information, such as if there is no match

Report this error, these two settings are mostly used for internal mail

solution

Fix the postfix configuration file /etc/postfix/main.cf

Find helo authentication information smtpd_helo_restrictions comment out the following line

reject_unknown_helo_hostname

 

The solutions for the following two errors are the same as 554 5.7.1, 454 4.7.1

错误信息:554 5.7.1 <[email protected]>: Recipient address rejected: SMTP AUTH is required, or it is a spam with forged sender domain

 

If you solve this error, you can cancel the following policy check. At this time, there is no problem in the internal mail.

The external mail will have the following error

check_policy_service inet:127.0.0.1:7777

 
 

Error message: 454 4.7.1 <[email protected]>: Relay access denied

 

The cause of the problem is found by looking at the logs, we send mail is anonymous, you must be authenticated to enable outgoing mail in the configuration file

Dec 17 11:01:58 www postfix/smtpd[1740]: disconnect from unknown[101.64.179.207]

Dec 17 11:02:11 www postfix/postscreen[1739]: CONNECT from [101.64.179.207]:10466 to [103.79.76.193]:25

Dec 17 11:02:11 www postfix/postscreen[1739]: PASS OLD [101.64.179.207]:10466

Dec 17 11:02:11 www postfix/smtpd[1740]: connect from unknown[101.64.179.207]

Dec 17 11:02:12 www postfix/smtpd[1740]: Anonymous TLS connection established from unknown[101.64.179.207]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)

Dec 17 11:02:12 www postfix/smtpd[1740]: NOQUEUE: reject: RCPT from unknown[101.64.179.207]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> pr

oto=ESMTP helo=<DESKTOP-8NP2UMV>

 
 

Add the following lines to the configuration file /etc/postfix/main.cf

Note that if there is no relevant option, just add

 
 

smtpd_sasl_auth_enable = yes #Use SMTP authentication

broken_sasl_auth_clients = yes #so that smtpclient that does not support RFC2554 can also interact with postfix

smtpd_sasl_local_domain = $ myhostname #domain requiring authentication,

smtpd_sasl_security_options = noanonymous // Do not allow the specified domain to send mail anonymously

Guess you like

Origin www.cnblogs.com/navysummer/p/12672657.html