Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic MailSuite

 AfterLogic Forum : AfterLogic MailSuite
Subject Topic: Afterlogic on Debian 5 lenny Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
sirarthur
Newbie
Newbie


Joined: 06 March 2010
Online Status: Offline
Posts: 3
Posted: 06 March 2010 at 6:12pm | IP Logged Quote sirarthur

This is more a howto rather than a support request, nevertheless I didn't the found the right place to post it. If any forum admin does, I appreciate you to move it to the right position.

I'm a long time user of Xmailserver, but recently I'd to move to Afterlogic in order to have IMAP support.
You must be wondering why to use Xmail, well, take a look of what you need to not use it:
sendmail or exim, qmail (which claims to have "few to configure" but is a real pandora's box to do anything of it), courrier-imap, spamassassin, just to name a short example. And to compare to Afterlogic you would even need RoundCube, the only webmail interface for the traditional linux mail server that doesn't really makes you sick as squirrelmail or, even worse, horde.

So here goes what you need to make XMail runs on your lenny box.
First make your decision:

a) Install regular xmailserver without webmail. Pretty much enough if you use an external mail client as Outlook or Thunderbird.

b) Install xmailserver with webmail.

c) Install Afterlogic's version of XMail with Webmail integrated.

For a) and b) you'll need apache, phpxmail and xmailserver

just install Apache (if isn't already installed) with php and xmail as follow:
Code:
apt-get install apache2 php5 xmailserver


Download phpxmail from xmailserver's page.

For b) you will need also Afterlogic's Webmail lite (only) and mysql. Download and uncompress the webmail on your http root. Then:
Code:
apt-get install php5-mysql mysql-server


On both a) and b) you'll not have IMAP support at all and can't use Afterlogic's Webmail (you can, but with a *few* hacks) to control the server.

Now, for the option c), the recommended install. Starting with a "new box" and a fresh install.
The first thing you'll need to do is to get rid of exim4, probably the MTA Debian decided was just your face and installed on your behalf even if you hadn't ask for a mail server. You can try do an:
apt-get remove exim4
but... surprise! It will remain there (gosh!). So in order to get rid of it you rather just delete it from init.d and rc.d, doing:

Code:

/etc/init.d/exim4 stop
rm /etc/init.d/exim4
rm /etc/rc0.d/Kxxexim4 (where xx is a number)
rm /etc/rc1.d/Kxxexim4
rm /etc/rc2.d/Kxxexim4
rm /etc/rc3.d/Sxxexim4
rm /etc/rc4.d/Sxxexim4
rm /etc/rc5.d/Sxxexim4
rm /etc/rc6.d/Kxxexim4


now install the requirements for XMail:

Code:

apt-get install libgcc1 libssl0.9.8 libstdc++6 apache2 php5 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapache2-mod-auth-mysql mysql-server-5.0 php5-mysql php5-pgsql zlib1g libdb4.6 openssl sed mawk rpm


Note: Unlike the script provided at sourceforge, you need libdb4.6, libdb4.7 isn't widely available at the moment and is unstable. If later on when you're reading it is already stable or you've unstable repositories active (and little respect for your server) install 4.7 instead.

Next you'll find that XMCrypt will be looking for libssl.so.4 and libcrypto.so.4 ... too bad! None of them exists on Debian. So we need to link the libraries. In order to do so, perform:

Code:

ln -s /usr/lib/libssl.so.0.9.8 /usr/lib/libssl.so.4
ln -s /usr/lib/libcrypto.so.0.9.8 /usr/lib/libcrypto.so.4


Now it's time for XMail. Don't go run and pick it at Sourceforge, the packages there will give you nothing but troubles and errors. Download the CentOS version instead (reason why I added RPM to the requirements above).

So perform:

Code:

wget  http://www.afterlogic.com/download/afterlogic-xmail-lite-4.8 .10-1.i386.rpm

if you want the lite version
or
Code:

wget  http://www.afterlogic.com/download/afterlogic-xmail-pro-4.8. 10-1.i386.rpm

for the pro version

Now perform:

Code:

rpm -i --nodeps afterlogic-xmail-(pro or lite)-4.8.10-1.i386.rpm


Now you've a few issues to solve, but nothing to worry about. The first of it is that you've no start and kill entries on rc.d for xmail, so let's do them:

Code:

ln -s /etc/init.d/xmail /etc/rc0.d/K10xmail
ln -s /etc/init.d/xmail /etc/rc1.d/K10xmail
ln -s /etc/init.d/xmail /etc/rc2.d/K10xmail
ln -s /etc/init.d/xmail /etc/rc6.d/K10xmail
ln -s /etc/init.d/xmail /etc/rc3.d/S90xmail
ln -s /etc/init.d/xmail /etc/rc4.d/S90xmail
ln -s /etc/init.d/xmail /etc/rc5.d/S90xmail

basically this means Start the server on runlevel 3,4 or 5 and Kill it on 0,1,2 or 6 (6 is reboot, halt or shutdown, so it wouldn't be smart to start a mailserver there).

Next we've the webmail folder in a strange location: /var/www/html/webmail, so let's move it to its right place on a default Debian install, that means.

Code:

mv /var/www/html/webmail /var/www


next step is to open inc_settings_path.php with nano and set the var value to /var/www/data

Now you can go on that way of change permissions and groups by folder and file or go the lazy way:
Code:
chmod -R 777 /var/www/webmail
(my default umask is 000, I don't like negative perms on single user environments/dedicated servers I do prefer positive perms, everything is writable by any user unless I or the user chmoded otherwise - the opposite of Linux's default and pretty much what Desktop versions of Windows do).

Moving on, now you can start XMail and access the adminpanel with user mailadm and pass 12345 and set it as you want.

To start XMail perform:

Code:
/etc/init.d/xmail start


For those using pro, now you might want a spam filter (actually it takes to be crazy to not have one these days). It would be nice if you could just check it on admin interface and it make its magic, but sorry... it doesn't.
First because someone (Afterlogic) forgot to put the filter shell scripts on the filters folder, instead you may found them on /var/MailRoot.sample/filters. Just copy them over to /var/MailRoot/filters

Code:

cp /var/MailRoot.sample/filters/bf-detect.sh /var/MailRoot/filters
cp /var/MailRoot.sample/filters/bf-learn.sh /var/MailRoot/filters


Then, because the shell script is bogus. Luckily enough, both files suffer the same bugs, just open it with nano and edit any entry that looks like:

Code:
if [$DEBUGG = "1" ]


To it's right syntax:
Code:
if [ $DEBUGG = "1" ]; then

Note that there's space between [ and $
Do this on both files and now you can active your spam filter.

With lite version you can active this also by uncomment its entry at filters.tab, but then you've noway to make it learn, since the "learn button" exists only on pro webmail.

Now for the database. Afterlogic doesn't provide one, so you will need to create one yourself:

Code:
mkdir /var/MailRoot/.SpamDB
touch /var/MailRoot/.SpamDB/wordlist.db

If you want a little head start however download xmail for windows and, in a windows box, extract it with uniextract. There's a 2 Mb wordlist.db that Afterlogic provides for Win users which you can copy over to your xmail install.

Next step, the antivirus.
Install ClamAV:
Code:

apt-get install clamav


Then just go to your admin interface and correct the path for the antivirus. Select ClamAV and you'll see its Windows settings, just change C:\Program Files... to:

/usr/bin/clamscan

And that's it. Your Lenny box is ready as email server.
Back to Top View sirarthur's Profile Search for other posts by sirarthur
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide