Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to unify IMAP folders between different mail clients and automatically create them?

 
client sidedovecotemailemail securityimap

Question

How to unify IMAP folders between different mail clients and automatically create them?

For example, how to alias "Sent" folder used by Outlook with "Sent Messages" used by Apple Mail.app, so both mail clients will have the same content?

Answer

One of two workarounds might be implemented to enable this behavior:

  • Workaround I:
    Change settings on mail client-side: set deleted messages to be stored only in Trash and sent messages to be stored only in Sent.
    For more information, refer to the documentation of the mail client used.

  • Workaround II:

    Warning: This workaround is not officially supported. All changes, committed to the configuration might be overwritten by future Plesk updates, upgrades, or repairs.

    Modify IMAP server configuration to enable SPECIAL-USE RFC 6154 tags:

    1. Connect to the server via SSH

    2. Create and open /etc/dovecot/conf.d/30-plesk-specialuse.conf file using a text editor:

      # vi /etc/dovecot/conf.d/30-plesk-specialuse.conf

    3. Add the namespace inbox block to include mailboxes (folders) with special_use tags:

      namespace inbox {
      separator = .
      prefix = INBOX.
      inbox = yes
      mailbox Sent {
      auto = subscribe
      special_use = Sent
      }
      mailbox "Sent Messages" {
      auto = no
      special_use = Sent
      }
      mailbox Spam {
      auto = create
      special_use = Junk
      }
      }

      Here, folder Sent Messages will be aliased to the folder Sent, and folders Sent and Spam will be created automatically.

      Note: This feature is available in Dovecot 2.1 and newer and is not provided by Courier-IMAP.
      For more detailed information refer to the official Dovecot Wiki.

    4. If Plesk Email Security is installed, create the file /etc/dovecot/conf.d/custom_sieve/move_spam.sieve with the following content:

      require ["fileinto","mailbox"];
      if allof (header :contains "X-SPAM-Flag" "Yes")
      {
      fileinto :create "Spam";
      stop;
      }

    5. Create the file /etc/dovecot/conf.d/99-move_spam.conf with the following content

      plugin {
      sieve_after = /etc/dovecot/conf.d/custom_sieve/move_spam.sieve
      }

    6. Reload Dovecot IMAP server to apply new configuration:

      # service dovecot reload

Note: Newly created folders will not replace the specific existing ones made via the mail client by default like Sent folder for example.

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Setting Up and Configuring a Linux Mail Server

Read More »

Advanced Techniques for Building an Email List

Read More »

How Modern Secure and Self-Hosted Messaging has Become a Cornerstone for Teams Worldwide

Read More »
Knowledge Base

Email header analysis reports SPF failed for localhost IP on mail sent from Plesk hosted mailbox: SPF Authentication : SPF Failed for IP – 127.0.0.1

Read More »

Unable to send mail from Plesk server: deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

Read More »

Mail delivery does not work: do not list domain in BOTH mydestination and virtual_mailbox_domains

Read More »

Can’t access mail: Warning: Inotify instance limit for user exceeded

Read More »

Hosting Wiki

  • RESTful Web Service
  • Content Security Policy ( CSP )
  • CLI
  • Server Redundancy
  • Cloud Service Architecture
  • Virtualizor
  • QMAIL
  • Dovecot
  • Sendmail
  • On-Demand Services
  • Bare Metal Server
  • Denial of Service
  • Red Hat Virtualization
  • Virtuozzo
  • Oracle VM Server
  • Citrix Hypervisor
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Virtualization
  • VirtualMin
  • Plesk
  • Web Server
  • DNS Server
  • SSH
  • Email Autoresponder
  • Mailing Lists
  • Email Alias
  • Email Virus Protection
  • Email Forwarding
  • Webmail
  • SpamAssassin
  • SPAM filter
  • SPAM
  • IMAP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family