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.

exim tweaks

Discussion in 'General Discussion' started by anand, Jul 3, 2003.

  1. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Well it seems there is no information on the forums for tweaking exim to get max performance.

    Is there anyone who has ideas etc to tweak exim for max mail performance. We run one cpanel server only for using it as a mail server as we have massive traffic on mails. Any help would be appreciated.

    Some features i am looking for:

    1. Do not accept mails for accounts which have disk quota full. After all why should we accept mails for them and put in queue to wait until they empty their account.

    2. Integrate some kind of RBL database with exim to take care of atleast some spammers. I tried to enable the RBL option in exim.conf, but i get errors from exim when i restart exim.

    3. This is not a feature, rather a problem i have, there is one local server some isp has and it was down for several days, the mails were all bounced, now exim doesn't accept any mails for this isp server. Any mail send to that generates "Retry time not reached for any host after a long failure period. How i get rid of this probs ???

    4. Limit attachment size which exim will accept from users. At times we have users sending 50MB attachments (believe i have had this several times)

    5. Restrict the number of senders to be specified in the TO/CC/BCC list. We have people sending one single mail to 100 people at one go (no they are not spammers, just people who want to send some information to their known guys in single shot). We want to restrict that one this many numbers are allowed else return error "Too many reciepients". I got this idea from aol when i was manually trying to deliver a clients email which he send to his 50 friends in one go all with aol email ids. The mail never made it, i have to delete the mail, aol always returned error saying "Too many recipients".

    Well stuff like this can surely make life easier for people like us. I am sure there would be several others who would like the same done.

    Looking forward to solutions...

    cPanel.net Support Ticket Number:
     
  2. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    Before I can offer solutions I need to know if you're using Exim 3 and will you continue to use Exim 3 once cPanel updates to Exim 4 in about a week or two? Or would you like to take advantage of Exim 4 once it's released?

    Config syntax has changed between versions, which is why I'm asking.

    cPanel.net Support Ticket Number:
     
  3. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I would surely choose exim4 as i hear its much better than exim3. I am not sure which version i run at present. I have

    WHM 6.4.2, Cpanel 6.4.2-S75, RedHat 7.3 on the server.

    cPanel.net Support Ticket Number:
     
  4. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Just read this, exim4 is standard with cpanel 7.0 only which is there only on the edge builds now. I believe it will take sometime atleast to come to stable release.

    I just changed one box of mine to edge to see the difference. I don't see much except for the xskin being default theme, neways will still have a look around.

    If its not a hassle for you can we start with exim 3 and then 4 till it makes to the stable ground on cpanel servers ?

    cPanel.net Support Ticket Number:
     
  5. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Reading the exim.conf on the edge server. Looks cool ;-) and promising.

    cPanel.net Support Ticket Number:
     
  6. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Ok i update my statement. I did miss a lot of stuff on exim 4 on the forums. Just read them all. Atpresent on the mail server i have exim3, but after reading so much on it, i intend to move to exim4 (but only after stable 7.0 build). i can't take the phone calls of ppl incase anything happens to mail server. I still see ppl having troubles with exim4 on their servers.

    cPanel.net Support Ticket Number:
     
  7. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Would be nice to have the tips for both Exim 3 and 4. :)
     
  8. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    I'm going to post for Exim 4 only; since it is much better designed than 3.x and everyone will be upgrading within the next few months. Answers are inline:
    This is kind of difficult to do. You can setup Exim so that all users have the same quota, but unfortunately the way cPanel has its quota system setup I think it is something Nick would have to code into his hacks. Anyway, here's the all system users have the same quota way: (this goes in the transport section of the config file)
    Code:
    quota = 10M
    quota_is_inclusive = false
    If you'd like system users to have separate quotas, you can do it like this:
    Code:
    quota = ${lookup{$local_part}lsearch*{/etc/exim/quotafile}{$value}{10M}}
    The contents of the quotafile would look something like this:
    Code:
    user1 10M
    user2 35M
    * 20M
    To bounce mail immediately because of quota violation, the following needs to be entered into the config file: (this goes in the retry configuration section above the all errors rule)
    Code:
    
    *     quota
    Code:
    deny      message = $sender_host_address is listed \
                        at $dnslist_domain
              dnslists = spamhaus.relays.osirusoft.com : \
                         proxy.relays.osirusoft.com : \
                         socks.relays.osirusoft.com : \
                         spamsites.relays.osirusoft.com : \
                         spews.relays.osirusoft.com : \
                         inputs.relays.osirusoft.com : \
                         spamsources.relays.osirusoft.com : \
                         dialups.relays.osirusoft.com : \
                         list.dsbl.org : \
                         flowgoaway.com : \
                         dialups.visi.com : \
                         blackholes.easynet.nl : \
                         opm.blitzed.org
      deny    local_parts = ^.*[@%!/|]
              message = I've never seen @, %, !, /, or | in an e-mail.  Neither should you.
    This could be that your Exim databases are tainted with bad information. Try the following:
    Code:
    /usr/sbin/exim_tidydb -t 1d /var/spool/exim retry > /dev/null
    /usr/sbin/exim_tidydb -t 1d /var/spool/exim reject > /dev/null
    /usr/sbin/exim_tidydb -t 1d /var/spool/exim wait-remote_smtp > /dev/null
    You may have to touch some files in order for the above to work with cPanel's install of Exim 4, simply complete the following:
    Code:
    touch /var/spool/exim/db/wait-remote_smtp.lockfile
    touch /var/spool/exim/db/retry.lockfile
    chown mailnull.mail /var/spool/exim/db/*
    chmod 640 /var/spool/exim/db/*
    You may want to cron the exim_tidydb commands to execute once a day. After you've executed those commands via the command line, clean out your queue with:
    Code:
    exim -v -qff &
    This should work fine:
    Code:
    message_size_limit = 10M
    return_size_limit = 10K
    hhmm not sure of the answer to this one. No harm in messages sitting in your queue really. Addresses that deliver right away, will be marked with a y in the message and addresses that have failed will be retried at a later date. If they continue to fail, the message will eventually be automagically expunged.

    cPanel.net Support Ticket Number:
     
  9. Silverado

    Silverado Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Backyard - Poolside
    Hello ciphervendor


    Regarding the "exim -v -qff &" I tried this and it works great to force a queue delivery in shell.
    My question is this. how would it be set up to perform in the /etc/crontab or crontab -e?
    Would you enter */5 * * * * exim -qff & or would you have to add "root" before the exim -qff & line?
    OR, would you have to call it with /usr/sbin/exim -qff &

    Naturally I am removing the -v because it doesn't need to be verbose in the cron job. Haven't found anything about the & command though.

    I am experiementing with it now..... trying to verify something works. I appreciate any input.

    cPanel.net Support Ticket Number:
     
    #9 Silverado, Jul 6, 2003
    Last edited: Jul 6, 2003
  10. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    Hello,

    You probably don't need to run that command every 5 minutes. Exim does a fine job on its own emptying the queue; however if you have frozen messages in there for an extended period of time, it's good to flush them out. I would suggest that you cron the three database cleaning commands once a day:
    Code:
    25 5 * * * /usr/sbin/exim_tidydb -t 1d /var/spool/exim retry > /dev/null
    30 5 * * * /usr/sbin/exim_tidydb -t 1d /var/spool/exim reject > /dev/null
    35 5 * * * /usr/sbin/exim_tidydb -t 1d /var/spool/exim wait-remote_smtp > /dev/null
    Then clean out the frozen messages from the queue every day as well following the database clean:
    Code:
    0 6 * * * /usr/sbin/exim -qff > /dev/null
    Doing the above will certainly help mail flow on your box.
     
  11. Silverado

    Silverado Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Backyard - Poolside
    Thanks. I already have the cron set up for daily DB cleaning and I would recommend that to anyone that has a lot of mail passing through. I truly appreciate your helpful tips!
    Thank you.
    :D

    cPanel.net Support Ticket Number:
     
  12. LVWH

    LVWH Member

    Joined:
    Dec 14, 2002
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    WOW!!!

    A Fantastic Thread!

    Nuff Said!

    LVWH

    cPanel.net Support Ticket Number: N/A
     
  13. mmkassem

    mmkassem Well-Known Member

    Joined:
    Oct 21, 2002
    Messages:
    390
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Egypt
    Anyone tried to get Amavis to work with Exim 4.x on Cpanel ?

    cPanel.net Support Ticket Number:
     
  14. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    Good discussion ! Thanks all .

    cPanel.net Support Ticket Number:
     
  15. pats

    pats Well-Known Member

    Joined:
    Mar 13, 2002
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    ciphervendor or nyone ..

    any idea how to restrict any perticular user/domain with certain attachment size limit?

    example general email limit maybe 2MB but for a perticular domain maybe i want to raise it to 5MB.

    Thanks

    cPanel.net Support Ticket Number:
     
  16. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Just installed exim4 using /scripts/exim4 on my main box and booom :(

    Msjority of mails stuck on the mail server now. Most of them when i try to manually deliver them give me this error:

    has_alias_but_no_mailbox_discarded_to_prevent_loop

    any help would be appreciated.

    cPanel.net Support Ticket Number:
     
  17. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    another update. No users are able to send emails who were using outlook express with smtp authentication switched on. Stuck :(

    cPanel.net Support Ticket Number:
     
  18. 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
    That msg. is a 'notice', not an 'error'. Do a search on these forums as I posted an in-depth reason for it. Mail should still go through BTW.

    cPanel.net Support Ticket Number:
     
  19. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    my mistake, its a notice alrite.

    And i didn't find anything on the forums when i searched for has_alias_but_no_mailbox_discarded_to_prevent_loop

    Any links to the thread would be helpful.

    cPanel.net Support Ticket Number:
     
  20. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    things seem to move on now. Had lot of troubles when i shifted to exim4, buts it better now.

    i was wondering since exim4 has acl's and we can deal with indivisual email ids / domains can we have something like spam checkers inbuilt using the acl's ?? This is just a wild guess. We could use some commonly used words in spam's and then put them in acl's and reject all emails with those words ??

    It mite sound absurd but this is wat just popped in my head.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page