Home
Home Blogs k4tz's blog
    • Blog
    • Clinic
    • Contact
    • Download
    • Video
    • Login

Poll

Favourite console text editor in Ubuntu:

Archives

July 2009
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311

LXer -- Linux and Open Source News

  • PostgreSQL 8.4 Improves Database Management, Security
  • Linux based Solar-powered networking anywhere
  • PostgreSQL 8.4 now available
  • Reserve Your Space on the Australian Stage
  • GPLv3 Celebrates Two Years, GPLv2 Still in Front
more

Linux Today

  • The Kernel Newbie Corner: Your First Loadable Kernel Module
  • Red Hat inks cloud partnership with Amazon
  • PostgreSQL 8.4
  • 10 Awesome Features of Krunner in KDE 4
  • Changing the World, One Penguin at a Time
more

Linux Insider

  • Is Dell Building an Android PDA?
  • Wikipedia and the Kidnapped Reporter: Censor or Savior?
  • The Business Case for Virtual Business, Part 2
  • Conspiracy Theories and the 'Smoking Gun'
  • What I Need to Help Sell Linux
more

Zarafa -- exchange replacement -- in Ubuntu

Submitted by k4tz on Fri, 10/24/2008 - 10:00
  • Blog
  • Ubuntu
Zarafa exchange replacement

For a long time I’m searching for a free exchange that runs on Ubuntu. Zimbra is very nice but you can’t connect with outlook for free. OpenExchange has the same issue and OpenChange is far from finished. I came across this news message.

Zarafa is licenced under the AGPL

Zarafa is a Mail Delivery Agent that supports:

  • AJAX webaccess with mail, contacts, todo, calendar
  • POP,IMAP support
  • Z-Push (ActiveSync replacement, I use this with my iphone)
  • 3 outlook users (via a closed source component)
  • iCal support
  • LDAP support (Active Directory)

You can use Postfix and other MTA’s to send and receive mails.
This tutorial describes how you can configure Zarafa. I use this for all my mail and it works perfect (also on my iPhone).

The webmail demo: http://demo.zarafa.com/

Step 1: install Zarafa
install depedencies:

Quote:
apt-get install mysql-server-5.0 libmysqlclient15off apache2-mpm-prefork libapache2-mod-php5

Zarafa use Mysql as a storage backend. You need apache if you want to use the WebAccess and Z-Push, both are written in PHP.

Download zarafa community edition, the download page is a little bit annoying because there is no direct download link. With lynx you can download it very easy. If you don’t have lynx: apt-get install lynx

Quote:
lynx http://zarafa.com/?q=en/download-community

Next we need to untar it:

Quote:
tar zxvf zarafa-6.20-ubuntu8.04-i386.tar.gz
cd zarafa-6.20-ubuntu8.04-i386

Start the installer:

Quote:
./install.sh

Follow the steps on the screen. Don’t enter a serial number. You can enter all questions except of the MySQL password.
Next we need to change a configuration in php.ini:

Quote:
nano /etc/php5/apache2/php.ini

Find with ctrl-w the line “magic_quotes_gpc = On” and turn On in Off.
Restart apache:

Quote:
apache2ctl restart

Zarafa needs some older versions of some packages. Therefore you need to hold back some new packages otherwise zarafa will be removed when you run "apt-get dist-upgrade"

Quote:
echo libvmime0 hold | dpkg --set-selections
echo libical0 hold | dpkg --set-selections

Done, zarafa is installed! Time to add a user.

Quote:
zarafa-admin -c jan -p secret -e jan@debaas.nl -f “Jan Peter Balkenende” -a 0

-c = create user
-p = password
-e = email
-f = full name
-a = administrator 1 or 0 (true of false)

To test Zarafa Webaccess, check with ifconfig the ip address and go this url:

https://<ip>/webaccess

Works great isn’t it? Pop, imap, mapi etc everything is working..

Step 3: install postfix and get mail working)

Install postfix:

Quote:
apt-get install postfix

Click oke and choose “No Configuration”

Next we have to change the config files. The fastest way is to copy these config files:

master.cf

Quote:
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - - - - smtpd
zarafa unix - n n - 10 pipe flags= user=vmail argv=/usr/bin/zarafa-dagent ${user}

