MailRoot/ctrlaccounts.tab as below:
administrator 0401080c0b0c16111704110a17
Step 3(PHPXmail):
I tried below setting on PHPXmail
A1
xx.xx.xx.xx
25
administrator
0401080c0b0c16111704110a17
0
A2
xx.xx.xx.xx
25
administrator
0401080c0b0c16111704110a17
U
A3
192.168.2.1
25
administrator
0401080c0b0c16111704110a17
0
A4
192.168.2.1
25
administrator
0401080c0b0c16111704110a17
U
A5
127.0.0.1
25
administrator
0401080c0b0c16111704110a17
0
A6
127.0.0.1
25
administrator
0401080c0b0c16111704110a17
U
PHPXmail tells below: Warning : fsockopen(): unable to connect to xx.xx.xx.xx:25 (Host is unreachable) in /overlay/xxx/phpxmail/class.xmail.php on line 96
Host is unreachable
I don't know about those packages, and I think you are unlikely to find support here as xmail is no longer supported by OpenWrt.
If you can confirm that you can access your router via the DDNS URL, then that part is solved. The email side of things is probably asked to the PHPXmail project.
These aren't OpenWRT related questions, and should really be asked elsewhere.
set MX til mail.xxx.xxx.xxx
Your PHPXmail should probably be configred to localhost or 192.168.x.x, if they run on the same device.
If it cannot connect on port 25, then the mail server isn't running, not set to listen on those IPs/subnets, or there's a FW issue.
XMail haven't been updated for 7 years, you really should look into another mail server software, like Postfix.
Also storing the emails in the virtual storage of the router will make you lose all mails if you reboot it. Storing it on the flash, will fill the flash space, and kill the flash drive, since it's not made for constant reads and writes.