Embed
Email

Ubuntu install-09

Document Sample

Shared by: yaohongm
Categories
Tags
Stats
views:
0
posted:
2/9/2012
language:
pages:
59
How to install Ubuntu and Zarafa for MS-Windows guys and gals…..









V0.9 –December 2011



M. Verkade

Contents

Contents....................................................................................................................................................2

Introduction .............................................................................................................................................4

Step 1 – Install VMware............................................................................................................................5

Step 2 – Download the Ubuntu iso...........................................................................................................5

Step 3 - Install Ubuntu in VMware player.................................................................................................5

Step 4 – Install VMware tools.................................................................................................................10

Step 5 - Install Ubuntu patches and updates..........................................................................................11

Step 6 – Ubuntu Settings........................................................................................................................14

6.1 Add the Linux console to the panel..............................................................................................14

6.2 Make the ‘adminuser’ an administrator on your system.............................................................14

6.3 Set the correct time zone ............................................................................................................15

6.4 Change the root-password...........................................................................................................15

6.5 Change the hostname of your machine........................................................................................16

6.6 Show your IP ................................................................................................................................17

6.7 Change your dynamic IP address to a static address...................................................................17

Step 7 – Install MySQL............................................................................................................................18

Step 8 – Add the canonical archive to the Ubuntu software center......................................................19

Step 9 – Install Zarafa..............................................................................................................................20

Step 10 – Configure Zarafa......................................................................................................................22

10.1 Add the MySQL password to server.cfg......................................................................................22

10.2 Turn indexing service on.............................................................................................................23

10.3 Set a virtual mail user in de users ..............................................................................................23

10.4 Turn dagent logging on...............................................................................................................24

Step 11 – Add your license (optional).....................................................................................................24

Step 12 – Add an MTA to deliver email to the net..................................................................................25

Step 13 – Add the vmail user to Zarafa...................................................................................................29

Step 14 – Restart the services.................................................................................................................30

Step 15 - Add a user to Zarafa and to the system...................................................................................31

Step 16 – Start Webaccess and test!......................................................................................................32

Step 17 – Check which version of Zarafa you are running......................................................................35

Step 18 – Test the Zarafa Indexer...........................................................................................................35

The end...................................................................................................................................................37

Appendix 1 – Linux Alternatives to Windows Applications....................................................................38

Appendix 2 – Linux Commands – Very First basics.................................................................................38





Ubuntu and Zarafa Page - 2 -

Appendix 3 – Various Zarafa commands.................................................................................................39

Appendix 4 – File locations.....................................................................................................................39

Extra 1 - Install SpamAssassin ................................................................................................................42

Extra 2 – Install Clam-AV (using procmail)..............................................................................................44

Extra 3 – Install Z-Push............................................................................................................................48

Extra 4 – Add aliases to Zarafa................................................................................................................53

Extra 5 – Manually upgrade to latest Zarafa 6.x.....................................................................................54

Extra 6 – Manually upgrade to Zarafa 7.x (NYA)....................................................................................60

Extra 6 – Install Zarafa WebApp (NYA)....................................................................................................63

Extra 7 - Install the Zarafa Python samples (NYA)...................................................................................63

Extra 8 – Install Z-Admin (NYA)...............................................................................................................63

Changelog...............................................................................................................................................64









Ubuntu and Zarafa Page - 3 -

Introduction

As a MS-Windows man, I have been used to the Windows interface and other windows do’s and

don’ts. In the meantime I consider myself a Windows expert…



Some friends around me are using Linux and recently I am involved with an open source project

called Zarafa. The Zarafa Collaboration Platform (www.zarafa.com) is a full featured MS-Exchange

Replacement which comes with an advanced webaccess that resembles MS-Outlook.



A logical next step was to install Linux and Zarafa to see what they were talking about. I started to

approach Linux the MS-Windows way.. Just install it and use your logics and wizards to install stuff,

sometimes looking at the net for references, but unfortunately I failed miserably.



Since I failed miserably, I think lots of people will fail too doing their first steps into Linux. After a

while I started to master Linux the hard way, so I decided to create a manual ‘First steps into Linux as

a MS-Windows guy/gall and get Zarafa running’.



This manual is meant for MS-Windows people that want to see what Linux is. Remember that Linux is

free software, Zarafa is free software and in the meantime every program used on your Windows

machine has it’s (free) Linux equivalent (see Appendix 1). So why stick with MS-Windows, a resource

hungry OS that does things you never know or want and eats your machines processor and memory

as a hungry dog?



In Linux everything can be investigated and controlled by you and lets you control your machine

instead of the machine controlling you!



The first step is to install a Virtual Machine on your Windows machine. The idea is that you can play

around without destroying your complete OS when you make a crucial mistake. I know you will mess-

up once like I did by accidentally deleting the /bin directory/folder… Good to know that you can

simply make backups of your virtual machines (by copying the directory/folder) and start all over

again with a copy of your virtual machine right before you made your fatal mistake.



The next step is to install Zarafa and give you a complete free mail server system. Just register a

domain name and share your email and calendar with your girlfriend so she knows what you are

doing.



The third stage is to give some examples of Linux equivalents to Windows software and a small

appendix about useful Linux commands and applications.



To complete this manual, there are some extra optional paragraphs explaining how to integrate

SpamAssassin, Clam-AV with Zarafa and show you how Z-Push, Z-Admin and the WebApp can be

installed.



Remember that I am not a Linux expert, but just a Windows guy doing my first Linux steps with a

goal: Setup a Linux machine and run the Zarafa Collaboration Platform. This manual is quite

extensive. The main reason is that I added loads of screenshots just to make sure it is clear for you!



To receive emails, you have to register a domain name like www.yourcompany.com. If you do not

have a domain name yet, I suggest you get yourself one so you can setup your complete mail

environment with this tutorial. There are several online possibilities to order and setup domain

names instantly like http://www.domein-direct.nl/.



