reject emails for specific email account if body of email contains:....

Discussion in 'Tips/Tricks/Mods' started by ariban99, Jan 25, 2023 at 8:13 PM.

  1. ariban99

    ariban99 Member

    I know i can setup a server wide content filter for emails, but can i do that for individual email users only? so example [email protected] only should have a filter, if the body message of the email contains words like SEO it should be rejected. i do see the filter button in the individual email but the options there are header, subject, to, from but i dont see the body of email option.
    Thank you
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Create a custom rule for that mailbox under "Custom rules" that moves such messages.
  3. ariban99

    ariban99 Member

    what would a custom rule look like?
  4. pyte

    pyte Active Member HowtoForge Supporter

    You could use a sieve rule like this for the mailbox:
    require ["reject", "body"];
    if allof(address :is "From" "[email protected]", body :contains  "SEO")
        reject "We don't want this message here";
        # Or discard it without notifying them
    Th0m likes this.
  5. ariban99

    ariban99 Member

Share This Page