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 Tools 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 Sort incoming emails according to rules (Sieve filters)

    Sort incoming emails according to rules (Sieve filters)

    This guide explains how to create sorting rules to automatically classify your incoming emails on Infomaniak according to certain conditions.

     

    Preamble

    • These rules allow the following automatic actions:
      • Delete or move messages from email addresses you no longer want to see.
      • Forward to your spouse emails from an email address so that both of you can receive them.
      • Copy messages that contain a specific keyword to a folder.
      • etc.
    • 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.
    • You can make a template for all the addresses of your Mail Service.
    • If you use an email software/client configured in POP, in parallel with Mail, messages classified in folders will no longer be downloaded by your application because the POP protocol only retrieves messages that are in your main inbox. To view classified messages, it will be necessary to use the IMAP protocol or only Infomaniak Mail.

     

    Access the rules from the Infomaniak Web Mail app

    Prerequisites

    • Have a paid email offer (free offers are limited to Standard mode without the possibility of creating a filter to forward an email to another email address, for example).
    • Have permission to manage rules: if you had been invited to the Infomaniak Web Mail app (online service ksuite.infomaniak.com/mail) to manage your address, it is possible that the Mail Service manager has revoked this right from their admin account.

    To access the sorting filters for your Infomaniak mail:

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

     

    Define a rule based on a received email

    You can also create a rule directly from the received email:

    1. Click here to access the Infomaniak Web Mail app (online service ksuite.infomaniak.com/mail).
    2. Open the message from the sender in question.
    3. Click on the action menu â‹® at the top right of the open message.
    4. Choose Create a rule to open the creation assistant which will be pre-filled with the elements of the message:

     

    Access rules from the Mail Service

    To access the sorting filters for your Infomaniak mail:

    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 in question.
    3. Click on the email address concerned in the table that appears.
    4. Click on the tab Filters and rules from the left sidebar:

     

    Configure filters & sorting rules

    Create a new rule in Standard mode

    • Click on the button Add a rule in Standard mode to create a new rule using an assistant/creation form:
    • The different conditions available for sorting filters are presented in this other guide.
    • Once a filter is created, click on Continue to activate it.

     

    Add or modify a rule in Standard mode

    If there are already sorting filters, the button to add more is at the top right of the table:

    These settings can be modified when you want by clicking on the pencil ✎ icon located to the right of the item in question.

     

    Create a new rule in Advanced (expert) mode

    If you don't know what you're doing, it is recommended to stay in Standard mode so as not to disrupt the sorting filters of your account ⚠️ No support is provided regarding the Sieve language (refer to this documentation — also discover the role of the host).

    • The advanced mode allows you to configure sorting rules directly from a script in Sieve language.
    • It is possible to import Sieve files via the button.
    • By enabling this mode, existing rules will be preserved but deactivated.

     

    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.

    Warning:

    • 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 that 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 file messages in 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. Add 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. Message classification :
      1. fileinto "Mail List/SL-Devel"; : files messages into the "Mail List/SL-Devel" folder.

    Warning:

    • Make sure the folder "Mail List/SL-Devel" already exists in your inbox.
    • Check that the script correctly modifies the email subject 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
    ©2025 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
    ©2025 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.