User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
email:configure-dovecot [2026/01/15 16:08] willyemail:configure-dovecot [2026/01/22 17:58] (current) – [Setup Sieve] willy
Line 74: Line 74:
  
 Sieve let's you create custom filters that will filter your inbound emails. Sieve let's you create custom filters that will filter your inbound emails.
- 
-Changes in **conf.d/20-lmtp.conf**: 
-<code> 
-protocol lmtp { 
-  mail_plugins = $mail_plugins sieve 
-} 
-</code> 
- 
-And specify which folder should store the filters. 
  
 Changes in **conf.d/90-sieve.conf**: Changes in **conf.d/90-sieve.conf**:
Line 90: Line 81:
 } }
 </code> </code>
 +
 +And enable sieve for lmtp (local delivery), edit **conf.d/20-lmtp.conf**:
 +<code>
 +protocol lmtp {
 +    mail_plugins {
 +    sieve = yes
 +  }
 +</code>
 +
  
 ===== Setup authentication ===== ===== Setup authentication =====
Line 118: Line 118:
 ssl = yes ssl = yes
 ssl_server { ssl_server {
-  cert_file = /etc/letsencrypt/live/casa.gardiol.org/fullchain.pem +  cert_file = /etc/dovecot/fullchain.pem 
-  key_file = /etc/letsencrypt/live/casa.gardiol.org/privkey.pem+  key_file = /etc/dovecot/privkey.pem
 } }
 </code> </code>
  
 +For this to work, you need to ensure that the certs are properly moved after being renewed by Let's Encrypt. I use the following post hook in **/etc/letsencrypt/renewal-hooks/post/dovecot.sh**:
 +<file - dovecot.sh>
 +cp /etc/letsencrypt/live/[cert path]/privkey.pem /etc/dovecot/privkey.pem
 +cp /etc/letsencrypt/live/[cert path]/fullchain.pem /etc/dovecot/fullchain.pem
 +chmod o+r /etc/dovecot/privkey.pem /etc/dovecot/fullchain.pem
 +/etc/init.d/dovecot restart
 +</file>
  
 +the chmod is required for command line tools using **doveadm**, like PostfixAdmin.
  
 ===== Testing ===== ===== Testing =====