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.

Mail failing on schedule?!?

Discussion in 'E-mail Discussions' started by dory36, May 21, 2004.

  1. dory36

    dory36 Well-Known Member

    Joined:
    Aug 30, 2003
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    I've been getting strange intermittent failures on email; the bounce always says "All deliveries are handled by MailScanner".

    I'd greatly appreciate any help!

    I had a similar problem earlier with a user cron job's email not getting through, with the same message, and seem to have solved it with queue_only_override = false in the exim.conf file.

    What is VERY strange is that when the failures occur, they seem to be at exact multiples of 5 minutes apart, as if some cron job is occasionally interrupting the mail. For example, yesterday I noted sequential failures occurred at 11:51:30 12:06:30 12:16:30 13:11:30 13:21:30 14:41:30

    Here is an excerpt of the results of the command 'grep "All deliveries are handled by MailScanner" exim_mainlog', with actual addresses changed:


    2004-05-19 10:36:30 1BQT7K-0004NH-NB == roy@userdomain.com R=defer_router defer (-1): All deliveries are handled by MailScanner
    2004-05-19 11:11:30 1BQTfF-0006xO-4M == roy@userdomain.com R=defer_router defer (-1): All deliveries are handled by MailScanner
    2004-05-19 11:51:30 1BQUHv-0000xv-Ae == msuffern@bigfreemailservice.com R=defer_router defer (-1): All deliveries are handled by MailScanner
    2004-05-19 12:06:30 1BQUWK-0001yO-Gd == lynn@anotheruserdomain.com R=defer_router defer (-1): All deliveries are handled by MailScanner
    2004-05-19 12:16:30 1BQUg7-0002es-Re == myid@mydomain.com R=defer_router defer (-1): All deliveries are handled by MailScanner
    2004-05-19 12:16:30 1BQUg7-0002eZ-AC == roy@userdomain.com R=defer_router defer (-1): All deliveries are handled by MailScanner
    2004-05-19 13:11:30 1BQVXN-0007An-HY == bill@mytestdomain.com R=defer_router defer (-1): All deliveries are handled by MailScanner
    2004-05-19 13:11:30 1BQVXN-0007Aa-C1 == myid@mydomain.com R=defer_router defer (-1): All deliveries are handled by MailScanner


    The bounce messages all show:

    This message was created automatically by mail delivery software.

    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:

    (addressee)
    All deliveries are handled by MailScanner

    Any ideas?

    Thanks, Bill
     
  2. dory36

    dory36 Well-Known Member

    Joined:
    Aug 30, 2003
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    On further investigation -- the failures seemed to occur whenever a message arrived when the mail queue was running -- which I had set to 5 minutes.

    So how do I prevent this? I assume some lock file is the culprit.

    (I already changed the queue to 60 minutes, so there are 12x fewer chances for the problem to occur.)

    Bill
     
  3. myrem

    myrem Well-Known Member

    Joined:
    Jul 14, 2002
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    I did this (and it seems to have solved this issue)...

    Edit 'etc/init.d/exim'

    Find the section for the deamon startup of the primary instance of exim
    Code:
            if [ ! -e "/etc/eximdisable" ]; then
                    if [ -x "/usr/sbin/clamd" ]; then
                            echo -n "Starting clamd: "
                                    daemon /usr/sbin/clamd
                            echo
                    fi
                    echo -n "Starting exim: "
                   TMPDIR=/tmp daemon /usr/sbin/exim $([ "$DAEMON" = yes ] && echo -bd ) \
                                             $([ -n "$QUEUE" ] && echo -q$QUEUE)
    Change the last two lines... remove the trailing '\' from the first and comment '#' the second line

    Code:
                    TMPDIR=/tmp daemon /usr/sbin/exim $([ "$DAEMON" = yes ] && echo -bd )
    #                                         $([ -n "$QUEUE" ] && echo -q$QUEUE)
    This will disable queue runs for the receiving exim daemon. The outgoing exim daemon will still process the queue, but won't butt-heads with incoming email.

    Save the changes... Then issue from the shell

    service exim stop
    (wait a few seconds)
    service exim start
     
    #3 myrem, Jul 16, 2004
    Last edited: Jul 16, 2004
  4. dory36

    dory36 Well-Known Member

    Joined:
    Aug 30, 2003
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    Thanks much!

    I will give that a try --

    Bill
     
  5. myrem

    myrem Well-Known Member

    Joined:
    Jul 14, 2002
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Let me know if it works... also, you should change your queue time back to 5 minutes (if you like)... that will let you know more quickly if the problem is solved.

    You may have seen in your exim_mainlog entires saying "Spool file is locked (another process is handling this message)". Never figured it out until today... It's the two exim daemons (main and outgoing) fighting over the queue. This should make those messages go away as well... :D
     
  6. 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'll be very interested to know the outcome of this. It could be responsible for several delays in eail processing. :)
     
  7. myrem

    myrem Well-Known Member

    Joined:
    Jul 14, 2002
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    This seems to have solved all my issues with the mail queue delays as well as those "All Deliveres are handled by MailScanner" failures.

    I have 5 messages stuck in the mail queue but they are all legitimate delays. :D Normally I'd get 20-30/day stuck in there. (mainly from 'spams' which caught the "All Deliverires..." defer)

    Hey Bill, did you try this yet?
     
  8. dory36

    dory36 Well-Known Member

    Joined:
    Aug 30, 2003
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    I made the change this morning, and also switched back to queue running every 5 minutes.

    So far, so good!

    Bill
     
Loading...

Share This Page