chore(deploy): 调整 rspamd 与 dovecot 启动配置
- 为 `rspamd` 指定运行用户/组,提升容器内启动一致性。 - 将 `dovecot` 配置格式整理为多行块,保持配置可读性。 - 在 `rspamd` 入口脚本中按可用账号选择启动参数,并保留兜底启动方式。
This commit is contained in:
@@ -35,7 +35,7 @@ stderr_logfile_maxbytes=0
|
|||||||
priority=30
|
priority=30
|
||||||
|
|
||||||
[program:rspamd]
|
[program:rspamd]
|
||||||
command=/usr/bin/rspamd -f
|
command=/usr/bin/rspamd -f -u _rspamd -g _rspamd
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
stdout_logfile=/dev/fd/1
|
stdout_logfile=/dev/fd/1
|
||||||
|
|||||||
@@ -12,11 +12,21 @@ ssl_key = </etc/ssl/private/ssl-cert-snakeoil.key
|
|||||||
mail_home = /var/mail/vhosts/%d/%n
|
mail_home = /var/mail/vhosts/%d/%n
|
||||||
namespace inbox {
|
namespace inbox {
|
||||||
inbox = yes
|
inbox = yes
|
||||||
mailbox Drafts { special_use = \Drafts }
|
mailbox Drafts {
|
||||||
mailbox Sent { special_use = \Sent }
|
special_use = \Drafts
|
||||||
mailbox Trash { special_use = \Trash }
|
}
|
||||||
mailbox Archive { special_use = \Archive }
|
mailbox Sent {
|
||||||
mailbox Spam { special_use = \Junk }
|
special_use = \Sent
|
||||||
|
}
|
||||||
|
mailbox Trash {
|
||||||
|
special_use = \Trash
|
||||||
|
}
|
||||||
|
mailbox Archive {
|
||||||
|
special_use = \Archive
|
||||||
|
}
|
||||||
|
mailbox Spam {
|
||||||
|
special_use = \Junk
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
passdb {
|
passdb {
|
||||||
@@ -29,11 +39,17 @@ userdb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
service imap-login {
|
service imap-login {
|
||||||
inet_listener imaps { port = 993 ssl = yes }
|
inet_listener imaps {
|
||||||
|
port = 993
|
||||||
|
ssl = yes
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
service lmtp {
|
service lmtp {
|
||||||
inet_listener lmtp { address = 0.0.0.0 port = 24 }
|
inet_listener lmtp {
|
||||||
|
address = 0.0.0.0
|
||||||
|
port = 24
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
service auth {
|
service auth {
|
||||||
|
|||||||
@@ -10,4 +10,9 @@ fi
|
|||||||
|
|
||||||
/usr/local/bin/lanqin-rspamd-sync-dkim --once || true
|
/usr/local/bin/lanqin-rspamd-sync-dkim --once || true
|
||||||
/usr/local/bin/lanqin-rspamd-sync-dkim &
|
/usr/local/bin/lanqin-rspamd-sync-dkim &
|
||||||
exec rspamd -f
|
if id _rspamd >/dev/null 2>&1; then
|
||||||
|
exec rspamd -f -u _rspamd -g _rspamd
|
||||||
|
elif id rspamd >/dev/null 2>&1; then
|
||||||
|
exec rspamd -f -u rspamd -g rspamd
|
||||||
|
fi
|
||||||
|
exec rspamd -f --insecure
|
||||||
|
|||||||
Reference in New Issue
Block a user