Re: [exim] Exim + filter + mkdir

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: andrey.morskoy
CC: exim-users
Subject: Re: [exim] Exim + filter + mkdir
On 2008-03-16 at 17:55 +0200, andrey.morskoy wrote:
> ACL vars seems to be invisible for filter - them are empty there, but
> thanks for idea.


Strange. I just tested this and it works. Exim 4.69. Did you cover
the non-SMTP case, to let you test this when there's no SMTP
conversation? (Sometime after sending the mail, I realised I should
have raised this oft-overlooked point).

File "foo" as a copy of my exim.conf with the acl_c_month settings
added:
----------------------------8< cut here >8------------------------------
# main section
acl_smtp_connect = acl_connect
acl_not_smtp_start = acl_check_not_smtp_start

# acls section
acl_connect:

  warn    set acl_c_month = ${extract{2}{ }{$tod_bsdinbox}}
  #.... some delay rules here ...
  accept  hosts = *


acl_check_not_smtp_start:
.ifdef DOING_RESUBMIT
warn control = suppress_local_fixups
.endif

  warn    set acl_c_month = ${extract{2}{ }{$tod_bsdinbox}}


accept
----------------------------8< cut here >8------------------------------

% cat -v filter 
save /tmp/foo/$acl_c_month/$reply_address+$tod_log+$message_exim_id
% exim -C foo -bF filter <msg.eml                     
Return-path copied from sender
Sender      = phil@???
Recipient   = phil@???
Testing Exim filter file "filter"


Save message to: /tmp/foo/Mar/Phil Pennock <fred@???>+2008-03-17 01:18:09+1Jb3zN-000OSk-9S
Filtering set up at least one significant delivery or other action.
No other deliveries will occur.
%