User Tools

Site Tools


doc:appunti:linux:sa:sieve_filtering_tnef

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
Last revisionBoth sides next revision
doc:appunti:linux:sa:sieve_filtering_tnef [2021/05/24 12:48] – [Installing the tnef-filter script] niccolodoc:appunti:linux:sa:sieve_filtering_tnef [2021/05/24 13:01] – [The Sieve filter] niccolo
Line 6: Line 6:
  
 The original TNEF attachment is retained, so **the size of the email is roughly doubled**. The original TNEF attachment is retained, so **the size of the email is roughly doubled**.
 +
 +===== Reference installation =====
 +
 +I'm running a mail server based on **Debian 10 Buster**, the IMAP, POP3 and LDA services are provided by **Dovecot**. The Local Delivery Agent have the **Sieve** filtering enabled. You can read the configuration details in this article: **[[postfix_spamassassin_clamav_dovecot#sieve_filtering|Sieve filtering with Dovecot]]**.
  
 ===== Installing the tnef-filter script ===== ===== Installing the tnef-filter script =====
Line 20: Line 24:
  
 ===== The Sieve filter ===== ===== The Sieve filter =====
 +
 +In my installation, each user have a file called **$HOME/sieve_before.d/personal.sieve**, this is a file where I put antispam and antivirus filters, that the user is not allowed to customize. Feel free to add the Sieve filter rule in whichever file suits your needs.
  
 <code> <code>
Line 35: Line 41:
 </code> </code>
  
-You need to include the **mime** and **foreverypart** plugins.+Notice that you need to include the **mime** and **foreverypart** plugins.
  
-I created the shell script **tnef-filter.sh** into the **/usr/local/lib/dovecot/sieve-filter/** directry, because that directory is the one declared to contains Sieve filters. You can set that location into **/etc/dovecot/conf.d/90-sieve-extprograms.conf**:+I created the shell script **tnef-filter.sh** into the **/usr/local/lib/dovecot/sieve-filter/** directry, it is a simple one-line command: 
 + 
 +<code bash> 
 +#!/bin/sh 
 +/usr/local/bin/tnef-filter 
 +</code> 
 + 
 +The directory is the one declared to contains Sieve filters. You can set that location into **/etc/dovecot/conf.d/90-sieve-extprograms.conf**:
  
 <file> <file>
Line 44: Line 57:
 } }
 </file> </file>
 +
  
doc/appunti/linux/sa/sieve_filtering_tnef.txt · Last modified: 2021/05/24 13:03 by niccolo