update-sieve-azure-domains.js•2.72 kB
#!/usr/bin/env node
console.log('📧 SIEVE RULE UPDATE - AZURE + MAINTAINABLE DOMAIN LIST\n');
const newSieveRule = `
# ===========================================
# PERSONAL DOMAIN NEWSLETTERS (User Maintained)
# ===========================================
# Emails from personal domains that are actually newsletters/marketing
# Add domains here as they're identified through manual review
# These bypass normal personal email protection
if anyof (
# Azure delivery notifications (actually promotional/marketing)
allof (
address :contains "from" "@protonmail.com",
header :contains "subject" ["azure", "delivery", "truck"]
),
# Personal domains that send promotional content
# ADD NEW DOMAINS HERE as you identify them during inbox review
address :domain :is "from" [
# Example entries (add real domains as needed):
# "personal-newsletter-domain.com",
# "blog-updates.personal.com"
],
# Specific sender patterns from personal domains that are promotional
allof (
address :domain :is "from" ["protonmail.com", "gmail.com", "yahoo.com", "outlook.com"],
anyof (
header :contains "subject" ["newsletter", "weekly digest", "unsubscribe", "promotional"],
header :contains "from" ["newsletter@", "updates@", "marketing@", "noreply@"]
)
)
) {
fileinto "Information";
stop;
}`;
console.log('📝 ADD THIS RULE TO SIEVE FILE:');
console.log('Insert after line 42 (after loop prevention, before whitelist protection)');
console.log('='.repeat(80));
console.log(newSieveRule);
console.log('='.repeat(80));
console.log('\n🎯 THIS RULE WILL:');
console.log('✅ Catch Azure delivery emails specifically');
console.log('✅ Provide maintainable section for adding new domains');
console.log('✅ Allow specific sender patterns from personal domains');
console.log('✅ Keep truly personal emails in inbox');
console.log('\n📧 USAGE:');
console.log('When you find emails like Azure in your inbox:');
console.log('1. Identify the pattern (domain + subject keywords)');
console.log('2. Add to appropriate section in this rule');
console.log('3. Update sieve file on FastMail');
console.log('4. Future emails auto-organize to Information/Newsletters');
console.log('\n🔧 MAINTENANCE:');
console.log('Update the domain list as you discover new promotional senders');
console.log('Keep the rule organized with comments for easy updates');
console.log('\n⚠️ PLACEMENT:');
console.log('This rule must come BEFORE whitelist protection');
console.log('This ensures these specific patterns get caught before');
console.log('the general "keep personal emails in inbox" logic');