XF 2.2 Email issues when sending from subdomain

mash33

Member
My forum is located at example.com/forum and the sender email address is set to forum@example.com

I want to change the sender email address to a subdomain, info@forum.example.com, but then the mail function stops working. I am using the PHP mail function and the subdomain SPF is correctly set up to allow mails from the base domain.

The Test outbound email tool runs without issue, but the email is never received, and not logged on the server.

Any advice for what the problem could be?
 

Mike

XenForo developer
Staff member
The PHP mail function essentially just calls the local MTA (Postfix, etc) and hands off to that for delivery. If there aren't any errors from the test tool, then that has happened successfully (at least from the perspective of XF and the only details will be in the server mail log (something like /var/log/maillog).
 

mash33

Member
Thanks, Mike. The odd thing is that nothing is logged in the maillog when the sender address is set to the subdomain. When the sender address is changed back to the base domain the mails are logged successfully. Also, when sending communication mails to users, the subdomain can be used as the sender address. Only transactional emails and the test email are not delivered.
 

mash33

Member
Just posting this in case anybody else runs into the issue: It isn't always very obvious, but there has to exist a real mailbox for the sender address you use. E.g. In my case, if I set the sender address to info@forum.mybroadband.co.za, all I had to do was create that mailbox and the mails started working. At least, this is the case for my hosting provider.
 
Top