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!

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

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

Tags:
  1. poppyq

    poppyq Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    156
    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:
    153
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. poppyq

    poppyq Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    156
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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