burger
infomaniak
infomaniak
cloud-computing-logo
Cloud Computing
web-domain-logo
Web & Domains
event-marketing-logo
Events & Marketing
  • Our products
    • Collaborative tools icon chevron
    • Web & Domains icon chevron
    • Cloud Computing icon chevron
    • Events & Marketing icon chevron
    • Streaming icon chevron

      ksuiteCollaborative suite

      Discover the collaborative suite → Discover →
    • kSuite Professional email, sovereign cloud and AI for sustainable performance
    • kSuite The suite for secure communication, storage and sharing
    • kdrive
      kDrive Store, collaborate and share your files
    • mail service
      Mail Service Create your email addresses with your domain
    • kChat
      kChat Communicate live with your teams
    • kmeet
      kMeet Organise your meetings online in complete security
    • swisstransfer
      SwissTransfer Send your files up to 50 GB free of charge.
    • kpaste
      kPaste Share and encrypt your sensitive information
    • ksuite
      Custom Brand Control the brand image of your products
    • kChat
      Chk Link reducer & QR code generator
      Find the web hosting solution you need
    • Domain name
      Domain name Reserve your domain name at the best price
    • Site Creator
      Site Creator Create your website with ease
    • web hosting
      Web Hosting Create your website with over 100 CMS
    • web hosting
      Wordpress Hosting Create your WordPress website easily
    • Cloud Server
      Cloud Server Power up your sites with guaranteed resources
    • Node.js Hosting Create a dynamic, interactive site with Node.js
    • SSL Certificat
      SSL certificates Secure your websites with an EV or DV certificate
    • Options
    • Domain privacy
      Domain Privacy Protect your domains’ private data
    • DNS Fast Anycast
      FastAnycast DNS Speed up your site access times
    • Dyn DNS
      DynDNS Access your devices remotely
    • Dyn DNS
      Renewal Warranty Secure your domains against loss and theft
      Find the right Cloud Computing solution

      Cloud services

    • public cloud
      Public Cloud (IaaS) Create your projects in a high-end, ultra-competitive Cloud
    • Cloud Server
      VPS Cloud Create a Windows / Linux server
    • Kubernetes service Deploy your containerised apps on a large scale.
    • VPS Lite
      VPS Lite Create a Windows/Linux server at a low cost
    • Database Service Manage your databases with a managed solution
    • jelastic cloud
      Jelastic Cloud (PaaS) Create your own customised environments
    • Other services

    • llm api
      AI Services Boost your productivity with our sovereign AI
    • swiss backup
      Swiss Backup Back up your devices in the Cloud
    • nas synology
      NAS Synology Rent a NAS in our secure data centers
    • High availibility
      Very High Availability Create a multi-data center infrastructure with customised SLAs
    • Housing
      Housing Install your servers in our data centers
    • Auth Add a privacy-friendly login method to your apps
      Infomaniak Events, the independent local events portal
      Online ticketing service with a wide choice of concerts, shows and events.
    • online shop
      Ticketing Create your ticketing service and sell tickets
    • kdrive
      Access Control Control access to your events with ease
    • kdrive
      Guest manager Automate your event invitations
    • kdrive
      Newsletter Send your newsletters at competitive prices
    • Streaming radio
      Streaming radio Create and broadcast your own live radio station online
    • streaming video
      Video-Streaming Create and broadcast live events and TV online
    • VOD and AOD
      VOD & AOD service Host and broadcast your recordings without limits
  • Resources
    documentation icon Documentation
    Guides & tutorials
    API documentation
    special offers icon Special offers
    Get started for free
    Student programme
    Become an affiliate
    partner program icon Partner programme
    Find a partner
    Become a partner
    Infomaniak Academy
    support icon Support & contact
    Contact Support
    Premium support - 24/7
    Contact our sales department
    Hiring an expert
    Migrate to Infomaniak
  • About us
    forest
    icon Ecological commitment
    We pollute. But we are taking action to reduce the footprint of our services and infrastructure
    Discover our commitment →
    icon About Infomaniak
    Our vision, our values
    Our teams
    Infomaniak is recruiting
    Press and communication
    Blog and news
    icon Security
    Data confidentiality
    Bug Bounty Programme
  • Get started for free
    Sign in
  • search-icon
    close-icon
      icon

      Would your needs exceed our solutions? To find out, contact us so that we can advise you personally.

      Our flagship products:
  • search-icon
  • Get started for free
    Sign in
