| --- |
| apiVersion: extensions/v1beta1 |
| kind: Ingress |
| metadata: |
| name: mailcow |
| namespace: mulk |
| labels: |
| name: mailcow |
| k8s-app: mailcow |
| annotations: |
| kubernetes.io/ingress.class: traefik |
| traefik.ingress.kubernetes.io/preserve-host: "true" |
| spec: |
| rules: |
| - host: mail.benkard.de |
| http: |
| paths: |
| - path: / |
| backend: |
| serviceName: mailcow |
| servicePort: 80 |
| - host: autodiscover.benkard.de |
| http: |
| paths: |
| - path: / |
| backend: |
| serviceName: mailcow |
| servicePort: 80 |
| |
| --- |
| apiVersion: v1 |
| kind: Service |
| metadata: |
| name: mailcow-pub |
| namespace: mulk |
| labels: |
| name: mailcow-pub |
| k8s-app: mailcow |
| spec: |
| selector: |
| name: mailcow |
| type: NodePort |
| externalTrafficPolicy: Local |
| ports: |
| - name: smtp-alt |
| port: 31025 |
| targetPort: 25 |
| protocol: TCP |
| nodePort: 31025 |
| --- |
| apiVersion: v1 |
| kind: Service |
| metadata: |
| name: mailcow |
| namespace: mulk |
| labels: |
| name: mailcow |
| k8s-app: mailcow |
| spec: |
| selector: |
| name: mailcow |
| type: ClusterIP |
| ports: |
| - name: http |
| port: 80 |
| targetPort: 80 |
| protocol: TCP |
| --- |
| apiVersion: apps/v1 |
| kind: Deployment |
| metadata: |
| name: mailcow |
| namespace: mulk |
| labels: |
| name: mailcow |
| k8s-app: mailcow |
| spec: |
| replicas: 1 |
| strategy: |
| rollingUpdate: |
| maxSurge: 1 |
| maxUnavailable: 1 |
| selector: |
| matchLabels: |
| k8s-app: mailcow |
| name: mailcow |
| template: |
| metadata: |
| labels: |
| name: mailcow |
| k8s-app: mailcow |
| spec: |
| imagePullSecrets: |
| - name: kube-registry-token |
| hostAliases: |
| - ip: "127.0.0.1" |
| hostnames: |
| - "mysql" |
| - "mysql-mailcow" |
| - "mysql-proxy" |
| - "redis" |
| - "redis-mailcow" |
| - "clamd" |
| - "clamd-mailcow" |
| - "dockerapi" |
| - "dockerapi-mailcow" |
| - "solr" |
| - "solr-mailcow" |
| - "watchdog" |
| - "watchdog-mailcow" |
| - "acme" |
| - "acme-mailcow" |
| - "nginx" |
| - "nginx-mailcow" |
| - "memcached" |
| - "memcached-mailcow" |
| - "postfix" |
| - "postfix-mailcow" |
| - "dovecot" |
| - "dovecot-mailcow" |
| - "sogo" |
| - "sogo-mailcow" |
| - "phpfpm" |
| - "phpfpm-mailcow" |
| - "rspamd" |
| - "rspamd-mailcow" |
| - "unbound" |
| - "unbound-mailcow" |
| containers: |
| - name: mysql-proxy |
| image: alpine/socat:1.0.3 |
| args: |
| - UNIX-LISTEN:/var/run/mysqld/mysqld.sock,reuseaddr,fork,unlink-early,mode=0777 |
| - TCP-CONNECT:mysql.system.svc.cluster.local.:3306 |
| volumeMounts: |
| - name: mysql-socket |
| mountPath: /var/run/mysqld |
| - name: redis |
| image: redis:5-alpine |
| env: |
| - name: TZ |
| value: Europe/Vienna |
| volumeMounts: |
| - name: redis-data |
| mountPath: /data |
| - name: clamd |
| image: mailcow/clamd:1.35 |
| env: |
| - name: TZ |
| value: Europe/Vienna |
| - name: SKIP_CLAMD |
| value: "y" |
| volumeMounts: |
| - name: config |
| subPath: clamav |
| mountPath: /etc/clamav |
| - name: clamav-data |
| mountPath: /var/lib/clamav |
| - name: rspamd |
| image: mailcow/rspamd:1.57 |
| env: |
| - name: TZ |
| value: Europe/Vienna |
| - name: DOVECOT_V4 |
| value: 127.0.0.1 |
| volumeMounts: |
| - name: rspamd-data |
| mountPath: /var/lib/rspamd |
| - name: config |
| subPath: rspamd/custom |
| mountPath: /etc/rspamd/custom |
| - name: config |
| subPath: rspamd/override.d |
| mountPath: /etc/rspamd/override.d |
| - name: config |
| subPath: rspamd/local.d |
| mountPath: /etc/rspamd/local.d |
| - name: config |
| subPath: rspamd/lua/ |
| mountPath: /etc/rspamd/lua |
| readOnly: true |
| - name: php-fpm |
| image: mailcow/phpfpm:1.55 |
| command: |
| - php-fpm |
| - -d |
| - date.timezone=Europe/Vienna |
| - -d |
| - expose_php=0 |
| env: |
| - {name: LOG_LINES, value: "9999"} |
| - {name: TZ, value: Europe/Vienna} |
| - {name: DBNAME, value: mailcow} |
| - {name: DBUSER, value: mailcow} |
| - {name: DBPASS, value: REDACTED} |
| - {name: MAILCOW_HOSTNAME, value: mail.benkard.de} |
| - {name: IMAP_PORT, value: "143"} |
| - {name: IMAPS_PORT, value: "993"} |
| - {name: POP_PORT, value: "110"} |
| - {name: POPS_PORT, value: "995"} |
| - {name: SIEVE_PORT, value: "4190"} |
| - {name: SUBMISSION_PORT, value: "587"} |
| - {name: SMTPS_PORT, value: "465"} |
| - {name: SMTP_PORT, value: "25"} |
| - {name: API_KEY, value: invalid} |
| - {name: API_ALLOW_FROM, value: invalid} |
| - {name: COMPOSE_PROJECT_NAME, value: mailcow-dockerized} |
| - {name: SKIP_SOLR, value: "y"} |
| volumeMounts: |
| - name: web-data |
| mountPath: /web |
| - name: config |
| subPath: rspamd/dynmaps |
| mountPath: /dynmaps |
| readOnly: true |
| - name: rspamd-data |
| mountPath: /var/lib/rspamd |
| - name: config |
| subPath: sogo |
| mountPath: /etc/sogo |
| - name: config |
| subPath: rspamd/meta_exporter |
| mountPath: /meta_exporter |
| readOnly: true |
| - name: config |
| subPath: phpfpm/php-fpm.d/pools.conf |
| mountPath: /usr/local/etc/php-fpm.d/z-pools.conf |
| - name: config |
| subPath: phpfpm/php-conf.d/opcache-recommended.ini |
| mountPath: /usr/local/etc/php/conf.d/opcache-recommended.ini |
| - name: config |
| subPath: phpfpm/php-conf.d/upload.ini |
| mountPath: /usr/local/etc/php/conf.d/upload.ini |
| - name: config |
| subPath: phpfpm/php-conf.d/other.ini |
| mountPath: /usr/local/etc/php/conf.d/zzz-other.ini |
| - name: mysql-socket |
| mountPath: /var/run/mysqld |
| - name: sogo |
| image: mailcow/sogo:1.65 |
| command: |
| - /bin/sleep |
| - inf |
| env: |
| - {name: DBNAME, value: mailcow} |
| - {name: DBUSER, value: mailcow} |
| - {name: DBPASS, value: REDACTED} |
| - {name: TZ, value: Europe/Vienna} |
| - {name: LOG_LINES, value: "9999"} |
| - {name: MAILCOW_HOSTNAME, value: mail.benkard.de} |
| - {name: ACL_ANYONE, value: disallow} |
| volumeMounts: |
| - name: config |
| subPath: sogo |
| mountPath: /etc/sogo |
| - name: config |
| subPath: sogo/custom-sogo.js |
| mountPath: /usr/lib/GNUstep/SOGo/WebServerResources/js/custom-sogo.js |
| - name: web-data |
| subPath: inc/init_db.inc.php |
| mountPath: /init_db.inc.php |
| - name: mysql-socket |
| mountPath: /var/run/mysqld |
| - name: dovecot |
| image: mailcow/dovecot:1.54 |
| tty: true |
| env: |
| - {name: DBNAME, value: mailcow} |
| - {name: DBUSER, value: mailcow} |
| - {name: DBPASS, value: REDACTED} |
| - {name: TZ, value: Europe/Vienna} |
| - {name: LOG_LINES, value: "9999"} |
| - {name: MAILDIR_GC_TIME, value: "1440"} |
| - {name: ACL_ANYONE, value: disallow} |
| volumeMounts: |
| - name: config |
| subPath: dovecot |
| mountPath: /usr/local/etc/dovecot |
| - name: assets |
| subPath: ssl |
| mountPath: /etc/ssl/mail |
| readOnly: true |
| - name: config |
| subPath: sogo |
| mountPath: /etc/sogo/ |
| - name: vmail |
| mountPath: /var/vmail |
| - name: vmail-attachments |
| mountPath: /var/attachments |
| - name: crypt-data |
| mountPath: /mail_crypt |
| - name: config |
| subPath: rspamd/custom |
| mountPath: /etc/rspamd/custom |
| - name: rspamd-data |
| mountPath: /var/lib/rspamd |
| - name: mysql-socket |
| mountPath: /var/run/mysqld |
| ports: |
| - name: doveadm |
| hostPort: 19991 |
| containerPort: 12345 |
| - name: imap |
| hostPort: 143 |
| containerPort: 143 |
| - name: imaps |
| hostPort: 993 |
| containerPort: 993 |
| - name: pop |
| hostPort: 110 |
| containerPort: 110 |
| - name: pops |
| hostPort: 995 |
| containerPort: 995 |
| - name: sieve |
| hostPort: 4190 |
| containerPort: 4190 |
| - name: postfix |
| image: mailcow/postfix:1.44 |
| volumeMounts: |
| - name: config |
| subPath: postfix |
| mountPath: /opt/postfix/conf |
| - name: assets |
| subPath: ssl |
| mountPath: /etc/ssl/mail |
| readOnly: true |
| - name: postfix-data |
| mountPath: /var/spool/postfix |
| - name: crypt-data |
| mountPath: /var/lib/zeyple |
| - name: rspamd-data |
| mountPath: /var/lib/rspamd |
| - name: mysql-socket |
| mountPath: /var/run/mysqld |
| env: |
| - {name: LOG_LINES, value: "9999"} |
| - {name: TZ, value: Europe/Vienna} |
| - {name: DBNAME, value: mailcow} |
| - {name: DBUSER, value: mailcow} |
| - {name: DBPASS, value: REDACTED} |
| ports: |
| - name: smtp |
| hostPort: 25 |
| containerPort: 25 |
| - name: smtps |
| hostPort: 465 |
| containerPort: 465 |
| - name: submission |
| hostPort: 587 |
| containerPort: 587 |
| - name: memcached |
| image: memcached:1.5.16 |
| - name: nginx |
| image: nginx:1.17.0-alpine |
| command: |
| - /bin/sh |
| - -c |
| - envsubst < /etc/nginx/conf.d/templates/listen_plain.template > /etc/nginx/conf.d/listen_plain.active && |
| envsubst < /etc/nginx/conf.d/templates/listen_ssl.template > /etc/nginx/conf.d/listen_ssl.active && |
| envsubst < /etc/nginx/conf.d/templates/server_name.template > /etc/nginx/conf.d/server_name.active && |
| envsubst < /etc/nginx/conf.d/templates/sogo.template > /etc/nginx/conf.d/sogo.active && |
| envsubst < /etc/nginx/conf.d/templates/sogo_eas.template > /etc/nginx/conf.d/sogo_eas.active && |
| nginx -t && |
| exec nginx -g 'daemon off;' |
| env: |
| - {name: HTTPS_PORT, value: "443"} |
| - {name: HTTP_PORT, value: "80"} |
| - {name: MAILCOW_HOSTNAME, value: mail.benkard.de} |
| #- {name: IPV4_NETWORK, value: ${IPV4_NETWORK:-172.22.1}} |
| - {name: TZ, value: Europe/Vienna} |
| volumeMounts: |
| - name: web-data |
| mountPath: /web |
| readOnly: true |
| - name: config |
| subPath: rspamd/dynmaps |
| mountPath: /dynmaps |
| readOnly: true |
| - name: assets |
| subPath: ssl |
| mountPath: /etc/ssl/mail |
| readOnly: true |
| - name: config |
| subPath: nginx |
| mountPath: /etc/nginx/conf.d |
| - name: config |
| subPath: rspamd/meta_exporter |
| mountPath: /meta_exporter |
| readOnly: true |
| ports: |
| - name: http |
| containerPort: 80 |
| - name: acme |
| image: mailcow/acme:1.70 |
| env: |
| - {name: LOG_LINES, value: "9999"} |
| - {name: ADDITIONAL_SAN, value: ""} |
| - {name: MAILCOW_HOSTNAME, value: mail.benkard.de} |
| - {name: DBNAME, value: mailcow} |
| - {name: DBUSER, value: mailcow} |
| - {name: DBPASS, value: REDACTED} |
| - {name: SKIP_LETS_ENCRYPT, value: "n"} |
| - {name: SKIP_IP_CHECK, value: "y"} |
| - {name: LE_STAGING, value: "n"} |
| - {name: TZ, value: Europe/Vienna} |
| volumeMounts: |
| - name: web-data |
| subPath: .well-known/acme-challenge |
| mountPath: /var/www/acme |
| - name: assets |
| subPath: ssl |
| mountPath: /var/lib/acme |
| - name: assets |
| subPath: ssl-example |
| mountPath: /var/lib/ssl-example |
| readOnly: true |
| - name: mysql-socket |
| mountPath: /var/run/mysqld |
| volumes: |
| - name: web-data |
| persistentVolumeClaim: |
| claimName: mailcow-web |
| - name: assets |
| persistentVolumeClaim: |
| claimName: mailcow-assets |
| - name: vmail |
| persistentVolumeClaim: |
| claimName: mailcow-vmail |
| - name: vmail-attachments |
| persistentVolumeClaim: |
| claimName: mailcow-vmail-attachments |
| - name: redis-data |
| persistentVolumeClaim: |
| claimName: mailcow-redis |
| - name: rspamd-data |
| persistentVolumeClaim: |
| claimName: mailcow-rspamd |
| - name: postfix-data |
| persistentVolumeClaim: |
| claimName: mailcow-postfix |
| - name: crypt-data |
| persistentVolumeClaim: |
| claimName: mailcow-crypt |
| - name: config |
| persistentVolumeClaim: |
| claimName: mailcow-config |
| - name: mysql-socket |
| emptyDir: {} |
| - name: clamav-data |
| emptyDir: {} |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: mailcow-web |
| namespace: mulk |
| labels: |
| k8s-app: mailcow |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| spec: |
| storageClassName: local-path |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 1Gi |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: mailcow-assets |
| namespace: mulk |
| labels: |
| k8s-app: mailcow |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| spec: |
| storageClassName: local-path |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 1Gi |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: mailcow-vmail |
| namespace: mulk |
| labels: |
| k8s-app: mailcow |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| spec: |
| storageClassName: local-path |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 1Gi |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: mailcow-vmail-attachments |
| namespace: mulk |
| labels: |
| k8s-app: mailcow |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| spec: |
| storageClassName: local-path |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 1Gi |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: mailcow-redis |
| namespace: mulk |
| labels: |
| k8s-app: mailcow |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| spec: |
| storageClassName: local-path |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 1Gi |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: mailcow-rspamd |
| namespace: mulk |
| labels: |
| k8s-app: mailcow |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| spec: |
| storageClassName: local-path |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 1Gi |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: mailcow-postfix |
| namespace: mulk |
| labels: |
| k8s-app: mailcow |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| spec: |
| storageClassName: local-path |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 1Gi |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: mailcow-crypt |
| namespace: mulk |
| labels: |
| k8s-app: mailcow |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| spec: |
| storageClassName: local-path |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 1Gi |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: mailcow-config |
| namespace: mulk |
| labels: |
| k8s-app: mailcow |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| spec: |
| storageClassName: local-path |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 1Gi |
| --- |
| #kind: ConfigMap |
| #apiVersion: v1 |
| #metadata: |
| # name: mailcow-config |
| # namespace: mulk |
| # labels: |
| # k8s-app: mailcow |
| #data: |
| # gerrit.config: | |
| # [gerrit] |
| # basePath = git |
| # canonicalWebUrl = https://gerrit.benkard.de/ |
| # serverId = 4f1749e7-9b7f-449e-acf9-5e80b87f8173 |