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.

No mail passing through local mail accounts

Discussion in 'E-mail Discussions' started by schwim, Mar 10, 2009.

  1. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    Mail forwards and accounts are failing to accept mail. I can't get anything to pass through. The mail log pretty much consists of exclusively these types of errors:

    Rejected RCPT: mail.server.net [66.102.189.190] is currently not permitted to relay through this server. Perhaps you have not logged into the pop/imap server in the last 30 minutes or do not have SMTP Authentication turned on in your email client.

    This happens regardless of whether it's a forward or mail account.

    I've set up mail accounts in the same way as on my other servers and I've never had this problem before.

    Could someone maybe give me a pointer as to where I need to begin snooping to find the problem? The client on that server is a way busy and it's put them in quite a bind(this account went from a shared hosting account to a VPS).

    Any help would be mucho appreciated.

    thanks,
    json
     
  2. JPC-Shaun

    JPC-Shaun Well-Known Member

    Joined:
    Oct 29, 2008
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Hi;

    You need to configure your email client to authenticate to the SMTP server when sending mail. It should be the same username/password that you use to check your mail.
     
  3. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Are you running Cpanel on this VPS ?

    If so, then make sure that the domains which you are wanting to accept mail for are listed in /etc/localdomains (and also make sure they are not listed in /etc/remotedomains). Other than that, you'll need to provide some more useful logs than what you have provided.

    Mike
     
  4. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    Hi there Mike,

    I can't thank you enough for your help. Moving the domain from remote to local resolved the issue.

    Could you perhaps tell me why cpanel set the account up this way by default? Is it because I transferred the account from another server?

    thanks,
    json
     
  5. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    /etc/localdomains - if a domain is listed here, this tells Cpanel to accept mail for that domain and attempt to deliver it locally on the server

    /etc/remotedomains - if a domain is listed here, this tells Cpanel that mail for that domain is held elsewhere on some other server.

    When you add a new account, it will automatically put that domain in /etc/localdomains (because it assumes that your server is going to perform mail duties for the domain). There are ways to override that from the user side (via their /cpanel login area). If you log into thier domain via http://www.theirdomain.com/cpanel and then you click on MX Records, you can see where that can be changed.

    Before you transferred, if the MX Records settings in their control panel pointed to some other server, then perhaps when you transferred the domain to the new server it inherited those settings.

    I would suggest that you log into WHM, then go and modify the DNS Zone for the domain inquestion - make sure all of the entries look correct to your eye (compared to how some of your other accounts look).

    It's hard to point out exactly why it would have done that - but I think that is rare. I recently transferred over 200 domains and did not have that problem - but in the past I have seen that occur.

    So when in doubt - if you are having problems with a new/transferred account and you know that your server is supposed to be the responsible mailserver, check and make sure the domain is in /etc/localdomains and not in /etc/remotedomains.

    Mike
     
  6. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    PS: by default Cpanel will / should set up the domain so that it is in /etc/localdomains. I can't say for sure what happened in your case.

    Log into /cpanel on one of the domains on your server and click on MX Entries.

    Look around and understand what the options are there. Depending on what they were set at on the old server before the transfer, Cpanel may not have added it in the way you expected. If the old server had the MX pointed elsewhere on the old server, then when you transferred it would attempt to set it up the same way.

    In the customer's /cpanel area:

    1. If the MX is pointing to the local server, then the domain should only be listed in /etc/localdomains and not in /etc/remotedomains

    2. If the MX is pointed to a server elsewhere and Always accept mail locally even if the primary mx does not point to this server is selected, then the domain will be listed in /etc/localdomains and the server will handle mail activity - but incoming mail will first go to the mail server pointed to in the MX record.

    This would be a common setup if you were using Postini, Messagelabs, or some other spam scrubbing service. You'd set the MX to point to the scrubber company's mail servers and you would set the server to Always accept mail locally even if the primary mx does not point to this server.

    3. If the MX is pointed to the local server and Always accept mail locally even if the primary mx does not point to this server is not selected, then the domain should/will be listed in /etc/localdomains and not in /etc/remotedomains. And the server will act like a normal mail server and will accept mail for that domain.

    4. If the MX is pointed to a remote server and Always accept mail locally even if the primary mx does not point to this server is not selected, then the domain should/will be listed in /etc/remotedomains and not in /etc/localdomains.

    The bottom line is, if the domain is listed in /etc/remotedomains - the server will never handle mail for that domain. You got that error because the server looked in /etc/remotedomains and saw that domain - and thus the server knew it was _not_ the responsible mailserver. So any mail coming into it for that domain had to be from some valid authenticated account. Since it was another mail server sending that mail to your mail server, your server barked. Once you removed the domain from /etc/remotedomains and added it to /etc/localdomains, your server knew it was responsible for delivering the mail and accepted it.

    Mike
     
    #6 mtindor, Mar 11, 2009
    Last edited: Mar 11, 2009
Loading...

Share This Page