Ubuntu and Zarafa Page - 4 -

You can find all ZCP manuals at http://www.zarafa.com/content/documentation



I have to thank Dominique Debyttere, Mark Sartor, Maarten Verwijs, Milo Oostergo and Remon van

Gijn (and all other Zarafians) for reading my tutorial and giving me suggestions. John Duurkoop for

testing the manual and of course Brian Joseph, the Zarafa CEO, for hiring me.







Step 1 – Install VMware

I am going to use Ubuntu, a Linux distribution that has an outstanding interface and has windows-like

wizards to get the most things done. To install Ubuntu on a Windows machine you have to run a so-

called virtual box in which Ubuntu can run as a kind of machine inside your machine.



To accomplish this, I choose to use VMware player or VMware server, a free software package which

can run virtual machines on your PC.



You can download VMware player/server from their website.



http://downloads.vmware.com/d/info/desktop_downloads/vmware_player/3_0



http://downloads.vmware.com/d/info/datacenter_downloads/vmware_server/2_0







Step 2 – Download the Ubuntu ISO

Ubuntu comes in different flavors and every 2 year they launch a so called LTS version that means

that this version will be supported for at least 4 years. I downloaded Ubuntu LTS 10.04 (Long Term

Support) from the Ubuntu website. Please be sure your machine supports 64bit when selecting that

flavor.



http://www.ubuntu.com/download/ubuntu/download







Step 3 - Install Ubuntu in VMware player

Next step is to install Ubuntu on the VMware player.



Note: I do not like prefabricated Ubuntu virtual machines because you never know if someone has

been fooling around with it or what is exactly installed on that machine.



On the net there are different videos which show you how to install Ubuntu on VMware.



http://www.youtube.com/watch?v=7Svv9PHMg4U



http://www.youtube.com/watch?v=AuOp5NZHMi0&feature=related



Remember that most of the OS software is collaborating so in this case VMware player recognizes

that you want to install Ubuntu and starts a wizard.









Ubuntu and Zarafa Page - 5 -

As a user and pass I choose adminuser / adminuser. You can choose whatever name you want, but it

is good to have at least one extra administrator account which you can use to install and administrate

your machine.



Note: Do not use usernames like [admin] or [root] since these are reserved words and you will end

up reinstalling Ubuntu.



Note: Ubuntu is case sensitive. It is common sense to use lower cases for usernames and mixed

case for passwords. In this case simply choose the same (‘very not safe’) password as the

username.









Name your virtual machine and set the installation path to the location you prefer.









Ubuntu and Zarafa Page - 6 -

Specify the amount of disk space you want to use for your Virtual Machine. Make sure you allocate

enough space. I selected 20GB of space.









Next to that, customize the hardware for your needs.









At least take 2GB of memory so your Zarafa and MySQL instances will have enough memory to

perform in a proper way.







Ubuntu and Zarafa Page - 7 -

For better graphic performance, turn the 3D acceleration on.









Finally a decision has to be made what kind of network IP address is given to this virtual machine.



By default NAT is selected. NAT means that VMWare player will create a network subdomain in which

this VM (Virtual Machine) will reside. VMWare player will translate (NAT) all traffic to this VM from

the internet. Although NAT seems like a good idea since it will use the hosts IP address for traffic, it is

better to bridge the VM to get a ‘real’ IP address from the domain controller (or DHCP server) of your

network.









Ubuntu and Zarafa Page - 8 -

With NAT this machine would get the IP address from VMWare player (192.168.237.130) and while

bridged the VM will receive an IP address from the networks DHCP server (192.168.178.20). The host,

the machines on which VMWare is installed, also got an IP address from the DHCP server

(192.168.178.17).









Make sure you end up with at least these changed settings in relation of the default settings:



Processors = 2 cores

Mem = 2 GB

HD = 20 GB

3D Accelerator = On

Network = Bridged



After the installation finishes (this can take up to half an hour) and the login screen pops up, please

login with the following credentials:



User : adminuser

Pass : adminuser









Ubuntu and Zarafa Page - 9 -

Step 4 – Install VMware tools

Install VMtools when the system prompts you to. This only has to be done once on your system.









Ubuntu and Zarafa Page - 10 -

After the installations finishes, we have to install the patches and updates of Ubuntu since software

keeps evolving.









Step 5 - Install Ubuntu patches and updates

Ubuntu has a built-in update manager. This application checks all installed packages (i.e. applications)

and checks if the latest version is available on your system. This means that next to Ubuntu itself, also

all third party products that are in the repository (big library with all the applications in it) are

updates.



Start the Update manager to update all packages. This can take up to 15 minutes depending on your

download speed.









Ubuntu and Zarafa Page - 11 -

Since Ubuntu is much stricter than Windows regarding user rights, you have to enter your password

when you perform updates like this. There are ways to make your account a so-called root-account,

but it is advised not to do that since you can completely destroy your machine.









Ubuntu and Zarafa Page - 12 -

Wait until the installation of the updates finishes.









During the process you are prompted to install GRUB (http://en.wikipedia.org/wiki/GNU_GRUB). This

is a Linux boot loader which let you multi-boot various OS-es. Since we are running in VMware, it is

not necessary to install GRUB.









After the installation is done, you have to restart your virtual machine. (Only once, compare that with

installing MS-Windows!!!)



I never understood why in Windows, after you updated your machine, there were new updates after

restarting it… Every time I ended up rebooting and rebooting Windows and installations could take 5







Ubuntu and Zarafa Page - 13 -

hours or more! When you follow this manual you have installed a complete Ubuntu within 1 hour (if

your internet is a bit fast since you have to download the complete Ubuntu OS ISO of 500+MB too)









Step 6 – Ubuntu Settings

After installing Ubuntu, you have to configure your Ubuntu with various settings like the time zone,

users etc.





6.1 Add the Linux console to the panel

When using Linux, you will be using the console once in a while. It is advisable to add it to the panel

bar.









Right Mouse click to pin the Terminal to the panel bar.









6.2 Make the ‘adminuser’ an administrator on your system

Go to the menu [Administration | users and groups] and change the account type to administrator.









Ubuntu and Zarafa Page - 14 -

6.3 Set the correct time zone

By default the Ubuntu time zone will be America. Change it to your current time zone.









6.4 Change the root-password

Root is the super user on Linux that can change everything. By default there is no root password so

cannot login as root. Since the root user is ‘god’ on your machine, it is wise to have a unique

password for root on your machine so you can log on with that account when everything else does

not work anymore. Please note that you remember this password. I have chosen as password

adminuser too (and will change it later on).



You can change the root password to a new password with the command : sudo passwd







Ubuntu and Zarafa Page - 15 -

6.5 Change the hostname of your machine

The hostname is the name of the machine. By default it is set to ‘Ubuntu’.



You can change the hostname by editing two files in the /etc directory:









Change the name in both files to your desired machine name and after a reboot, the hostname will

be changed. In my case I have set it to ‘zarafaserver’









And









6.6 Show your IP

Sometimes you need the IP address of the machine you just created. The external address can be

found through http://www.showmyip.com.









Your internal IP addresses can be seen by the Linux command ip addr show:







Ubuntu and Zarafa Page - 16 -

You also can right-click on the network icon in the panel bar and select ‘connection information’.









6.7 Change your dynamic IP address to a static address

To make sure your IP address is not changed accidentally by your DHCP server (as it did in my

installation which took me about an hour to find out why my port forwards were not working

anymore), make the IP address static by editing the connection details by clicking ‘Edit Connections’.









Ubuntu and Zarafa Page - 17 -

Step 7 – Install MySQL

Ubuntu comes with the Ubuntu software center. This is a repository for all native supported Ubuntu

software. Next to the standard Ubuntu software, there is also a so called Canonical partner

repository. This repository contains third party software from various vendors like Zarafa.



Zarafa uses MySQL as a database so we have to install MySQL by using the Ubuntu Software Center.

MySQL resides in the standard Ubuntu Repository. Later on this manual we will add the Canonical

Repository to the Ubuntu Software Center.









When MySQL prompts you for a password, please use as a root pass : adminuser

You can change this password later if you want.



Ubuntu and Zarafa Page - 18 -

Optionally install the following applications which can be of use for you in a later stadium.



•MySQL Administrator



•MySQL Query Browser







Step 8 – Add the canonical archive to the Ubuntu software center

Ubuntu works with software repositories where you simply can install software.



Next to the Ubuntu base-repository, a partner repository exists which have to be added to the

Software Center to become active.









Select [Edit | Software sources]









Add the Canonical partner repository by checking the appropriate checkbox.









Ubuntu and Zarafa Page - 19 -

When [close] is pressed, it can take up to several minutes to add the repository to the system. Please

be patient, the repository finally will be available in the Ubuntu Software Center.







Step 9 – Install Zarafa

After the Canonical partner repository is added you can download partner packages like Zarafa.



Currently only Zarafa 6.40 is available in the Canonical partner repository. We will install 6.40 after

which we will (manually) upgrade to Zarafa 7.x which came available in July 2011 (See chapter ).

Eventually Zarafa 7 will be available as a separate package in the Ubuntu Canonical Repository.



Search for Zarafa using the edit-box (Select the Canonical Partner Repository or get software). Several

Zarafa packages will be available:









Ubuntu and Zarafa Page - 20 -

Install the following packages:



-Zarafa



-Zarafa-libs



-Zarafa-webaccess



-Zarafa-webaccess-mobile



-Zarafa-indexer



-Zarafa-licensed



-Zarafa-python



-Zarafa-webaccess-muc



Wait until the installation is finished, this will take about 5 minutes depending on your internet

speed.









After the installation finished, all Zarafa components should be marked with a green flag.









Ubuntu and Zarafa Page - 21 -

Step 10 – Configure Zarafa

10.1 Add the MySQL password to server.cfg

Since Zarafa uses MySQL as a database, it has to know the password of MySQL so Zarafa can create

and setup the database. To edit the settings we have to open a Terminal window and edit the

server.cfg file.



Note: You cannot simply browse for the server.cfg file and edit it due to the restrictions of the file

system where only root users may edit this file.



To edit these kind of config files, you have to be a root-user. You can become a root user by prefixing

every command with the [sudo] or use [sudo -i] or simply [su] to be the root user during this terminal

session.



1 [sudo -i] Become a root user

2 [cd /etc/Zarafa] Go to the directory where the Zarafa config files reside

3 [gedit server.cfg] Edit the server.cfg by using gedit, a graphical editor









Set the root password for MySQL and set the attachments as [files]









Ubuntu and Zarafa Page - 22 -

10.2 Turn indexing service on

Zarafa uses the Lucene indexer to speed up searches in the Zarafa database. To turn it on, change the

appropriate settings in the server.cfg file.









10.3 Set a virtual mail user in de users

Zarafa needs a virtual user to deliver its email. We will create this user later on this manual. To

prevent ending up editing the server.cfg file again, we will add this user right now.









Ubuntu and Zarafa Page - 23 -

10.4 Turn dagent logging on

Zarafa uses a delivery agent to deliver email to the MTA. The most common issues are regarding this

delivery so we want to set the delivery logging on until we know it works flawless.









Uncomment the # and add the # before the current setting. The # is the prefix for comment often

used in Linux config files.









Step 11 – Add your license (optional)

Zarafa is an open source product which, in this case, means that there is a community version which

is completely free and is a full featured product.



As you probably can understand that Zarafa as a company cannot ‘live on air’. Therefore certain

advanced features of Zarafa are disabled in this free community version like Zarafa backup, Zarafa

multiserver, high-availability support, archiving, the advanced multi-user calendar etc. For more info

on the features per edition you can visit the Zarafa support page at

http://www.zarafa.com/content/editions



Pricing information can be found on http://www.zarafa.com/content/prices



To add your license, you can issue this command to create a license file in the /etc/zarafa/license

directory.



echo "yourserial" | sudo tee -a /etc/zarafa/license/base









Or just use gedit in the appropriate directory to create the file and add your serial number:









Ubuntu and Zarafa Page - 24 -

Step 12 – Add an MTA to deliver email to the net

An MTA is a Mail Transport Agent that can send emails to the internet. Zarafa can use any MTA to

send email but Sendmail and Postfix are the ones most common used.



I will use Postfix due to its simplicity and flexibility. Install postfix through the Ubuntu Software Center









Select [Internet Site] and other default settings when Postfix install prompts the settings.









After Postfix is installed, configure Postfix for your domain:









Add the following lines to the main.cf of Postfix



mailbox_command = /usr/bin/zarafa-dagent "$USER"



mailbox_transport = zarafa: zarafa_destination_recipient_limit = 1



mydestination = hostname.local, example.com, localhost.hostname.local, localhost







It ends up like this:









Also make sure the internet hostname is correct in the main.cf.









Ubuntu and Zarafa Page - 25 -

You can check if the hostname is correct by running the command : host mail.yourdomain.com.









Set Zarafa as a delivery mode in the master.cf file. Remember to keep the spaces intact!



zarafa unix - n n - 10 pipe



flags=DRhu user=vmail argv=/usr/bin/zarafa-dagent -R ${recipient}









To test if postfix is installed correctly try to connect manually through telnet:









To receive email on your domain addresses, you have to ‘tell’ the internet the exact address where to

deliver emails which are sent to your domain. This is done by editing the DNS (Domain Name Service)

records on a DNS server. This can be done by your internet provider or, if you have access to that, a

DNS tool like www.dnstools.nl. Make sure all MX records in the DNS are correct and pointing to the

correct external IP address of your network.





Ubuntu and Zarafa Page - 26 -

You can check if the mailserver is reachable by using the ping command after changing the DNS:









Note: It can take up to 1 day to have the DNS records updated on the internet!



Also make sure port 25 is forwarded to this VM’s internal IP address by adding a port-forward in your

router. I also did port 110 (Pop3), port 80 (Http/webpages) and port 5900 (Ubuntu Remote Desktop /

VNC).









To check if the forward works on your router, you can check it by using a port scanner on a remote

machine:









Ubuntu and Zarafa Page - 27 -

Note: Make sure the firewall is opened for port 25 on the host machine (the machine where the VM

is running on) or else the VM cannot be reached from outside the network!



Note: Some ISP’s block port 25 for sending mailservers, for instance ziggo.nl. This issue can be fixed

by using a relay host (using your providers smtp server). You can configure a relay host in the

main.cf file of postfix:









To check if Apache works on port 80, you can simply start a web browser and navigate to your zarafa

server:









Step 13 – Add the vmail user to Zarafa

Zarafa uses a user called vmail to deliver emails to postfix. We have to create this user on the Ubuntu

system:



adduser --system --no-create-home vmail









Ubuntu and Zarafa Page - 28 -

Add this user to the local_admin_users of Zarafa in the server.cfg









Step 14 – Restart the services

We are done with all settings so we have to restart the system. We can do that by restarting the

complete virtual machine or the corresponding services. In this case, since we changed the

hostname, I would recommend restarting the complete virtual machine.



If you only want to restart the services, you can do that with the following commands in the terminal

window:



/etc/init.d/apache2 restart

/etc/init.d/postfix restart

/etc/init.d/zarafa-server start









To see if all services are running correct, you can use the system monitor:









The tab [processes] shows all Zarafa processes:







Ubuntu and Zarafa Page - 29 -

Step 15 - Add a user to Zarafa and to the system

/usr/bin/zarafa-admin -c marc -p marc -e marc@yourdomain.nl -f "Marc Verkade"









Add a user to Ubuntu : adduser marc









Check if the user is available in the user administration of Ubuntu.









Note: Remember that Zarafa is installed under user ’adminuser’. Do not make the mistake to login

as user ‘Marc’ and expect Zarafa to work under that account. Always login with user ‘adminuser’.



This is all to install a Linux distribution and get Zarafa running!

Ubuntu and Zarafa Page - 30 -

Step 16 – Start Webaccess and test!

To test if it works, login to the webaccess by opening Firefox and enter the URL: 127.0.0.1/webaccess.









Login with user marc and pass marc.









Send a test email to another account…





Ubuntu and Zarafa Page - 31 -

And see if it has arrived:









Note: Hotmail expects your domain name to have a reverse DNS entry. Sometimes this will fail and

emails to (for instance) hotmail cannot be sent and will be bounced. If sending emails to hotmail is

not possible, use relay_host to send your emails or unblock the IP address as described in the

following posts.

http://www.stigmatedbrain.net/drupal/?q=node/40

http://www.hmailserver.com/forum/viewtopic.php?f=7&t=19094



Next step is to check if Outlook also connects to our new mailserver. First you have to install the

Zarafa client from http://download.zarafa.com/community/final/









Ubuntu and Zarafa Page - 32 -

Next step is to configure Outlook to connect to Zarafa by adding a new account:









Note: We did not configure secure access, so uncheck the corresponding checkbox



It works!









Step 17 – Check which version of Zarafa you are running

See which version of Zarafa you are running and check if you have the latest version.









Ubuntu and Zarafa Page - 33 -

Step 18 – Test the Zarafa Indexer

To make sure the indexer works, we can see in the log that it starts and stops. To see more details, we

can increase the loglevel and check the logfiles if everything goes OK.



Edit /etc/zarafa/indexer.cfg and increase the loglevel.









Restart the zarafa-indexer:









Check the log: The indexer starts and reindexes the mailstore of Marc. It seems to run OK!









Ubuntu and Zarafa Page - 34 -

The end

This is all for now. Zarafa is build to be flexible and this manual does not cover a fraction of the

possibilities. There are various manuals on the internet but I found most of them written by ‘Linux

guys for Linux guys’ so loads of stuff were new for me and I just could not understand what they were

talking about.



This tutorial is just for you as a Windows man to learn Linux a bit and to setup a free Zarafa mail

server. Remember that YOU now have total control and not you machine and/or Windows!



By creating this manual, I am confident to replace my Windows desktop to a Ubuntu desktop. I hope

you enjoyed your Linux and Zarafa trip as much as I enjoyed creating this tutorial!



Parts of this manual is based on the Zarafa Wiki from Zarafa Engineer Dominique Debyttere:

http://www.zarafa.com/wiki/index.php/Installing_Zarafa_from_Ubuntu_Repository









Ubuntu and Zarafa Page - 35 -

Appendix 1 – Linux Alternatives to Windows Applications

Go to the website and download the Debian/Ubuntu package. The package manager will install the

application for you when downloaded!



Total Commander Krusader www.krusader.org

MS-Word Open office / Libre Office http://www.libreoffice.org/

Paint / Paintshop The Gimp http://www.gimp.org/

Illustrator Inkscape http://inkscape.org/

Zip 7-zip http://www.7-zip.org/download.html

Media Player VLC of MPlayer http://www.videolan.org/

Media Center XBMC http://xbmc.org/

Internet TV Miro http://www.getmiro.com/

SoundRecorder Audacity http://audacity.sourceforge.net/

Outlook Thunderbird + Sunbird http://www.mozilla.org/nl/thunderbird/

Internet Explorer Chrome http://chrome.google.com

MindManager FreeMind http://freemind.sourceforge.net

Blog software Wordpress http://wordpress.org/

Snag-it Shutter http://shutter-project.org/

PDF-Reader Okular http://okular.kde.org/

MS-Project GanttProject http://www.ganttproject.biz/

DTP Scribus http://www.scribus.net/canvas/Scribus

Camtesia Wink http://www.debugmode.com/wink/

Wallpaper Changer Wally http://www.becrux.com

DVD Emulation Furius https://launchpad.net/furiusisomount

Video Editor Avidemux http://fixounet.free.fr/avidemux

IrfanView XnView http://www.xnview.com/en/xnview.html

PDF Writer CUPS-PDF http://www.cups-pdf.de/

HTML Editor Kompozer http://kompozer.net/

3D Animation Blender http://www.blender.org/

Antivirus Clam AV http://clamtk.sourceforge.net/index.html







Appendix 2 – Linux Commands – Very First basics

sudo –v Set the sudo for 15 minutes

sudo –i or su Set root rights for this terminal window



man #command Get help for the command ???

:q Quits the man-page



cd Windows:cd

Remark that directorys are written with slashes and not with back-slashes

/etc/zarafa instead of \etc\zarafa



ls Windows:dir



chmod Change file/directory permissions



Ubuntu and Zarafa Page - 36 -

chown Change owner of files (user/group)



vi Simple line editor

:q = quit



tee –a Add info to the end of a file

echo "yourserial" | sudo tee -a /etc/zarafa/license/base



gedit Graphical editor like notepad



top Shows top-processes

q = quit

h = help

o = list of columns







Appendix 3 – Various Zarafa commands

Zarafa-stats zarafa-stats --system | more

gets the Zarafa stats for the system







Appendix 4 – File locations

In Linux, various special locations are



/bin/zarafa Zarafa binary files

/etc/zarafa Zarafa config files

/var/log/zarafa Zarafa log files

/usr/share/zarafa Zarafa scripts

/etc/postfix Postfix log files

/var/log/mail.log This log will give info if emails are send/received correctly or not by postfix

/home/$user$ Users home folder





Appendix 5 – Krusader – Total Commander for Linux

Krusader is the Total Commander for Linux. As a windows man, I always use Total Commander so the

first thing to do was to find an alternative for this outstanding tool (http://www.ghisler.com).



After installing Krusader using the Ubuntu Software Center, you have to change some settings before

it works flawless.



1Add kdesu to the /usr/bin directory by making a link. The commando ln creates a shortlink to a file.









2Make sure your files are moved to the trash bin instead of trashed immediately. Just in case if you

accidentally delete a file.





Ubuntu and Zarafa Page - 37 -

3There is a bug in the system while running a terminal windows by pressing [F2]. You have to edit the

file by the command gedit ~/.kde/share/config/krusaderrc and change the default terminal to :

Terminal=gnome-terminal --working-directory %d









4To use the CTRL+E (Edit as root) you have to install kwrite from the Ubuntu Software Center



Some shortkeys in Krusader:

F1 = Help

F2 = Start terminal here

F3 = View

F4 = Edit

F5 = Copy

F7 = New directory

F8 = Delete

Backspace = Directory Up

Tab = Switch panes

CTRL+S = Search I changed this to CTRL+F

CTRL+D = Bookmarks / shortcuts

CTRL+E = Edit as root

CTL+. = Show hidden files

ALT-SHIFT-B = Show Brief mode

ALT-SHIFT-K = Root mode Krusader









Ubuntu and Zarafa Page - 38 -

Extra 1 - Install SpamAssassin

SpamAssassin is a open source spamfilter (http://spamassassin.apache.org/). On their website it is

clearly described how to install SpamAssassin:









Let’s try to install SpamAssissin this way instead of using the Ubuntu Software Center (which does

practically the same). Start a terminal session and remember to get sudo rights before using apt-get!









Remember that apt-get also installs any dependencies it is missing. After a while SpamAssassin is

installed, however, the daemon is not started yet!









After SpamAssassin is installed, we have to configure it for Zarafa. First of all edit the file

/etc/spamassassin/local.cf, the SpamAssassin configuration file.



•Delete the # so SpamAssassin marks email as spam









•Encapsulate spam emails to prevent executing scripts etc.









•Make sure your localhost is not a spammer









•Add extra SpamAssassin settings for network checks, autolearning etc.









Ubuntu and Zarafa Page - 39 -

A SpamAssassin configuration file creator can be found at :

http://www.yrex.com/spam/spamconfig.php



NOTE: Due to licensing issues DCC is not enabled by default in version 3.1+. You have to enable the

plugin in /etc/mail/spamassassin/v310.pre DCC will not be used.









We have to turn SpamAssassin on because it is disabled by default. If you forget this step, as I did,

you will get this message:









After editing the file /etc/default/spamassassin, it starts correctly.









Now, we need to tell Postfix to use SpamAssassin. In our case, SpamAssassin will be invoked only

once Postfix has finished with the email. To tell Postfix to use SpamAssassin, we are going to

edit /etc/postfix/master.cf and change the line:



smtp inet n - - - - smtpd





to:

smtp inet n - - - - smtpd



-o content_filter=spamassassin





and then, at the end of master.cf, let's add:

spamassassin unix - n n - - pipe



user=vmail argv=/usr/bin/spamc -f -e



/usr/sbin/sendmail -oi -f ${sender} ${recipient}









Ubuntu and Zarafa Page - 40 -

and here we go, our spam filter is setup, we need to reload postfix settings and everything should be

ready.

#/etc/init.d/postfix reload



Try to send an email to an external address and check in /var/log/mail.log if the email is sent.









Note: SpamAssassin tries to make a user profile, but since it fails, it will use the default settings as

we configured.







Extra 2 – Install Clam-AV (using procmail)

ClamAV is an open-source virusscanner for Linux and Windows (www.clamav.net)



First step is to install the ClamAV-daemon by using the Ubuntu Software Center. There are 2 versions:

The standard ClamAV and the ClamAV-daemon. I recommend the daemon for mailservers since it

stays in memory running as a service and is much faster than the standard version.









After installing ClamAV-daemon, you will see that several packages are also installed like Clam-

freshclam (Update tool for virus definitions) and ClamAV (the commandline ClamAV).



By default ClamAV does not have an interface other than the terminal window, you can download an

interface like ClamTK.









Ubuntu and Zarafa Page - 41 -

Note: After installing ClamAV it is possible that some security patches are available for download in

the Ubuntu Software Center. Just install these updates!



Check is ClamAV works by firing up ClamTK and for instance scan a directory.









There are several options to integrate ClamAV with Zarafa. Since we integrated SpamAssassin directly

into Postfix, I will use procmail for adding ClamAV to the mail transport procedures. The idea using

procmail is that we tell our MTA (Postfix) to send all emails to procmail instead of directly into the

inbox of the user. In procmail we then configure which applications each email has to pass before it

can be delivered to the actual inbox.



So the flow will be : Postfix Procmail Spamassassin ClamAV ??? Zarafa user inbox



I found a manual on the net how to configure procmail, clamAV and Spamassasin:

https://secure.kitserve.org.uk/content/how-install-zarafa-debian-lenny-postfix-procmail-

spamassassin-clamassassin-spam-learning-and



We start by installing procmail and clamassassin









After procmail is installed, we have to tell postfix to deliver emails to procmail instead of the Zarafa-

inbox by editing the Postfix configuration file /etc/postfix/main.cf and comment the Zarafa entries

and add the procmail entry:









Ubuntu and Zarafa Page - 42 -

Also comment all Zarafa related lines in /etc/postfix/master.cf since procmail will do the actual

delivery for us.



Next step is to configure procmail to send emails to SpamAssassin, ClamAV and finally to Zarafa. We

have to edit the file /etc/procmailrc. If this file does not exist, simply create it by using the command

‘gedit procmailrc’ on the terminal commandline in the /etc directory.



Copy the following code in this file and save it.

# Run procmail as the receiving user, not root:

DROPPRIVS=yes



# Log procmail's activities to the log directory:

LOGFILE=/var/log/procmail.log



# Scan message to see if it contains a virus:

:0fw: $HOME/.clamassassin.lock

| /usr/bin/clamassassin



# If the message appears to contain a virus, pass Zarafa the -j flag:

:0w

* ^X-Virus-Status: Yes

| /usr/bin/zarafa-dagent -j $LOGNAME

EXITCODE=$?



# Alternatively, you can automatically delete the message by commenting

# out the above section and uncommenting the following:

#:0

#* ^X-Virus-Status: Yes

#/dev/null



# If no virus was found, scan message to see if it is spam:

:0fw: $HOME/.spamassassin.lock

* < 256000

| /usr/bin/spamc --headers



# If spamassassin thinks the message is spam, pass Zarafa the -j flag:

:0w

* ^X-Spam-Flag: YES

| /usr/bin/zarafa-dagent -j $LOGNAME

EXITCODE=$?



# Otherwise pass the message to Zarafa as normal:

:0w

| /usr/bin/zarafa-dagent $LOGNAME

EXITCODE=$?









Before procmail will work, we have to configure clamassassin by editing the file

/etc/defaults/clamassassin and tell it has to use the ClamAV-daemon for virus scanning (note the

‘d’).









We now have to restart postfix, procmail or simply restart the VM and check if all services and

daemons are running.









Now send an email to your Zarafa Server and see in the log files if ClamAV and SpamAssassin are

working.









Ubuntu and Zarafa Page - 43 -

Note: Procmail tries to add info to the dagent-log but user Marc does not have sufficient rights. To

add read/write rights to a file you can use the chmod command. See

https://help.ubuntu.com/community/FilePermissions for more information about file permissions.









After this, the dagent.log also shows the email is delivered:









Extra 3 – Install Z-Push

Z-Push (http://z-push.sourceforge.net/soswp/) is an open-source implementation of the ActiveSync

protocol written in php. Although it is an open-source project, it has native Zarafa support. Z-Push

supports various mobile phones including iPhone, Android, Nokia and Windows mobile.



The first step is to download the latest Z-Push package. You can find the latest version at http://z-

push.sourceforge.net/soswp/index.php?pages_id=39&t=Download. When you download a .gz file,

Ubuntu detects that this is an installable file, so it will try to open it with the package manager. In this

case this will NOT work! You have to save the file and extract the files manually to a certain folder.









By default, the file will be saved in the users download folder /home/adminuser/Downloads.





Ubuntu and Zarafa Page - 44 -

To extract the files, open up a terminal window, take root, navigate to the downloads folder of

adminuser and extract the files.









After the files are extracted, a folder z-push-1.5.4-707 (or other version) is created in the adminuser’s

download directory. Since I do not like this name with version number, I rename the folder to simply

z-push by using the mv command.









After this, I move the z-push directory to the more proper place /var/www. The location of Z-push is

now /var/www/z-push.









Edit the Z-push configuration file /var/www/z-push/config.php file and make sure

that ‘date_default_timezone_set’ is set to your time zone.









Before Z-Push can work, we have to make sure that our Z-Push directory is writable by the web

server. To do this, we issue the commands chmod (change file/directory attributes) and chown

(change the owner of a file/directory) in a terminal window:



chmod 755 /var/www/z-push/state

chown www-data.www-data /var/www/z-push/state









Z-push is now setup. We have to tell Apache that Z-Push has to be used when an activesync request

takes place. We have to edit the Apache configuration file /etc/apache2/sites-availiable/default and

add the following line:





Ubuntu and Zarafa Page - 45 -

Alias /Microsoft-Server-ActiveSync /var/www/z-push/index.php









After this, we have to restart Apache: /etc/init.d/apache2 restart









Note that Apache cannot find the correct hostname since we did not set this in the Apache

configuration file. Our hostname is ‘zarafaserver’ as we saw earlier when setting up our virtual

machine.









To get rid of this Apache warning, add the ServerName property to the Apache configuration file in

/etc/apache2/httpd.conf









When we restart Apache, the server name can now be found and no warnings are showed.









Since we added port-forwards on our router earlier when we configured postfix, z-push should work

out-of-the-box. To check, you can simply start a browser and call Microsoft-Server-ActiveSync. A

username / password window should pop up:









Ubuntu and Zarafa Page - 46 -

I configured my iPhone 4 to connect to my new Zarafa server by using the ‘Exchange’ connection type

and connect to mail.xyz.nl:









Note: We did not configure SSL, so turn it off at the account properties on your iPhone / mobile!









Ubuntu and Zarafa Page - 47 -

And it works!









Perform an extra test by adding an appointment in your agenda on your mobile and see if it arrives in

your WebAccess and works.









Extra 4 – Add aliases to Zarafa

To be able to use aliases for our Ubuntu usernames, we have to configure Postfix to use a virtual

name/table with aliases instead of simply deliver the email to Zarafa after checking if the user exists.

How to configure Postfix is described in the Zarafa manual at

http://doc.zarafa.com/6.40/Administrator_Manual/en-US/html/_MTAIntegration.html







Ubuntu and Zarafa Page - 48 -

First we add the virtual properties in het Postfix configuration file /etc/postfix/main.cf.









After this, we have to create a ‘translation’ table to tell Postfix what users and aliases are handled by

our mail server and to what user the email should be send.









After creating a virtual.db file by executing postmap /etc/postfix/virtual, we have to restart Postfix

and the Zarafa dagent.









Check if the alias works by sending an email to info@yourdomain.nl. Check /var/log/mail.log for

information if something fails and the alias does not work.







Extra 5 – Manually upgrade to latest Zarafa 6.x

When software in a distribution repository is updated, it should be tested very well. This means in

general that not all software in Ubuntu is up-to date and new packages can be available on the

various vendor websites.



This is also the case with Zarafa. As we speak (July 2011) Zarafa 6.40.8 is the version that resides on

the Ubuntu Canonical Lucid Repository but the latest final version is 6.40.10.



When we want to upgrade Zarafa, we have to be aware that we installed Zarafa from the Ubuntu

Software Center and that Zarafa installation packages from the Zarafa websites are not compatible

with that. The routine is:



1 De-install Zarafa from the Ubuntu Software Center

2 Download Zarafa from the Zarafa website

3 Install the Zarafa packages



Step 1 : De-install Zarafa from the Ubuntu Software Center









Ubuntu and Zarafa Page - 49 -

Go to the Ubuntu Software Center, search for the keyword 'Zarafa' and press 'Remove' to deinstall all

Zarafa packages. The Zarafa configuration files will not be removed!









Step 2 : Download Zarafa from the Zarafa website



We have to download the latest version of Zarafa from the Zarafa portal. Go to the page

http://portal.zarafa.com and register yourself as a new user by pressing the 'Sign up' button.









After your have registered yourself, go to the downloads tab and select the version you want to

download.



In this case, I choose Zarafa 6.40.10 after which the following window appeared where I entered the

following information.









Ubuntu and Zarafa Page - 50 -

When prompted to open or save the file, choose 'Open With Archive Manager'. Press 'Extract' to

extract the files and choose the downloads folder, select 'All files' and press 'Extract'.









Step 3 – Install the Zarafa packages



After extracting the file a dialog pops up.



We can investigate the folder by pressing the 'Show the files' button.









Ubuntu and Zarafa Page - 51 -

As you can see, various files are extracted with extensions .deb. These are Debian packages that can

be installed and correspond with the Zarafa packages that were available in the Ubuntu Software

Center. Notice that there is also an 'install.sh' file. This is an installation script for Zarafa but since we

have been using the Ubuntu Software Center and the Lucid partner repository, this will not work right

away!



First we have to remove the Canonical Lucid Repository from the Ubuntu Software Center. If we do

not remove it, the installation package manager will try to install Zarafa components (which is Zarafa

6.40.8) from the repository in stead of our downloaded latest Zarafa packages (6.40.10).



To remove the repository, open the Ubuntu Software Center, select 'edit | software sources', choose

tab 'Other Software' and uncheck the lucid partner repository.









After deleting the Lucid partner repository, we have to open up a terminal window to execute the

installation script 'install.sh'. Type ' sudo -i' and navigate to the adminuser downloads folder. After

that, we can fire up the install script by entering the command 'bash install.sh'.









Ubuntu and Zarafa Page - 52 -

Follow the installation script and answer the questions. Just use the defaults by pressing ENTER

except at these questions:



•MySQL root password → adminuser



•When there is a warning about the database being already in use, just ignore.



•When asking to write a new indexer config or use the old one, keep the old one.



After pressing [ENTER] several times, Zarafa 6.40.10 is installed.









Start the Zarafa Webaccess to check if the update finished correctly!









Ubuntu and Zarafa Page - 53 -

Extra 6 – Manually upgrade to Zarafa 7.x (NYA)

NOTE: You cannot directly update your Zarafa installation from the Ubuntu Software Center with a

download from the Zarafa website.



The Zarafa update routine is:



1 Uninstall Zarafa 6

- From the Ubuntu Software Center if it is installed that way

- From the package manager

2 Delete the Canonical Lucid partner repository from the Ubuntu Software Center

3 Install Zarafa 7 packages from the Zarafa website



When you have a valid Zarafa 6.x License, you can simply update the license on the Zarafa portal. If

you do not have a valid license, you can request a test-serial for Zarafa 7 from the Zarafa website.



Go to the Evaluation Subscription request page at http://www.zarafa.com/serial_request, fill in the

information and press 'download'.









Step 1 : Download ZCP 7.x from the Zarafa Portal

Go to http://portal.zarafa.com and download the latest release of Zarafa 7.









Ubuntu and Zarafa Page - 54 -

Save the file and unpack the files (right-mouse click | Extract here) in the download directory.









Step 2 : Uninstall the Zarafa 6 packages



To install the Zarafa 7.x packages, we first have to uninstall the Zarafa 6.x packages. With the Zarafa

installation, an uninstall.sh script is delivered, however, it is known that this script sometimes does

not uninstall Zarafa 6.x properly so we will use the Zarafa Package manager to uninstall Zarafa.



As you might know, Ubuntu uses packages to install software. These packages can be downloaded,

installed and uninstalled with a so-called package manager. We will use the standard Synaptic

Package Manager of Ubuntu to uninstall Zarafa 6.x from your system.



After the package manager started, type 'zarafa' in the quick search box.









Ubuntu and Zarafa Page - 55 -

Press the right-mouse button on the packages and 'Mark for removal' for each package.









After all packages are marked, press the 'Apply' button to actually remove the Zarafa packages from

your Ubuntu system.



Note: Close the package manager after it is finished or else Zarafa 7 installation will fail!



Step 3 : Install the Zarafa 7 packages



Navigate to the Zarafa download folder and install Zarafa 7 by starting the install.sh script.









NOTE : During the installation process you will be prompted what to do with your Zarafa 6.x

settings. Please keep these settings or else you will end up reconfiguring Zarafa!



Fill in the right information for the MySQL server access



•MySQL root password → adminuser









Ubuntu and Zarafa Page - 56 -

When you look in the processes after the installation finishes, you will see that the Zarafa server

process is not started. This is due to the fact that the Zarafa database has to be updated to the Zarafa

7 scheme yet. Since this can take a while, Zarafa decided to leave you the decision when to upgrade

your database since this can take a while to complete.









To start the upgrade, you can use the zarafa7-upgrade tool. You can find this file in the

/usr/share/doc/zarafa/zarafa7-upgrade.gz zipfile. Please unzip this file by starting a terminal

window, navigate to the right directory and execute gzip -d zarafa7-upgrade.gz.







Before the upgrade script can be run, we need to install the python-mysql package. Start the Ubuntu

Software Center and install this package.









After the Python mySQL package is installed, the database upgrade script can be executed.









Ubuntu and Zarafa Page - 57 -

Please restart Zarafa by executing /etc/init.d/zxarafa-server start on a terminal window.









And check the log if Zarafa-server starts.









Step 4 : Check if the update worked by starting the WebAccess.









Step 5 : Update the Zarafa license



Open the file base in the folder /etc/zarafa/license and replace the 6.x license with your 7.x license.



Step 6 : Reboot the machine and check again if everything works as expected.









Extra 6 – Install Zarafa WebApp (NYA)





Extra 7 - Install the Zarafa Python samples (NYA)









Ubuntu and Zarafa Page - 58 -

Changelog

2011-12-08

- Fixed some minor typo’s

- Upload to Zarafa community page



2011-08-11

- Added manual update to Zarafa 7.x



2011-08-02

- Added manual update to Zarafa 6.x



2011-07-31

- Added Z-push

- Added mail aliases



2011-07-27

- Added paragraph : SpamAssassin

- Added paragraph : ClamAV with procmail



2011-07-25

- Postfix install finished

- Static IP address instead of DHCP

- Firewall / port forwarding

- Relay host for ziggo.nl because ziggo blocks port 25

- VMWare bridging instead of NAT

- Krusader appendix

- Windows app replacement appendix

- Added grammar changes as suggested by Maarten Verwijs









Ubuntu and Zarafa Page - 59 -


Related docs
Other docs by yaohongm
Supreme Court Decisions 1950s-1970s
Views: 0  |  Downloads: 0
As-GBO
Views: 0  |  Downloads: 0
LG 125 Quickguide
Views: 0  |  Downloads: 0
Newsletter111025
Views: 0  |  Downloads: 0
WELCOME TO THE ROCK
Views: 0  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!