fix(snappymail): configure csrx.ru domain with correct IMAP/SMTP server
SnappyMail defaulted to localhost:143 for IMAP. Create csrx.ru.json domain config pointing to the mailserver container (shared front network): - IMAP: mailserver:993 SSL - SMTP: mailserver:587 STARTTLS with auth Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e09e2fe04a
commit
e342d39c41
1 changed files with 79 additions and 0 deletions
|
|
@ -211,6 +211,85 @@
|
|||
when: snappymail_pw_result.changed
|
||||
changed_when: true
|
||||
|
||||
# ── SnappyMail domain config for csrx.ru ─────────────────────────────────────
|
||||
# Points IMAP/SMTP to the mailserver container (shared `front` Docker network).
|
||||
# type: 0=plain, 1=SSL, 2=STARTTLS
|
||||
- name: Deploy SnappyMail domain config for {{ domain_base }}
|
||||
ansible.builtin.copy:
|
||||
content: |
|
||||
{
|
||||
"IMAP": {
|
||||
"host": "mailserver",
|
||||
"port": 993,
|
||||
"type": 1,
|
||||
"timeout": 300,
|
||||
"shortLogin": false,
|
||||
"lowerLogin": true,
|
||||
"sasl": ["PLAIN", "LOGIN"],
|
||||
"ssl": {
|
||||
"verify_peer": false,
|
||||
"verify_peer_name": false,
|
||||
"allow_self_signed": true,
|
||||
"SNI_enabled": true,
|
||||
"disable_compression": true,
|
||||
"security_level": 0
|
||||
},
|
||||
"disabled_capabilities": [],
|
||||
"use_expunge_all_on_delete": false,
|
||||
"fast_simple_search": true,
|
||||
"force_select": false,
|
||||
"message_all_headers": false,
|
||||
"message_list_limit": 10000,
|
||||
"search_filter": ""
|
||||
},
|
||||
"SMTP": {
|
||||
"host": "mailserver",
|
||||
"port": 587,
|
||||
"type": 2,
|
||||
"timeout": 60,
|
||||
"shortLogin": false,
|
||||
"lowerLogin": true,
|
||||
"sasl": ["PLAIN", "LOGIN"],
|
||||
"ssl": {
|
||||
"verify_peer": false,
|
||||
"verify_peer_name": false,
|
||||
"allow_self_signed": true,
|
||||
"SNI_enabled": true,
|
||||
"disable_compression": true,
|
||||
"security_level": 0
|
||||
},
|
||||
"useAuth": true,
|
||||
"setSender": true,
|
||||
"usePhpMail": false
|
||||
},
|
||||
"Sieve": {
|
||||
"enabled": false,
|
||||
"host": "mailserver",
|
||||
"port": 4190,
|
||||
"type": 0,
|
||||
"timeout": 10,
|
||||
"shortLogin": false,
|
||||
"lowerLogin": true,
|
||||
"sasl": ["PLAIN"],
|
||||
"ssl": {
|
||||
"verify_peer": false,
|
||||
"verify_peer_name": false,
|
||||
"allow_self_signed": true
|
||||
}
|
||||
},
|
||||
"whiteList": ""
|
||||
}
|
||||
dest: "{{ tools_root }}/snappymail/data/_data_/_default_/domains/{{ domain_base }}.json"
|
||||
owner: "82"
|
||||
group: "82"
|
||||
mode: "0640"
|
||||
register: snappymail_domain_result
|
||||
|
||||
- name: Restart SnappyMail after domain config update
|
||||
ansible.builtin.command: docker restart snappymail
|
||||
when: snappymail_domain_result.changed
|
||||
changed_when: true
|
||||
|
||||
# ── Mail accounts (idempotent: check host-side config file) ──────────────────
|
||||
- name: Wait for mailserver to be ready
|
||||
ansible.builtin.command: docker exec mailserver postfix status
|
||||
|
|
|
|||
Loading…
Reference in a new issue