According to Discourse’s official recommendation, we are using MailGun’s service.
In most cases, there are no issues, but for some specific email addresses, such as iCloud, we receive the following prompt when sending activation emails:
"message": "5.5.1 Error: need MAIL command - MAIL FROM error: 450 4.1.8 <bounce+6712f2.21c8873-lucas.hu=@mail.visafn.com>: Sender address rejected: Domain not found",
The image below shows the error log information provided by the email service provider:
Problem and Solution
The main reason for the above problem is that some specific email service providers have spam checking policies.
Especially iCloud, which verifies the domain address of the sender when sending emails.
Because our service uses a subdomain for sending, the domain address we send from is actually mail.visafn.com instead of the traditional visafn.com.
Therefore, iCloud cannot verify the above address and considers the email sent by the system as spam, thus rejecting it.
Solution
The solution is also very simple. It is necessary to ensure that the MX record for the subdomain mail.visafn.com used for sending emails exists in the DNS.
As marked in the image above.
The MX record for the subdomain needs to be added to your DNS, and the record above should show as verified.
Of course, DNS updates will not take effect immediately. If you continue to send to iCloud, you may still experience intermittent errors.
Wait a few hours before testing again, which usually resolves the issue of emails being marked as spam.
Generally, most problems with Discourse sending emails are related to email server configuration and DNS, specifically MX record issues.



