Finished: integrations/0-sogo-centos-6-mysql.md.
Mention Fail2ban in faq/file.locations.md.
This commit is contained in:
parent
3a5a5ee850
commit
b8d6f65ce3
|
@ -116,6 +116,12 @@ Additional config files:
|
||||||
|
|
||||||
Amavisd is configured to log to [Postfix log file](#postfix) by iRedMail.
|
Amavisd is configured to log to [Postfix log file](#postfix) by iRedMail.
|
||||||
|
|
||||||
|
## Fail2ban
|
||||||
|
|
||||||
|
Main config file is `/etc/fail2ban/jail.local`. All custom settings should be
|
||||||
|
placed in `jail.local`, and don't touch `jail.conf`, so that upgrading
|
||||||
|
Fail2ban binary package won't override your custom settings.
|
||||||
|
|
||||||
## Roundcube webmail
|
## Roundcube webmail
|
||||||
|
|
||||||
Roundcube webmail is installed under below directory by default:
|
Roundcube webmail is installed under below directory by default:
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
<li><a href="#log-files_2">Log files</a></li>
|
<li><a href="#log-files_2">Log files</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li><a href="#fail2ban">Fail2ban</a></li>
|
||||||
<li><a href="#roundcube-webmail">Roundcube webmail</a></li>
|
<li><a href="#roundcube-webmail">Roundcube webmail</a></li>
|
||||||
<li><a href="#iredapd">iRedAPD</a></li>
|
<li><a href="#iredapd">iRedAPD</a></li>
|
||||||
<li><a href="#iredadmin">iRedAdmin</a></li>
|
<li><a href="#iredadmin">iRedAdmin</a></li>
|
||||||
|
@ -158,6 +159,10 @@ on Debian/Ubuntu.</p>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="log-files_2">Log files</h3>
|
<h3 id="log-files_2">Log files</h3>
|
||||||
<p>Amavisd is configured to log to <a href="#postfix">Postfix log file</a> by iRedMail.</p>
|
<p>Amavisd is configured to log to <a href="#postfix">Postfix log file</a> by iRedMail.</p>
|
||||||
|
<h2 id="fail2ban">Fail2ban</h2>
|
||||||
|
<p>Main config file is <code>/etc/fail2ban/jail.local</code>. All custom settings should be
|
||||||
|
placed in <code>jail.local</code>, and don't touch <code>jail.conf</code>, so that upgrading
|
||||||
|
Fail2ban binary package won't override your custom settings.</p>
|
||||||
<h2 id="roundcube-webmail">Roundcube webmail</h2>
|
<h2 id="roundcube-webmail">Roundcube webmail</h2>
|
||||||
<p>Roundcube webmail is installed under below directory by default:</p>
|
<p>Roundcube webmail is installed under below directory by default:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title>SOGo: install SOGo on CentOS 6 with iRedMail (MySQL backend)</title>
|
<title>Install SOGo groupware on CentOS 6 with iRedMail (MySQL backend)</title>
|
||||||
<link href="./css/markdown.css" rel="stylesheet"></head>
|
<link href="./css/markdown.css" rel="stylesheet"></head>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -10,13 +10,13 @@
|
||||||
<a href="http://www.iredmail.org" target="_blank">iRedMail web site</a>
|
<a href="http://www.iredmail.org" target="_blank">iRedMail web site</a>
|
||||||
|
|
||||||
// <a href="./index.html">Document Index</a>
|
// <a href="./index.html">Document Index</a>
|
||||||
</div><h1 id="sogo-install-sogo-on-centos-6-with-iredmail-mysql-backend">SOGo: install SOGo on CentOS 6 with iRedMail (MySQL backend)</h1>
|
</div><h1 id="install-sogo-groupware-on-centos-6-with-iredmail-mysql-backend">Install SOGo groupware on CentOS 6 with iRedMail (MySQL backend)</h1>
|
||||||
<div class="toc">
|
<div class="toc">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#sogo-install-sogo-on-centos-6-with-iredmail-mysql-backend">SOGo: install SOGo on CentOS 6 with iRedMail (MySQL backend)</a><ul>
|
<li><a href="#install-sogo-groupware-on-centos-6-with-iredmail-mysql-backend">Install SOGo groupware on CentOS 6 with iRedMail (MySQL backend)</a><ul>
|
||||||
<li><a href="#requirements">Requirements</a></li>
|
<li><a href="#requirements">Requirements</a></li>
|
||||||
<li><a href="#install-sogo">Install SOGo</a></li>
|
<li><a href="#install-sogo">Install SOGo</a></li>
|
||||||
<li><a href="#create-sql-database-to-store-sogo-data">Create SQL database to store SOGo data</a></li>
|
<li><a href="#create-required-sql-database">Create required SQL database</a></li>
|
||||||
<li><a href="#configure-sogo">Configure SOGo</a></li>
|
<li><a href="#configure-sogo">Configure SOGo</a></li>
|
||||||
<li><a href="#enable-activesync-support">Enable ActiveSync support</a><ul>
|
<li><a href="#enable-activesync-support">Enable ActiveSync support</a><ul>
|
||||||
<li><a href="#apache-web-server">Apache web server</a></li>
|
<li><a href="#apache-web-server">Apache web server</a></li>
|
||||||
|
@ -24,12 +24,8 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#start-sogo-and-dependent-services">Start SOGo and dependent services</a></li>
|
<li><a href="#start-sogo-and-dependent-services">Start SOGo and dependent services</a></li>
|
||||||
<li><a href="#access-sogo">Access SOGo</a></li>
|
<li><a href="#access-sogo-from-web-browser">Access SOGo from web browser</a></li>
|
||||||
<li><a href="#how-to-configure-client-applications">How to configure client applications</a><ul>
|
<li><a href="#configure-your-mail-clients-or-mobile-devices-to-use-caldavcarddav-services">Configure your mail clients or mobile devices to use CalDav/CardDAV services</a></li>
|
||||||
<li><a href="#apple-devices">Apple Devices</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#todo">TODO</a></li>
|
|
||||||
<li><a href="#references">References</a></li>
|
<li><a href="#references">References</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
@ -61,10 +57,25 @@ gpgcheck=0
|
||||||
<ul>
|
<ul>
|
||||||
<li>Install SOGo and dependences:</li>
|
<li>Install SOGo and dependences:</li>
|
||||||
</ul>
|
</ul>
|
||||||
<pre><code># yum install sogo sope49-gdl1-mysql sogo-activesync libwbxml
|
<pre><code># yum install sogo sope49-gdl1-mysql sogo-activesync sogo-ealarms-notify sogo-tool
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h2 id="create-sql-database-to-store-sogo-data">Create SQL database to store SOGo data</h2>
|
<ul>
|
||||||
|
<li>Append an alias entry in Postfix config file <code>/etc/postfix/aliases</code>, so that
|
||||||
|
notifications of cron jobs will be sent to mail server administrator.</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code># Part of file: /etc/postfix/aliases
|
||||||
|
|
||||||
|
sogo: root
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Execute command to update alias db:</p>
|
||||||
|
<pre><code># postalias /etc/postfix/aliases
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h2 id="create-required-sql-database">Create required SQL database</h2>
|
||||||
|
<p>SOGo will store some data (e.g. user preferences, sieve rules) in SQL database,
|
||||||
|
so we need to create a database for it.</p>
|
||||||
<pre><code>$ mysql -u root -p
|
<pre><code>$ mysql -u root -p
|
||||||
|
|
||||||
mysql> CREATE DATABASE sogo CHARSET='UTF8';
|
mysql> CREATE DATABASE sogo CHARSET='UTF8';
|
||||||
|
@ -72,29 +83,73 @@ mysql> GRANT ALL ON sogo.* TO sogo@localhost IDENTIFIED BY 'password';
|
||||||
|
|
||||||
mysql> GRANT SELECT ON vmail.mailbox TO sogo@localhost;
|
mysql> GRANT SELECT ON vmail.mailbox TO sogo@localhost;
|
||||||
|
|
||||||
mysql> CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, home) AS SELECT username, username, password, name, username, maildir FROM vmail.mailbox;
|
mysql> CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, home) AS SELECT username, username, password, name, username, CONCAT(storagebasedirectory, '/', storagenode, '/', maildir) FROM vmail.mailbox WHERE active=1;
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Note: SOGo will create required SQL tables automatically, we don't need to
|
||||||
|
create them manually.</p>
|
||||||
<h2 id="configure-sogo">Configure SOGo</h2>
|
<h2 id="configure-sogo">Configure SOGo</h2>
|
||||||
<p>Default SOGo config file is <code>/etc/sogo/sogo.conf</code>:</p>
|
<p>Default SOGo config file is <code>/etc/sogo/sogo.conf</code>. We have a sample config file
|
||||||
|
for you, just replace MySQL username/password in this file, then it's done.</p>
|
||||||
|
<p>With below config file, SOGo will listen on address <code>127.0.0.1</code>, port <code>20000</code>.</p>
|
||||||
<pre><code>{
|
<pre><code>{
|
||||||
|
// Official SOGo documents:
|
||||||
|
// - http://www.sogo.nu/english/support/documentation.html
|
||||||
|
// - http://wiki.sogo.nu
|
||||||
|
//
|
||||||
|
// Mailing list:
|
||||||
|
// - http://www.sogo.nu/english/support/community.html
|
||||||
|
|
||||||
|
// Enable verbose logging. Reference:
|
||||||
|
// http://www.sogo.nu/nc/support/faq/article/how-to-enable-more-verbose-logging-in-sogo.html
|
||||||
|
//ImapDebugEnabled = YES;
|
||||||
|
//LDAPDebugEnabled = YES;
|
||||||
|
//MySQL4DebugEnabled = YES;
|
||||||
|
//PGDebugEnabled = YES;
|
||||||
|
|
||||||
|
// Daemon address and port
|
||||||
WOPort = 127.0.0.1:20000;
|
WOPort = 127.0.0.1:20000;
|
||||||
|
|
||||||
SOGoProfileURL = "mysql://sogo:password@localhost:3306/sogo/user_profiles";
|
// PID file
|
||||||
OCSFolderInfoURL = "mysql://sogo:password@localhost:3306/sogo/folders";
|
//WOPidFile = /var/log/sogo/sogo.log;
|
||||||
OCSSessionsFolderURL = "mysql://sogo:password@localhost:3306/sogo/sessions";
|
|
||||||
|
// IMAP connection pool.
|
||||||
|
// Your performance will slightly increase, as you won't open a new
|
||||||
|
// connection for every access to your IMAP server.
|
||||||
|
// But you will get a lot of simultaneous open connections to your IMAP
|
||||||
|
// server, so make sure he can handle them.
|
||||||
|
// For debugging it is reasonable to turn pooling off.
|
||||||
|
//NGImap4DisableIMAP4Pooling = NO;
|
||||||
|
|
||||||
|
SOGoProfileURL = "mysql://sogo:password@127.0.0.1:3306/sogo/sogo_user_profile";
|
||||||
|
OCSFolderInfoURL = "mysql://sogo:password@127.0.0.1:3306/sogo/sogo_folder_info";
|
||||||
|
OCSSessionsFolderURL = "mysql://sogo:password@127.0.0.1:3306/sogo/sogo_sessions_folder";
|
||||||
|
|
||||||
|
// Default language in the web interface
|
||||||
|
SOGoLanguage = English;
|
||||||
|
|
||||||
|
// Specify which module to show after login: Calendar, Mail, Contacts.
|
||||||
|
SOGoLoginModule = Mail;
|
||||||
|
|
||||||
|
// Must login with full email address
|
||||||
|
SOGoForceExternalLoginWithEmail = YES;
|
||||||
|
|
||||||
|
// Allow user to change full name and email address.
|
||||||
|
SOGoMailCustomFromEnabled = YES;
|
||||||
|
|
||||||
// Enable email-based alarms on events and tasks.
|
// Enable email-based alarms on events and tasks.
|
||||||
SOGoEnableEMailAlarms = YES;
|
SOGoEnableEMailAlarms = YES;
|
||||||
OCSEMailAlarmsFolderURL = "mysql://sogo:password@localhost:3306/sogo/alarms";
|
OCSEMailAlarmsFolderURL = "mysql://sogo:password@127.0.0.1:3306/sogo/sogo_alarms_folder";
|
||||||
|
|
||||||
// Use TLS
|
// IMAP server
|
||||||
//SOGoIMAPServer = "imaps://127.0.0.1:143/?tls=YES";
|
//SOGoIMAPServer = "imaps://127.0.0.1:143/?tls=YES";
|
||||||
// Local connection is considered as secure by Dovecot.
|
// Local connection is considered as secure by Dovecot.
|
||||||
SOGoIMAPServer = "imap://127.0.0.1:143/";
|
SOGoIMAPServer = "imap://127.0.0.1:143/";
|
||||||
|
|
||||||
|
// SMTP server
|
||||||
SOGoMailingMechanism = smtp;
|
SOGoMailingMechanism = smtp;
|
||||||
SOGoSMTPServer = 127.0.0.1;
|
SOGoSMTPServer = 127.0.0.1;
|
||||||
|
//SOGoSMTPAuthenticationType = PLAIN;
|
||||||
|
|
||||||
// Enable managesieve service
|
// Enable managesieve service
|
||||||
//
|
//
|
||||||
|
@ -102,45 +157,50 @@ mysql> CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, home) A
|
||||||
// webmail, don't use sieve service in both webmails, otherwise
|
// webmail, don't use sieve service in both webmails, otherwise
|
||||||
// it will be messy.
|
// it will be messy.
|
||||||
//
|
//
|
||||||
//SOGoSieveServer = sieve://PH_MANAGESIEVE_BIND_HOST:PH_MANAGESIEVE_PORT;
|
//SOGoSieveServer = sieve://127.0.0.1:4190;
|
||||||
//SOGoSieveScriptsEnabled = YES;
|
//SOGoSieveScriptsEnabled = YES;
|
||||||
//SOGoVacationEnabled = YES;
|
//SOGoVacationEnabled = YES;
|
||||||
//SOGoForwardEnabled = YES;
|
//SOGoForwardEnabled = YES;
|
||||||
|
|
||||||
|
// Memcached
|
||||||
SOGoMemcachedHost = 127.0.0.1;
|
SOGoMemcachedHost = 127.0.0.1;
|
||||||
|
|
||||||
SOGoTimeZone = "Europe/Berlin";
|
SOGoTimeZone = "America/New_York";
|
||||||
|
|
||||||
SOGoFirstDayOfWeek = 1;
|
SOGoFirstDayOfWeek = 1;
|
||||||
SOGoMailMessageCheck = every_5_minutes;
|
|
||||||
SOGoForceExternalLoginWithEmail = YES;
|
SOGoRefreshViewCheck = every_5_minutes;
|
||||||
|
SOGoMailReplyPlacement = below;
|
||||||
|
|
||||||
SOGoAppointmentSendEMailNotifications = YES;
|
SOGoAppointmentSendEMailNotifications = YES;
|
||||||
SOGoFoldersSendEMailNotifications = YES;
|
SOGoFoldersSendEMailNotifications = YES;
|
||||||
SOGoACLsSendEMailNotifications = YES;
|
SOGoACLsSendEMailNotifications = YES;
|
||||||
|
|
||||||
|
// PostgreSQL cannot update view
|
||||||
SOGoPasswordChangeEnabled = YES;
|
SOGoPasswordChangeEnabled = YES;
|
||||||
|
|
||||||
// User authentication
|
// Authentication using SQL
|
||||||
SOGoUserSources =
|
SOGoUserSources = (
|
||||||
(
|
|
||||||
{
|
{
|
||||||
type = sql;
|
type = sql;
|
||||||
id = directory;
|
id = vmail_mailbox;
|
||||||
viewURL = "mysql://sogo:password@127.0.0.1:3306/sogo/users";
|
viewURL = "mysql://sogo:password@127.0.0.1:3306/sogo/users";
|
||||||
|
|
||||||
canAuthenticate = YES;
|
canAuthenticate = YES;
|
||||||
userPasswordAlgorithm = md5;
|
|
||||||
|
// Default algorithm used when changing passwords.
|
||||||
|
userPasswordAlgorithm = ssha;
|
||||||
prependPasswordScheme = YES;
|
prependPasswordScheme = YES;
|
||||||
|
|
||||||
// SOGo can use SQL database as address book, but it's able to
|
// Use vmail.mailbox as global address book.
|
||||||
// query ALL mail accounts. Enable it on your own.
|
// WARNING: This will search all user accounts, not just accounts
|
||||||
isAddressBook = NO;
|
// under same domain as login user.
|
||||||
|
//isAddressBook = YES;
|
||||||
|
//displayName = "Global Address Book";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<p><strong>NOTE</strong>: SOGo will create required SQL tables automatically (<code>user_profiles</code>,
|
|
||||||
<code>folder</code>, <code>sessions</code>, ...), we don't need to create them manually.</p>
|
|
||||||
<h2 id="enable-activesync-support">Enable ActiveSync support</h2>
|
<h2 id="enable-activesync-support">Enable ActiveSync support</h2>
|
||||||
<h3 id="apache-web-server">Apache web server</h3>
|
<h3 id="apache-web-server">Apache web server</h3>
|
||||||
<p>SOGo installs config file <code>/etc/httpd/conf.d/SOGo.conf</code> by default, please
|
<p>SOGo installs config file <code>/etc/httpd/conf.d/SOGo.conf</code> by default, please
|
||||||
|
@ -157,16 +217,24 @@ open it and find below lines:</p>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h3 id="nginx-web-server">Nginx web server</h3>
|
<h3 id="nginx-web-server">Nginx web server</h3>
|
||||||
<p>If you're running Nginx web server, please open file
|
<p>If you're running Nginx web server configured by iRedMail, please open file
|
||||||
<code>/etc/nginx/conf.d/default.conf</code>, add some lines in <code>server {}</code> block which
|
<code>/etc/nginx/conf.d/default.conf</code>, add some lines in <code>server {}</code> configured for
|
||||||
is configured for HTTPS:</p>
|
HTTPS:</p>
|
||||||
<pre><code>server {
|
<pre><code>server {
|
||||||
listen 443;
|
listen 443;
|
||||||
...
|
...
|
||||||
|
|
||||||
# Add below lines for SOGo
|
# Add below lines for SOGo
|
||||||
|
|
||||||
# SOGo
|
# SOGo
|
||||||
|
location ~ ^/sogo { rewrite ^ https://$host/SOGo; }
|
||||||
|
location ~ ^/SOGO { rewrite ^ https://$host/SOGo; }
|
||||||
|
|
||||||
|
# For IOS 7
|
||||||
|
location = /principals/ {
|
||||||
|
rewrite ^ https://$server_name/SOGo/dav;
|
||||||
|
allow all;
|
||||||
|
}
|
||||||
|
|
||||||
location ^~ /SOGo {
|
location ^~ /SOGo {
|
||||||
proxy_pass http://127.0.0.1:20000;
|
proxy_pass http://127.0.0.1:20000;
|
||||||
#proxy_redirect http://127.0.0.1:20000/SOGo/ /SOGo;
|
#proxy_redirect http://127.0.0.1:20000/SOGo/ /SOGo;
|
||||||
|
@ -191,37 +259,35 @@ is configured for HTTPS:</p>
|
||||||
}
|
}
|
||||||
|
|
||||||
location /SOGo.woa/WebServerResources/ {
|
location /SOGo.woa/WebServerResources/ {
|
||||||
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
alias /usr/lib64/GNUstep/SOGo/WebServerResources/;
|
||||||
}
|
}
|
||||||
location /SOGo/WebServerResources/ {
|
location /SOGo/WebServerResources/ {
|
||||||
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
alias /usr/lib64/GNUstep/SOGo/WebServerResources/;
|
||||||
}
|
}
|
||||||
location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
|
location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
|
||||||
alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
|
alias /usr/lib64/GNUstep/SOGo/$1.SOGo/Resources/$2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<p><strong>Important note</strong>: You should replace directory <code>/usr/lib/GNUstep/SOGo</code> the
|
<p><strong>Important note</strong>: You must replace path <code>/usr/lib/GNUstep/SOGo</code> with
|
||||||
the real directory which contains SOGo files:</p>
|
the real directory which contains SOGo files:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>on RHEL/CentOS: it's <code>/usr/lib/GNUstep/SOGo</code> on x86 platform,
|
<li>on i386 platform, it's <code>/usr/lib/GNUstep/SOGo</code>.</li>
|
||||||
<code>/usr/lib64/GNUstep/SOGo</code> on x86_64 platform.</li>
|
<li>on x86_64, it's <code>/usr/lib64/GNUstep/SOGo</code>.</li>
|
||||||
<li>on Debian/Ubuntu, it's <code>/usr/lib/GNUstep/SOGo</code>.</li>
|
|
||||||
<li>on OpenBSD, it's `/</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="start-sogo-and-dependent-services">Start SOGo and dependent services</h2>
|
<h2 id="start-sogo-and-dependent-services">Start SOGo and dependent services</h2>
|
||||||
<pre><code>service sogod start
|
<pre><code># service sogod restart
|
||||||
service httpd restart
|
# service httpd restart # <- restart 'nginx' service if you're running Nginx
|
||||||
service memcached start
|
# service memcached restart
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h2 id="access-sogo">Access SOGo</h2>
|
<h2 id="access-sogo-from-web-browser">Access SOGo from web browser</h2>
|
||||||
<p>Open your favourite web browser, access URL: <code>https://[your_server]/SOGo</code>.</p>
|
<p>Open your favourite web browser, access URL: <code>https://[your_server]/SOGo</code> (the
|
||||||
<h2 id="how-to-configure-client-applications">How to configure client applications</h2>
|
word <code>SOGo</code> is case-sensitive), you can login with your email account credential.</p>
|
||||||
<h3 id="apple-devices">Apple Devices</h3>
|
<h2 id="configure-your-mail-clients-or-mobile-devices-to-use-caldavcarddav-services">Configure your mail clients or mobile devices to use CalDav/CardDAV services</h2>
|
||||||
<p>URL for calendar service: <code>http://[host]/SOGo/dav/[full email address]/</code></p>
|
<p>Please check our documents <a href="./index.html#configure-mail-client-applications">here</a>
|
||||||
<h2 id="todo">TODO</h2>
|
to configure your mail clients or mobile devices.</p>
|
||||||
<h2 id="references">References</h2><p style="text-align: center; color: grey;">Document published under a <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">CC BY-ND 3.0</a> license. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.<!-- Google Analytics -->
|
<h2 id="references">References</h2><p style="text-align: center; color: grey;">Document published under a <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">CC BY-ND 3.0</a> license. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.<!-- Google Analytics -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# SOGo: install SOGo on CentOS 6 with iRedMail (MySQL backend)
|
# Install SOGo groupware on CentOS 6 with iRedMail (MySQL backend)
|
||||||
|
|
||||||
[TOC]
|
[TOC]
|
||||||
|
|
||||||
|
@ -29,10 +29,28 @@ gpgcheck=0
|
||||||
* Install SOGo and dependences:
|
* Install SOGo and dependences:
|
||||||
|
|
||||||
```
|
```
|
||||||
# yum install sogo sope49-gdl1-mysql sogo-activesync libwbxml
|
# yum install sogo sope49-gdl1-mysql sogo-activesync sogo-ealarms-notify sogo-tool
|
||||||
```
|
```
|
||||||
|
|
||||||
## Create SQL database to store SOGo data
|
* Append an alias entry in Postfix config file `/etc/postfix/aliases`, so that
|
||||||
|
notifications of cron jobs will be sent to mail server administrator.
|
||||||
|
|
||||||
|
```
|
||||||
|
# Part of file: /etc/postfix/aliases
|
||||||
|
|
||||||
|
sogo: root
|
||||||
|
```
|
||||||
|
|
||||||
|
Execute command to update alias db:
|
||||||
|
|
||||||
|
```
|
||||||
|
# postalias /etc/postfix/aliases
|
||||||
|
```
|
||||||
|
|
||||||
|
## Create required SQL database
|
||||||
|
|
||||||
|
SOGo will store some data (e.g. user preferences, sieve rules) in SQL database,
|
||||||
|
so we need to create a database for it.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ mysql -u root -p
|
$ mysql -u root -p
|
||||||
|
@ -42,32 +60,78 @@ mysql> GRANT ALL ON sogo.* TO sogo@localhost IDENTIFIED BY 'password';
|
||||||
|
|
||||||
mysql> GRANT SELECT ON vmail.mailbox TO sogo@localhost;
|
mysql> GRANT SELECT ON vmail.mailbox TO sogo@localhost;
|
||||||
|
|
||||||
mysql> CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, home) AS SELECT username, username, password, name, username, maildir FROM vmail.mailbox;
|
mysql> CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, home) AS SELECT username, username, password, name, username, CONCAT(storagebasedirectory, '/', storagenode, '/', maildir) FROM vmail.mailbox WHERE active=1;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Note: SOGo will create required SQL tables automatically, we don't need to
|
||||||
|
create them manually.
|
||||||
|
|
||||||
## Configure SOGo
|
## Configure SOGo
|
||||||
|
|
||||||
Default SOGo config file is `/etc/sogo/sogo.conf`:
|
Default SOGo config file is `/etc/sogo/sogo.conf`. We have a sample config file
|
||||||
|
for you, just replace MySQL username/password in this file, then it's done.
|
||||||
|
|
||||||
|
With below config file, SOGo will listen on address `127.0.0.1`, port `20000`.
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
|
// Official SOGo documents:
|
||||||
|
// - http://www.sogo.nu/english/support/documentation.html
|
||||||
|
// - http://wiki.sogo.nu
|
||||||
|
//
|
||||||
|
// Mailing list:
|
||||||
|
// - http://www.sogo.nu/english/support/community.html
|
||||||
|
|
||||||
|
// Enable verbose logging. Reference:
|
||||||
|
// http://www.sogo.nu/nc/support/faq/article/how-to-enable-more-verbose-logging-in-sogo.html
|
||||||
|
//ImapDebugEnabled = YES;
|
||||||
|
//LDAPDebugEnabled = YES;
|
||||||
|
//MySQL4DebugEnabled = YES;
|
||||||
|
//PGDebugEnabled = YES;
|
||||||
|
|
||||||
|
// Daemon address and port
|
||||||
WOPort = 127.0.0.1:20000;
|
WOPort = 127.0.0.1:20000;
|
||||||
|
|
||||||
SOGoProfileURL = "mysql://sogo:password@localhost:3306/sogo/user_profiles";
|
// PID file
|
||||||
OCSFolderInfoURL = "mysql://sogo:password@localhost:3306/sogo/folders";
|
//WOPidFile = /var/log/sogo/sogo.log;
|
||||||
OCSSessionsFolderURL = "mysql://sogo:password@localhost:3306/sogo/sessions";
|
|
||||||
|
// IMAP connection pool.
|
||||||
|
// Your performance will slightly increase, as you won't open a new
|
||||||
|
// connection for every access to your IMAP server.
|
||||||
|
// But you will get a lot of simultaneous open connections to your IMAP
|
||||||
|
// server, so make sure he can handle them.
|
||||||
|
// For debugging it is reasonable to turn pooling off.
|
||||||
|
//NGImap4DisableIMAP4Pooling = NO;
|
||||||
|
|
||||||
|
SOGoProfileURL = "mysql://sogo:password@127.0.0.1:3306/sogo/sogo_user_profile";
|
||||||
|
OCSFolderInfoURL = "mysql://sogo:password@127.0.0.1:3306/sogo/sogo_folder_info";
|
||||||
|
OCSSessionsFolderURL = "mysql://sogo:password@127.0.0.1:3306/sogo/sogo_sessions_folder";
|
||||||
|
|
||||||
|
// Default language in the web interface
|
||||||
|
SOGoLanguage = English;
|
||||||
|
|
||||||
|
// Specify which module to show after login: Calendar, Mail, Contacts.
|
||||||
|
SOGoLoginModule = Mail;
|
||||||
|
|
||||||
|
// Must login with full email address
|
||||||
|
SOGoForceExternalLoginWithEmail = YES;
|
||||||
|
|
||||||
|
// Allow user to change full name and email address.
|
||||||
|
SOGoMailCustomFromEnabled = YES;
|
||||||
|
|
||||||
// Enable email-based alarms on events and tasks.
|
// Enable email-based alarms on events and tasks.
|
||||||
SOGoEnableEMailAlarms = YES;
|
SOGoEnableEMailAlarms = YES;
|
||||||
OCSEMailAlarmsFolderURL = "mysql://sogo:password@localhost:3306/sogo/alarms";
|
OCSEMailAlarmsFolderURL = "mysql://sogo:password@127.0.0.1:3306/sogo/sogo_alarms_folder";
|
||||||
|
|
||||||
// Use TLS
|
// IMAP server
|
||||||
//SOGoIMAPServer = "imaps://127.0.0.1:143/?tls=YES";
|
//SOGoIMAPServer = "imaps://127.0.0.1:143/?tls=YES";
|
||||||
// Local connection is considered as secure by Dovecot.
|
// Local connection is considered as secure by Dovecot.
|
||||||
SOGoIMAPServer = "imap://127.0.0.1:143/";
|
SOGoIMAPServer = "imap://127.0.0.1:143/";
|
||||||
|
|
||||||
|
// SMTP server
|
||||||
SOGoMailingMechanism = smtp;
|
SOGoMailingMechanism = smtp;
|
||||||
SOGoSMTPServer = 127.0.0.1;
|
SOGoSMTPServer = 127.0.0.1;
|
||||||
|
//SOGoSMTPAuthenticationType = PLAIN;
|
||||||
|
|
||||||
// Enable managesieve service
|
// Enable managesieve service
|
||||||
//
|
//
|
||||||
|
@ -75,46 +139,50 @@ Default SOGo config file is `/etc/sogo/sogo.conf`:
|
||||||
// webmail, don't use sieve service in both webmails, otherwise
|
// webmail, don't use sieve service in both webmails, otherwise
|
||||||
// it will be messy.
|
// it will be messy.
|
||||||
//
|
//
|
||||||
//SOGoSieveServer = sieve://PH_MANAGESIEVE_BIND_HOST:PH_MANAGESIEVE_PORT;
|
//SOGoSieveServer = sieve://127.0.0.1:4190;
|
||||||
//SOGoSieveScriptsEnabled = YES;
|
//SOGoSieveScriptsEnabled = YES;
|
||||||
//SOGoVacationEnabled = YES;
|
//SOGoVacationEnabled = YES;
|
||||||
//SOGoForwardEnabled = YES;
|
//SOGoForwardEnabled = YES;
|
||||||
|
|
||||||
|
// Memcached
|
||||||
SOGoMemcachedHost = 127.0.0.1;
|
SOGoMemcachedHost = 127.0.0.1;
|
||||||
|
|
||||||
SOGoTimeZone = "Europe/Berlin";
|
SOGoTimeZone = "America/New_York";
|
||||||
|
|
||||||
SOGoFirstDayOfWeek = 1;
|
SOGoFirstDayOfWeek = 1;
|
||||||
SOGoMailMessageCheck = every_5_minutes;
|
|
||||||
SOGoForceExternalLoginWithEmail = YES;
|
SOGoRefreshViewCheck = every_5_minutes;
|
||||||
|
SOGoMailReplyPlacement = below;
|
||||||
|
|
||||||
SOGoAppointmentSendEMailNotifications = YES;
|
SOGoAppointmentSendEMailNotifications = YES;
|
||||||
SOGoFoldersSendEMailNotifications = YES;
|
SOGoFoldersSendEMailNotifications = YES;
|
||||||
SOGoACLsSendEMailNotifications = YES;
|
SOGoACLsSendEMailNotifications = YES;
|
||||||
|
|
||||||
|
// PostgreSQL cannot update view
|
||||||
SOGoPasswordChangeEnabled = YES;
|
SOGoPasswordChangeEnabled = YES;
|
||||||
|
|
||||||
// User authentication
|
// Authentication using SQL
|
||||||
SOGoUserSources =
|
SOGoUserSources = (
|
||||||
(
|
|
||||||
{
|
{
|
||||||
type = sql;
|
type = sql;
|
||||||
id = directory;
|
id = vmail_mailbox;
|
||||||
viewURL = "mysql://sogo:password@127.0.0.1:3306/sogo/users";
|
viewURL = "mysql://sogo:password@127.0.0.1:3306/sogo/users";
|
||||||
|
|
||||||
canAuthenticate = YES;
|
canAuthenticate = YES;
|
||||||
userPasswordAlgorithm = md5;
|
|
||||||
|
// Default algorithm used when changing passwords.
|
||||||
|
userPasswordAlgorithm = ssha;
|
||||||
prependPasswordScheme = YES;
|
prependPasswordScheme = YES;
|
||||||
|
|
||||||
// SOGo can use SQL database as address book, but it's able to
|
// Use vmail.mailbox as global address book.
|
||||||
// query ALL mail accounts. Enable it on your own.
|
// WARNING: This will search all user accounts, not just accounts
|
||||||
isAddressBook = NO;
|
// under same domain as login user.
|
||||||
|
//isAddressBook = YES;
|
||||||
|
//displayName = "Global Address Book";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
__NOTE__: SOGo will create required SQL tables automatically (`user_profiles`,
|
|
||||||
`folder`, `sessions`, ...), we don't need to create them manually.
|
|
||||||
|
|
||||||
## Enable ActiveSync support
|
## Enable ActiveSync support
|
||||||
|
|
||||||
### Apache web server
|
### Apache web server
|
||||||
|
@ -138,9 +206,9 @@ ProxyPass /Microsoft-Server-ActiveSync \
|
||||||
|
|
||||||
### Nginx web server
|
### Nginx web server
|
||||||
|
|
||||||
If you're running Nginx web server, please open file
|
If you're running Nginx web server configured by iRedMail, please open file
|
||||||
`/etc/nginx/conf.d/default.conf`, add some lines in `server {}` block which
|
`/etc/nginx/conf.d/default.conf`, add some lines in `server {}` configured for
|
||||||
is configured for HTTPS:
|
HTTPS:
|
||||||
|
|
||||||
```
|
```
|
||||||
server {
|
server {
|
||||||
|
@ -148,8 +216,16 @@ server {
|
||||||
...
|
...
|
||||||
|
|
||||||
# Add below lines for SOGo
|
# Add below lines for SOGo
|
||||||
|
|
||||||
# SOGo
|
# SOGo
|
||||||
|
location ~ ^/sogo { rewrite ^ https://$host/SOGo; }
|
||||||
|
location ~ ^/SOGO { rewrite ^ https://$host/SOGo; }
|
||||||
|
|
||||||
|
# For IOS 7
|
||||||
|
location = /principals/ {
|
||||||
|
rewrite ^ https://$server_name/SOGo/dav;
|
||||||
|
allow all;
|
||||||
|
}
|
||||||
|
|
||||||
location ^~ /SOGo {
|
location ^~ /SOGo {
|
||||||
proxy_pass http://127.0.0.1:20000;
|
proxy_pass http://127.0.0.1:20000;
|
||||||
#proxy_redirect http://127.0.0.1:20000/SOGo/ /SOGo;
|
#proxy_redirect http://127.0.0.1:20000/SOGo/ /SOGo;
|
||||||
|
@ -174,44 +250,40 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /SOGo.woa/WebServerResources/ {
|
location /SOGo.woa/WebServerResources/ {
|
||||||
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
alias /usr/lib64/GNUstep/SOGo/WebServerResources/;
|
||||||
}
|
}
|
||||||
location /SOGo/WebServerResources/ {
|
location /SOGo/WebServerResources/ {
|
||||||
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
alias /usr/lib64/GNUstep/SOGo/WebServerResources/;
|
||||||
}
|
}
|
||||||
location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
|
location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
|
||||||
alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
|
alias /usr/lib64/GNUstep/SOGo/$1.SOGo/Resources/$2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
__Important note__: You should replace directory `/usr/lib/GNUstep/SOGo` the
|
__Important note__: You must replace path `/usr/lib/GNUstep/SOGo` with
|
||||||
the real directory which contains SOGo files:
|
the real directory which contains SOGo files:
|
||||||
|
|
||||||
* on RHEL/CentOS: it's `/usr/lib/GNUstep/SOGo` on x86 platform,
|
* on i386 platform, it's `/usr/lib/GNUstep/SOGo`.
|
||||||
`/usr/lib64/GNUstep/SOGo` on x86_64 platform.
|
* on x86_64, it's `/usr/lib64/GNUstep/SOGo`.
|
||||||
* on Debian/Ubuntu, it's `/usr/lib/GNUstep/SOGo`.
|
|
||||||
* on OpenBSD, it's `/
|
|
||||||
|
|
||||||
## Start SOGo and dependent services
|
## Start SOGo and dependent services
|
||||||
|
|
||||||
```
|
```
|
||||||
service sogod start
|
# service sogod restart
|
||||||
service httpd restart
|
# service httpd restart # <- restart 'nginx' service if you're running Nginx
|
||||||
service memcached start
|
# service memcached restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Access SOGo
|
## Access SOGo from web browser
|
||||||
|
|
||||||
Open your favourite web browser, access URL: `https://[your_server]/SOGo`.
|
Open your favourite web browser, access URL: `https://[your_server]/SOGo` (the
|
||||||
|
word `SOGo` is case-sensitive), you can login with your email account credential.
|
||||||
|
|
||||||
## How to configure client applications
|
## Configure your mail clients or mobile devices to use CalDav/CardDAV services
|
||||||
|
|
||||||
### Apple Devices
|
Please check our documents [here](./index.html#configure-mail-client-applications)
|
||||||
|
to configure your mail clients or mobile devices.
|
||||||
URL for calendar service: `http://[host]/SOGo/dav/[full email address]/`
|
|
||||||
|
|
||||||
## TODO
|
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue