The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Root forward to locally forwarded email "user doesn't exist" despite forward working

Discussion in 'E-mail Discussions' started by poppyq, Aug 8, 2016.

Tags:
  1. poppyq

    poppyq Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Austin, TX
    So, this is kind of a weird one. I've been forwarding all root email to user@domain.com for a domain and email hosted on the local server. However, instead of having an email account for user@domain.com, I've been using a mail forward from user@domain.com to user@gmail.com. This has been working for a very long time, until last week.

    Suddenly, I've started getting mail delivery failed emails from the server with "user@domain.com user doesn't exist". What's weird about this is that I'm actually still getting the forwards at user@gmail.com. Somehow, it seems to be trying to both forward the email and send it to a local mailbox that doesn't exist, using the same email address.

    I'm not sure how to fix this. Temporarily I've set the root forward directly to user@gmail.com (I know). I've looked through domain aliases, dns settings/zones (dns is hosted externally), deleted and recreated the forward, etc., but can't find anything specific to why this might be happening. Possible bug when using a root forward to a locally hosted/forwarded email in a recent update?
     
  2. swipesy

    swipesy Registered

    Joined:
    Jun 25, 2002
    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    3
    I had the same problem, which took me several hours to find the cause. I literally just found it and fixed it minutes ago.

    Without going into all the details, it came down to this line in exim.conf:

    require_files = "+/etc/valiases/$domain:+${extract{5}{::}{${lookup passwd{${lookup{$domain}lsearch{/etc/userdomains}{$value}}}{$value}}}}/mail/$domain/$local_part"

    dovecot_virtual_delivery will trigger a local delivery if the mail *folder* exists, whether or not the email account record does. Using the user@domain.com example (CPanel user "domain"), see if this folder exists:

    /home/domain/mail/domain.com/user

    If it does, that's the reason exim is trying to deliver the message there. Delete the "user" folder and the problem should go away.

    I don't know for sure, but I believe this started happening for me when courier was replaced with dovecot by CPanel.

    Hope that helps!
     
    James Moreland likes this.
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify if the hostname is missing from the /etc/localdomains file on the affected systems? If so, adding the server's hostname to this file should address the issue.

    Thank you.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To update, an unnecessary directory likely existed for the affected email account at the following location:

    /home/$cpanel-username/mail/$domain.com/$email-username/

    The existence of such a directory can result in "User doesn't exist" error messages if no corresponding email account exists on the system. Manually creating an email account for the affected user or removing the offending directory are both effective workarounds.

    Thank you.
     
  5. poppyq

    poppyq Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Austin, TX
    Sorry it took me so long to respond to this, but this was exactly what it was. Thank you so much! The weird part is that I've been using a forward for at least a year, and this only started happening in the past couple of months. I'm not sure how to explain that, but it doesn't matter anymore as it's been fixed. Also thanks to cPanelMichael as he suggested the same thing as well.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page