[Exim] filters and tmail

Top Pagina
Delete this message
Reply to this message
Auteur: Lee Shakespeare
Datum:  
Aan: exim-users
Onderwerp: [Exim] filters and tmail
Hi Folks.

I'm trying to use use filters and tmail to deliver to UW IMAP mbx
subfolders. I think that the correct way to do this is use the save
command in the filter and use $address_file variable in the address_file
transport as thus :

address_file:
driver = pipe
command = "/usr/bin/tmail -D ${local_part}+${address_file}"
user = $local_part
group = mail

My problem is that exim appears to set $address_file to be the full path
of the mailbox, when only the relative path is set in the filter. This
is reasonable I suppose, because under normal circumstances exim would
be performing the deliver itself. However, tmail (and dmail) don't like
full paths and on seeing the leading / opts to deliver the message to
INBOX instead.

Trimmed exim -d10 output

userforward director: file = .forward
set uid=0 gid=81 euid=530 egid=100
successful stat of /home/lee/.
93 bytes read from /home/lee/.forward
file is a filter file
Filter: start of processing
Condition is true: $header_from: contains lee@???
Filter: save message to: mail/lee
Filter: at end "delivered" is true
Filter: end of processing

[snip]

address_file transport entered
direct command:
argv[0] = /usr/bin/tmail
argv[1] = -D
argv[2] = ${local_part}+${address_file}
direct command after expansion:
argv[0] = /usr/bin/tmail
argv[1] = -D
argv[2] = lee+/home/lee/mail/lee
Writing message to pipe

[snip]

So.... Is there a way of loosing the absolute path information in
$address_file? Or can I pass the folder information back from the
filter to the address_file transport another way? Or am I completely on
the wrong track! :)

Thanks.
Lee.

--
------------------------------------------------------------
Lee Shakespeare : TWF Internet Limited : lee@???

Don't mind me, pulling my hair out because of the squandered 
potential of the web is a hobby of mine.    [Jamie Zawinski]