#------------------------------------------------------------------------------ # Copyright (c) 2005-2017 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 18.09.2005 jed # Last Update: $Id$ # # Important: These binaries must be updated if openssl files # have been changed e.g. from v0.9.7 to v.0.9.8! # # !!! this is not a script but an step-by-step howto !!! #------------------------------------------------------------------------------ exit 1 # - list of binaries: # /usr/bin/mailutil # /usr/sbin/imapd # ipop3d # # - needs the following library packages to build: # libpam # libpam-dev # libssl # libssl-dev # libz # libz-dev # # - needs the following packages to be build: # certs ### download wget ftp://ftp.cac.washington.edu/imap/imap.tar.Z ### extract uncompress imap.tar.Z tar xvf imap.tar cd imap-2007f ### patch # To make sure that the mailutil program is able to access all # mailboxes in different home directories without restrictions # it's important that it's compiled before any patches are # applied. # # ./src/imapd/Makefile.ORG # ./src/osdep/unix/env_unix.c.ORG # ./src/osdep/unix/dummy.c.ORG # ./imapd/Makefile.ORG # ./Makefile.ORG make slx SSLTYPE=unix SSLINCLUDE=/usr/include/openssl SSLCERTS=/usr/local/ssl/certs SSLKEYS=/usr/local/ssl/private or # with PAM authentication make lnp PASSWDTYPE=pam SSLTYPE=unix SSLINCLUDE=/usr/include/openssl SSLCERTS=/usr/local/ssl/certs SSLKEYS=/usr/local/ssl/private strip -s mailutil/mailutil # make a backup of the mailutil program cp mailutil/mailutil ../mailutil # After it has successfully been compiled we're ready to # patch several files. To restrict access to root and others # by changing/setting the parameter 'restrictbox = -1' in # src/osdep/unix/env_unix.c # diff -rupN env_unix.c.ORG env_unix.c --- env_unix.c.ORG 2010-11-27 11:38:29.000000000 +0100 +++ env_unix.c 2010-11-27 11:38:29.000000000 +0100 @@ -77,11 +77,13 @@ static char *sslCApath = NIL; /* non-sta static short anonymous = NIL; /* is anonymous */ static short blackBox = NIL; /* is a black box */ static short closedBox = NIL; /* is a closed box (uses chroot() jail) */ -static short restrictBox = NIL; /* is a restricted box */ +//static short restrictBox = NIL; /* is a restricted box */ +static short restrictBox = -1; /* is a restricted box */ static short has_no_life = NIL; /* is a cretin with no life */ /* block environment init */ static short block_env_init = NIL; -static short hideDotFiles = NIL;/* hide files whose names start with . */ +//static short hideDotFiles = NIL;/* hide files whose names start with . */ +static short hideDotFiles = 1; /* hide files whose names start with . */ /* advertise filesystem root */ static short advertisetheworld = NIL; /* only advertise own mailboxes and ** #shared */ @@ -1729,8 +1731,8 @@ void dorc (char *file,long flag) disableLockWarning = atoi (k); else if (!compare_cstring (s,"set disable-unix-UIDs-and-keywords")) has_no_life = atoi (k); - else if (!compare_cstring (s,"set hide-dot-files")) - hideDotFiles = atoi (k); +// else if (!compare_cstring (s,"set hide-dot-files")) +// hideDotFiles = atoi (k); else if (!compare_cstring (s,"set list-maximum-level")) list_max_level = atol (k); else if (!compare_cstring (s,"set trust-dns")) # Don't display dot-files when displaying folder list in imapd # patch ./Makefile and add 'EXTRACFLAGS=-DFORCENODOTFILES' # # patch src/osdep/unix/dummy.c # # /* scan directory, ignore . and .. */ # if (!dir || dir[(len = strlen (dir)) - 1] == '/') while (d = readdir (dp)) # #if FORCENODOTFILES # if ((!(dt && (*dt) (d->d_name))) && # (d->d_name[0] != '.')) { # #else # if ((!(dt && (*dt) (d->d_name))) && # ((d->d_name[0] != '.') || # (((int) mail_parameters (NIL,GET_HIDEDOTFILES,NIL)) ? NIL : # (d->d_name[1] && (((d->d_name[1] != '.') || d->d_name[2]))))) && # ((len + strlen (d->d_name)) <= NETMAXMBX)) { # #endif # /* see if name is useful */ # Don't use /etc/nologin for shutting down imapd anymore because it # has a sidekick on e.g. sshd which will be locked too. # Patch file src/imapd/Makefile: SHUTDOWN=/etc/nologin -> SHUTDOWN=/etc/mail-nologin # clean-up previous build make clean ### build # Makefile anpassen und SSLTYPE=unix setzen um auch weiterhin # unverschlüsselte Kennwortübertragung zu erlauben. Die # Sicherheitsabfrage beim übersetzen mit 'y' bestätigen. # standard make slx SSLTYPE=unix SSLINCLUDE=/usr/include/openssl SSLCERTS=/usr/local/ssl/certs SSLKEYS=/usr/local/ssl/private or # with PAM authentication make lnp PASSWDTYPE=pam SSLTYPE=unix SSLINCLUDE=/usr/include/openssl SSLCERTS=/usr/local/ssl/certs SSLKEYS=/usr/local/ssl/private strip -s imapd/imapd strip -s ipopd/ipop3d strip -s mlock/mlock cp imapd/imapd /inet-mail-news/mail/usr/sbin/ cp imapd/ipop3d /inet-mail-news/mail/usr/sbin/ cp docs/FAQ.txt /inet-mail-news/mail/usr/sbin/docs/ cp docs/RELNOTES /inet-mail-news/mail/usr/sbin/docs/ cp mailutil/mailutil /inet-mail-news/mail/usr/bin/ tar cvf ../uwi-2007f-eX.tar ../mailutil imapd/imapd ipopd/ipop3d mlock/mlock docs/FAQ.txt docs/RELNOTES scp uwi.tar farragut:/tmp/