block all incoming emails besides whitelisted for specific email account

Discussion in 'General' started by ariban99, Aug 27, 2024.

  1. ariban99

    ariban99 Member

    I have 1 email account for placing orders with a vendor only. i whitelisted that vendors email domain under spamfilter whitelist.
    lately i am getting alot of spam in this email inbox.
    how can i block every email besides what i whitelisted for this user account?
     
  2. Strontium

    Strontium New Member

    With a custom mail filter recipe like that:
    Code:
    if allof(
        not address :is "From" "[email protected]",
        not address :is "From" "[email protected]"
    ) {
        fileinto "Junk";
    }
    
     
    Last edited: Aug 29, 2024
  3. ariban99

    ariban99 Member

    thank you. can the whitelist be just the domain or it must be the full email to work?
    also instead of going into junk the rest of the emails, can it be rejected?
     
  4. Strontium

    Strontium New Member

    Code:
    if address :domain :is "from" "example.com" {
        fileinto "INBOX";
    } else {
        reject "";
        stop;
    }
     
  5. ariban99

    ariban99 Member

    nice, thank you!
     
    Strontium likes this.

Share This Page