diff --git a/DMS/sync_dynamodb_to_sieve.py b/DMS/sync_dynamodb_to_sieve.py index 59212e5..56bcb30 100644 --- a/DMS/sync_dynamodb_to_sieve.py +++ b/DMS/sync_dynamodb_to_sieve.py @@ -67,8 +67,16 @@ def sync(): # Compile os.system(f'sievec {sieve_path}') - os.system(f'doveadm sieve activate -u {email} {sieve_path.name}') - print(f'✓ {email}') + + # Activate via symlink + sieve_dir = mailbox_dir / 'sieve' + sieve_dir.mkdir(exist_ok=True) + active_link = sieve_dir / '.dovecot.sieve' + if active_link.exists(): + active_link.unlink() + active_link.symlink_to('../.dovecot.sieve') + + print(f'✓ {email}') if __name__ == '__main__': sync() \ No newline at end of file