Commit e4bd4c8a218a
Changed files (2)
home
common
services
home/common/services/goimapnotify.nix
@@ -6,9 +6,14 @@
}:
let
# Helper function to create goimapnotify config for an account
- mkAccountConfig = accountName: accountConfig: ''
+ mkAccountConfig = accountName: accountConfig:
+ let
+ # Handle null port values - if port is null or not set, use 993
+ imapPort = if accountConfig.imap.port != null then accountConfig.imap.port else 993;
+ in
+ ''
host: ${accountConfig.imap.host}
- port: ${toString (accountConfig.imap.port or 993)}
+ port: ${toString imapPort}
tls: true
tlsOptions:
rejectUnauthorized: true
@@ -28,7 +33,7 @@ let
else
${pkgs.mu}/bin/mu index --quiet
fi
- '';
+ '';
# Get enabled email accounts that have mbsync enabled
enabledAccounts = builtins.filter (
home/common/services/imapfilter-config.lua
@@ -167,9 +167,9 @@ function apply_rules(messages, rules, action, folder_name)
if #results > 0 then
print(string.format(" → Matched %d message(s)", #results))
if action == 'delete' then
- -- Move to Trash instead of permanent deletion
- account:create_mailbox('Trash')
- results:move_messages(account['Trash'])
+ -- Move to Deleted Messages (iCloud's trash folder, shows as "Bin" in iOS)
+ account:create_mailbox('Deleted Messages')
+ results:move_messages(account['Deleted Messages'])
elseif action == 'archive' then
archive_by_year(results)
elseif action == 'move' then