<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>@Mail Knowledge Base</title>
	<link>http://atmail.com/kb</link>
	<description>@Mail hints and tips</description>
	<pubDate>Wed, 18 Apr 2012 07:30:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>
	<language>en</language>
			<item>
		<title>Updating Dovecot</title>
		<link>http://atmail.com/kb/2012/updating-dovecot-2/</link>
		<comments>http://atmail.com/kb/2012/updating-dovecot-2/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 07:30:29 +0000</pubDate>
		<dc:creator>John Contad</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://atmail.com/kb/2012/updating-dovecot-2/</guid>
		<description><![CDATA[Newer versions of Dovecot contain updates to the handling of uidlist files - the issues of which, may lead to difficulties when receiving emails via POP3 or IMAP. It may be a good idea to update your installation.
Atmail 6.3.6 uses the 1.2 branch; newer versions of this branch are available for download via: http://www.dovecot.org/download.html
To update, [...]]]></description>
			<content:encoded><![CDATA[<p>Newer versions of Dovecot contain updates to the handling of uidlist files - the issues of which, may lead to difficulties when receiving emails via POP3 or IMAP. It may be a good idea to update your installation.</p>
<p>Atmail 6.3.6 uses the 1.2 branch; newer versions of this branch are available for download via: http://www.dovecot.org/download.html</p>
<p>To update, just do the following:</p>
<p>1.) Download the latest sources from the above link:</p>
<p><strong>% wget "http://www.dovecot.org/releases/1.2/dovecot-1.2.17.tar.gz"</strong></p>
<p>2.) Untar, then go into the untarred directory:</p>
<p><strong>%  tar xvfz dovecot-1.2.17.tar.gz<br />
% cd dovecot-1.2.17</strong></p>
<p>3.) Stop the Atmail service:</p>
<p><strong>% /etc/init.d/atmailserver stop</strong></p>
<p>4.) Configure, install:</p>
<p><strong>% ./configure --prefix=/usr/local/atmail/mailserver/ --with-mysql --with-ldap --with-docs=no<br />
% make && make install</strong></p>
<p>5.) Start the Atmail service:</p>
<p><strong>% /etc/init.d/atmailserver restart</strong></p>
<p>Congratulations! Now you have the latest Dovecot binaries installed.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://atmail.com/kb/2012/updating-dovecot-2/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Updating Dovecot</title>
		<link>http://atmail.com/kb/2012/updating-dovecot/</link>
		<comments>http://atmail.com/kb/2012/updating-dovecot/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 06:18:40 +0000</pubDate>
		<dc:creator>John Contad</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://atmail.com/kb/2012/updating-dovecot/</guid>
		<description><![CDATA[Newer versions of Dovecot contain updates to the handling of uidlist files - the issues of which, may lead to difficulties when receiving emails via POP3 or IMAP. It may be a good idea to update your installation.
Atmail 6.3.6 uses the 1.2 branch; newer versions of this branch are available for download via: http://www.dovecot.org/download.html
To update, [...]]]></description>
			<content:encoded><![CDATA[<p>Newer versions of Dovecot contain updates to the handling of uidlist files - the issues of which, may lead to difficulties when receiving emails via POP3 or IMAP. It may be a good idea to update your installation.</p>
<p>Atmail 6.3.6 uses the 1.2 branch; newer versions of this branch are available for download via: http://www.dovecot.org/download.html</p>
<p>To update, just do the following:</p>
<p>1.) Download the latest sources from the above link:</p>
<p>% wget "http://www.dovecot.org/releases/1.2/dovecot-1.2.17.tar.gz"</p>
<p>2.) Untar, then go into the untarred directory:</p>
<p>%  tar xvfz dovecot-1.2.17.tar.gz<br />
% cd dovecot-1.2.17</p>
<p>3.) Stop the Atmail service:</p>
<p>% /etc/init.d/atmailserver stop<br />
4.) Configure, install:</p>
<p>% ./configure --prefix=/usr/local/atmail/mailserver/ --with-mysql --with-ldap --with-docs=no<br />
% make && make install</p>
<p>5.) Start the Atmail service:</p>
<p>% /etc/init.d/atmailserver restart</p>
<p>Congratulations! Now you have the latest Dovecot binaries installed.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://atmail.com/kb/2012/updating-dovecot/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Kernel Errors on Terminal when using CentOS</title>
		<link>http://atmail.com/kb/2011/kernel-errors-on-terminal-when-using-centos/</link>
		<comments>http://atmail.com/kb/2011/kernel-errors-on-terminal-when-using-centos/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 22:25:00 +0000</pubDate>
		<dc:creator>John Contad</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://atmail.com/kb/2011/kernel-errors-on-terminal-when-using-centos/</guid>
		<description><![CDATA[Some Atmail appliances and machines may find the following similar output to their terminal, at 1-second intervals:
 atmail kernel: EDAC MC0: UE page 0x0, offset 0x0, grain 1073741824, row 5, labels ":": i3200 UET
This is caused by a kernel issue affecting CentOS and Fedora machines. You will need to disable that particular module. Open up /etc/modprobe.d/blacklist.conf, [...]]]></description>
			<content:encoded><![CDATA[<p>Some Atmail appliances and machines may find the following similar output to their terminal, at 1-second intervals:</p>
<p><strong> atmail kernel: EDAC MC0: UE page 0x0, offset 0x0, grain 1073741824, row 5, labels ":": i3200 UET</strong></p>
<p>This is caused by a kernel issue affecting CentOS and Fedora machines. You will need to disable that particular module. Open up /etc/modprobe.d/blacklist.conf, and add:</p>
<p><strong>blacklist i3200_edac</strong><br />
Restart your machine afterward.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://atmail.com/kb/2011/kernel-errors-on-terminal-when-using-centos/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Using Nginx as reverse IMAP/POP Proxy</title>
		<link>http://atmail.com/kb/2011/using-nginx-as-reverse-imappop-proxy/</link>
		<comments>http://atmail.com/kb/2011/using-nginx-as-reverse-imappop-proxy/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 03:01:13 +0000</pubDate>
		<dc:creator>John Contad</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://atmail.com/kb/2011/using-nginx-as-reverse-imappop-proxy/</guid>
		<description><![CDATA[This document covers the steps you need to take to have Atmail working with the NginX platform.
Nginx is a free, open-source, high-performance HTTP server and IMAP/POP3 proxy. This is useful for environments that wish to geographically split machines into independent entities, with a central routing system that forwards a user to his/her specific server.
First, download [...]]]></description>
			<content:encoded><![CDATA[<p>This document covers the steps you need to take to have Atmail working with the NginX platform.</p>
<p>Nginx is a free, open-source, high-performance HTTP server and IMAP/POP3 proxy. This is useful for environments that wish to geographically split machines into independent entities, with a central routing system that forwards a user to his/her specific server.</p>
<p>First, download spawn-fcgi from http://redmine.lighttpd.net/projects/spawn-fcgi/news:</p>
<p><em>% wget "http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz"</em></p>
<p>Untar, install:</p>
<p><em>% tar xvfz spawn-fcgi-1.6.3.tar.gz<br />
% cd spawn-fcgi-1.6.3<br />
% ./configure && make && make install</em></p>
<p>Then, download nginx from http://nginx.org/en/download.html:</p>
<p><em>% wget "http://nginx.org/download/nginx-1.0.8.tar.gz"</em></p>
<p>Untar, install:</p>
<p><em>% tar xvfz nginx-0.8.40.tar.gz<br />
% cd nginx-0.8.40<br />
% ./configure && make && make install</em></p>
<p>This will install nginx in /usr/local/nginx/. You will then need to move the /usr/local/nginx/conf/nginx.conf file:</p>
<p><em>% mv /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.old<br />
% cd /usr/local/nginx/conf</em></p>
<p>Replace the nginx.conf file with these contents:</p>
<p><span style="font-style: italic">user  atmail;</span><br style="font-style: italic" /><span style="font-style: italic">worker_processes  2;</span><br style="font-style: italic" /><span style="font-style: italic">error_log  logs/error.log  info;</span><br style="font-style: italic" /><span style="font-style: italic">pid        logs/nginx.pid;</span><br style="font-style: italic" /><span style="font-style: italic">events {</span><br style="font-style: italic" /><span style="font-style: italic">    worker_connections  1024;</span><br style="font-style: italic" /><span style="font-style: italic">    }</span><br style="font-style: italic" /><br style="font-style: italic" /><span style="font-style: italic">mail {</span><br style="font-style: italic" /><span style="font-style: italic">  auth_http  localhost:80/auth.php;</span><br style="font-style: italic" /><span style="font-style: italic">  proxy  on;</span><br style="font-style: italic" /><span style="font-style: italic">  imap_capabilities  "IMAP4rev1"  "UIDPLUS"; </span><br style="font-style: italic" /><span style="font-style: italic">  server {</span><br style="font-style: italic" /><span style="font-style: italic">    listen     143;</span><br style="font-style: italic" /><span style="font-style: italic">    protocol   imap;</span><br style="font-style: italic" /><span style="font-style: italic">  }</span><br style="font-style: italic" /><span style="font-style: italic"> </span><br style="font-style: italic" /><span style="font-style: italic">  pop3_capabilities  "TOP"  "USER";</span><br style="font-style: italic" /><span style="font-style: italic">  server {</span><br style="font-style: italic" /><span style="font-style: italic">    listen     110;</span><br style="font-style: italic" /><span style="font-style: italic">    protocol   pop3;</span><br style="font-style: italic" /><span style="font-style: italic">  }</span><br style="font-style: italic" /><span style="font-style: italic">}</span><br style="font-style: italic" /><br style="font-style: italic" /><span style="font-style: italic">http {</span><br style="font-style: italic" /><span style="font-style: italic">    include       mime.types;</span><br style="font-style: italic" /><span style="font-style: italic">    default_type  application/octet-stream;</span><br style="font-style: italic" /><span style="font-style: italic">    sendfile        on;</span><br style="font-style: italic" /><span style="font-style: italic">    keepalive_timeout  10;</span><br style="font-style: italic" /><br style="font-style: italic" /><span style="font-style: italic">server {</span><br style="font-style: italic" /><span style="font-style: italic">    # Your server's IP address. Leave as an asterisk to bind to all interfaces</span><br style="font-style: italic" /><span style="font-style: italic">    listen       *:80;</span><br style="font-style: italic" /><span style="font-style: italic">    # Your domain name</span><br style="font-style: italic" /><span style="font-style: italic">    server_name  domain.com;      </span><br style="font-style: italic" /><span style="font-style: italic">    location / {</span><br style="font-style: italic" /><span style="font-style: italic">    # Path to your Atmail webmail directory</span><br style="font-style: italic" /><span style="font-style: italic">        root   /usr/local/atmail/webmail/;  </span><br style="font-style: italic" /><span style="font-style: italic">        index  index.php;</span><br style="font-style: italic" /><span style="font-style: italic">        # this serves static files that exist without running other rewrite tests</span><br style="font-style: italic" /><span style="font-style: italic">        if (-f $request_filename) {</span><br style="font-style: italic" /><span style="font-style: italic">            expires 30d;</span><br style="font-style: italic" /><span style="font-style: italic">            break;</span><br style="font-style: italic" /><span style="font-style: italic">        }</span><br style="font-style: italic" /><span style="font-style: italic">    # Routes directory requests to index.php.</span><br style="font-style: italic" /><span style="font-style: italic">        if (!-e $request_filename) {</span><br style="font-style: italic" /><span style="font-style: italic">            rewrite ^(.+)$ /index.php?q=$1 last;</span><br style="font-style: italic" /><span style="font-style: italic">        }</span><br style="font-style: italic" /><span style="font-style: italic">    }</span><br style="font-style: italic" /><br style="font-style: italic" /><span style="font-style: italic">    location ~ \.php$ {</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_pass   127.0.0.1:34480;  # IP and Port of your spawn-fcgi process </span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_index  index.php;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  SCRIPT_FILENAME    /usr/local/atmail/webmail/$fastcgi_script_name; </span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  QUERY_STRING       $query_string;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  REQUEST_METHOD     $request_method;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  CONTENT_TYPE       $content_type;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  CONTENT_LENGTH     $content_length;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  REQUEST_URI        $request_uri;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  DOCUMENT_URI       $document_uri;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  DOCUMENT_ROOT      $document_root;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  SERVER_PROTOCOL    $server_protocol;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  REMOTE_ADDR        $remote_addr;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  REMOTE_PORT        $remote_port;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  SERVER_ADDR        $server_addr;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  SERVER_PORT        $server_port;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  SERVER_NAME        $server_name;</span><br style="font-style: italic" /><span style="font-style: italic">        fastcgi_param  REDIRECT_STATUS    200;</span><br style="font-style: italic" /><span style="font-style: italic">    }</span><br style="font-style: italic" /><span style="font-style: italic">}</span><br style="font-style: italic" /><span style="font-style: italic">}</span><br style="font-style: italic" /><br style="font-style: italic" />Spawn the FastCGI process afterwards. For this example, we will run it in port 34480:</p>
<p><em>% /usr/local/bin/spawn-fcgi -f /usr/bin/php-cgi -a 127.0.0.1 -p 34480 -P /var/run/fastcgi-php.pid -C 2</em></p>
<p>You will then need to edit the /usr/local/nginx/conf/nginx.conf file. It will contain this line:</p>
<p><em>fastcgi_pass   127.0.0.1:34480;  # IP and Port of your spawn-fcgi process</em></p>
<p>If you change the spawn-fcgi port, you will need to edit it in the nginx.conf file as well. For example, a spawn-fcgi port of 51000 will have this command:</p>
<p><em>/usr/local/bin/spawn-fcgi -f /usr/bin/php-cgi -a 127.0.0.1 -p 51000 -P /var/run/fastcgi-php.pid -C 2</em></p>
<p>And this configuration line:</p>
<p><em>fastcgi_pass   127.0.0.1:51000;  # IP and Port of your spawn-fcgi process</em></p>
<p>The configuration file will also contain the following lines of interest:</p>
<p><em>root   /usr/local/atmail/webmail/;</em></p>
<p>This defines the document root you wish to have.</p>
<p><em>user  atmail;</em></p>
<p>This defines the username you want to run nginx as.</p>
<p><em>worker_processes  2;</em></p>
<p>This sets the number of processes that nginx spawns. We recommend it to be set to the number of CPU cores you have available.</p>
<p>Note the document root specified above (in this case, /usr/local/atmail/webmail/). Create the authentication php file at /usr/local/atmail/webmail/auth.php, and fill it with these lines:</p>
<p><em><?php<br />
</em></p>
<p><em>$username=$_SERVER["HTTP_AUTH_USER"] ;<br />
$userpass=$_SERVER["HTTP_AUTH_PASS"] ;<br />
$protocol=$_SERVER["HTTP_AUTH_PROTOCOL"] ;</em></p>
<p><em>$backend_port=110;<br />
if ($protocol=="imap") {<br />
$backend_port=143;<br />
}<br />
if ($protocol=="smtp") {<br />
$backend_port=25;<br />
}</em></p>
<p><em>if (!authuser($username,$userpass)) {<br />
fail();<br />
exit;<br />
}</em></p>
<p><em>$userserver=getmailserver($username);<br />
pass($userserver, $backend_port);</em></p>
<p><em>// Authentication block<br />
function authuser($user,$pass)<br />
{<br />
// You can put a query for authentication with the DB here.<br />
// Since auth will be done post-proxy, we're just returning true<br />
return true;<br />
}</em></p>
<p><em>// MySQL connection function<br />
function mysqlconn($user,$query){<br />
$atmail_dbuser="atmail";<br />
$atmail_dbpass="changeme";<br />
$atmail_db="nginx_map";<br />
$atmail_dbhost="127.0.0.1";</em></p>
<p><em>mysql_connect($atmail_dbhost,$atmail_dbuser,$atmail_dbpass);<br />
@mysql_select_db($atmail_db) or die( "Unable to select database");</em></p>
<p><em>$server1 = mysql_query($query);</em></p>
<p><em>$server = mysql_fetch_array($server1);<br />
$server2 = $server['Server'];<br />
return $server2;<br />
mysql_close();</em></p>
<p><em>}</em></p>
<p><em>function getmailserver($user){<br />
$query = "select Server from UserMap where Account='$user'";<br />
$server = mysqlconn($user,$query);<br />
return $server;<br />
mysql_close();</em></p>
<p><em>}</em></p>
<p><em>function fail(){<br />
header("Auth-Status: Invalid login or password");<br />
exit;<br />
}</em></p>
<p><em>function pass($server,$port){<br />
header("Auth-Status: OK");<br />
header("Auth-Server: $server");<br />
header("Auth-Port: $port");<br />
exit;<br />
}</em></p>
<p>Save the file. After it is created, login to MySQL:</p>
<p><em>% mysql -u [dbuser] -p</em></p>
<p>Specify [dbuser] as your MySQL root user. Create the database (in this case, nginx_map, with the user 'atmail', the password 'changeme' and the host '127.0.0.1'):</p>
<p><em>> create database nginx_map;</em><br />
<em> > grant all privileges on nginx_map.* to 'atmail'@'localhost' identified by 'changeme';<br />
> grant all privileges on nginx_map.* to 'atmail'@'127.0.0.1' identified by 'changeme';<br />
> flush privileges;</em></p>
<p>Create the database skeleton:</p>
<p><em>CREATE TABLE `UserMap` (<br />
`Account` varchar(255) NOT NULL default '',<br />
`Server` varchar(255) NOT NULL default '',<br />
PRIMARY KEY  (`Account`) );<br />
);</em></p>
<p>You can create preliminary entries like so:</p>
<p><em>> insert into UserMap values("john@juno.com","192.168.0.71");</em></p>
<p>This will forward the user 'john@juno.com' to the IMAP host at '192.168.0.71'.</p>
<p>When you are satisfied, run the nginx process:</p>
<p><em>% /usr/local/nginx/sbin/nginx</em></p>
<p>To test it out, login locally with your sample user:</p>
<p><em>% telnet localhost 143<br />
Trying 127.0.0.1...<br />
Connected to localhost.localdomain (127.0.0.1).<br />
Escape character is '^]'.<br />
* OK IMAP4 ready<br />
1 login john@juno.com changeme<br />
1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA] Logged in</em></p>
<p>Congratulations! Now you can set your Nginx process as a forwarding proxy for IMAP and POP requests. This is useful for very large installations that wish to install Atmail as a geographically separated cluster install.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://atmail.com/kb/2011/using-nginx-as-reverse-imappop-proxy/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Using Unison with Atmail</title>
		<link>http://atmail.com/kb/2011/using-unison-with-atmail/</link>
		<comments>http://atmail.com/kb/2011/using-unison-with-atmail/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 06:13:54 +0000</pubDate>
		<dc:creator>John Contad</dc:creator>
		
	<category>Uncategorized</category>
	<category>Multiserver</category>
	<category>OS</category>
	<category>Atmail 5</category>
	<category>Atmail 6</category>
		<guid isPermaLink="false">http://atmail.com/kb/2011/using-unison-with-atmail/</guid>
		<description><![CDATA[Unison allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. In other words, it can be used for two-way synchronization between your servers.
For [...]]]></description>
			<content:encoded><![CDATA[<p>Unison allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. In other words, it can be used for <span style="font-weight: bold">two-way synchronization</span> between your servers.</p>
<p>For illustrative purposes in this example, the Unison Master hostname will be called "<span style="font-weight: bold">master-foo-01</span>"; the Client hostname will be called "<span style="font-weight: bold">slave-foo-02</span>".</p>
<p>To setup Unison on your machine, do the following for both machines:</p>
<p>1.) Download the dependency, OCaml from: <a href="http://caml.inria.fr/download.en.html">http://caml.inria.fr/download.en.html</a></p>
<p><span style="font-style: italic">atmail@master-foo-01# wget "http://caml.inria.fr/pub/distrib/ocaml-3.12/ocaml-3.12.0.tar.gz"</span></p>
<p>2.) Install emacs (a dependency):</p>
<p><span style="font-style: italic">atmail@master-foo-01# yum install emacs</span></p>
<p>3.) Unpack, install OCaml:</p>
<p><span style="font-style: italic">atmail@master-foo-01# tar xvfz ocaml-3.12.0.tar.gz</span><br style="font-style: italic" /><span style="font-style: italic">atmail@master-foo-01# cd ocaml-3.12.0</span><br style="font-style: italic" /><span style="font-style: italic">atmail@master-foo-01# ./configure && make world</span><br style="font-style: italic" /><span style="font-style: italic">atmail@master-foo-01# make opt</span><br style="font-style: italic" /><span style="font-style: italic">atmail@master-foo-01# make install</span></p>
<p>4.) Download Unison from: <a href="http://www.cis.upenn.edu/~bcpierce/unison/download.html">http://www.cis.upenn.edu/~bcpierce/unison/download.html</a></p>
<p><span style="font-style: italic">atmail@master-foo-01# wget "http://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.40.63.tar.gz"</span><br style="font-style: italic" /><br />
5.) Untar, install:<br style="font-style: italic" /><br style="font-style: italic" /><span style="font-style: italic">atmail@master-foo-01# make world opt</span><br style="font-style: italic" /><span style="font-style: italic">atmail@master-foo-01# sudo make install</span></p>
<p>6.) Move the Unison binary to your preferred prefix. We suggest /usr/bin/:<br />
<br style="font-style: italic" /><span style="font-style: italic">atmail@master-foo-01# mv unison /usr/bin/unison</span><br style="font-style: italic" /><span style="font-style: italic">atmail@master-foo-01# chmod 755 /usr/bin/unison</span></p>
<p>7.) You will then need to set the keys. Create a SSH public key on the Master server:</p>
<p><span style="font-style: italic">atmail@master-foo-01# ssh-keygen -t rsa</span></p>
<p>8.) This will produce a public key in /home/atmail/.ssh/id_rsa.pub. Copy the .pub file to the Slave machine:</p>
<p><span style="font-style: italic">atmail@master-foo-01# scp /home/atmail/.ssh/id_rsa.pub root@slave-foo-02:/home/atmail/.ssh/id_rsa.pub</span></p>
<p>9.) Pipe the public key into a file called authorized_keys, in your .ssh directory.</p>
<p><span style="font-style: italic">atmail@slave-foo-02# cat /home/atmail/.ssh/id_rsa.pub >> authorized_keys</span></p>
<p>10.) Make sure that the authorized_keys file, and all of the contents of the .ssh directory have 600 permissions:</p>
<p><span style="font-style: italic">atmail@slave-foo-02# chmod 600 /home/atmail/.ssh/*</span></p>
<p>11.) Try to login, sans password, from the Master machine to the Client machine.</p>
<p><span style="font-style: italic">atmail@master-foo-01# ssh atmail@<span style="font-weight: bold">slave-foo-02</span></span></p>
<p>12.) This should allow you to login. Now, you can try to sync the differences between the users/ directory of the master and slave machines. From any of the machines, execute:</p>
<p><span style="font-style: italic">atmail@master-foo-01# unison -batch -auto /usr/local/atmail/users ssh://<span style="font-weight: bold">slave-foo-01</span>//usr/local/atmail/users</span></p>
<p>13.) The output should be similar to:</p>
<p><span style="font-weight: bold">UNISON 2.40.63 finished propagating changes at 01:25:25.57 on 18 Apr 2011</span><br style="font-weight: bold" /><span style="font-weight: bold">Saving synchronizer state</span><br style="font-weight: bold" /><span style="font-weight: bold">Synchronization complete at 01:25:25  (xx items transferred, 0 skipped, 0 failed)</span></p>
<p>14.) You will need to set this in cron. Create a file called /home/atmail/unison.sh. In the file:<br />
<br style="font-weight: bold" /><span style="font-style: italic">#!/bin/sh</span><br style="font-style: italic" /><span style="font-style: italic">/usr/bin/unison -batch -auto /usr/local/atmail/users ssh://<span style="font-weight: bold">slave-foo-01</span>//usr/local/atmail/users</span><br style="font-weight: bold" /><br />
15.) Set permissions:</p>
<p><em>% chmod 755 /home/atmail/unison.sh</em></p>
<p>16.) Add an entry to your /etc/crontab. It will look like:</p>
<p><em>01,10,20,30,40,50 * * * * atmail /home/atmail/unison.sh</em></p>
<p>This will synchronize your /usr/local/atmail/users directory for both machines.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://atmail.com/kb/2011/using-unison-with-atmail/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Manually Upgrading Atmail 6.x.x Appliance to Atmail 6.20.7 +</title>
		<link>http://atmail.com/kb/2011/upgrading-atmail-6xx-appliance-to-atmail-6207/</link>
		<comments>http://atmail.com/kb/2011/upgrading-atmail-6xx-appliance-to-atmail-6207/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 01:49:19 +0000</pubDate>
		<dc:creator>Stewart Bazley</dc:creator>
		
	<category>Installation</category>
	<category>Atmail 6</category>
		<guid isPermaLink="false">http://atmail.com/kb/2011/upgrading-atmail-6xx-appliance-to-atmail-6207/</guid>
		<description><![CDATA[If you wish to upgrade your appliance to the latest version of Atmail (6.20.7+), please do the following.
 1. Download latest version
To install the latest Atmail patch download a copy from the client-portal page - http://atmail.com/portal/ or download the latest evaluation version.
In these instructions, replace [version] with your current version of Atmail. These are generic [...]]]></description>
			<content:encoded><![CDATA[<p>If you wish to upgrade your appliance to the latest version of Atmail (6.20.7+), please do the following.</p>
<p><strong> 1. Download latest version</strong></p>
<p>To install the latest Atmail patch download a copy from the client-portal page - http://atmail.com/portal/ or download the latest evaluation version.</p>
<p>In these instructions, replace [version] with your current version of Atmail. These are generic instructions to upgrade any previous release of Atmail 6.X to the latest version. The process is designed to be as straightforward as possible, and uses the WebAdmin interface to help simplify the upgrade.</p>
<p><strong>2. Backup</strong></p>
<p>Note: The upgrade and migration scripts have been used for production systems and considered stable.</p>
<p>Before proceeding it is strongly recommended that you make a backup of your current Atmail installation:</p>
<p><code>mysqldump -u root -p atmail6 > /usr/local/atmail/atmail6[version]-backup.sql</code></p>
<p><code>tar cfvz atmail6[version]-backup.tgz /usr/local/atmail /etc/httpd/conf/httpd.conf /etc/init.d/atmailserver</code></p>
<p>This is required before you upgrade in case you need to roll-back any changes, do not skip this step.</p>
<p>Any customizations to Atmail (PHP, HTML, MTA-related code changes) must be backed up. The upgrade process will overwrite any modifications, and these must be merged in after the upgrade./</p>
<p><strong> 3. Extract the patch out into the directory for Atmail</strong></p>
<p>Extract the files:</p>
<p><code>tar xfvz atmail6.mailserver.tgz -C /usr/local/</code></p>
<p><strong> 4. Permissions</strong></p>
<p>You will now need to give Atmail correct permissions.</p>
<p><code>chown -R atmail /usr/local/atmail/webmail/</code></p>
<p><strong>5. Rename Files </strong></p>
<p>You will now need to rename the following file.<br />
<code>mv /usr/local/atmail/mailserver/bin/atmail-update-version /usr/local/atmail/mailserver/bin/atmail-update-version.off </code></p>
<p><strong> 6. WebAdmin Update</strong></p>
<p>Visit the WebAdmin of Atmail and use the Update software link. This will guide you through the web-based upgrade utility for the database schema updates and config changes:</p>
<p>e.g http://server.com/mail/index.php/admin/</p>
<p>Where server.com/mail/index.php is the URL of the Atmail software on your server.Login to Web Administration using your admin username/password, then click the License tab > Update software.</p>
<p><strong> 7. Command Line Update</strong></p>
<p>Depending on the software update, additional packages may need to be re-installed or re-compiled if you are using the Email Server version of Atmail. If prompted during the Web Admin upgrade, run the additional upgrade utility from a command-line: <code /></p>
<p><code><code>cd /usr/local/atmail/</code> <code>php server-update.php [version]</code></p>
<p>Where [version] is the previous version of Atmail installed.<strong> </strong></p>
<p><strong>8. Upgrade Complete</strong></p>
<p>Congratulations, the upgrade is now complete. You can now reload the Webmail interface of Atmail and begin using the latest release and features.If you've made any customizations to the HTML templates, images, or source-code, these changes will need to be copied back in after the upgrade. We recommend using the “diff” command-line utility to compare any local customizations to the latest version.<strong> </strong></p>
<p><strong>Troubleshooting</strong></p>
<p>Force Re-Run UpgradeIf you run into any troubles with the upgrade you may need to re-run the upgrade process.</p>
<p>Assuming that your last version was 6.20.1; Login to your Atmail database and execute the following command.</p>
<p><code>update Config set keyValue = "6.20.1" where keyName = "version";</code></p>
<p>This will fool the WebAdmin update scripts and enable re-running the sql schema updates via the WebAdmin > License > Update Software.</p>
<p>Following the success of the WebAdmin update, please then execute the server-update.php file as the update page will instruct you.</p>
<p><code>php server-update.php 6.20.1</code></p>
<p></code>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://atmail.com/kb/2011/upgrading-atmail-6xx-appliance-to-atmail-6207/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Upgrading to SpamAssassin 3.3.x</title>
		<link>http://atmail.com/kb/2011/upgrading-to-spamassassin-33x/</link>
		<comments>http://atmail.com/kb/2011/upgrading-to-spamassassin-33x/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 04:32:00 +0000</pubDate>
		<dc:creator>John Contad</dc:creator>
		
	<category>Uncategorized</category>
	<category>Anti-Spam</category>
		<guid isPermaLink="false">http://atmail.com/kb/2011/upgrading-to-spamassassin-33x/</guid>
		<description><![CDATA[The newer version of SpamAssassin contains many upgrades - up to, and including DKIM checks, an improved SQL settings implementation. You may want to upgrade to this version.
Upgrading is easy; just go through the following steps:
1.) Download SpamAssassin from: http://spamassassin.apache.org/downloads.cgi
% wget "http://apache.mirror.aussiehq.net.au//spamassassin/source/Mail-SpamAssassin-3.3.1.tar.gz"
2.) Unpack:

% tar xvfz Mail-SpamAssassin-3.3.1.tar.gz -C /usr/local/atmail/server_source/
% cd /usr/local/atmail/server_source/Mail-SpamAssassin-3.3.1

3.) Rename your previous SpamAssassin directory:
% [...]]]></description>
			<content:encoded><![CDATA[<p>The newer version of SpamAssassin contains many upgrades - up to, and including DKIM checks, an improved SQL settings implementation. You may want to upgrade to this version.</p>
<p>Upgrading is easy; just go through the following steps:</p>
<p>1.) Download SpamAssassin from: <a href="http://spamassassin.apache.org/downloads.cgi">http://spamassassin.apache.org/downloads.cgi</a></p>
<p><em>% wget "http://apache.mirror.aussiehq.net.au//spamassassin/source/Mail-SpamAssassin-3.3.1.tar.gz"</em></p>
<p>2.) Unpack:<br />
<em><br />
% tar xvfz Mail-SpamAssassin-3.3.1.tar.gz -C /usr/local/atmail/server_source/<br />
% cd /usr/local/atmail/server_source/Mail-SpamAssassin-3.3.1</em><strong><br />
</strong><br />
3.) Rename your previous SpamAssassin directory:</p>
<p><em>% mv /usr/local/atmail/spamassassin /usr/local/atmail/spamassassin.3.2</em></p>
<p>4.) Install the NetAddr::IP module:</p>
<p><em>% perl -MCPAN -e 'install NetAddr::IP'</em></p>
<p>5.) Install:</p>
<p><em>% perl Makefile.PL  PREFIX=/usr/local/atmail/spamassassin/  && make && make install</em></p>
<p>6.) Move the local.cf and sqlsettings.cf files:</p>
<p><em>% cp /usr/local/atmail/spamassassin.3.2/etc/sqlsettings.cf /usr/local/atmail/spamassassin.3.2/etc/local.cf /usr/local/atmail/spamassassin/etc/mail/spamassassin/</em></p>
<p>7.) Restart services:</p>
<p><em>% /etc/init.d/atmailserver restart</em></p>
<p>Congratulations. Now you have SpamAssassin 3.3.x. Credits to the Apache Software Foundation (<a href="http://www.apache.org/">http://www.apache.org/</a>) for making a tremendously amazing piece of software.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://atmail.com/kb/2011/upgrading-to-spamassassin-33x/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Running IMAP on Another Port</title>
		<link>http://atmail.com/kb/2011/running-imap-on-another-port/</link>
		<comments>http://atmail.com/kb/2011/running-imap-on-another-port/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 00:14:52 +0000</pubDate>
		<dc:creator>John Contad</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://atmail.com/kb/2011/running-imap-on-another-port/</guid>
		<description><![CDATA[To run Dovecot on another port, just do the following:
Open up /usr/local/atmail/mailserver/etc/dovecot.conf. Find:
protocol imap {
#
mail_plugins = quota imap_quota
#
#  mail_executable = /usr/local/atmail/mailserver/etc/create-imap.sh
#
}
Change to:
protocol imap {
#
mail_plugins = quota imap_quota
#
#  mail_executable = /usr/local/atmail/mailserver/etc/create-imap.sh
#
listen = *:143 *:144

} 
Where 144 is your additional port. Restart Atmail afterward.

]]></description>
			<content:encoded><![CDATA[<p>To run Dovecot on another port, just do the following:</p>
<p>Open up /usr/local/atmail/mailserver/etc/dovecot.conf. Find:</p>
<p><strong>protocol imap {<br />
#<DOVECOT_PLUGINSIMAP><br />
mail_plugins = quota imap_quota<br />
#<LDAP_CREATE1><br />
#  mail_executable = /usr/local/atmail/mailserver/etc/create-imap.sh<br />
#</LDAP_CREATE1><br />
}</strong></p>
<p>Change to:</p>
<p><strong>protocol imap {<br />
#<DOVECOT_PLUGINSIMAP><br />
mail_plugins = quota imap_quota<br />
#<LDAP_CREATE1><br />
#  mail_executable = /usr/local/atmail/mailserver/etc/create-imap.sh<br />
#</LDAP_CREATE1><br />
listen = *:143 *:144<br />
</strong></p>
<p><strong>} </strong></p>
<p>Where 144 is your additional port. Restart Atmail afterward.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://atmail.com/kb/2011/running-imap-on-another-port/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Logrotate for Atmail 6 logs</title>
		<link>http://atmail.com/kb/2011/logrotate-for-atmail-6-logs/</link>
		<comments>http://atmail.com/kb/2011/logrotate-for-atmail-6-logs/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 05:38:22 +0000</pubDate>
		<dc:creator>John Contad</dc:creator>
		
	<category>Uncategorized</category>
		<guid isPermaLink="false">http://atmail.com/kb/2011/logrotate-for-atmail-6-logs/</guid>
		<description><![CDATA[Configuring Logrotate is critical, so as to reduce the size of the files used by Atmail in the webmail/log directory. To implement logrotate for your server, please do the following:
- create a file in /etc/logrotate.d/ called 'logrotate_atmail_log'
- in the file, put:
/usr/local/atmail/webmail/log/*log {    missingok    notifempty    sharedscripts    postrotate/etc/init.d/atmailserver restart >/dev/null 2>&#038;1 &#124;&#124; true    endscript}
- start logrotate:
% /usr/sbin/logrotate [...]]]></description>
			<content:encoded><![CDATA[<p>Configuring Logrotate is critical, so as to reduce the size of the files used by Atmail in the webmail/log directory. To implement logrotate for your server, please do the following:</p>
<p>- create a file in /etc/logrotate.d/ called 'logrotate_atmail_log'</p>
<p>- in the file, put:<br />
<span style="font-weight: bold">/usr/local/atmail/webmail/log/*log {</span><br style="font-weight: bold" /><span style="font-weight: bold">    missingok</span><br style="font-weight: bold" /><span style="font-weight: bold">    notifempty</span><br style="font-weight: bold" /><span style="font-weight: bold">    sharedscripts</span><br style="font-weight: bold" /><span style="font-weight: bold">    postrotate</span><br style="font-weight: bold" /><span style="font-weight: bold">/etc/init.d/atmailserver restart >/dev/null 2>&1 || true</span><br style="font-weight: bold" /><span style="font-weight: bold">    endscript</span><br style="font-weight: bold" /><span style="font-weight: bold">}</span><br />
- start logrotate:</p>
<p style="font-weight: bold">% /usr/sbin/logrotate /etc/logrotate.conf</p>
<p>This will then manually execute the log rotation process.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://atmail.com/kb/2011/logrotate-for-atmail-6-logs/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Creating Mailing Lists in Atmail 6.x</title>
		<link>http://atmail.com/kb/2011/creating-mailing-lists-in-atmail-6x/</link>
		<comments>http://atmail.com/kb/2011/creating-mailing-lists-in-atmail-6x/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 04:15:29 +0000</pubDate>
		<dc:creator>Brad Kowalczyk</dc:creator>
		
	<category>Atmail 6</category>
	<category>maintenance tools</category>
	<category>Hints and Tips</category>
		<guid isPermaLink="false">http://atmail.com/kb/2011/creating-mailing-lists-in-atmail-6x/</guid>
		<description><![CDATA[As some may have noticed, the method used for mailing list creation in Atmail 5.x no longer works with Atmail6. There is however a solution to creating mailing lists for Atmail 6. The easiest way, if you have many users to add at once is to use the batch-alias-create.php script described here. Create a csv [...]]]></description>
			<content:encoded><![CDATA[<p>As some may have noticed, the method used for mailing list creation in Atmail 5.x no longer works with Atmail6. There is however a solution to creating mailing lists for Atmail 6. The easiest way, if you have many users to add at once is to use the batch-alias-create.php script described <a href="http://atmail.com/kb/2011/batch-creation-of-aliases-in-atmail/">here</a>. Create a csv file like such:</p>
<p>Deliver,list@domain.com,user1@dom.com;user2@dom.com;user3@dom.com;...etc</p>
<p>(If you have more than one mailing list you wish to create then put the details for each one on a new line in the csv file.)</p>
<p>With the example above a "deliver locally and alias" alias will be created which will result in all mail sent to list@domain.com also being forwarded to each email address specified (note that the "forward-to" addresses are separated by a semi-colon ";" not a comma ","). The effect of this is the same as the old style Atmail 5 mailing list; list@domain.com will receive a copy of all emails and they will also be forwarded to everyone in the "list".</p>
<p>To add single addresses to the mailing list just go to Webadmin > Services > Mail Aliases, select "Local Alias" as the alias type, enter the address of the list in the "Local Email Address" field and the address of the user you wish to add in the "Forward To" field, then click "Add Alias".</p>
<p>To delete addresses from the list simply find in the table the entry or entries you wish to delete, check the checkbox then click "Delete Selected". You may wish to type in the name of the list or the name of the account in the "Filter by domain" field at the top if you have many entries in the table, just to make your target easier to find.</p>
<p>And that is about it. Pretty simple!
</p>
]]></content:encoded>
			<wfw:commentRSS>http://atmail.com/kb/2011/creating-mailing-lists-in-atmail-6x/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>

