# Sieve rules for Vacation Email Replies

**URL:** https://meta.discourse.org/t/sieve-rules-for-vacation-email-replies/43987
**Category:** Sysadmins
**Tags:** reference
**Created:** [May 10, 2016, 11:59am UTC](https://meta.discourse.org/t/sieve-rules-for-vacation-email-replies/43987 "2016-05-10T11:59:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![carlokok](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/carlokok/32/115951_2.png) [@carlokok](https://meta.discourse.org/u/carlokok)
#### Post date: [May 10, 2016, 11:59am UTC](https://meta.discourse.org/t/sieve-rules-for-vacation-email-replies/43987/1 "2016-05-10T11:59:37Z")

</div>

I’ve started collecting custom sieve rules for imap for all the vacation email replies we get, here’s my script if anyone is interested:

```plaintext
require ["copy","fileinto"];
# rule:[sa]
if header :contains "x-spam-level" " *****"
{
	fileinto "myspam";
	stop;
}
# rule:[postmastercrap]
if anyof (header :contains "from" "MAILER-DAEMON@", header :contains "from" "postmaster@")
{
	fileinto "pmcrap";
	stop;
}
# rule:[vacation]
if anyof (header :contains "x-qq-holidayreply" "true", 
	header :contains "subject" "Automatic reply", 
	header :contains "subject" "Automatische Antwort", 
	header :contains "subject" "Vacation reply", 
	header :contains "subject" "Réponse automatique", 
	header :contains "subject" "Automatisch antwoord", 
	header :contains "subject" "自动回复", 
	header :contains "subject" "Delivery Failure", 
	header :contains "subject" "Holiday Re", 
	header :contains "subject" "Out of Office", 
	header :contains "subject" "Abwesenheitsnachricht", 
	header :contains "subject" "Respuesta automática", 
	header :contains "subject" "Autosvar:", 
	header :contains "X-MDAutoResponse" "1",
	header :contains "subject" "Abwesenheitsnachricht:")
{
	fileinto "pmcrap";
	stop;
}

```
