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.

Whm: Mail Hangs In Mail Queue Manager For No Reason

Discussion in 'E-mail Discussions' started by Floyd R Turbo, Jul 30, 2015.

  1. Floyd R Turbo

    Floyd R Turbo Member

    Joined:
    Jul 30, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Des Moines, IA
    cPanel Access Level:
    Root Administrator
    Running WHM 11.50.0 build 29 on a VPS hosted on Godaddy (I know...restrain yourself, locked in for 7 years, not my doing)

    Running a single cPanel acount for a website that hosts a Xenforo forum. I am the forum admin and VPS admin. I set everything up during a transition from a Windows Dedicated server running DotNetNuke ActiveForums so at least this is way better.

    Here's what I can't figure out. All the forum generated emails go out normally 99% of the time. But every once in a while I see a thread reply pop up on my phone/Tapatalk and it takes 10-15 minutes for the actual email to make it through.

    When this happens, I go to WHM MQM and lo and behold, there is it, hanging up in the queue. Sometimes this happens for registrations, password resets, thread replies, convo alerts, you name it. Not just me, happens to random users.

    If I go to Tweak Setting -> Mail Max hourly emails per domain = Unlimited. Shouldn't this prevent ANY emails from getting queued? I know that GoDaddy has a ceiling but I smacked that on the first day the VPS went online and went through the process to have them bump it up way past what we should ever hit again.

    The percentage of email messages (above the account’s hourly maximum) to queue and retry for delivery = 125%, but this should be irrelevant if Max Mail is Unlimited, yes?

    Maximum percentage of failed or deferred messages a domain may send per hour = Unlimited

    Number of failed or deferred messages a domain may send before protections can be triggered = 5. Could this be it?

    Email delivery retry time = 60 but if I just let messages sit there in the queue, they usually will go in about 15 minutes (that's if I don't force a deliver all) but I will have to watch this one the next time I see it happening.

    I use XF's automated bounce email handler so I don't get many outbound bounces anymore. I have no idea why emails just randomly hang in the queue.

    Anyone have any insight on this?

    Thanks!
    BTW I may look like I know what I'm talking about, but I'm really just learning the ropes and very good at googling things to figure them out. This one has me stumped.
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    What error are you getting in logs file ? Please check your exim mail logs file and let us know what error are you getting on logs file.
     
  3. Floyd R Turbo

    Floyd R Turbo Member

    Joined:
    Jul 30, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Des Moines, IA
    cPanel Access Level:
    Root Administrator
    How do I do that? I can't find anything in WHM like that by searching 'exim' or 'log'
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    I suggest searching for one of these messages in /var/log/exim_mainlog with a command such as:

    Code:
    exigrep user@domain /var/log/exim_mainlog
    You can replace "user@domain" with any search term, such as the message subject or message ID.

    Thank you.
     
  5. Floyd R Turbo

    Floyd R Turbo Member

    Joined:
    Jul 30, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Des Moines, IA
    cPanel Access Level:
    Root Administrator
    Newb. I have no idea how to do that.

    I was able to view the main log file (which is huge and not what I was looking for), and the last 300 entries in the error log file, which led me to fix another unrelated error (favicon missing) but I cannot find the /var directory. Like I said, newb here

    I need some more dumbed down type of instructions because I can't find the exim log files.
     
    #5 Floyd R Turbo, Aug 3, 2015
    Last edited by a moderator: Aug 3, 2015
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You will need to access your server via SSH as "root" to run the command referenced in my last response. A guide on how to do this is found at:

    cPanel/WHM - SSH Access

    Thank you.
     
  7. Floyd R Turbo

    Floyd R Turbo Member

    Joined:
    Jul 30, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Des Moines, IA
    cPanel Access Level:
    Root Administrator
    I am quite literally banging my head on the desk, because I can't figure this out, the directions are outdated, or both. at best, not worded for someone who has never touched putty/ssh before.

    I first tried the "how to SSH with Putty" and that didn't work. What port should I enter? it defaults to 22?

    I get a pop up saying key is not cached locally, I select no, enter 'root' and the password, access denied.

    So go now try "How to SSH with PuTTY and a public key."

    1. From the Windows Start menu, open the client. done
    2. Navigate to the PuTTY Key Generator interface. where exactly is this? in putty? WHM? cpanel?
    3. Under the Actions heading, click Generate. PuTTY will generate the key and display the result under the Key menu. huh?
    4. Copy the public key and paste it in the .ssh/authorized_keys file. what?
    5. Enter a passphrase in the Key passphrase and Confirm passphrase text boxes. where?
    6. Click Save private key and save the key as a .ppk file.

      Important:

      You must save PuTTY keys as .ppk files.

    7. In the Session interface, from the Saved Sessions menu, select your preferred authorization session and click Load.
    8. Navigate to the Auth interface under the SSH category.
    9. Click Browse, select the private key file that you wish to upload, and click Open.
    10. Navigate to WHM's Manage root's SSH Keys interface (Home >> Security Center >> Manage root's SSH Keys) and import the server's keys.
    etc etc, horribly written. video tutorial is completely outdated.

    I muddled my way through this to a certain point but it still fails. What I finally did was after creating the SSH public and private keys in cpanel and authorizing them, I then went into WHM to Manage root's SSH keys and pasted in the keys there and imported the key, that didn't work, then i realized I had to authorize there too, once I did putty login process recognized the key FINALLY and then it says

    login as: root
    Authenticating with public key "imported-openssh-key"
    Passphrase for key "imported-openssh-key":
    Server refused public-key signature despite accepting key!
    root@166.62.59.107's password:
    Access denied

    WTF
     
    #7 Floyd R Turbo, Aug 5, 2015
    Last edited: Aug 5, 2015
  8. Floyd R Turbo

    Floyd R Turbo Member

    Joined:
    Jul 30, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Des Moines, IA
    cPanel Access Level:
    Root Administrator
    I blew away all the keys I had generated on cPanel and WHM and started over by creating a new key in WHM, authorized it, went to view private key, entered passphrase to unlock key, copy/pasted that into a .ppk file locally, selected that file in putty, I get the exact same result

    login as: root
    Authenticating with public key "imported-openssh-key"
    Passphrase for key "imported-openssh-key":
    Server refused public-key signature despite accepting key!
    root@166.62.59.107's password:
    Access denied
     
  9. Floyd R Turbo

    Floyd R Turbo Member

    Joined:
    Jul 30, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Des Moines, IA
    cPanel Access Level:
    Root Administrator
    Still looking for help here.

    I have tried and tried to figure out the instructions referenced in my posts above but I can't find any way to make sense of them. I'm guessing this is due to outdated documentation, meaning, things aren't in the same place anymore or the way that keys are generated has changed.

    The instructions describe a way that the public and private keys are generated. As far as I can tell, they are not done this way. For instance, how am I supposed to place something in the .ssh directory? I can do this under cpanel if I create the keys in cpanel instead of WHM, but from what I can tell, cpanel automatically creates the authorized_keys file. Am I wrong here? Can someone PLEASE help me out?
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can start by allowing password authentication instead of using a key by ensuring the following option is enabled:

    "WHM Home » Security Center » SSH Password Authorization Tweak"

    This will allow you to authenticate with the root password instead of a key. From there, you can follow the guide here if you want to enforce key authentication:

    https://forums.cpanel.net/threads/t...-your-server-read-this-sshd-hardening.403381/

    Thank you.
     
  11. Floyd R Turbo

    Floyd R Turbo Member

    Joined:
    Jul 30, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Des Moines, IA
    cPanel Access Level:
    Root Administrator
    I figured this out finally. logging in using root is disabled so I had to use the other username and then sudo su - to elevate to root.

    I'm in now and ran the exigrep command and what I see happening is this:

    Code:
    2015-08-10 14:01:13 ************ H=dedrelay.where.secureserver.net [*********]: SMTP error from remote mail server after initial connection: *** ****  *******.prod.mesa1.secureserver.net : DED : ... temporary failure
    2015-08-10 14:01:13 ************ == ***@*****.com R=send_to_smart_host T=remote_smtp defer (0) H=dedrelay.where.secureserver.net [**********]  : SMTP error from remote mail server after initial connection: 421 ***********.prod.mesa1.secureserver.net : DED : ... temporary failure
    
    Correct me if I'm wrong, but this appears to be an issue with the relay server on the host side?
     
  12. Floyd R Turbo

    Floyd R Turbo Member

    Joined:
    Jul 30, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Des Moines, IA
    cPanel Access Level:
    Root Administrator
    I ran

    Code:
    exigrep failure /var/log/exim_mainlog
    ...and I can see a ton of these
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, I suggest consulting with your hosting provider to have them increase any sending limits imposed on your server. It looks like the relay server is not allowing the message to send out to the remote mail server.

    Thank you.
     
  14. Floyd R Turbo

    Floyd R Turbo Member

    Joined:
    Jul 30, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Des Moines, IA
    cPanel Access Level:
    Root Administrator
    It is not an email limit issue.
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The following snippet from your log output indicates the issue is not with the cPanel server:

    To clarify, you provided this message to your hosting provider and they confirmed there are no email limitations imposed on your server?

    Thank you.
     
  16. Floyd R Turbo

    Floyd R Turbo Member

    Joined:
    Jul 30, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Des Moines, IA
    cPanel Access Level:
    Root Administrator
    Correct. They were no help at all. They were just like "well it appears there is not much else we can do for you at this time, do you need anything else?" which ticked me off. I ran into the email limitation issue very early on when I opened up the forum and sent out a bulk e-mail to all users that the forum was back online. After having lifted that cap (went to the max they would allow short f a written/formal limit request, which wasn't necessary) we haven't had any problems with the email limitation. Bottom line, this is not an email limitation issue.

    To me it appears that their relay servers are kicking it back but they don't see it that way.

    What I can tell you is that it happens to me and several other users regularly. All the time. I am on dozens of other forums, vbulletin, xenforo, IPB, phpBB, etc, and every single one of them, the emails come right through at the same time as my Tapatalk push notification, except this forum. It is most definitely not my email.

    Something is causing outbound messages from the forum to temporarily fail. The only workaround I've been able to come up with so far is to lower the retry time from 60m to like 3m. So now anything stuck in the queue just hammers it over and over again until it gets through.
     
  17. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I suggest showing them the error output from the log and asking for additional details about why the relay server is not allowing emails, if it's not an imposed limit.

    Thank you.
     
  18. Floyd R Turbo

    Floyd R Turbo Member

    Joined:
    Jul 30, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Des Moines, IA
    cPanel Access Level:
    Root Administrator
  19. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You may need to consult with them further, or request assistance from an administrator that handles the relay server to obtain additional information. Unfortunately, if the relay server is at fault and you don't have access to it, you won't be able to resolve the issue.

    Thank you.
     
    Floyd R Turbo likes this.
Loading...

Share This Page