1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Recompile qmail How-To?

Discussion in 'Plesk for Linux - 8.x and Older' started by DeanW, Jun 26, 2006.

  1. DeanW

    DeanW Guest

    I need help recompiling qmail...

    Plesk 8 qmail patches
    Plesk v7.5.4 qmail patches
    qmail 1.03 source

    Downloaded all to /usr/src

    tar xzf qmail-1.03.tar.gz
    tar xzf qmail_patches.tar.gz

    As per this article I attempted to add the patches...

    cd qmail-1.03
    for d in ../qmail-patches/patch*; do patch <"$d"; done

    Then compile qmail...

    make setup check

    I get an error
    So I modify conf-spawn to 509 instead of 1000...

    make setup check

    I get an error
    Checked for openssl
    Of course I have openssl, but apparently need libs from somewhere...

    Downloaded openssl source corresponding to my RPM version from here.

    Created the apparent folder

    mkdir openssl

    Copied the 'include' files...

    cd openssl
    cp -L /usr/src/openssl-0.9.7a/include/openssl/* .

    And still the same error about not being able to find include files in the openssl dir... I checked the conf-* files and there are no config options for this dir... also it concerns me that the users in conf-users are not the same plesk uses - won't this break things?

    Thanks for any direction.
  2. rev606

    rev606 Guest

    Try installing the openssl-devel RPM.
  3. DeanW

    DeanW Guest

    Thanks for the tip. I did that:

    yum install openssl-devel

    rpm -qa | grep openssl
    cd /usr/src/qmail-1.03
    make clean

    removed my old openssl botched attempt..

    rm -rf openssl

    make setup check

    Still getting an error :(
    find /* -name ssl.lib

    ...Nothing.. :(
  4. jean-david

    jean-david Guest

    I had to add in the qmail-1.0.3 folder a file named
    ssl.lib wich contains the following line:
  5. Effektor

    Effektor Guest

    Still getting errors like above.

    ./compile idedit.c
    idedit.c: In Funktion »main«:
    idedit.c:126: Warnung: Rückgabetyp von »main« ist nicht »int«
    ./load idedit strerr.a substdio.a error.a str.a fs.a \
    wait.a open.a seek.a
    ./compile install-big.c
    ./compile install.c
    install.c: In Funktion »main«:
    install.c:277: Warnung: Rückgabetyp von »main« ist nicht »int«
    ./load install-big fifo.o install.o auto_qmail.o \
    auto_split.o auto_uids.o strerr.a substdio.a open.a error.a \
    str.a fs.a
    ./compile hier.c
    ./load install fifo.o hier.o auto_qmail.o auto_split.o \
    auto_uids.o strerr.a substdio.a open.a error.a str.a fs.a
    ./compile instcheck.c
    instcheck.c: In Funktion »main«:
    instcheck.c:105: Warnung: Rückgabetyp von »main« ist nicht »int«
    ./load instcheck fifo.o hier.o auto_qmail.o auto_split.o \
    auto_uids.o strerr.a substdio.a error.a str.a fs.a
    cat home.sh \
    | sed s}QMAIL}"`head -1 conf-qmail`"}g \
    > home
    chmod 755 home
    cat home+df.sh \
    | sed s}QMAIL}"`head -1 conf-qmail`"}g \
    > home+df
    chmod 755 home+df
    cat proc.sh \
    | sed s}QMAIL}"`head -1 conf-qmail`"}g \
    > proc
    chmod 755 proc
    cat proc+df.sh \
    | sed s}QMAIL}"`head -1 conf-qmail`"}g \
    > proc+df
    chmod 755 proc+df
    cat binm1.sh \
    | sed s}QMAIL}"`head -1 conf-qmail`"}g \
    > binm1
    chmod 755 binm1
    cat binm1+df.sh \
    | sed s}QMAIL}"`head -1 conf-qmail`"}g \
    > binm1+df
    chmod 755 binm1+df
    cat binm2.sh \
    | sed s}QMAIL}"`head -1 conf-qmail`"}g \
    > binm2
    chmod 755 binm2
    cat binm2+df.sh \
    | sed s}QMAIL}"`head -1 conf-qmail`"}g \
    > binm2+df
    chmod 755 binm2+df
    cat binm3.sh \
    | sed s}QMAIL}"`head -1 conf-qmail`"}g \
    > binm3
    chmod 755 binm3
    cat binm3+df.sh \
    | sed s}QMAIL}"`head -1 conf-qmail`"}g \
    > binm3+df
    chmod 755 binm3+df
    ./compile spfquery.c
    spfquery.c: In Funktion »main«:
    spfquery.c:24: Warnung: Rückgabetyp von »main« ist nicht »int«
    ./load spfquery spf.o ip.o ipme.o ipalloc.o strsalloc.o \
    now.o dns.o datetime.a stralloc.a alloc.a str.a substdio.a \
    case.a error.a fs.a `cat dns.lib` `cat socket.lib`
  6. dw604

    dw604 Guest

    I've got it now!

    Finally got it thanks to all of these helpful replies! This is on a PSA7.5.4 FC4 system

    - Install openssl-devel

    yum install openssl-devel

    - Download qmail 1.03 and plesk patches for 8.0 or 7.5.4 (see first post)

    - tar xzf from the same folder creating 2 subdirs

    - Download additional patch, such as http://qmail.org/outgoingip.patch and put it in the patches folder

    - chdir to qmail-1.03

    - Do the Plesk patches:

    for d in ../qmail-patches/patch*; do patch <"$d"; done

    - Do the outgoingip.patch (lazy way)

    for d in ../qmail-patches/outgoingip.patch; do patch <"$d"; done

    - Edit conf-spawn (I had to make mine 509 or less so I made it 500)

    vi conf-spawn

    - Create the required SSL file as recommended in post above

    echo "-lssl -lcrypto" > ssl.lib

    - Compile qmail

    make setup check (yes, it will give lots of scary warnings while compiling)

    - Config/setup qmail


    - At this point I like to modify /var/qmail/control/me to remove the subdomain.

    - Echo desired IP to /var/qmail/control/outgoingip

    - Reboot or do the following:

    kill -HUP `ps auxw | grep xinetd | grep -v grep | awk {'print $2'}`

    service qmail restart

    That should do it!

    Hey, check out my email list management script at www.listmailpro.com :)
  7. Yitz

    Yitz Guest

    I followed the directions and now my server doesn't accept email altogother it seems that the qmail-smtpd isn't starting. If someone can be of assistance it would be very much appreciated.

    Thank You in advance
  8. dw604

    dw604 Guest

    Try removing Dr.Web and SpamAssassin

    for r in `rpm -qa | grep drweb`; do rpm -e $r; done;
    for r in `rpm -qa | grep spamas`; do rpm -e $r; done;

    Run both twice if there are dependency problems. :)
  9. Yitz

    Yitz Guest

    It didn't help. The qmail-smtpd server isn't started but when invoked via the command line it does responed.
  10. dw604

    dw604 Guest

    Try recompiling without any additional patches, just the ones expected by Plesk. You did download and apply those, right? :D

  11. dw604

    dw604 Guest

    I've seen some servers with improper file permissions on important /var/qmail/bin files such as qmail-queue. Google should get you the right ones to use.
  12. madcat

    madcat Guest

    This is a great idea and I'd like to apply it to our servers to stop outgoing spam ... Is there any way to do this using rpmbuild ? Can I even get a copy of the psa-qmail source RPM? I've had troubles in the past caused by installing software that was not RPM built and later yum updating (even if qmail is on the exclude= line).