Sieve script

Discussion in 'Installation/Configuration' started by diakov, Apr 5, 2021.

  1. diakov

    diakov New Member

    Hi Guys,
    Would you be able to help me please because I am stuck.

    I've created a couple of filters and the only one problem I can't resolve is to have receiver email address to be automatically added to mailto:
    and then notified about delivery of the email. I've tried all possible ways and still no result. I believe something is wrong with my variables but not sure what

    Here is my code

    require ["enotify", "mailbox", "reject", "variables"];
    if header :matches "to" "*@*" {
    }
    if header :matches "Subject" "SEC=SECRET" {
    notify :importance "1"
    :message "SEC=SECRET Email Received"
    "mailto:${2}";
    }
    if header :matches "Subject" "SEC=TOP SECRET" {
    notify :importance "1"
    :message "SEC=TOP SECRET Email Received"
    "mailto: ${2}";
    }
    if anyof (header :contains "Subject" "SEC=SECRET",
    header :contains "Subject" "SEC=TOP SECRET")
    {
    reject "We are not accepting SECRET or TOP SECRET level of information";
    }
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  3. TonyG

    TonyG Active Member

    It could vaguely be related to ISPConfig if the Dovecot config files don't have Sieve extensions correctly defined. At this time ISPConfig doesn't have Postfix or Sieve configuration maintenance, but ISPConfig is fairly opinionated (not in a bad way) about how these packages are configured so that some of the ISPConfig features integrate properly. So it's left to the admin to manually tweak all of the config files. This could lead to notes in this forum like "you didn't config the email server properly" when there's very little documentation on the topic. I'm not saying that's a fault. I'm just saying that's the way it is - and it can lead to someone working in a state of uncertaintly about what changes are OK in the mail server without breaking ISPConfig, or at least facing some criticism in this forum. This is just my personal experience - ISPConfig itself has been awesome. Configuring the email server manually took a couple months.

    Given the (very welcome) recent changes in 2.x related to updates and email server configs, I haven't updated yet because I'm terrified that an ISPConfig update will break my mail server. (Yeah, I know, clone the server and test first.) This is not to introduce a new topic into this thread - if I actually have an issue after reading the changelog docs then I'll post separately. I'm noting this to reaffirm that ISPConfig is integrated with the email server configs, and it's very difficult to know what we can change or should not change without a lot of manual research on each setting. I'm looking forward to the new docs to read and write on this topic.

    Anyway, I agree that @diakov should put his inquiry elsewhere, until some link with ISPConfig is established. Diakov - if you post a link here to your other thread I'd like to join that discussion.
     

Share This Page