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.

Why does perfectly good mail sit on the exim queue undelivered?

Discussion in 'E-mail Discussions' started by spaceman, Sep 19, 2006.

  1. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Why does perfectly good email sit on the exim mail queue (WHM > Mail Queue Manager) undelivered?

    I'm sure there are number of reasons, e.g. server load. But it's kind of annoying (for myself and my clients) when I see mail in the queue that is 2, 4, 8+ hours old, I click on the 'Deliver Now' link, et voila! Delivered successfully right away.

    My logical guess is that if the mail doesn't get delivered first time, then exim will try again at repeat intervals. What are those intervals, and can they be easily altered?

    Also, 'Attempt to deliver all messages in queue' cannot be relied upon to work (but that's another story: http://forums.cpanel.net/showthread.php?t=23382), and I know that

    exim -qff

    ... can be used to 'force' mail to be delivered (caution: this can really whack your server load), but I was wondering if there's a variation on the exim -qff command that that can specifically target a certain email address and/or domain? I ask because right now I'm manually clicking 'Deliver Now' on one message after another (time consuming!) to push aging messages through for the same email address. I'd love to be able to run exim -qff that targets just this lucky customer who I really want to look after! :)

    Any takers?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You need to search the log for the indivisual message ID which should give you a reason why the email was initially queued rather than delivered. Most common reasons I see in your situation:

    1. Load average is too high when the email arrives (default is 3)

    2. DNS query for the sender times out

    3. Sender verification times out

    4. Unexpected results from changing exim defaults in exim.conf
     
  3. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Cheers Chirpy.

    grep 1GQIpn-0004oX-UX /var/log exim_mainlog

    The result I got back was this: "failed to lock mailbox", which is of course because the POP account in question was being accessed by the owner at the same time as the attempt to deliver mail to it.

    Getting slightly off-topic: in the above example the email in the queue was listing 5 recipient POP accounts at the same domain name, and the error message "failed to local mailbox" was against a single one of these 5 POP accounts. In this example, just because 1 out of 5 pop accounts couldn't respond, does that mean that the over 4 didn't get their email at this time?

    I'm also seeing the word '(Delivered)' against some of the mail items in the exim mail queue. What's that about? If it's delivered in the sense I understand the word delivered, then why is it still in the queue? :confused:
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    A couple of things:

    1. Could the ones stating that they were delivered for multiple recipients, so one worked, others haven't?

    2. I would guess you're still using mbox and cppop? If you migrated to maildir the pop lock problem should completely go away.
     
  5. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    1. I've definitely seen '(Delivered)' against one or two recipients in a multiple recipient list on the exim mail queue, which would presumably which ones have been successfully delivered and which ones haven't. But right now I can see (Delivered) against two messages on two independent servers where both messages only have a single recipient:

    1GPwaT-0006kB-PB 4.2K 43h Delete Deliver Now
    eaaqCughs@mail.ru (Delivered)

    1GQAXq-0005eu-E7 3.8K 28h Delete Deliver Now
    eDerpGqXp@mail.ru (Delivered)

    Sure, these are almost certainly spam, but I still wonder about the meaning of (Delivered) against a single recipient message...

    2. You're right. Converting shortly. Thanks!
     
  6. brendanrtg

    brendanrtg Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16
    Another problem I noticed is that GENUINE mails that CANNOT BE DELIVERED just sits in the queue and for hosting serves, that can mean thousands of emails lying around per day.

    Is there any tweak or fixes which can DELETE and REMOVE these emails after say a certain period or whats the default period if any?
     
  7. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    sorry to butt in the middle of the thread here, but we've been considering converting our server over to the maildir but have some reservations as to what effect it'll have on the 40+ hosting accounts currently using the old mbox system. What type of problem can we anticipate if we do the conversion?? We currently have Horde and Neomail enabled for all account Cpanel.

    Is there a significate advatange doing the conversion to the maildir from the old mbox/cppop system?

    thx's
    Mickalo
     
  8. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    I'd like to know this too.
     
  9. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    We did the maildir conversion thing a few weeks ago, and yes it did cut down the mail queue. And those "perfectly good emails" waiting in the queue now get delivered. Cpanel prefers maildir now so i guess its the way to go.
    The problems you will find by doing the conversion are, clients have to re-subscribe to their old email boxes to read/view old mail by going into squirelmail, selecting their old mail boxes and hitting the "subscribe" link. Another problem is that Neomail is removed.
    And another problem we get is an error message in the daily Logwatch email saying " **Unmatched Entries**
    /usr/lib/courier-imap/etc/shared/index: No such file or directory:" .
     
    #9 kernow, Oct 5, 2006
    Last edited: Oct 5, 2006
  10. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    There are also significant improvments with stability and performance of both POP3 and IMAP, especially with any accounts where users leave email on the server. There's also the nice courier imap feature that allows you to have multiple simultaneous IMAP logins to the same account which you can't do in uw-imap.
     
  11. anushkumar

    anushkumar Well-Known Member

    Joined:
    May 14, 2005
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    I have done mailconversion on many cpanel servers which has over 350 accounts and had no problems what so ever. You can try this without hesitation.. Any issues, just shoot it here ;)
     
  12. erick_paper

    erick_paper Well-Known Member

    Joined:
    Apr 19, 2005
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    Hello

    Can someone tell me where I can find a step by step newbie-admin guide to installing maildir?

    Will this affect mailman and email lists? Or is this just a simple backend modification and everything will work as is?
     
  13. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    The script is already installed, open a consol and type:
    #/scripts/convert2maildir
     
  14. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    There is one minor gotcha you should be aware of:

    In the old mailbox format scenario, when the user logs into webmail via cpanel they can see email for ALL the mailboxes in the account. This feature goes away when you convert to Maildir and they can only see the email for the master account (normally unused).

    To add back the ability to work on subaccounts, you can manually create symlinks to the other mail directories, works like a treat. I think this is loosely described somewhere else on these forums.

    There's another feature that hasn't been mentioned - I think users checking email is a little less cpu intensive - less disk/file has to be read to check for new email. This is more noticeable for larger accounts.
     
  15. mambovince

    mambovince Well-Known Member

    Joined:
    Jan 15, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    London, UK
    Does this mean that once converted, no more need to run my nightly cron to fix mailbox permissions?

    - Vince
     
  16. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I've never had to.
     
Loading...

Share This Page