change home folder for dovecot
This commit is contained in:
@@ -77,12 +77,12 @@ def sync():
|
|||||||
user = email.split('@')[0]
|
user = email.split('@')[0]
|
||||||
|
|
||||||
# Path: /var/mail/domain.de/user/.dovecot.sieve
|
# Path: /var/mail/domain.de/user/.dovecot.sieve
|
||||||
mailbox_dir = Path(VMAIL_BASE) / domain / user
|
mailbox_dir = Path(VMAIL_BASE) / domain / user / 'home'
|
||||||
|
|
||||||
# Skip if mailbox doesn't exist
|
# Skip if mailbox doesn't exist
|
||||||
if not mailbox_dir.exists():
|
if not mailbox_dir.exists():
|
||||||
print(f'⚠ Skipped {email} (mailbox not found)')
|
mailbox_dir.mkdir(exist_ok=True)
|
||||||
continue
|
os.system(f'chown docker:docker {mailbox_dir}')
|
||||||
|
|
||||||
sieve_path = mailbox_dir / '.dovecot.sieve'
|
sieve_path = mailbox_dir / '.dovecot.sieve'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user