Fatal! Write Failure: /etc/valiases/

When trying to add the email forwarder in cPanel we get the following error :

Fatal! Write Failure :/etc/valiases/[sub.whmmainhost.tld]. Ignore any messages of success this can only result in failure!

That means the ownership and/or permissions set on the fileĀ “/etc/valiases/DOMAIN.tld” are incorrect.

cd /etc/valiases/
chown USERNAME:mail /etc/valiases/DOMAIN.tld

OR, ssh to the server and run the following command:

/scripts/fixvaliases