diff --git a/html/sogo-centos-6-mysql.html b/html/sogo-centos-6-mysql.html index e0d591b8..e4db03f1 100644 --- a/html/sogo-centos-6-mysql.html +++ b/html/sogo-centos-6-mysql.html @@ -18,7 +18,13 @@
  • Install SOGo
  • Create SQL database to store SOGo data
  • Configure SOGo
  • +
  • Enable ActiveSync support +
  • Start SOGo and dependent services
  • +
  • Access SOGo
  • How to configure client applications @@ -65,7 +71,6 @@ gpgcheck=0 mysql> CREATE DATABASE sogo CHARSET='UTF8'; mysql> GRANT ALL ON sogo.* TO sogo@localhost IDENTIFIED BY 'password'; --- TODO mysql> GRANT SELECT ON vmail.mailbox TO sogo@localhost; mysql> CREATE VIEW sogo.sogo_users (c_uid, c_name, c_password, c_cn, mail, home) AS SELECT username, username, password, name, username, maildir FROM vmail.mailbox; @@ -73,17 +78,22 @@ mysql> CREATE VIEW sogo.sogo_users (c_uid, c_name, c_password, c_cn, mail, ho

    Configure SOGo

    Default SOGo config file is /etc/sogo/sogo.conf:

    -
    (
    +
    {
         WOPort = 127.0.0.1:20000;
     
         SOGoProfileURL = "mysql://sogo:password@localhost:3306/sogo/sogo_user_profile";
         OCSFolderInfoURL = "mysql://sogo:password@localhost:3306/sogo/sogo_folder_info";
         OCSSessionsFolderURL = "mysql://sogo:password@localhost:3306/sogo/sogo_sessions_folder";
     
    -    SOGoIMAPServer = "127.0.0.1";
    -    SOGoDraftsFolderName Drafts
    -    SOGoSentFolderName Sent
    -    SOGoTrashFolderName Trash
    +    // Enable email-based alarms on events and tasks.
    +    SOGoEnableEMailAlarms = YES;
    +    OCSEMailAlarmsFolderURL = "mysql://sogo:password@localhost:3306/sogo/sogo_alarms_folder";
    +
    +    // Use TLS
    +    SOGoIMAPServer = "imaps://127.0.0.1:143/?tls=YES";
    +    //SOGoDraftsFolderName = Drafts;
    +    //SOGoSentFolderName = Sent;
    +    //SOGoTrashFolderName = Trash;
     
         SOGoMailingMechanism = smtp;
         SOGoSMTPServer = 127.0.0.1;
    @@ -105,8 +115,6 @@ mysql> CREATE VIEW sogo.sogo_users (c_uid, c_name, c_password, c_cn, mail, ho
         SOGoFoldersSendEMailNotifications = YES;
         SOGoACLsSendEMailNotifications = YES;
     
    -    // OCSEMailAlarmsFolderURL = "mysql://sogo:password@localhost:3306/sogo/sogo_alarms_folder";
    -
         SOGoPasswordChangeEnabled = YES;
     
         SOGoUserSources =
    @@ -121,17 +129,89 @@ mysql> CREATE VIEW sogo.sogo_users (c_uid, c_name, c_password, c_cn, mail, ho
                 prependPasswordScheme = YES;
             }
         );
    +}
     

    NOTE: SOGo will create required SQL tables automatically (sogo_user_profile, sogo_folder_info, sogo_sessions_folder, ...), we don't need to create them manually.

    +

    Enable ActiveSync support

    +

    Apache web server

    +

    SOGo installs config file /etc/httpd/conf.d/SOGo.conf by default, please +open it and find below lines:

    +
    #ProxyPass /Microsoft-Server-ActiveSync \
    +# http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync \
    +# retry=60 connectiontimeout=5 timeout=360
    +
    + +

    Remove # at the beginning to enable ActiveSync support:

    +
    ProxyPass /Microsoft-Server-ActiveSync \
    + http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync \
    + retry=60 connectiontimeout=5 timeout=360
    +
    + +

    Nginx web server

    +

    If you're running Nginx web server, please open file +/etc/nginx/conf.d/default.conf, add some lines in server {} block which +is configured for HTTPS:

    +
    server {
    +    listen 443;
    +    ...
    +
    +    # Add below lines for SOGo
    +
    +    # SOGo
    +    location ^~ /SOGo {
    +        proxy_pass http://127.0.0.1:20000;
    +        #proxy_redirect http://127.0.0.1:20000/SOGo/ /SOGo;
    +        # forward user's IP address
    +        #proxy_set_header X-Real-IP $remote_addr;
    +        #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    +        #proxy_set_header Host $host;
    +        proxy_set_header x-webobjects-server-protocol HTTP/1.0;
    +        #proxy_set_header x-webobjects-remote-host 127.0.0.1;
    +        #proxy_set_header x-webobjects-server-name $server_name;
    +        #proxy_set_header x-webobjects-server-url $scheme://$host;
    +    }
    +
    +    location ^~ /Microsoft-Server-ActiveSync {
    +        proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync;
    +        proxy_redirect http://127.0.0.1:20000/Microsoft-Server-ActiveSync /;
    +    }
    +
    +    location ^~ /SOGo/Microsoft-Server-ActiveSync {
    +        proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync;
    +        proxy_redirect http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync /;
    +    }
    +
    +    location /SOGo.woa/WebServerResources/ {
    +        alias /usr/lib/GNUstep/SOGo/WebServerResources/;
    +    }
    +    location /SOGo/WebServerResources/ {
    +        alias /usr/lib/GNUstep/SOGo/WebServerResources/;
    +    }
    +    location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
    +        alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
    +    }
    +}
    +
    + +

    Important note: You should replace directory /usr/lib/GNUstep/SOGo the +the real directory which contains SOGo files:

    +
      +
    • on RHEL/CentOS: it's /usr/lib/GNUstep/SOGo on x86 platform, + /usr/lib64/GNUstep/SOGo on x86_64 platform.
    • +
    • on Debian/Ubuntu, it's /usr/lib/GNUstep/SOGo.
    • +
    • on OpenBSD, it's `/
    • +

    Start SOGo and dependent services

    service sogod start
     service httpd restart
     service memcached start
     
    +

    Access SOGo

    +

    Open your favourite web browser, access URL: https://[your_server]/SOGo.

    How to configure client applications

    Apple Devices

    URL for calendar service: http://[host]/SOGo/dav/[user]/

    diff --git a/integrations/sogo-centos-6-mysql.md b/integrations/sogo-centos-6-mysql.md index e9abbcd3..bf650f9d 100644 --- a/integrations/sogo-centos-6-mysql.md +++ b/integrations/sogo-centos-6-mysql.md @@ -43,7 +43,6 @@ $ mysql -u root -p mysql> CREATE DATABASE sogo CHARSET='UTF8'; mysql> GRANT ALL ON sogo.* TO sogo@localhost IDENTIFIED BY 'password'; --- TODO mysql> GRANT SELECT ON vmail.mailbox TO sogo@localhost; mysql> CREATE VIEW sogo.sogo_users (c_uid, c_name, c_password, c_cn, mail, home) AS SELECT username, username, password, name, username, maildir FROM vmail.mailbox; @@ -54,17 +53,22 @@ mysql> CREATE VIEW sogo.sogo_users (c_uid, c_name, c_password, c_cn, mail, home) Default SOGo config file is `/etc/sogo/sogo.conf`: ``` -( +{ WOPort = 127.0.0.1:20000; SOGoProfileURL = "mysql://sogo:password@localhost:3306/sogo/sogo_user_profile"; OCSFolderInfoURL = "mysql://sogo:password@localhost:3306/sogo/sogo_folder_info"; OCSSessionsFolderURL = "mysql://sogo:password@localhost:3306/sogo/sogo_sessions_folder"; - SOGoIMAPServer = "127.0.0.1"; - SOGoDraftsFolderName Drafts - SOGoSentFolderName Sent - SOGoTrashFolderName Trash + // Enable email-based alarms on events and tasks. + SOGoEnableEMailAlarms = YES; + OCSEMailAlarmsFolderURL = "mysql://sogo:password@localhost:3306/sogo/sogo_alarms_folder"; + + // Use TLS + SOGoIMAPServer = "imaps://127.0.0.1:143/?tls=YES"; + //SOGoDraftsFolderName = Drafts; + //SOGoSentFolderName = Sent; + //SOGoTrashFolderName = Trash; SOGoMailingMechanism = smtp; SOGoSMTPServer = 127.0.0.1; @@ -86,8 +90,6 @@ Default SOGo config file is `/etc/sogo/sogo.conf`: SOGoFoldersSendEMailNotifications = YES; SOGoACLsSendEMailNotifications = YES; - // OCSEMailAlarmsFolderURL = "mysql://sogo:password@localhost:3306/sogo/sogo_alarms_folder"; - SOGoPasswordChangeEnabled = YES; SOGoUserSources = @@ -102,12 +104,91 @@ Default SOGo config file is `/etc/sogo/sogo.conf`: prependPasswordScheme = YES; } ); +} ``` __NOTE__: SOGo will create required SQL tables automatically (`sogo_user_profile`, `sogo_folder_info`, `sogo_sessions_folder`, ...), we don't need to create them manually. +## Enable ActiveSync support + +### Apache web server + +SOGo installs config file `/etc/httpd/conf.d/SOGo.conf` by default, please +open it and find below lines: + +``` +#ProxyPass /Microsoft-Server-ActiveSync \ +# http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync \ +# retry=60 connectiontimeout=5 timeout=360 +``` + +Remove `#` at the beginning to enable ActiveSync support: + +``` +ProxyPass /Microsoft-Server-ActiveSync \ + http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync \ + retry=60 connectiontimeout=5 timeout=360 +``` + +### Nginx web server + +If you're running Nginx web server, please open file +`/etc/nginx/conf.d/default.conf`, add some lines in `server {}` block which +is configured for HTTPS: + +``` +server { + listen 443; + ... + + # Add below lines for SOGo + + # SOGo + location ^~ /SOGo { + proxy_pass http://127.0.0.1:20000; + #proxy_redirect http://127.0.0.1:20000/SOGo/ /SOGo; + # forward user's IP address + #proxy_set_header X-Real-IP $remote_addr; + #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + #proxy_set_header Host $host; + proxy_set_header x-webobjects-server-protocol HTTP/1.0; + #proxy_set_header x-webobjects-remote-host 127.0.0.1; + #proxy_set_header x-webobjects-server-name $server_name; + #proxy_set_header x-webobjects-server-url $scheme://$host; + } + + location ^~ /Microsoft-Server-ActiveSync { + proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync; + proxy_redirect http://127.0.0.1:20000/Microsoft-Server-ActiveSync /; + } + + location ^~ /SOGo/Microsoft-Server-ActiveSync { + proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync; + proxy_redirect http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync /; + } + + location /SOGo.woa/WebServerResources/ { + alias /usr/lib/GNUstep/SOGo/WebServerResources/; + } + location /SOGo/WebServerResources/ { + alias /usr/lib/GNUstep/SOGo/WebServerResources/; + } + location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ { + alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2; + } +} +``` + +__Important note__: You should replace directory `/usr/lib/GNUstep/SOGo` the +the real directory which contains SOGo files: + +* on RHEL/CentOS: it's `/usr/lib/GNUstep/SOGo` on x86 platform, + `/usr/lib64/GNUstep/SOGo` on x86_64 platform. +* on Debian/Ubuntu, it's `/usr/lib/GNUstep/SOGo`. +* on OpenBSD, it's `/ + ## Start SOGo and dependent services ``` @@ -116,6 +197,10 @@ service httpd restart service memcached start ``` +## Access SOGo + +Open your favourite web browser, access URL: `https://[your_server]/SOGo`. + ## How to configure client applications ### Apple Devices