Add an Authentication prop to use SOGo's internal auth

This commit is contained in:
Daniel Berteaud 2015-03-05 09:22:35 +01:00
parent 6d2bab5610
commit 07e7af8352
3 changed files with 21 additions and 6 deletions

View File

@ -1,3 +1,17 @@
auth_cache_size = { $dovecot{'AuthCacheSize'} || '5242880' }
auth_cache_ttl = 7200
auth_cache_negative_ttl = 0
{
# Only enable auth cache if SOGo is using CAS
my $sogo_auth = $sogod{'Authentication'} || 'cas';
if (lc $sogo_auth eq 'cas'){
my $size = $dovecot{'AuthCacheSize'} || '5242880';
my $ttl = $dovecot{'AuthCacheTTL'} || '7200';
my $neg_ttl = $dovecot{'AuthCacheNegativeTTL'} || '0';
$OUT .=<<"EOF";
auth_cache_size = $size
auth_cache_ttl = $ttl
auth_cache_negative_ttl = $neg_ttl
EOF
}
else{
$OUT .= "# No auth cache as SOGo doesn't use CAS";
}
}

View File

@ -1,5 +1,6 @@
{
if (-d '/var/service/dovecot'){
my $auth = $sogod{'Authentication'} || 'cas';
if (lc $auth eq 'cas'){
$OUT .=<<"HERE";
auth sufficient pam_cas.so -simap://localhost -f/etc/pam_cas.conf
HERE

View File

@ -56,8 +56,8 @@
\}
);
{
# is smeserver-dovecot installed ?
if (-d '/var/service/dovecot'){
my $auth = $sogod{'Authentication'} || 'cas';
if (lc $auth eq 'cas'){
$OUT .=<<"HERE";
SOGoAuthenticationType = cas;
SOGoCASServiceURL = "https://auth.$DomainName/cas/";