[Dovecot] How do I use plus-addressing in Dovecot 1.1.x?
I'm using Postfix, Amavisd-new/SpamAssassin, and Dovecot. They all run
on the same server (running Linux). The mailboxes are stored on the
same server in maildir format.
The logical path for incoming messages (as I understand it) is:
- received by Postfix; handed off to Amavisd-new
- Amavisd-new checks to see whether or not it's spam/undesirable;
hands off to Dovecot deliver - Dovecot deliver delivers the message to the local mailbox
Under each of my user's mailbox is a submailbox called "spam". Just so
I don't confuse terminologies (I'm no IMAP/maildir expert), for
example, we have someone@domain.com. My configured mail_location is
"maildir:/srv/mail/%d/%n", so this person's mailbox is located here: /
srv/mail/domain.com/someone/ Within this directory is another
mailbox: /srv/mail/domain.com/someone/.spam/
The plan is to have Dovecot deliver send a message (which has been
labeled by Amavisd-new as spam) directly to the ".spam" submailbox,
instead of the INBOX (/srv/mail/domain.com/someone/). With Dovecot
1.0.x, I used "plus addressing". Amavisd-new was configured so that,
if a message was found to be spam, it delivered the message to Dovecot
deliver, but changed the delivery address. Now, instead of "someone@domain.com
", it was "someone+spam@domain.com". Dovecot deliver took this message
and delivered it correctly to the ".spam" submailbox (/srv/mail/
domain.com/someone/.spam/). Just to emphasize, this process does work
(using Dovecot 1.0.x).
With Dovecot 1.1.0, this process is broken. Now, spam messages are
delivered to the INBOX instead, and, when checking the dovecot-
deliver.log, I'm seeing "save failed to spam: Unknown namespace".
As best as I can tell, the answer seems to lie in "namespaces" as a
feature added in Dovecot 1.1.0. The problem is that I don't understand
how I could use them to resolve this situation. I've read the
documentation. I've looked at as many example configurations as I
could find.
Please help. I want to get this working again. I'm sure it's something
very straight-forward, but I don't understand. How must I change my
Dovecot 1.1.x configuration so that my "plus addressing" set up
(detailed above) will work again?
Or is there a better way?
Thanks so much for your help, and thanks for a great product!
- Jon
On 11/2/2008 3:33 PM, Jon Fullmer wrote:
How must I change my Dovecot 1.1.x configuration so that my "plus addressing" set up (detailed above) will work again?
So, maybe it would be a good idea to actually provide some config details? ;)
output of dovecot -n would a goo starting place...
--
Best regards,
Charles
I didn't want to inundate the list with too much data. Here's the
output of "dovecot -n". Because I'm paranoid, some parts are
obfuscated with capital Xs:
1.1.6: /etc/dovecot/dovecot.conf
OS: Linux 2.6.27.4 ppc ext3
protocols: imaps ssl_cert_file: XXXXXXXXXXXXXX ssl_key_file: XXXXXXXXXXXXXX disable_plaintext_auth: no login_dir: /usr/var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_location: maildir:/srv/mail/%d/%n namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes auth default: mechanisms: plain login user: XXXXXX passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: static args: uid=XXXXXX gid=XXXXX home=/srv/mail/%d/%n allow_all_users=yes socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: XXXXX group: XXXXXX master: path: /var/run/dovecot/auth-master mode: 384 user: XXXXX
Is there anything else that would be helpful?
- Jon
On Nov 3, 2008, at 5:48 AM, Charles Marcus wrote:
Jon Fullmer wrote:
you can use something like this (in master.cf):
dovecot unix - n n - - pipe flags=DRhu user=_mailbox argv=/path/to/dovecot/deliver -d ${user}@${nexthop} -n -m ${extension}
(-n prevents dovecot from creating the folder if it doesn't exist. otherwise, strangers can create random folders in your mailbox!).
Alternatively, you can use sieve:
require "fileinto";
if header :contains "X-Spam-Flag" "YES" { fileinto "Junk"; stop; }
#if header :contains "X-Amavis-Alert" "BANNED" {
fileinto "Junk";
stop;
#}
#if header :contains "X-Spam-Status" "BOUNCE_MESSAGE" {
fileinto "Junk.Bounce";
stop;
#}
This is the line from my master.cf:
dovecot unix - n n - - pipe flags=DRhu user=XXXXXX:XXXXXX argv=/usr/lib/dovecot/deliver -f $ {sender} -d ${user}@${nexthop} -n -m ${extension}
I'm not having a problem with a new mailbox being created (say,
"someone+spam"). It would seem that deliver isn't separating the
"someone+spam", or else is doing it in a way that is different from
the way it used to.
If I have to use sieve, I can I guess, but why was this feature
damaged? This did work in 1.0.15. I haven't changed the config with
the upgrade to 1.1.6.
- Jon
On Nov 4, 2008, at 2:46 AM, mouss wrote:
participants (5)
-
Charles Marcus
-
Jon Fullmer
-
justin@ma3x.net
-
mouss
-
Timo Sirainen