Browse Source

Implemented no auth smtp proxy pass

master
Fábio Kaiser Rauber 2 years ago
parent
commit
c3552689f5
  1. 9
      charts/mailproxy/v0.1.0/templates/nginx-configmap.yaml
  2. 12
      charts/mailproxy/v0.1.0/templates/nginx-mailhosts-conf.yaml
  3. 4
      charts/mailproxy/v0.1.0/values.yaml

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

@ -70,6 +70,15 @@ data:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
{{ if .Values.nginx.noAuthSmtpServerIP -}}
location = /noauth {
add_header Auth-Status OK;
add_header Auth-Server {{ .Values.nginx.noAuthSmtpServerIP }};
add_header Auth-Port 25;
return 204;
}
{{- end }}
}

12
charts/mailproxy/v0.1.0/templates/nginx-mailhosts-conf.yaml

@ -33,6 +33,18 @@ data:
xclient on;
proxy_pass_error_message on;
}
{{ if .Values.nginx.noAuthSmtpServerIP -}}
noauthsmtp.conf: |-
server {
listen 25;
server_name localhost;
protocol smtp;
smtp_auth none;
smtp_capabilities none;
auth_http localhost:8080/noauth;
xclient on;
}
{{- end }}
ssl.conf: |-
ssl_certificate /etc/nginx/ssl/tls.crt;
ssl_certificate_key /etc/nginx/ssl/tls.key;

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

@ -20,8 +20,12 @@ nginx:
- name: smtp
number: 587
protocol: TCP
- name: noauthsmtp
number: 25
protocol: TCP
annotations: {}
loadBalancerIP: ""
noAuthSmtpServerIP: ""
certificate:
issuer: letsencrypt-staging
issuerKind: ClusterIssuer

Loading…
Cancel
Save