[Dovecot] namespace delivery question

Laszlo Kiraly l.kiraly at madalbal.hu
Sat Jun 29 22:16:04 EEST 2013


Okay,

I have this in the config:

---
namespace {
        type = public
        prefix = public/
        separator = /
        location = sdbox:/home/vmail/public/%u
        subscriptions = no
}
---

And "sieve_before = /home/vmail/sieve/"

My sieve script here:

---
require "fileinto";

if address :is ["To","CC"] "info at domain.com"
{
        fileinto "public/info";
}
---

I compiled it with sievec. If I send mail to info at domain.com I get " failed to 
store into mailbox 'public/info': Mailbox doesn't exist: info", and dovecot 
stores the mail in the private namespace.

I have

---
userdb {
driver = static
args = uid=1035 gid=8 home=/home/vmail/%Ln allow_all_users=yes
}
---

where allow_all_users=yes theoretically makes mailboxes automatically.

I tried to create this mailbox manually but "doveadm mailbox create 
public/info" makes mailbox under /home/vmail/public/root/mailboxes/info/ which 
isn't, what I want.

What can I do?

My log:

---
Jun 29 20:54:26 test dovecot: lmtp(15045): Debug: Module loaded: 
/usr/lib/dovecot/modules/lib90_sieve_plugin.so
Jun 29 20:54:26 test dovecot: lmtp(15045): Debug: auth input: info uid=1035 
gid=8 home=/home/vmail/info
Jun 29 20:54:26 test dovecot: lmtp(15045): Debug: changed username to info
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: Effective uid=1035, 
gid=8, home=/home/vmail/info
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: Namespace inbox: 
type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, 
subscriptions=yes location=sdbox:
/home/vmail/info
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: fs: 
root=/home/vmail/info, index=, control=, inbox=, alt=
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: Namespace : 
/home/vmail/info doesn't exist yet, using default permissions
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: Namespace : Using 
permissions from /home/vmail/info: mode=0700 gid=-1
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: Namespace : 
type=public, prefix=public/, sep=/, inbox=no, hidden=no, list=yes, 
subscriptions=no location=sdbox:/
home/vmail/public/info
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: fs: 
root=/home/vmail/public/info, index=, control=, inbox=, alt=
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: Namespace public/: 
/home/vmail/public/info doesn't exist yet, using default permissions
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: Namespace public/: 
Using permissions from /home/vmail/public/info: mode=0700 gid=-1
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: sieve: include: 
sieve_global_dir is not set; it is currently not possible to include `:global' 
scripts.
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: 
kQGGCmItz1HFOgAAaS8hrw: sieve: script file /home/vmail/info/.dovecot.sieve not 
found
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: 
kQGGCmItz1HFOgAAaS8hrw: sieve: user's script /home/vmail/info/.dovecot.sieve 
doesn't exist (using default script
 location instead)
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: 
kQGGCmItz1HFOgAAaS8hrw: sieve: no default script configured for user
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: 
kQGGCmItz1HFOgAAaS8hrw: sieve: user has no valid location for a personal 
script
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: 
kQGGCmItz1HFOgAAaS8hrw: sieve: executed before user's personal Sieve 
script(1): /home/vmail/sieve/global.sieve
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: 
kQGGCmItz1HFOgAAaS8hrw: sieve: opening script /home/vmail/sieve/global.sieve
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: 
kQGGCmItz1HFOgAAaS8hrw: sieve: script binary /home/vmail/sieve/global.svbin 
successfully loaded
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: 
kQGGCmItz1HFOgAAaS8hrw: sieve: binary save: not saving binary 
/home/vmail/sieve/global.svbin, because it is alre
ady stored
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: 
kQGGCmItz1HFOgAAaS8hrw: sieve: executing script from 
/home/vmail/sieve/global.svbin
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Error: 
kQGGCmItz1HFOgAAaS8hrw: sieve: msgid=<E1Ut0Hy-0003uZ-4c at test.madalbal.hu>: 
failed to store into mailbox 'public/info': Mailbox doesn't exist: info
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: Namespace : 
/home/vmail/info/mailboxes/INBOX doesn't exist yet, using default permissions
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Debug: Namespace : Using 
permissions from /home/vmail/info: mode=0700 gid=-1
Jun 29 20:54:26 test dovecot: lmtp(15045, info): kQGGCmItz1HFOgAAaS8hrw: 
sieve: msgid=<E1Ut0Hy-0003uZ-4c at test.madalbal.hu>: stored mail into mailbox 
'INBOX'
Jun 29 20:54:26 test dovecot: lmtp(15045, info): Error: 
kQGGCmItz1HFOgAAaS8hrw: sieve: execution of script 
/home/vmail/sieve/global.sieve failed, but implicit keep was successful
Jun 29 20:54:26 test dovecot: lmtp(15045): Disconnect from local: Client quit 
(in reset)
---


---------- Original Message -----------
From: Thomas Leuxner <tlx at leuxner.net>
To: dovecot at dovecot.org
Sent: Fri, 28 Jun 2013 15:37:34 +0200
Subject: Re: [Dovecot] namespace delivery question

> * Laszlo Kiraly <l.kiraly at madalbal.hu> 2013.06.27 14:20:
> 
> > I couldn't find solution in the documentation, how can I manage the email 
> > delivery to the public namespace?
> [...]
> > namespace {
> >   location = sdbox:/home/vmail/public/%u
> >   prefix = public.
> >   separator = .
> >   subscriptions = no
> >   type = public
> > }
> 
> You can use sieve for that with LMTP:
> 
> if address :is ["To","CC"] "someone at domain.tld"
>         {
>         fileinto "Public.Mailbox.Folder";
>         }
> 
> I personally use / separators so not 100% the syntax applies to your 
> scenario.
> 
> Thomas
------- End of Original Message -------


More information about the dovecot mailing list