[Dovecot] Allow setting ACL_ANYONE in mailcow.conf
This commit is contained in:
		@@ -85,6 +85,7 @@ map {
 | 
			
		||||
}
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
echo -n ${ACL_ANYONE} > /usr/local/etc/dovecot/acl_anyone
 | 
			
		||||
 | 
			
		||||
# Create userdb dict for Dovecot
 | 
			
		||||
cat <<EOF > /usr/local/etc/dovecot/sql/dovecot-dict-sql-userdb.conf
 | 
			
		||||
 
 | 
			
		||||
@@ -167,9 +167,17 @@ echo '    </dict>
 | 
			
		||||
chown sogo:sogo -R /var/lib/sogo/
 | 
			
		||||
chmod 600 /var/lib/sogo/GNUstep/Defaults/sogod.plist
 | 
			
		||||
 | 
			
		||||
# Patch ACLs (comment this out to enable any or authenticated targets for ACL)
 | 
			
		||||
if patch -sfN --dry-run /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff > /dev/null; then
 | 
			
		||||
  patch /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff;
 | 
			
		||||
# Patch ACLs
 | 
			
		||||
if [[ ${ACL_ANYONE} == 'allow' ]]; then
 | 
			
		||||
  #enable any or authenticated targets for ACL
 | 
			
		||||
  if patch -R -sfN --dry-run /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff > /dev/null; then
 | 
			
		||||
    patch -R /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff;
 | 
			
		||||
  fi
 | 
			
		||||
else
 | 
			
		||||
  #disable any or authenticated targets for ACL
 | 
			
		||||
  if patch -sfN --dry-run /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff > /dev/null; then
 | 
			
		||||
    patch /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff;
 | 
			
		||||
  fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Copy logo, if any
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user