If hosting your own websites, such as WordPress, on a single webserver and have your email for a particular domain on that web server hosted somewhere else, you may experience the following error message when trying to send emails from within your website to an email address on the same domain: ‘virtual_aliases via virtual_aliases router forced address failure’. (Hope this long sentence makes sense).
To resolve this issue SSL to your webserver take a look at the entries in the ‘etc/localdomains’ file. In here you will see a list of your locally hosted domains on that web server. Using an editor such as VI or NANO remove the line which contains the name of your domain whose email is hosted elsewhere and then save and exit.
Next using an editor open up the ‘etc/remotedomains’ file and add in the name of your domain – ensuring that the case and spelling matches how it was originally entered into the ‘etc/localdomains’ file. Save the file and exit the editor.
You have now told the email transfer agent on the web server (eg: Exim) to look for a remotely hosted email server for that domain to send locally generated emails to.