Decouple archive mailboxes from accounts
This commit is contained in:
parent
0bb49019b6
commit
8d2838aea7
4 changed files with 130 additions and 46 deletions
|
|
@ -80,7 +80,11 @@ func migrateAccount(a Account) error {
|
|||
return fmt.Errorf("open target %s: %w", a.Name, err)
|
||||
}
|
||||
defer dst.Close()
|
||||
mboxDir := filepath.Join(Cfg.MboxRoot, a.MboxDir)
|
||||
archiveName := accountMboxDir(a)
|
||||
if archiveName == "" {
|
||||
return fmt.Errorf("keine Archiv-Mailbox fuer %s ausgewaehlt", a.Name)
|
||||
}
|
||||
mboxDir := filepath.Join(Cfg.MboxRoot, archiveName)
|
||||
mbox, err := NewMboxWriter(mboxDir)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue