|
|
|
@ -1,9 +1,11 @@
|
|
|
|
|
# Basic configuration
|
|
|
|
|
user nginx;
|
|
|
|
|
worker_processes auto;
|
|
|
|
|
pcre_jit on;
|
|
|
|
|
error_log /dev/stderr notice;
|
|
|
|
|
pid /var/run/nginx.pid;
|
|
|
|
|
load_module "modules/ngx_mail_module.so";
|
|
|
|
|
load_module "modules/ngx_stream_module.so";
|
|
|
|
|
|
|
|
|
|
events {
|
|
|
|
|
worker_connections 1024;
|
|
|
|
@ -275,6 +277,25 @@ http {
|
|
|
|
|
include /etc/nginx/conf.d/*.conf;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
stream {
|
|
|
|
|
log_format main '$remote_addr [$time_local] '
|
|
|
|
|
'$protocol $status $bytes_sent $bytes_received '
|
|
|
|
|
'$session_time "$upstream_addr" '
|
|
|
|
|
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
|
|
|
|
|
access_log /dev/stdout main;
|
|
|
|
|
|
|
|
|
|
# managesieve
|
|
|
|
|
server {
|
|
|
|
|
listen 14190;
|
|
|
|
|
resolver {{ RESOLVER }} valid=30s;
|
|
|
|
|
|
|
|
|
|
proxy_connect_timeout 1s;
|
|
|
|
|
proxy_timeout 1m;
|
|
|
|
|
proxy_protocol on;
|
|
|
|
|
proxy_pass {{ IMAP_ADDRESS }}:4190;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mail {
|
|
|
|
|
server_name {{ HOSTNAMES.split(",")[0] }};
|
|
|
|
|
auth_http http://127.0.0.1:8000/auth/email;
|
|
|
|
|