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.

Rebuild/Fix Mail Dbs/Boxes

Discussion in 'E-mail Discussions' started by DigiCrime, Oct 14, 2003.

  1. DigiCrime

    DigiCrime Well-Known Member

    Joined:
    Nov 27, 2002
    Messages:
    399
    Likes Received:
    0
    Trophy Points:
    16
    Seen this in WHM, what exactly does this feature do

    cPanel.net Support Ticket Number:
     
  2. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    If I click on this option, I see lines like this:

    Incorect mode on mailbox /home/account/mail/domain.com.au/info/inbox.pop (0644).. fixing

    Fine great, they're being 'fixed', but can anyone tell me how (and why) are they getting 'broken' in the first place?

    I help to manage two dedicated servers, and it seems that if I click on this option in WHM, there are always at least a few fixups that have to be performed EVERY DAY. Surely this is indicative of something that should be fixed at source (so that it doesn't keep on happening)??

    Thanks for your comments.
     
    #2 spaceman, Jan 22, 2004
    Last edited: Jan 26, 2004
  3. xion

    xion Active Member

    Joined:
    Apr 6, 2003
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Same thing on our servers. I'd love to know why that is happening also. For now, I've just set a night cronjob to run it.
     
  4. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Sounds like a plan. I'm considering the same, but will hold off until I find out more about why it's happening and whether running a daily 'fix' is a good thing.
     
  5. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    It is weird. I ran it a couple days ago and it listed about 20 fixes. It would be nice to know why the fixes were needed in the first place.
     
  6. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Although the creation of the incorrect settings seems to be, one of life's little mysteries, you would do well to setup a daily (if not twice) cron job. It does makes a difference if the settings are incorrect -- had Clients with eMail problems and after running it, they were fixed.

    I usually run it 4 or 5 times a day as, whenever I use the "Manage Mail Queue" to delete garbage eMails I will next use the "Fix/Rebuild" link -- since I'm there anyway. ;)
     
  7. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    That makes sense. I've never had a problem with the email, but since there is ocassionally something that should be fixed, might as well fix it while we're there.
     
  8. Peoplespaces

    Peoplespaces Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    217
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    This feature I believe fixes things like mailbox locks that happen when the download is interrupted.

    We get a dozen a day fixed and we run it several times a day.
     
  9. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Official tech response from cPanel (Clifford P):

    [cPanel] "...a lot of times this does fix as mentioned in the thread items related to inbox locks (i.e. where a clients pop connection suddenly dies). I'm not certain as to other causes of the incorrect permissions, they can range from external scripts modifying the file permissions to older emails that are transfered over from different cpanel servers."

    [Me] So can I assume that you approve/recommend that we run an hourly cron job to run this script?

    [cPanel] It won't harm anything I can say that much, hourly might be a bit much but again it shouldn't harm anything at all.
     
  10. Watcher_TVI

    Watcher_TVI Registered

    Joined:
    Mar 10, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    It appeared to me there was some issue related to accessing web mail and permissions with Cpanel. After several complaints about clients not receiving mail. I had to set it up on a Cron to keep things repaired. Since I did there hasn't been any complaints about mail delivery...
     
  11. (cmo)

    (cmo) Member

    Joined:
    Feb 28, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    How to setup cron

    I need to know how to setup the cron to do the automatic fix at least twice a day. I am not an expert in SSH.
     
  12. icanectc

    icanectc Well-Known Member

    Joined:
    Mar 10, 2003
    Messages:
    344
    Likes Received:
    0
    Trophy Points:
    16
    Yes how do we setup a cron job to run this? Thanks for any assistance.
     
  13. Ramsy

    Ramsy Guest

    in ssh:
    crontab -e (as root)

    add:
    0 * * * * /scripts/mailperm > /dev/null 2<&1

    or in freebsd:
    @daily /scripts/mailperm > /dev/null 2<&1

    This will run the script daily @ 0:00
     
  14. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Thanks Ramsy, that was VERY nice of you to document this for us newbies.

    If I want to run this at 3AM instead, am I safe to say that I could modify this to look like:

    3 * * * * /scripts/mailperm > /dev/null 2<&1

    And what if I wanted to run this a couple times a day, say at 3AM and also 3PM, would it be:

    3 15 * * * /scripts/mailperm > /dev/null 2<&1

    Now I'm just flat out guessing at this point. :)

    - Scott
     
  15. evisions

    evisions Well-Known Member

    Joined:
    Jan 25, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Hey sneader, actually this line:
    3 15 * * * /scripts/mailperm > /dev/null 2<&1

    would run the job at 3:03pm every day. The format is:
    minute
    hour
    day (of month)
    month
    day (of week)

    to run twice daily use this:
    0 3,15 * * * /scripts/mailperm > /dev/null 2<&1

    that will run it at 3am and 3pm daily.

    And actually Ramsy's post of:
    0 * * * * /scripts/mailperm > /dev/null 2<&1
    will run the script at the top of every hour.

    for more information type:
    man 5 crontab

    there are examples in the man page.
     
  16. eazistore

    eazistore Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Singapore
    Hi evision,

    Can I ask you somthing?

    I have added this:
    0 12,15 * * * /scripts/mailperm > /dev/null 2<&1

    This means that it will run everyday at 1200hrs and 2400hrs.
    Meaning running it twice daily.

    Is that right?
    Thanks for the tips.

    Sincerely,
    Vincent
     
  17. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Your
    0 12,15 * * * /scripts/mailperm > /dev/null 2<&1
    will make it run at 1200 hours and 1500 hours, or noon and 3pm.

    For noon and midnight, you want
    0 0,12 * * * /scripts/mailperm > /dev/null 2<&1
    because 0 is midnight.
     
  18. eazistore

    eazistore Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Singapore
    Hi squirrel,

    I have change to:
    0 0,12 * * * /scripts/mailperm > /dev/null 2<&1

    Thanks for the tips.

    Sincerely,
    Vincent
     
  19. mrbill

    mrbill Member

    Joined:
    Oct 23, 2002
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Thanks to everyone - this thread was very helpful.
     
  20. evisions

    evisions Well-Known Member

    Joined:
    Jan 25, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for answering that question directed at me Squirel ;). I'm glad you got it worked out Vincent.
     
Loading...

Share This Page