Postfix Filters and header_checks

Dennis devel at muhlesteins.com
Mon Aug 15 14:59:54 MDT 2005


Jonathan Ellis wrote:

>On Mon, 15 Aug 2005 14:21:53 -0600, "Dennis" <devel at muhlesteins.com>
>said:
>  
>
>>Jonathan Ellis wrote:
>>
>>    
>>
>>>On Mon, 15 Aug 2005 13:57:23 -0600, "Dennis" <devel at muhlesteins.com>
>>>said:
>>>      
>>>
>>>>All the documentation I find for the header_checks just says foo:bar
>>>>where I put ??:??.  I just want to execute a script with the mail as the
>>>>input and then have the mail delivered unaltered.  So what is foo:bar
>>>>supposed to really be?  The docs/man pages say it's
>>>>transport:destination but I'm having trouble figuring out how to make
>>>>transport:destination into path/args for my script.
>>>>   
>>>>
>>>>        
>>>>
>>>http://www.postfix.org/FILTER_README.html gives an example.
>>> 
>>>
>>>      
>>>
>>Already been there.  The filter there is executed each time a mail
>>arrives.  I want the filter to be executed only when the header check
>>passes.  The examples for the header/body_checks just say foo:bar where
>>I need to add something to execute the script though.  I've only found
>>examples in header/body_checks for using REJECT, which I can get to work
>>just fine.  But I don't want to use the REJECT action, I want to use
>>FILTER but don't know what to replace foo:bar with.
>>    
>>
>
>The same things you can set up for content_filter.  In the readme they
>demonstrate setting up a service called scan.
>  
>
Won't the filter then apply to all the emails though?  I just want to
execute it if I match a header.  Hence the header_checks question. 
Also, scan starts another smtp on 10025 (in the example).  I'd much
rather use the filter example:

filter    unix  -       n       n       -       10      pipe
    flags=Rq user=filter argv=/path/to/script -f ${sender} -- ${recipient}

I just don't know what to put in the header_checks file to get that script to execute.  

>-Jonathan
>.-----------------------------------.
>| This has been a P.L.U.G. mailing. |
>|      Don't Fear the Penguin.      |
>|  IRC: #utah at irc.freenode.net   |
>`-----------------------------------'
>  
>




More information about the PLUG mailing list