Hallo,
hier eine Beispielkonfiguration für isync/mbsync zum Sichern aller Mails eines Postfachs von netcup.
Hat mich einige Zeit gekostet bis ich es geschafft habe, dass alle Ordner und auch der Posteingang gesichert werden.
Lösung war am Ende zwei Channels anzulegen, einmal mit und einmal ohne Patterns.
"Patterns *" führt zu INBOX.* und damit werden dann zwar alle Unterordner von INBOX aber nicht der INBOX selbst gesichert.
Code
# execute: /usr/bin/mbsync --all --config example.mbsyncrc
### GLOBAL CONFIG
CopyArrivalDate yes
Expunge None
### mail@domain.tld START
IMAPAccount mail@domain.tld
Host mxfXXX.netcup.net
User mail@domain.tld
Pass PASSWORDHERE
UseIMAPS yes
CertificateFile /etc/ssl/certs/ca-certificates.crt
IMAPStore mail@domain.tld-remote
Account mail@domain.tld
MaildirStore mail@domain.tld-local
Path ~/backup/mail/mail@domain.tld/
Inbox ~/backup/mail/mail@domain.tld/Inbox
Channel mail@domain.tld
Master ":mail@domain.tld-remote:"
Slave ":mail@domain.tld-local:"
Patterns * # everything, but no INBOX
Sync Pull New ReNew Flags
Create Slave
SyncState *
Channel mail@domain.tld-INBOX
Master ":mail@domain.tld-remote:"
Slave ":mail@domain.tld-local:"
#Patterns # without patterns: only INBOX, nothing else
Sync Pull New ReNew Flags
Create Slave
SyncState *
### mail@domain.tld END
Alles anzeigen