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.

Configuring Exim with MySQL lookup support

Discussion in 'General Discussion' started by tjjfv, Apr 22, 2006.

  1. tjjfv

    tjjfv Registered

    Joined:
    Nov 11, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1

    I need to make use of MySQL lookups from within Exim. This requires that the mysqlclient libraries are included during the build of Exim. Thus I need the Makefile that CPanel uses to build exim, so that I can just add the MySQL related lines. Is this available, or are there any other suggestions?

    Thanks,

    Tom
     
    #1 tjjfv, Apr 22, 2006
    Last edited: Apr 23, 2006
  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
  3. tjjfv

    tjjfv Registered

    Joined:
    Nov 11, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Just what I needed! Thanks!

    After getting the CPanel-compatible Source RPM for Exim (from the above location), I copied the 'EDITME' file that was included in the root of the source package, edited it to include MySQL lookups and provided the location of the MySQL include and library paths, and then built and installed. Nothing seems to have stopped working, so thats good; I'll followup once I have confirmed the MySQL lookups are working.

    I was somewhat unsure about the other files in the source package, such as the 'antirelay' files and the 'exim-config' files. I assumed that I did not need to do anything with them, as my current installation had come from CPanel, and thus those were already installed properly. Is this correct?

    Also, after reviewing the '.patch' files, I assumed that they were only needed if working off of the original Exim source, instead of the CPanel provided Exim source. Is this correct?

    Thanks,

    Tom
     
    #3 tjjfv, Apr 23, 2006
    Last edited: Apr 29, 2006
  4. terrybenge

    terrybenge Registered

    Joined:
    Jun 7, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Where is the source, I can only find RPMS

    i need source for CentOS 3.5 i686 to enable mysql exim 4.52-7

    Terry
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    They're where I linked to above, there are source rpms there.
     
  6. terrybenge

    terrybenge Registered

    Joined:
    Jun 7, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    You are of course correct, couldnt see it for looking.

    Now my inability to understand all things linux shows - how do I expand the source RPM so I can edit the files?

    Even better - is there a step by step 'How To' for enabling mysql?

    Thanks
    Terry
     
  7. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
  8. terrybenge

    terrybenge Registered

    Joined:
    Jun 7, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Now I'm a the point where I can do the 'make install'

    Problem is, when i install the logs give the following error despite the exim.conf still being the default one and running fine before the install.

    server exim: exim shutdown failed Jun 9 07:41:27 server exim: antirelayd shutdown succeeded Jun 9 07:41:27 server exim: spamd shutdown succeeded Jun 9 07:41:27 server exim: 2006-06-09 07:41:27 Exim configuration error for virtual_userdelivery_spam transport: Jun 9 07:41:27 server exim: quota_directory must not be set without "directory" Jun 9 07:41:27 server exim: exim startup failed Jun 9 07:41:27 server exim: 2006-06-09 07:41:27 Exim configuration error for virtual_userdelivery_spam transport: Jun 9 07:41:27 server exim: quota_directory must not be set without "directory" Jun 9 07:41:27 server exim: exim startup failed Jun 9 07:41:27 server exim: antirelayd startup succeeded Jun 9 07:41:28 server exim: spamd startup succeeded exim has failed, please contact the sysadmin.

    Even tried reinstalling exim fresh via /scripts/eximup --force
    then doing the make install - still get the same error.

    These are the details of my default install that works fine:

    root@server [/eximdistro/exim-4.52]# /scripts/eximup
    Exim Setup Script Version 20.0
    Fetching version information from http://updates.cpanel.net/eximinstall/version (RELEASE)....Fetching http://updates.cpanel.net/eximinstall/version (0)....@8.10.120.130......connected......receiving...100%......Done
    Done
    This is the exim 4.52 installer release number 7 for platform centos 3.5
    exim is up to date. Use eximup --force to force a reinstall
    root@server [/eximdistro/exim-4.52]#

    This is the src file i am working with.
    exim-4.52-7_cpanel_smtpctl_av_rewrite_mm2_mmmtrap_exiscan_md5pass.src.rpm

    I have mage 3 changes to the makefile that I put in the Local dir:

    LOOKUP_MYSQL=yes

    LOOKUP_INCLUDE=-I/usr/include/mysql/
    LOOKUP_LIBS=-L/usr/lib -L/usr/lib/mysql -lmysqlclient


    Am I missing something? Any ideas?
    Terry
     
  9. terrybenge

    terrybenge Registered

    Joined:
    Jun 7, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Finally solved the issue. It required two patches to be applied the SRC rpm.

    exim-4.52-maildir_quota.patch
    exim-transport_filter_timeout-4.51.patch

    e.g. cd to the directory the src rpm extracted to.

    #patch -p1</eximdistro/exim-4.52-maildir_quota.patch
    #patch -p1</eximdistro/exim-transport_filter_timeout-4.51.patch


    In addition the the folowing lines being to the makefile copied to the Local/ dir of the distro.

    LOOKUP_MYSQL=yes

    LOOKUP_INCLUDE=-I/usr/include/mysql/
    LOOKUP_LIBS=-L/usr/lib -L/usr/lib/mysql -lmysqlclient

    NB: You need the mysql library on your server.

    _____________________________________
    http://www.ansa-me.com Using Autoresponders to sell more to your customers
     
Loading...

Share This Page