Product:
Search Type:

Plesk 8 uses patched Qmail. How do I compile Qmail with my own patches?

Article ID: 1161 
Last Review: Feb,05 2008
APPLIES TO:
  • Plesk 8.x for Linux/Unix

RESOLUTION

You can download Qmail sources, for example from http://qmail.org/, apply Plesk patches which are attached to this article, apply your own patches and compile Qmail. Here the steps that should be done:

- review your custom patches and Plesk patches to find out what custom patch changes and when it should be applied: before Plesk patches or after them or in the middle before/after some specific patch. Note that Plesk 8.3.x qmail patches should be applied in alphabetical order, for Plesk 8.2 and below first apply all "patch*" files, and then "fr49-quota-patch", for example:
# cd qmail-1.03
# for patch in ../patches/patch* ; do patch -p0 < $patch ; done
# patch -p0 < ../patches/fr49-quota-patch

- change 'conf-users' and 'conf-groups' files to match changes applied in patch-pe and patch-pf patches. Those files should contain records in format 'groupname GID' or 'username UID'. Below are the commands that will put correct records inot these files (note that these commands should be ran on system where qmail is already installed):
# grep -E '^(qmail|alias)' /etc/passwd | awk 'BEGIN {FS=":"; OFS=" ";} {if ($1 == "qmail") {print $1,$3,"\nroot 0"} else {print $1,$3}}' > conf-users

# grep -E '^(qmail|nofiles)' /etc/group | awk 'BEGIN {FS=":"; OFS=" ";} {print $1,$3}' > conf-groups

- configure linker flags (inside qmail src directory after patches applied):
# pkg-config --libs openssl > ssl.lib
# echo "/var/qmail" > conf-qmail

Now you can run 'make'.

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields