initial commit of file from CVS for smeserver-sogo on Sat Sep 7 16:42:51 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 16:42:51 +10:00
parent 6d95628cf6
commit ac311161a2
122 changed files with 3844 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
# Sogod cronjobs
# Vacation messages expiration
# The credentials file should contain the sieve admin credentials (username:passwd)
0 0 * * * sogo /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds
# Session cleanup - runs every minute
# - Ajust the nbMinutes parameter to suit your needs
# Example: Sessions without activity since 60 minutes will be dropped:
#* * * * * sogo /usr/sbin/sogo-tool expire-sessions 60
# Email alarms - runs every minutes
# If you need to use SMTP AUTH for outgoing mails, specify credentials to use
# with '-p /path/to/credentialsFile' (same format as the sieve credentials)
* * * * * sogo /usr/sbin/sogo-ealarms-notify > /dev/null 2>&1
# Daily backups
# - writes to ~sogo/backups/ by default
# - will keep 31 days worth of backups by default
# - runs once a day by default, but can run more frequently
# - make sure to set the path to sogo-backup.sh correctly
#30 0 * * * sogo /usr/share/doc/sogo/sogo-backup.sh

View File

@@ -0,0 +1,7 @@
#
# Increase maximum IMAP command line length
#
# Maximum IMAP command line length in bytes. Some clients generate very long
# command lines with huge mailboxes, so you may need to raise this if you get
# "Too long argument" or "IMAP command line too large" errors often.
imap_max_line_length = {${'dovecot'}{'ImapMaxLineLenght'} || '2048'}k

View File

@@ -0,0 +1 @@
sogo

View File

@@ -0,0 +1,3 @@
#! /bin/sh
exec mysql < /var/lib/sogo/smeserver/sogo_mysql_create_database.sql

View File

@@ -0,0 +1,3 @@
#! /bin/sh
exec mysql < /var/lib/sogo/smeserver/sogo_mysql_update_privileges.sql

View File

@@ -0,0 +1,3 @@
#! /bin/sh
exec /etc/e-smith/events/actions/sogo_upgrade

View File

@@ -0,0 +1,4 @@
#! /bin/sh
exec /etc/e-smith/events/actions/sogo_upgrade_2.3

View File

@@ -0,0 +1,15 @@
{
my $applePort = ${'apple-carddav'}{'TCPPort'} || "8843";
my $sogoStatus = $sogod{'status'} || "enabled";
my $appleStatus = ${'apple-carddav'}{'status'} || "enabled";
if (($sogoStatus eq 'enabled') && ($appleStatus eq 'enabled')){
$OUT .=<<"EOF";
Listen 0.0.0.0:$applePort
EOF
}
}

View File

@@ -0,0 +1,15 @@
{
my $applePort = ${'apple-carddav'}{'TCPPort'} || "8843";
my $sogoStatus = $sogod{'status'} || "enabled";
my $appleStatus = ${'apple-carddav'}{'status'} || "enabled";
if (($sogoStatus eq 'enabled') && ($appleStatus eq 'enabled')){
$OUT .=<<"EOF";
NameVirtualHost 0.0.0.0:$applePort
EOF
}
}

View File

@@ -0,0 +1,72 @@
# SOGo Groupware
{
$sogoStatus = $sogod{'status'} || "disabled";
$webmailStatus = $imp{'status'} || "disabled";
$activeSync = $sogod{'ActiveSync'} || 'disabled';
$OUT = "";
}
SetEnvIf Host (.*) REQUEST_HOST=$1
ProxyPass /SOGo http://127.0.0.1:{$sogod{'TCPPort'}}/SOGo
ProxyPassReverse /SOGo http://127.0.0.1:{$sogod{'TCPPort'}}/SOGo
# iOS auto discovery
RedirectMatch ^/principals/users/(.*)$ /SOGo/dav/$1
RedirectMatch ^/principals/$ /SOGo/dav/
RedirectMatch ^/.well-known/(caldav|carddav)$ /SOGo/dav/
{
if ($activeSync =~ m/^enabled|on|1|yes$/i){
$OUT .=<<"HERE";
ProxyPass /Microsoft-Server-ActiveSync http://127.0.0.1:$sogod{'TCPPort'}/SOGo/Microsoft-Server-ActiveSync retry=60 connectiontimeout=5 timeout=3600
HERE
}
else {
$OUT .= "# ActiveSync is disabled\n";
}
}
<Location /SOGo>
# order deny,allow
# deny from all
# allow from all
Require all granted
SSLRequireSSL on
AddDefaultCharset UTF-8
RequestHeader set "x-webobjects-server-url" "https://%\{REQUEST_HOST\}e/SOGo"
</Location>
{
use Config;
my $arch = $Config{selectminbits};
if ($arch eq "32"){
$OUT .= qq(
Alias /.woa/WebServerResources/ /usr/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo.woa/WebServerResources/ /usr/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ /usr/lib/GNUstep/SOGo/WebServerResources/
AliasMatch /SOGo/so/ControlPanel/Products/(.*)/Resources/(.*) /usr/lib/GNUstep/SOGo/\$1.SOGo/Resources/\$2\
<Directory "/usr/lib/GNUstep/SOGo/">
);}
elsif ($arch eq "64"){
$OUT .= qq(
Alias /.woa/WebServerResources/ /usr/lib64/GNUstep/SOGo/WebServerResources/
Alias /SOGo.woa/WebServerResources/ /usr/lib64/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ /usr/lib64/GNUstep/SOGo/WebServerResources/
AliasMatch /SOGo/so/ControlPanel/Products/(.*)/Resources/(.*) /usr/lib64/GNUstep/SOGo/\$1.SOGo/Resources\$2
<Directory "/usr/lib64/GNUstep/SOGo/">
);}
}
AllowOverride None
Options +ExecCGI -Includes
# Order allow,deny
# Allow from all
Require all granted
</Directory>

View File

@@ -0,0 +1,43 @@
{
my $sogoPort = $sogod{'TCPPort'} || "20000";
my $applePort = ${'apple-carddav'}{'TCPPort'} || "8843";
my $sogoStatus = $sogod{'status'} || "enabled";
my $appleStatus = ${'apple-carddav'}{'status'} || "enabled";
if (($sogoStatus eq 'enabled') && ($appleStatus eq 'enabled')){
$OUT .=<<"EOF";
<VirtualHost 0.0.0.0:$applePort>
ServerName $SystemName.$DomainName
SSLEngine On
ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On
ProxyPassInterpolateEnv On
RewriteEngine On
RedirectMatch ^/principals/users/(.*)\$ /\$1
RedirectMatch ^/principals/\$ /
RedirectMatch ^/.well-known/(caldav|carddav)\$ /
RewriteRule /SOGo/dav(.*) /\$1 [L,R]
ProxyPass / http://127.0.0.1:$sogoPort/SOGo/dav/ interpolate
<Proxy http://127.0.0.1:$sogoPort>
RequestHeader set "x-webobjects-server-port" "$applePort"
RequestHeader set "x-webobjects-server-name" "$SystemName.$DomainName:$applePort"
RequestHeader set "x-webobjects-server-url" "https://$SystemName.$DomainName:$applePort"
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
RequestHeader set "x-webobjects-remote-host" "127.0.0.1"
AddDefaultCharset UTF-8
# Order allow,deny
# Allow from all
Require all granted
</Proxy>
</VirtualHost>
EOF
}
else{
$OUT .= "";
}
}

View File

@@ -0,0 +1,20 @@
{
my $sslport = $modSSL{'TCPPort'} || '443';
if ($port ne $sslport){
## Redirect Web Address to Secure Address
$OUT .= " RewriteEngine on\n";
$OUT .= " RewriteRule ^/SOGo(/.*|\$) https://%{HTTP_HOST}/SOGo\$1 \[L,R\]\n";
}
$OUT .= " RewriteRule ^/sogo(/.*|\$) https://%{HTTP_HOST}/SOGo\$1 \[L,R\]\n";
$sogoStatus = $sogod{'status'} || "disabled";
$webmailStatus = $imp{'status'} || "disabled";
if (($webmailStatus eq 'disabled') and ($sogoStatus eq 'enabled')) {
$OUT .= " RewriteRule ^/webmail(/.*|\$) https://%{HTTP_HOST}/SOGo\$1 \[L,R\]\n";
}
}

View File

@@ -0,0 +1,6 @@
/var/log/sogo/*.log \{
missingok
rotate 5
notifempty
copytruncate
\}

View File

@@ -0,0 +1,4 @@
{
my $pwd = esmith::util::LdapPassword ();
$OUT.="sogo:$pwd";
}

View File

@@ -0,0 +1 @@
\{

View File

@@ -0,0 +1,4 @@
OCSFolderInfoURL = "mysql://sogo:{$sogod{'DbPassword'}}@localhost/sogo/sogo_folder_info";
OCSSessionsFolderURL = "mysql://sogo:{$sogod{'DbPassword'}}@localhost/sogo/sogo_sessions_folder";
SOGoProfileURL = "mysql://sogo:{$sogod{'DbPassword'}}@localhost/sogo/sogo_user_profile";
OCSEMailAlarmsFolderURL = "mysql://sogo:{$sogod{'DbPassword'}}@localhost/sogo/sogo_alarms_folder";

View File

@@ -0,0 +1,2 @@
SOGoMemcachedHost = 127.0.0.1;
SOGoCacheCleanupInterval = 1800;

View File

@@ -0,0 +1,13 @@
SOGoMailSpoolPath = "/var/spool/sogo";
SOGoIMAPServer = "imap://localhost:{$imap{'TCPPort'} || '143'}";
SOGoMailDomain = {$DomainName};
SOGoMailingMechanism = smtp;
SOGoSMTPServer = localhost;
SOGoMailListViewColumnsOrder = (
Flagged, Attachment, Subject, From, Unread, Date, Size
);
SOGoTrashFolderName = {($sogod{'TrashFolder'} || "Trash")};
SOGoDraftsFolderName = {($sogod{'DraftsFolder'} || "Drafts")};
SOGoSentFolderName = {($sogod{'SentFolder'} || "Sent")};
SOGoJunkFolderName = "{$dovecot{SpamFolder} || "Junk"}";
SOGoMailCustomFromEnabled = YES;

View File

@@ -0,0 +1,6 @@
SOGoACLsSendEMailNotifications = {uc($sogod{'ACLsSendEMailNotifications'} || "NO")};
SOGoAppointmentSendEMailNotifications = YES;
SOGoAppointmentSendEMailReceipts = YES;
SOGoEnableEMailAlarms = {($sogod{'EnableEMailAlarms'} || "NO")};
SOGoAuthenticationMethod = LDAP;
SOGoFoldersSendEMailNotifications = NO;

View File

@@ -0,0 +1,5 @@
SOGoRefreshViewCheck = "every_10_minutes";
SOGoFirstDayOfWeek = "1";
SOGoFirstWeekOfYear = "First4DayWeek";
SOGoCalendarDefaultReminder = "-PT15M";

View File

@@ -0,0 +1,2 @@
SOGoMailAuxiliaryUserAccountsEnabled = {uc($sogod{'MailAuxiliaryUserAccountsEnabled'} || "YES")};
SOGoEnablePublicAccess = {uc($sogod{'PublicAccess'} || "NO")};

View File

@@ -0,0 +1,12 @@
{
if (($sieve{'status'} || 'disabled') eq 'enabled'){
my $sieveport = $sieve{'TCPPort'} || '4190';
$OUT .=<<"HERE";
SOGoSieveServer = "sieve://localhost:$sieveport";
SOGoVacationEnabled = YES;
SOGoForwardEnabled = YES;
SOGoSieveScriptsEnabled = YES;
NGImap4ConnectionStringSeparator = ".";
HERE
}
}

View File

@@ -0,0 +1,3 @@
SOGoSuperUsernames = (
{($sogod{'AdminUsers'} || 'admin')}
);

View File

@@ -0,0 +1 @@
SOGoTimeZone = {$TimeZone};

View File

@@ -0,0 +1,31 @@
SOGoUserSources = (
\{
CNFieldName = cn;
IDFieldName = uid;
UIDFieldName = uid;
baseDN = "ou=Users,{ esmith::util::ldapBase($DomainName); }";
bindFields = (uid);
canAuthenticate = YES;
displayName = "Users";
hostname = localhost;
id = users;
isAddressBook = YES;
port = {$sogod{'LdapTCPPort'} || '389'};
type = ldap;
\},
\{
CNFieldName = cn;
IDFieldName = cn;
UIDFieldName = cn;
baseDN = "ou=Groups,{ esmith::util::ldapBase($DomainName); }";
bindFields = (cn);
canAuthenticate = YES;
displayName = "Groups";
hostname = localhost;
id = groups;
isAddressBook = YES;
port = {$sogod{'LdapTCPPort'} || '389'};
type = ldap;
\}
);

View File

@@ -0,0 +1,11 @@
/* 70 Active Sync options and tuning */
SOGoMaximumPingInterval = {$sogod{'SOGoMaximumPingInterval'} || '3540'};
SOGoMaximumSyncInterval = {$sogod{'SOGoMaximumSyncInterval'} || '3540'};
SOGoInternalSyncInterval = {$sogod{'SOGoInternalSyncInterval'} || '60'};
SOGoMaximumSyncResponseSize = {$sogod{'SOGoMaximumSyncResponseSize'} || '2048'};
SOGoMaximumSyncWindowSize = {$sogod{'SOGoMaximumSyncWindowSize'} || '100'};
WOWorkersCount = {$sogod{WOWorkersCount} || "10"};
WOWatchDogRequestTimeout = {$sogod{'WOWatchDogRequestTimeout'} || '3600'};

