postfix error: 535 5.7.8 Error: authentication failed: authentication failure

Solution 1:

You need to know the differences between smtpd and smtp in Postfix. In short, smtpd is the SMTP server that receive the email and smtp is the SMTP client that send the email.

Based on the article linked above, you need to add the following three parameters into main.cf:

smtp_sasl_auth_enable=yes 
smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd 
smtp_sasl_security_options

Unfortunately, postconf -noutput is different:

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options =

Do you notice the difference between those two snippets? Great. So fix the typo and your problem should be resolved.