Offizielles Server Zertifikat

Hallo,

auf unseren Server wird auch via HTTPS von außen zugegriffen, IMAP per SSL ebenfalls betrieben.

Wir würden daher gerne ein offizielles Zertifikat für Cyrus, Postfix & Apache verwenden. Gibt es da für UCS Besonderheiten zu beachten? Oder kann das Zertifikat ganz normal per imapd.conf und die UMC (apache2/ssl/xxx + postfix/ssl) Parameter gemacht werden? Oder ist da noch mehr zu tun?

1 Like

Hallo,

der Weg über die UCR-Variablen “apache2/ssl/", “postfix/ssl/” und "mail/cyrus/ssl/” ist korrekt.

Zum Cyrus habe ich ad hoc die Dokumentation nicht gefunden, aber im Template steht:

[code]print ‘tls_cert_file: %s’ % baseConfig.get(‘mail/cyrus/ssl/certificate’, ‘/var/lib/cyrus/cert.pem’)
print ‘tls_key_file: %s’ % baseConfig.get(‘mail/cyrus/ssl/key’, ‘/var/lib/cyrus/private.key’)

if baseConfig.get(“mail/cyrus/murder/master”, “”):
print ‘tls_ca_file: %s’ % baseConfig.get(‘mail/cyrus/ssl/cafile’, ‘/etc/univention/ssl/ucsCA/CAcert.pem’)
if baseConfig.get(‘mail/cyrus/ssl/capath’):
print ‘tls_ca_path: %s’ % baseConfig.get(‘mail/cyrus/ssl/capath’)
else:
print ‘tls_ca_path: %s’ % baseConfig.get(‘mail/cyrus/ssl/capath’, ‘/etc/univention/ssl/ucsCA/certs/’)
if baseConfig.get(‘mail/cyrus/ssl/cafile’):
print ‘tls_ca_file: %s’ % baseConfig.get(‘mail/cyrus/ssl/cafile’)
[/code]

Viele Grüße,
Dirk Ahrnke

[quote=“zash”]Hallo,

auf unseren Server wird auch via HTTPS von außen zugegriffen, IMAP per SSL ebenfalls betrieben.

Wir würden daher gerne ein offizielles Zertifikat für Cyrus, Postfix & Apache verwenden. Gibt es da für UCS Besonderheiten zu beachten? Oder kann das Zertifikat ganz normal per imapd.conf und die UMC (apache2/ssl/xxx + postfix/ssl) Parameter gemacht werden? Oder ist da noch mehr zu tun?[/quote]

Hallo, hier ein Howto, (für openssl.com)
(bitte my_company ersetzen durch Name der Firma/Einrichtung)

[code]### Zertifikat generieren

Verzeichnis fuer eigenes Zertifikat erstellen

mkdir /etc/ssl/my_company
cd /etc/ssl/my_company

Zertifikatserzeugung

openssl genrsa -out my_company.key 2048
openssl req -new -nodes -key my_company.key -out my_company.csr
cat my_company.csr
–> damit zu openssl.com gehen und Zertifizieren lassen
Wir benoetigen ein “Class 2 Organization Validation” Zertifikat, dies ggf. bei Ihnen anpassen
https://www.startssl.com/?app=35
Das Zertifikat als “wildcard Zertifikat” ausstellen lassen, mit
folgenden Domains:
Allgemeiner Name: *.my_company.de
Email: postmaster@my_company.de
Alternativer Name des Inhabers:
DNS-Name: *.my_company.de
DNS-Name: my_company.de
DNS-Name: *.my_company.info
DNS-Name: my_company.info
DNS-Name: *.my_company.net
DNS-Name: my_company.net
DNS-Name: *.my_company.org
DNS-Name: my_company.org
DNS-Name: …

–> das generierte Zertifikat von openssl.com geht dann in die Datei
my_company.crt

pem-Format erzeugen

openssl x509 -in my_company.crt -out my_company.pem -outform pem

intermediate erzeugen

wget https://www.startssl.com/certs/sub.class2.server.ca.pem
wget https://www.startssl.com/certs/ca.pem
cat ca.pem sub.class1.server.ca.pem > ca-bundle.pem

intermediate bundle mit crt(pem-Format) erzeugen

cat my_company.pem > my_company-combined.pem
cat ca-bundle.pem >>my_company-combined.pem

Apache Konfiguration

ucr set apache2/ssl/certificate="/etc/ssl/my_company/my_company.pem"
ucr set apache2/ssl/key="/etc/ssl/my_company/my_company.key"
ucr set apache2/ssl/certificatechain="/etc/ssl/my_company/ca-bundle.pem"
wget http://www.my_company.de/favicon.ico -O /var/www/favicon.ico
service apache2 restart

Postfix Konfiguration

ucr set mail/postfix/ssl/certificate="/etc/ssl/my_company/my_company.pem"
ucr set mail/postfix/ssl/key="/etc/ssl/my_company/my_company.key"
ucr set mail/postfix/ssl/cafile="/etc/ssl/my_company/ca-bundle.pem"
service postfix restart
vim /etc/default/saslauthd
START=yes
/etc/init.d/saslauthd restart

Zarafa-Gateway konfigurieren

ucr set
zarafa/cfg/gateway/ssl_certificate_file="/etc/ssl/my_company/my_company-combined.pem"
ucr set zarafa/cfg/gateway/ssl_private_key_file="/etc/ssl/my_company/my_company.key"
service zarafa-gateway restart[/code]

Mastodon