Page 1 of 8 123 ... LastLast
Results 1 to 10 of 71

Thread: HOWTO: Zarafa exchange replacement

  1. #1

    HOWTO: Zarafa exchange replacement

    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:

    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

    Next we need to untar it:

    tar zxvf zarafa-6.20-ubuntu8.04-i386.tar.gz
    cd zarafa-6.20-ubuntu8.04-i386
    Start the installer:
    ./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:
    nano /etc/php5/apache2/php.ini
    Find with ctrl-w the line “magic_quotes_gpc = On” and turn On in Off.
    Restart apache:

    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"

    echo libvmime0 hold | dpkg --set-selections
    echo libical0 hold | dpkg --set-selections
    Done, zarafa is installed! Time to add a user.

    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:
    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
    #
    # 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(8) delivery
    # agent. See the pipe(8) 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

    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:
    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:
    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:

    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
    untar to the apache directory
    tar zxvf z-push-<version>.tgz -C /var/www
    Change some permissions:
    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
    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

  2. #2
    Join Date
    Oct 2008
    Beans
    1

    Re: HOWTO: Zarafa exchange replacement

    Is there any posibility to use it for more then three outlook users? It looks very nice, but this is a big disadvantage for me.

  3. #3
    Join Date
    Feb 2007
    Beans
    19

    Re: HOWTO: Zarafa exchange replacement

    Quote Originally Posted by PeterEs View Post
    Is there any posibility to use it for more then three outlook users? It looks very nice, but this is a big disadvantage for me.
    They do have three other versions beside the community version. All of them seems to support unlimited Outlook accounts

    http://www.zarafa.com/?q=en/content/versions

  4. #4

    Re: HOWTO: Zarafa exchange replacement

    That's correct, you have to pay for more outlook users. You can also use imap for outlook if calender en contacts are not necessary.

    There is a new version of zarafa, I try to update this tutorial as fast as possible. I also want to add a anti spam/virus section.

  5. #5
    Join Date
    Nov 2008
    Beans
    22

    Re: HOWTO: Zarafa exchange replacement

    Hi,

    Thanks for putting up this tutorial; i have been trying to get zarafa working myself for a few weeks now.

    I have just done a fresh install of ubuntu 32bit 8.04 and selected the LAMP option, from there i have followed your instructions but have come across some problems.

    Firstly, postfix was not picking up mails from my backup MX server, the postfix error log has the following message:
    -------------------
    Nov 15 14:15:52 [my server name] postfix/master[8032]: fatal: /etc/postfix/master.cf: line 43: bad transport type: smtp_fallback_relay=
    -------------------
    i tried writing the name of an smtp server in here so the line looked like "smtp_fallback_relay=smtp.isp.com" but this didnt work. I then commented out that line and got this error message:
    -------------------
    Nov 15 17:36:21 [my server name] postfix/master[4784]: fatal: /etc/postfix/master.cf: line 70: bad transport type: user=vmail
    -------------------

    Is anyone able to help me with these problems?

    In the past I have selected Internet Site configuration when installing postfix - this is the first time I chose No Configuration and the first time I have had these errors.

    The place I have stumbled previously is postfix has picked up the email, it is sat in the directory /var/mail but Zarafa will not pick it up from there to distribute to a user.

    Any help would be much appreciated.

    Thanks.

    matt

  6. #6
    Join Date
    Nov 2008
    Beans
    22

    Re: HOWTO: Zarafa exchange replacement

    ok, i have made a little progress this evening.

    From reading this link... http://zarafa.com/wiki/index.php/MTA_integration I found i needed to add in "local_admin_users = root vmail" to the /etc/zarafa/server.cfg file. That has stopped my last error message I posted.

    I now have a new one of
    ----------------------------------------
    Nov 15 21:06:48 [my server name] postfix/postfix-script[4901]: fatal: the Postfix mail system is not running
    ----------------------------------------

    I have tried looking on the net this evening for help with sorting this one by I have had no luck

    Any ideas???


    Many thanks.

    matt

  7. #7
    Join Date
    Jun 2006
    Beans
    13

    Re: HOWTO: Zarafa exchange replacement

    Quote Originally Posted by mattbourne View Post
    ----------------------------------------
    Nov 15 21:06:48 [my server name] postfix/postfix-script[4901]: fatal: the Postfix mail system is not running
    ----------------------------------------

    I have tried looking on the net this evening for help with sorting this one by I have had no luck

    Any ideas???


    Many thanks.

    matt
    Hi Matt,

    I have the EXACT same problem here.. although I am running Ubuntu server 8.10.. but should not make a difference..

    Anyone got Zarafa working? I'd love to get this thing running!

    Thanks !

  8. #8
    Join Date
    Nov 2008
    Beans
    22

    Re: HOWTO: Zarafa exchange replacement

    Ive had no luck yet progressing past the error. I have created a new thread on the Zarafa forum too but havent had any luck there but they had asked me for more detail...

    http://forums.zarafa.com/viewtopic.p...3799f6941c2e24

    matt

  9. #9
    Join Date
    Jun 2006
    Beans
    13

    Re: HOWTO: Zarafa exchange replacement

    Thanks for your reply Matt.. I'll keep an eye on the Zarafa topic as well, and maybe I can add some useful information.

    I was thinking of getting rid of postfix and try something like sendmail and fetchmail.. if I finaly get things running, I'll let you know right away.

    In the meantime, I'm hoping someone will provide us with a better fix

  10. #10
    Join Date
    Nov 2008
    Beans
    22

    Re: HOWTO: Zarafa exchange replacement

    w00ter,

    Ive got it working. Seeing as the Zarafa people were sooooo helpful, i thought i would post it here!!!

    In your main.cf, insert the following line of code:
    --------
    mailbox_command = /usr/bin/zarafa-dagent "$USER"
    --------

    Dont have these 2 in there, delete them if they are:
    --------
    mailbox_transport = zarafa:
    zarafa_destination_recipient_limit = 1
    --------

    You dont need to make any changes to master.cf so remove these if you have added them:
    --------
    zarafa unix - n n - 10 pipe
    flags= user=vmail argv=/usr/bin/zarafa-dagent ${user}
    --------

    and remove the "vmail" user from this line in /etc/zarafa/server.cfg
    --------
    local_admin_users = root vmail
    --------

    I hope that works for you, i just need to sort out my emails going through my ISP's SMTP server until I can sort out a static IP address now (i think and hope!!!!)

    Let me know how you get on.

    matt

Page 1 of 8 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •