Problems setting up email forwarders in exim
I've manually tried adding and removing some entries in /etc/valiases/ files in the system as root to configure mail forwarding but unfortunately, some forwarding which I manually removed and added are not taking effect. It looks like a cache or certain copy of the old forwarders still exist. I restarted all services and even cleared exim cache but still not luck.
I bumped into a solution about recreating the /etc/aliases.db but I am not sure if exim is using this file. I've also tried the ff commands but no luck:
exim_dbmbuild /etc/aliases /etc/aliases.db
exim_dbmbuild /etc/valiases/ /etc/aliases.db
Some guys from the forums mentioned that we have to run newaliases command as root in the terminal to rebuild /etc/aliases.db but it looks like this is for Sendmail MTP and not for exim. Anyone can help me understand how to update mail forwarders?
Btw, I've also used the CPANEL interface for this but it looks like the same thing is happening.
-
The only recommended method of adding forwarders is through the interface, or by using the API UAPI Functions - Email::add_forwarder - Developer Documentation - cPanel Documentation Can you explain what is happening/what the issue is when you add a forwarder? 0 -
Hi Lauren, as mentioned in my post, any changes I've made in the email forwarders for some account does not apply properly. May it be a change from the Cpanel interface or manually editing the /etc/valiases/ files. To give an example: I have an existing forwarder: user1@domain.com: user1@abcdomain.com Then, I deleted this forwarder and created a new one. user1@domain.com: user1@xyzdomain.com After making these changes, whenever somebody sends an email to user1@domain.com, the email is still being forwarded to user1@abcdomain.com every time. The email is also not being forwarded to user1@xyzdomain.com as if the forwarder is not there. Please note that I already cleared exim cache, restarted exim and other services and even waited for days just to see if these changes require propagation time but it looks like this problem still persist. I even removed all forwarders for user1@domain.com but still email are still being forwarded to user1@abcdomain.com. That's why I thought that there might be some cache or copy somewhere else of the previous forwarder. Creating a new forwarder that doesn't exist before works fine: If user2@domain.com doesn't have any existing forwarder, creating a new one will work fine. Removing and deleting existing forwarders for user2@domain also works fine. That's why I mentioned that this is only happening to "some" users and not to all. 0 -
Hi @shaqabwebmaster Thanks for explaining the issue! The only reason I noted the supported method of modifying the forwarders is because of this statement: I've manually tried adding and removing some entries in /etc/valiases/ files in the system as root to configure mail forwarding but unfortunately, some forwarding which I manually removed and added are not taking effect. It looks like a cache or certain copy of the old forwarders still exist. I restarted all services and even cleared exim cache but still not luck.
I just want it to be clear this shouldn't be necessary. Can you run the following I'm curious to see if the old forwarder is present in any of the other valiases files:grep -ir "user1@abcdomain.com" /etc/valiases0
Please sign in to leave a comment.
Comments
3 comments