Discussion:
Exim forwarding using .forward files and Dovecot
FreeStyleGames
2007-02-16 15:34:59 UTC
Permalink
Hello I am having some trouble with my exim .forward file. I want to be
able to filter incoming messages into a certain folder based on their
subject. This seems simple enough and works provided that that the
folder in my inbox already exists, however I want the folders to be
automatically created for me.


My .forward file is shown below when the message arrives it creates the
folder /$home///Maildir/.INBOX.test/ /without any trouble but it is not
however recognised by my IMAP client (Thunderbird).

I think this may be because the server uses dovecot and all the other
IMAP folders have the following files in

dovecot-uidlist dovecot.index dovecot.index.cache dovecot.index.log

When exim creates a new folder these files aren't created and so maybe
dovecot doesn't think they are valid IMAP folders.

Any ideas?

------------------------------------------------------------------------
# Exim filter

if $header_subject: contains "empire" then
save Maildir/.INBOX.test/
endif

------------------------------------------------------------------------
/

Some relevant sections of exim.conf/
------------------------------------------------------------------------
userforward:
driver = redirect
check_local_user
file = $home/.forward
no_verify
no_expn
check_ancestor
allow_filter
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
directory_transport = address_directory

address_directory:
driver = appendfile
create_directory
maildir_format
delivery_date_add
envelope_to_add
return_path_add
------------------------------------------------------------------------
--
## List details at http://www.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/
Wouter Verhelst
2007-02-16 17:52:31 UTC
Permalink
Post by FreeStyleGames
Hello I am having some trouble with my exim .forward file. I want to be
able to filter incoming messages into a certain folder based on their
subject. This seems simple enough and works provided that that the
folder in my inbox already exists, however I want the folders to be
automatically created for me.
My .forward file is shown below when the message arrives it creates the
folder /$home///Maildir/.INBOX.test/ /without any trouble but it is not
however recognised by my IMAP client (Thunderbird).
I think this may be because the server uses dovecot and all the other
IMAP folders have the following files in
dovecot-uidlist dovecot.index dovecot.index.cache dovecot.index.log
When exim creates a new folder these files aren't created and so maybe
dovecot doesn't think they are valid IMAP folders.
Any ideas?
This is really not an exim question, but has everything to do with IMAP
and your mail client. Just hit "refresh folders" in your mail client
through whatever interface it has for that, and you'll see them
magically appear.

You may also have some success by subscribing your users upon creation
of a new mail folder, but that depends on whether your mail client uses
the IMAP subscription feature. In the case of dovecot, subscription is
done by a Maildir/subscriptions file.
--
<Lo-lan-do> Home is where you have to wash the dishes.
-- #debian-devel, Freenode, 2004-09-22
--
## List details at http://www.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/
Loading...