Dear Sam, Matus, et al.:

        My project to install and configure Courier on our DigitalOcean hosted 
FreeBSD 11.0 based VPS is now substantially further along. This message is to 
report what installation steps work reliably on a current FreeBSD system. I 
have updated the subject header of this message to better reflect its scope.

        Matus appropriately suggested that I seek help from the FreeBSD 
community. Unfortunately, FreeBSD support for Courier seems stalled at version 
0.65.3_4 <https://www.freshports.org/mail/courier/>, which I discovered has 
problems on FreeBSD 11. The FreeBSD courier-unicode package 
<https://www.freshports.org/devel/courier-unicode/> is current at version 1.4, 
but using it as the basis for installing courier-authlib causes that 
installation to fail without any reported error. The FreeBSD courier-authlib 
package <https://www.freshports.org/security/courier-authlib/> is now at 
version 0.66.3, which is behind the current 0.66.4 version. I tried to install 
the current Courier version 0.76.3 atop the FreeBSD courier-unicode and 
courier-authlib packages, but that failed. Ultimately, I found that it was 
necessary to install the current courier-unicode-devel package atop 
courier-unicode 1.4 before courier-authlib could be installed successfully. 
This was suggested as a possibility by the courier-authlib configure script. I 
should note that the static message displayed by the script still references 
“Courier Unicode Library 1.2.”

        Making the courier installation scripts work properly required 
abandonment of expectations that the scripts would be able to automatically 
find all necessary resources installed in standard ways on a FreeBSD 11 system. 
Adoption of Sam’s helpful suggestion about passing CPPFLAGS to the configure 
scripts made it possible to move beyond the impasse that I initially wrote 
about. Long and careful review of the configure scripts enabled me to develop 
configure commands that should work with any standard FreeBSD system. (For 
anyone curious about the differences between Linux distributions and FreeBSD, 
DigitalOcean publishes [a] Comparative Introduction to FreeBSD for Linux Users 
<https://www.digitalocean.com/community/tutorials/a-comparative-introduction-to-freebsd-for-linux-users>,
 which is a good resource.)

        The following configure commands presume that several users and groups 
have been created on the FreeBSD system. As suggested in the Courier 
installation instructions, I created a user and user group named “courier.” I 
also created users and user groups for the roles of Courier Administrator and 
Courier Webmail. Those two user accounts have home directories where the 
respective website files are stored. Those sites are securely hosted by Apache 
running on the same VPS.

        The following configure command can be used to configure the 
installation from source code of both courier-unicode and courier-unicode-dev:

./configure \
CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/local/include/courier" \
LDFLAGS="-L/usr/lib -L/usr/local/lib -L/usr/local/lib/courier" \
--prefix=/usr/local \
--exec-prefix=/usr/local \
--sysconfdir=/usr/local/etc/courier \
--localstatedir=/var \
--includedir=/usr/local/include/courier \
--libdir=/usr/local/lib/courier \
--enable-dependency-tracking

        Next, the following configure command can be used to configure the 
installation from source code of courier-authlib:

./configure \
CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/local/include/libidn 
-I/usr/local/include/courier" \
LDFLAGS="-L/usr/lib -L/usr/local/lib -L/usr/local/lib/courier" \
--prefix=/usr/local \
--exec-prefix=/usr/local \
--sysconfdir=/usr/local/etc/courier \
--localstatedir=/var \
--includedir=/usr/local/include/courier \
--libdir=/usr/local/lib/courier \
--enable-dependency-tracking \
--enable-ltdl-install \
--with-ltdl-include=/usr/local/include \
--with-ltdl-lib=/usr/local/lib \
--with-mailuser=courier \
--with-mailgroup=courier

        Then, the following configure command can be used to configure the 
installation from source code of courier:

./configure \
CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/local/include/libidn 
-I/usr/local/include/courier" \
LDFLAGS="-L/usr/lib -L/usr/local/lib -L/usr/local/lib/courier 
-L/usr/local/lib/courier/courier-authlib" \
COURIERAUTHLIB=/usr/local/lib/courier/courier-authlib \
--prefix=/usr/local/ \
--exec-prefix=/usr/local/ \
--sysconfdir=/usr/local/etc/courier \
--localstatedir=/var \
--includedir=/usr/local/include/courier \
--libdir=/usr/local/lib/courier \
--with-cachedir=/var/cache/webmail-logincache \
--with-webadmindir=/usr/home/courier-admin/courierwebadmin \
--with-certsdir=/usr/home/courier-admin/.pki-certs \
--enable-imageurl=/home/courier-webmail/www/docs/images \
--enable-https \
--enable-mimecharset=UTF-8 \
--enable-mimetypes=/usr/local/etc/mime.types

         I hope that these commands serve as helpful examples for others trying 
to install or upgrade courier installations on systems with standard BSD 
directory hierarchies.

On Dec 12, 2016, at 5:22 PM, Sam Varshavchik <mr...@courier-mta.com 
<mailto:mr...@courier-mta.com>> wrote:

> Typically, a compiler searches for header files in /usr/include, and maybe 
> /usr/local/include. If you stick something somewhere else, you have to tell 
> the compiler, it won't find it for you. You can pass CPPFLAGS to configure, 
> to specify an additional compilation flags.
> 
> However, your approach is overall wrong. I'm sure that libtool is already 
> properly packaged for FreeBSD. I'm sure it's somewhere in the ports tree, and 
> all you have to do is install it, and it will be properly installed in 
> /usr/include, /usr/lib, and all the usual default system directories, where 
> all applications will find them, by default.

        Sam, thank you again for suggesting that I use CPPFLAGS. They made it 
possible to move forward. I also felt sure that using the FreeBSD packaged or 
ported libtool would work. I tried both, but the configure scripts could not 
find libtool without the CPPFLAGS options.

On Dec 13, 2016, at 7:10 AM, Matus UHLAR - fantomas <uh...@fantomas.sk 
<mailto:uh...@fantomas.sk>> wrote:

> On 13.12.16 07:01, Sam Varshavchik wrote:
> 
>> …Perhaps you should ask someone else in your organization for assistance, 
>> here.
> 
> 
> or, someone form FreeBSD to help you with installing libtool and courier
> packages the FreeBSD way (ports), not manually from sources.

        If I succeed in installing and configuring Courier on our FreeBSD 
system, I will pass along information about what works to the FreeBSD 
maintainers. That might encourage better and more current support for Courier 
from the FreeBSD community.

        Sincerely yours,

        Michael

PS: For anyone who wants to tinker with or test a FreeBSD virtual system hosted 
by DigitalOcean, upon your request, I can reply with or post a referral 
hyperlink that if used will provide a $10 credit that would cover the cost of 
two months of fees for a base $5 virtual private server (“droplet” in 
DigitalOcean parlance). Note that droplet creation defaults to a larger $10 per 
month VPS, so changing the size to the minimum stretches the credit.

<+>-=-<+>-=-<+>-=-<+>-=-<+>-=-<+>-=-<+>

SCARAMELLA & HOOFNAGLE
Computer Division
 ~  *  ~
Voice: 856-424-2100
Web: http://www.ScaraHoof.com <http://www.scarahoof.com/>

<+>-=-<+>-=-<+>-=-<+>-=-<+>-=-<+>-=-<+>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to