View File

@@ -0,0 +1,6 @@
NGUseUTF8AsURLEncoding = YES;
WOMessageUseUTF8 = YES;
WOParsersUseUTF8 = YES;
WOPort = 127.0.0.1:{$sogod{'TCPPort'}};
WOUseRelativeURLs = YES;
SxVMemLimit = {$sogod{'SxVMemLimit'} || '384'};

View File

@@ -0,0 +1,5 @@
/*
{
$OUT = Text::Template::_load_text("/etc/e-smith/templates-default/template-begin");
$OUT =~ s/^#/ * /gm
} */

View File

@@ -0,0 +1 @@
\}

View File

@@ -0,0 +1,6 @@
PORT="{($memcached{'TCPPort'} || '11211')}"
USER="nobody"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS="-l 127.0.0.1"

View File

@@ -0,0 +1,2 @@
PREFORK={($sogod{'WOWorkersCount'} || "10")}
USER=sogo

View File

@@ -0,0 +1,22 @@
CONNECT mysql;
REPLACE INTO user (host, user, password)
VALUES (
'localhost',
'sogo',
password('{$sogod{DbPassword}}')
);
REPLACE INTO db (host, db, user, select_priv, insert_priv, update_priv,
delete_priv, create_priv, drop_priv, alter_priv, index_priv,
references_priv)
VALUES (
'localhost',
'sogo',
'sogo',
'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y',
'Y'
);
FLUSH PRIVILEGES;

View File

@@ -0,0 +1 @@
fix_headers_case

View File

@@ -0,0 +1,11 @@
{
return "" unless (-x '/usr/bin/make-srv');
$OUT .= "# SRV Records for SOGo\n";
$OUT .= `/usr/bin/make-srv -service _caldavs._tcp.$DomainName -target $SystemName.$DomainName -port 443`;
$OUT .= `/usr/bin/make-srv -service _carddavs._tcp.$DomainName -target $SystemName.$DomainName -port 443`;
$OUT .= `/usr/bin/make-srv -service _caldav._tcp.$DomainName -target $SystemName.$DomainName -port 443`;
$OUT .= `/usr/bin/make-srv -service _carddav._tcp.$DomainName -target $SystemName.$DomainName -port 443`;
}