Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Problems setting up email forwarders in exim

Discussion in 'E-mail Discussion' started by shaqabwebmaster, Jan 9, 2019.

  1. shaqabwebmaster

    shaqabwebmaster Registered

    Joined:
    Jun 27, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Qatar
    cPanel Access Level:
    Root Administrator
    I've manually tried adding and removing some entries in /etc/valiases/<domain> 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/<domain> /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.
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,766
    Likes Received:
    440
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. shaqabwebmaster

    shaqabwebmaster Registered

    Joined:
    Jun 27, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Qatar
    cPanel Access Level:
    Root Administrator
    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/<domain> 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.
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,766
    Likes Received:
    440
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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 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:

    Code:
    grep -ir "user1@abcdomain.com" /etc/valiases
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice