Browse Source

Add mail config

master
Fábio Kaiser Rauber 3 years ago
parent
commit
1e310288b4
  1. 12
      charts/mailproxy/v0.1.0/templates/nginx-certificate.yaml
  2. 37
      charts/mailproxy/v0.1.0/templates/nginx-configmap.yaml
  3. 12
      charts/mailproxy/v0.1.0/templates/nginx-deployment.yaml
  4. 4
      charts/mailproxy/v0.1.0/values.yaml

12
charts/mailproxy/v0.1.0/templates/nginx-certificate.yaml

@ -0,0 +1,12 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ include "mailproxy.fullname" . }}
labels:
{{- include "mailproxy.labels" . | nindent 4 }}
spec:
secretName: {{ include "mailproxy.fullname" . }}-tls
issuerRef:
name: {{ .Values.nginx.certificate.issuer }}
dnsNames:
{{- toYaml .Values.nginx.certificate.dnsNames | nindent 4 }}

37
charts/mailproxy/v0.1.0/templates/nginx-configmap.yaml

@ -2,6 +2,8 @@ apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: {{ include "mailproxy.fullname" . }}-nginxconf name: {{ include "mailproxy.fullname" . }}-nginxconf
labels:
{{- include "mailproxy.labels" . | nindent 4 }}
data: data:
phpfpm-conf: |- phpfpm-conf: |-
upstream backend { upstream backend {
@ -34,5 +36,40 @@ data:
include fastcgi_params; include fastcgi_params;
} }
} }
imap-conf: |-
server {
listen 993;
server_name localhost;
protocol imap;
auth_http localhost:8080/auth-mail.php;
ssl on;
proxy_pass_error_message on;
}
pop-conf: |-
server {
listen 995;
server_name localhost;
protocol pop3;
auth_http localhost:8080/auth-mail.php;
ssl on;
proxy_pass_error_message on;
}
smtp-conf: |-
server {
listen 587;
server_name localhost;
protocol smtp;
auth_http localhost:8080/auth-mail.php;
starttls only;
xclient on;
proxy_pass_error_message on;
}
ssl-conf: |-
ssl_certificate /etc/nginx/ssl/tls.crt;
ssl_certificate_key /etc/nginx/ssl/tls.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
ssl_prefer_server_ciphers on;

12
charts/mailproxy/v0.1.0/templates/nginx-deployment.yaml

@ -48,6 +48,18 @@ spec:
- mountPath: /etc/nginx/conf.d/phpfpm.conf - mountPath: /etc/nginx/conf.d/phpfpm.conf
subPath: phpfpm-conf subPath: phpfpm-conf
name: nginxconf name: nginxconf
- mountPath: /etc/nginx/conf.d/imap.conf
subPath: imap-conf
name: nginxconf
- mountPath: /etc/nginx/conf.d/pop.conf
subPath: pop-conf
name: nginxconf
- mountPath: /etc/nginx/conf.d/smtp.conf
subPath: smtp-conf
name: nginxconf
- mountPath: /etc/nginx/ssl
name: {{ include "mailproxy.fullname" . }}-tls
readOnly: true
resources: resources:
{{- toYaml .Values.nginx.resources | nindent 12 }} {{- toYaml .Values.nginx.resources | nindent 12 }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}

4
charts/mailproxy/v0.1.0/values.yaml

@ -19,6 +19,10 @@ nginx:
- name: smtp - name: smtp
number: 587 number: 587
protocol: TCP protocol: TCP
certificate:
issuer: letsencrypt-staging
dnsNames:
- mail.com
resources: {} resources: {}
# limits: # limits:
# cpu: 100m # cpu: 100m

Loading…
Cancel
Save