Posts Tagged ‘courier-imap’

Courier-IMAP 4.x and later with Plesk 8.3

Tuesday, August 3rd, 2010

I have not confirmed this problem in any version other than Plesk 8.3.0, simply because I have not had the time. :(

According to the Parallels forums and documentation, you should be able to upgrade the version of Courier-IMAP running on the server to any later version.

I however attempted to upgrade to Courier-IMAP 4.7.0 and 4.8.0 using authlib 0.6.3 with no success.

Then I read the following entry in the Courier-IMAP Changelog:

2004-11-05 Mr. Sam

* pop3dserver.c (main): Authenticated address is in AUTHENTICATED,
not AUTHADDR, now.

It would appear that this one change, breaks the authpsa authentication module so that one can not implement later versions of Courier-IMAP on Plesk 8.3.0, since authpsa expects the authentication information in the AUTHADDR shell variable.

Courier-IMAP 3.0.8 on CentOS with Plesk

Tuesday, August 3rd, 2010

I ran into a problem where I wanted to recompile Courier-IMAP so that it can work with Plesk 8.3 on my CentOS server.

After a lot of searching to locate courier-imap-3.0.8.tar.bz which is now a very outdated version of Courier-IMAP, I bumped into a problem during the recompiling of Courier-IMAP.

The error I received was:
In file included from authstaticlistsearch.c:9:
/usr/include/stdio.h:385: error: syntax error before ‘&&’ token

A bit of Googling lead me to a February 2005 post on the atmail website, which I repeat below for ease of reference:

Patching Courier-IMAP for Fedora/Redhat non-RPM in

This article applies to @Mail Server installations only.

Description: The standard Courier-IMAP 3.0.8 distribution will not build on stock Fedora/Redhat systems. Compilation fails while building the authlib library, usually with an error message like:

In file included from authstaticlistsearch.c:9:
/usr/include/stdio.h:385: error: syntax error before ‘&&’ token

A review of the stdio.h file shows that no ‘&&’ symbols appears on or near line 385.

Solution: The courier-imap/authlib directory contains a file named ‘debug.h’ to support the debugging of authentication attempts against the Courier IMAP server. This file contains a C preprocessor macro named ‘dprintf’ that conflicts with the ‘dprintf’ function defined in glibc’s ‘stdio.h’. This conflict isn’t a problem so long as ‘#include ‘ appears before ‘#include “debug.h”‘ in the authlib source files. Unfortunately, this is not the case for files ‘authstaticlistsearch.c’, ‘authmoduser3.c’, ‘mod.h’, ‘authtest.c’, ‘debug.c’, and ‘authdaemon.c’.

To fix this problem, open these files in a text editor and move the ‘#include “debug.h”‘ line so that it is the last include directive. Make sure that you do not paste it into a ‘#if … #endif’ block. Once you have made these changes, the build process should succeed.