I am trying to write a recipe that rejects emails that has attachments that are not either pdf or tiff.  I found this <br><pre>if header :contains &quot;x-attached&quot;<br>  [&quot;.exe&quot;,&quot;.bat&quot;,&quot;.js&quot;,&quot;.com&quot;,&quot;.cmd&quot;,&quot;.ini&quot;,&quot;.dll&quot;,&quot;.bas&quot;,&quot;.cpl&quot;,&quot;.drv&quot;,&quot;.inf&quot;,&quot;.sys&quot;,&quot;.pif&quot;] {<br>
  discard;<br>  stop;<br>}<br><br>in this tutorial <a href="http://wiki.fastmail.fm/index.php?title=SieveRecipes">http://wiki.fastmail.fm/index.php?title=SieveRecipes</a><br></pre><pre><br></pre>
<p>So I tried:</p><p>if header :contains &quot;x-attached&quot;<br> [&quot;.tiff&quot;,&quot;.pdf&quot;] {<br> fileinto &quot;INBOX&quot;;<br> stop;<br>} else {<br> reject &quot;Your message was returned because of the attachment type. Only pdf and tiff format allowed&quot;;<br>
}</p><p>However, it does not work.  The emails get rejected regardless of their attachment type. That is, emails with pdfs and</p><p>tiffs attached get rejected.  What am I doing wrong?  Any help would be greatly appreciated.</p>
<p>Thanks,</p><p>Richard<br></p><p><br></p>