#submission inet n - - - - smtpd
# -o smtpd_tls_security_level=encrypt
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
# -o milter_macro_daemon_name=ORIGINATING
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o smtp_fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe( delivery
# agent. See the pipe( man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}

main.cf

Quote:
See /usr/share/postfix/main.cf.dist for a commented, more complete version

# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

mailbox_transport = zarafa: zarafa_destination_recipient_limit = 1

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, localhost.$mydomain, $mydomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4

Finally you have to add your hostname at this line: "myhostname = "

add the user vmail:

Quote:
useradd vmail

Now you can send mail. To receive mail you have to configure the MX records for your domain and point them to your IP.

Everything is working right now.

Step 4: run as non-root user (optional)
This step is very recommended, but not necessary to get zarafa working.

Add a user:

Quote:
addgroup --system zarafa
adduser --system –-home /dev/null –-no-create-home –-ingroup zarafa –-disabled-password --gecos 'Zarafa services' --shell /bin/false zarafa

mkdir /var/log/zarafa

chown zarafa.zarafa /var/log/zarafa

You can change the config files of every zarafa service in /etc/zarafa. Open them all and edit the run_as_user and run_as_group options in zarafa.

When you change the user of zarafa-licenced you can't use Outlook anymore. This is some annoying bug. A work around is to change some permissions:

Quote:
chown zarafa.zarafa /var/run/zarafa-licensed
chown -R zarafa.zarafa /var/lib/zarafa/

But when you restart zarafa licenced with /etc/init.d/zarafa-licenced restart you have to change the permissions of /var/run/zarafa-licenced again. You can solve this by adding the chown command to the init script.

Step 5: get Z-push working (optional)

download Z-Push

Quote:
wget http://download.berlios.de/z-push/z-push-1.1.1.tar.gz

untar to the apache directory

Quote:
tar zxvf z-push-<version>.tgz -C /var/www

Change some permissions:

Quote:
chmod 755 /var/www/z-push/state
chown www-data.www-data /var/www/z-push/state

Add an alias to the apache config.

/etc/apache2/sites-availiable/default

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

*WARNING* You CANNOT simply rename the Z-Push directory to Microsoft-Server-ActiveSync.
This will cause Apache to send redirects to the PDA, which will definitely break your PDA
synchronisation.

Done

More information
http://www.zarafa.nl/?q=en/content/documentation

Source: http://ubuntuforums.org/showthread.php?t=956654
  • k4tz's blog
  • Add new comment

Recent blog posts

  • Questions about installing Ubuntu on HP Mini 1000 netbook
  • Epson NX400 driver in Ubuntu
  • Installing Ubuntu Jaunty on HP DV2 laptop
  • How to Install latest version of Midori [Browser] on Ubuntu
  • Download PCLinuxOS 2009.2
  • Download Sabayon Linux 4.2 "GNOME"
  • Map Windows Shares Permanently on Ubuntu with GVFS
  • Ubuntu 9.04 (Jaunty) and Acer Aspire One AOD150-iBb
  • Using Linux Ubuntu on HP HDX 16t Laptop
  • Run a particular program but prevent it from accessing the Internet
more

Linux World

  • Microsoft's Secret Weapon isn't FUD, it's Inertia
  • Will Google Wave revolutionise free software collaboration?
  • Is Android the key to the GNU/Linux desktop? Really?
  • USN-785-1: ipsec-tools vulnerabilities
  • Call it Netbook, Smartbook, or “Low-cost small notebook PC” - It is Great for Linux
  • The Week of the Linux Desktop
  • USN-781-2: Gaim vulnerabilities
  • USN-781-1: Pidgin vulnerabilities
  • USN-780-1: CUPS vulnerability
Archive Syndicate content

Recent comments

  • 1) # ./mkrawdev.sh ./mkrawdev.sh: line 6: ошибка синтаксиса окол
    8 weeks 1 day ago
  • 1) # ./mkrawdev.sh ./mkrawdev.sh: line 6: ошибка синтаксиса окол
    8 weeks 1 day ago
  • Aries Register is the best choice in Europe.
    17 weeks 6 days ago
  • Re: wireless
    20 weeks 3 days ago
  • wireless
    20 weeks 6 days ago
  • Re: Setting up wvdial to support Three
    24 weeks 6 days ago
  • Setting up wvdial to support Three
    26 weeks 1 day ago
  • не проходит built + raw device
    33 weeks 6 days ago
  • Re: Knol is not a Wikipedia clone
    38 weeks 2 days ago
  • Re: THANK YOU SOOOOO MUCH!!!
    38 weeks 2 days ago
All contents copyright © 2008, Dhuha Net. All rights reserved
Ubuntudoctor® is a member of the Dhuha Network. Privacy Policy
RoopleTheme