Price Price
Knowledge base

1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!

Knowledge base Filter incoming emails using the Sieve language

    Filter incoming emails using the Sieve language

    This guide explains how to create sorting rules in Advanced mode, scripts in Sieve language, to automatically classify your incoming emails on Infomaniak according to certain conditions.

     

    âš  Available with:

    kSuitefree
     Standard
     Business
     Enterprise
     my kSuite
     my kSuite+
    Mail ServiceStarter 1 max. address
     Premium 5 min. addresses

     

    Preamble

    • If you do not have a compatible offer or if you prefer a simplified configuration, refer to this other guide.
      • ⚠️ No support is provided regarding the Sieve language (refer to this documentation — also discover the role of the host).
    • Unlike the sorting rules offered within email software/clients (Microsoft Outlook, Mozilla Thunderbird, Apple Mail...), these rules will act directly on the server of your mailboxes before even the IMAP connection.
    • It is possible to import Sieve files via a button.
    • By activating this mode, the existing standard rules will be kept but deactivated.
    • The redirect command (allowing to forward an email to another address) is not allowed in scripts.
      • If you import a Sieve script from another host, make sure to remove this command.
      • To forward emails, use the assistant in Standard mode or the Redirections section of your Mail Service.

     

    Access the rules from the Infomaniak Web Mail app

    Prerequisites

    • Having permission to manage rules: if you had been invited to the Infomaniak Web app Mail (online service ksuite.infomaniak.com/mail) to manage your address, it is possible that the Mail Service manager has removed this right from their admin account.removed this right.

    To access the sorting filters for your Infomaniak mailbox:

    1. Click here to access the Infomaniak Web app Mail (online service ksuite.infomaniak.com/mail).
    2. Click on the Settings icon ‍ in the top right corner.
    3. Check or select the email address concerned in the drop-down menu.
    4. Click on Filters and rules:
      ‍

     

    Access rules from a Mail Service

    To access the sorting filters for your Infomaniak mailbox:

    1. Click here to access the management of your product on the Infomaniak Manager (need help?).
    2. Click directly on the name assigned to the product concerned.
    3. Click on the email address concerned in the table that appears.
    4. Click on the Rules tab from the left sidebar (or top bar):

     

    Create a new rule in Advanced (expert) mode

    Make sure to click on Advanced mode:

    First example of advanced sorting

    Here is a simple example of a command using this language:

    require ["fileinto"];
    if address :contains "from" "facebook.com" {
        fileinto "fb";
    } elsif header :matches "List-Unsubscribe" "*" {
        fileinto "nl";
    } else {
        keep;
    }

    Explanations:

    1. Loading required extensions: use require ["fileinto"]; to indicate that you will use the fileinto function.
    2. Filtering Facebook messages: use if address :contains "from" "facebook.com" to check if the sender's address contains "facebook.com"; if so, the message is filed in the "fb" folder with fileinto "fb";.
    3. Filtering messages with an unsubscribe link: use elsif header :matches "List-Unsubscribe" "*" to check if the "List-Unsubscribe" header is present in the message; if so, the message is filed in the "nl" folder with fileinto "nl";.
    4. Keeping other messages: use else { keep; } to keep all other messages that do not match the previous criteria.

    Attention:

    • If you need to mention a subfolder, use the separator / (as in the second example), but it is not necessary to specify INBOX in your codes
    • Make sure the folders fb and nl already exist in your inbox; otherwise, the messages may not be sorted correctly
    • The filter address :contains "from" "facebook.com" works correctly for addresses that contain "facebook.com" in the "from" field
    • The filter header :matches "List-Unsubscribe" "*" checks only for the presence of the "List-Unsubscribe" header, not its content

     

    Second example of advanced sorting

    This code modifies the subject based on thesender (adds a prefix to the subject when an email passes the filter, for example):

    require ["fileinto", "editheader", "variables", "regex"];
    if address "sender" "owner-scientific-linux-devel at LISTSERV.FNAL.GOV" {
        if header :regex "subject" "((Re|Fwd): *)\\[SCIENTIFIC-LINUX-DEVEL\\] *(.*)" {
            deleteheader "Subject";
            addheader "Subject" "${1}${3}";
        } else {
            # Ajouter un préfixe si l'objet ne correspond pas déjà au modèle
            deleteheader "Subject";
            addheader "Subject" "[SL-Devel] ${1}";
        }
        fileinto "Mail List/SL-Devel";
    }

    Explanations:

    1. Required extensions:
      1. fileinto: to classify messages into folders.
      2. editheader: to modify email headers.
      3. variables: to use variables in expressions.
      4. regex: for regular expressions.
    2. Condition on the sender:
      1. if address "sender" "owner-scientific-linux-devel at LISTSERV.FNAL.GOV": checks if the sender matches.
    3. Condition on the subject:
      1. if header :regex "subject" "((Re|Fwd): *)\\[SCIENTIFIC-LINUX-DEVEL\\] *(.*)": checks if the subject matches the specified pattern.
      2. deleteheader "Subject"; and addheader "Subject" "${1}${3}";: deletes the existing subject and adds a new subject with the captured parts.
    4. Adding a prefix if the subject does not already match the pattern:
      1. addheader "Subject" "[SL-Devel] ${1}";: adds a prefix "[SL-Devel]" to the subject if it is not already present.
    5. Classifying the message:
      1. fileinto "Mail List/SL-Devel";: classifies messages into the "Mail List/SL-Devel" folder.

    Attention:

    • Make sure the folder Mail List/SL-Devel already exists in your inbox.
    • Check that the script correctly modifies the subject of emails to add or adjust the prefix if necessary.


    Link to this FAQ:
    Has this FAQ been helpful?
    Thank you for your feedback. Improve this FAQ?
    Please do not ask any questions through this form, it is only used to improve our FAQ.
    Please use our contact form for any question.
    Your message has been sent. Thank you for suggesting an improvement to this FAQ.
    Display all FAQs for this product
    logo infomaniak
    Prices do not include VAT
    facebook
    twitter
    linkedin
    instagram

    Infomaniak

    About Infomaniak The team Infomaniak is recruiting Press space Infomaniak blog All certificates Products and offers Clients' opinions

    Support

    Assistance 7/7 FAQ and guides Premium Support Sales contact API REST Report abuse WHOIS Public Cloud status Service status

    Partnerships

    Become a reseller Affiliate programme Directory of partners Requests for quotes Infomaniak Academy

    Ecology

    Green hosting Certificates & awards

    Follow our development

    The email entered is invalid
    earth icon
    • EN
      • EN
      • DE
      • ES
      • FR
      • IT
    ©2026 Infomaniak - Legal documents - Legal notice - Data Protection - Privacy Policy - Site map - Manage your cookies
    bcorp-logo
    icann-logo
    swiss
    new-iso
    swiss-hosting
    logo infomaniak
    Prices do not include VAT

    Infomaniak

    About Infomaniak The team Infomaniak is recruiting Press and media Infomaniak blog All certificates Products and offers Clients' opinions

    Support

    Assistance 7/7 FAQ and guides Premium Support offer Sales contact API REST Report abuse WHOIS Public Cloud status Service status

    Partnerships

    Become a reseller Affiliate programme Directory of partners Requests for quotes Infomaniak Academy

    Ecology

    Green hosting Certificates & awards

    Follow our development

    The email entered is invalid
    bcorp-logo
    icann-logo
    swiss
    new-iso
    swiss-hosting

    facebook
    twitter
    linkedin
    instagram
    ©2026 Infomaniak
    Contracts - Legal notice - Data Protection - Privacy Policy - Site map - Manage your cookies

    Managers

    earth icon
    • EN
      • EN
      • DE
      • ES
      • FR
      • IT
    Your browser is outdated, security and browsability are no longer guaranteed. We recommend that you update it as soon as possible by clicking here.