Search for:
Language:

Product:
Category:
No categories for selected product

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

Article ID: 1161 
Last Review: May, 24 2010

Views: 21709 APPLIES TO:
  • Plesk 8.x for Linux/Unix
  • Plesk 9.x for Linux/Unix

Resolution

You should 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:

  1. 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: for Plesk 8.3 and above qmail patches should be applied in alphabetical order. For Plesk 8.2 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

  2. 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 into these files.
    NOTE: these commands should be ran on system where qmail is already installed, i.e. where Plesk is already installed.
    # grep -E '^(qmail|alias)' /etc/passwd | awk 'BEGIN {FS=":"; OFS=" ";} {if ($1 == "qmaill") {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

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

  4. Now you can run `make`,

  5. After compilation you should NOT overwrite all existing qmail files with new ones, i.e. do not run `make install`, installed configuration files and init script should remain untouched. Instead, only needed qmail binaries should be replaced with new compiled ones:

    • Stop Qmail and DrWeb services from Plesk panel (not from shell!),
    • Stop xinetd(inetd) service from shell,
    • Replace files according to your Plesk version:
      For Plesk 8.2: copy compiled qmail-queue, qmail-remote, qmail-local into Qmail bin/ directory plus make their copies with .origin suffix, f.e.:
      # cp qmail-queue /var/qmail/bin/qmail-queue
      # cp qmail-queue /var/qmail/bin/qmail-queue.origin
      # cp qmail-local /var/qmail/bin/qmail-local
      # cp qmail-local /var/qmail/bin/qmail-local.origin
      # cp qmail-remote /var/qmail/bin/qmail-remote
      # cp qmail-remote /var/qmail/bin/qmail-remote.origin

      For Plesk 8.3 and above: copy compiled qmail-queue, qmail-remote, qmail-local into Qmail bin/ directory with .moved suffix (do NOT replace current files!), f.e.:
      # cp qmail-queue /var/qmail/bin/qmail-queue.moved
      # cp qmail-local /var/qmail/bin/qmail-local.moved
      # cp qmail-remote /var/qmail/bin/qmail-remote.moved
      Please remember to restore original owners/permissions for the files replaced. Because files owners/permissions may differ on different operating systems we cannot provide exact commands. Before replacing the binaries remember original owners/permissions and restore them afterwards.
    • Start xinetd(inetd) service
    • Start Qmail and DrWeb services.

Additional information

NOTE: Before starting the recompilation it is recommended to learn original qmail documentation for specification of the recompilation procedure.

NOTE: For Parallels Plesk Panel version 9.5 you may use patches plesk93_qmail_patches.tgz and same compilation instructions.

Attachments:



Email subscription for changes to this article Email subscription for changes to this article

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.
* - required fields
 
 
 
 
 
 
For Home
For Business
For Hosters
For SaaS
For Developers
 
Desktop Virtualization
- Parallels Desktop 5 for Mac
- Parallels Desktop Switch to Mac Edition
- Parallels Desktop 4 for Windows & Linux
- Parallels Workstation Extreme
- Parallels Desktop for Upgrading to Windows 7
Server Virtualization
- Parallels Server for Mac 4.0
- Parallels Server for Mac Bare Metal Edition
- Parallels Server 4 Bare Metal
- Parallels Virtuozzo Containers
Automation
- Parallels Operations Automation
- Parallels Business Automation
- Parallels Business Automation - Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Parallels Small Business Panel
More Products