Re: Mailbox does not exist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bart,
On 30.08.2006, at 10:43, Bart Van Loon wrote:

On Tue, 2006-08-29 at 21:25 +0200, former03 | Baltasar Cevc wrote:
Hi Bart,

user.bbbart.Lists.gphoto.devel (\HasNoChildren)

[...]
alex # echo "" | /usr/local/cyrus/bin/deliver -m
user.bbbart.Lists.gphoto.devel
+user.bbbart.Lists.gphoto.devel: Mailbox does not exist
alex # logout
bbbart@alex ~ $ echo "" | /usr/local/cyrus/bin/deliver -m
Lists.gphoto.devel
+Lists.gphoto.devel: Mailbox does not exist

course, when I specify the user bbbart at the end of the deliver
statement, the empty mail gets delivered in my INBOX, but this is not
what I want.

I don't know wheter I understood what you want - the question I got
was: how can I make cyrus deliver use the mailbox subhierarchy of the
currently logged in user?

yes, exactly. so my mail is fetched by fetchmail, whcih calls upon
procmail, which in his turn, calls upon /usr/local/cyrus/bin/deliver.
all this happens as the user for which the mail is being processed. in
this example. that would be 'bbbart'.

from the man-page I get the following:

"""
-m mailbox
   Deliver to mailbox.  If any userids are specified, attempts to
deliver to user.userid.mailbox for each userid. If the ACL on any such
mailbox does not grant the sender the "p" right or if -m is not
specified, then delivers to the INBOX for the userid, regardless of the
ACL on the INBOX.
   If no userids are specified, attempts to deliver to mailbox.  If the
ACL on mailbox does not grant the sender the "p" right, the delivery
fails.
"""

so I expect that

$ /usr/local/cyrus/bin/deliver -m Lists.gphoto.devel bbbart

would try to drop the mail into user.bbbart.Lists.gphoto.devel (if it is
allowed) and fallback on user.bbbart

seen from the perspective of the user bbbart, that would be delivery in
INBOX.Lists.gphoto.devel with fallback on INBOX.

isn't this interpretation correct?

my goal is to write procmail recipes that sort my mail by passing it
to /usr/local/cyrus/bin/deliver with the correct -m parameter.

Actually, that's how I think it should work - I'm not sure, though, as
I never used deliver...

Maybe it's a permission problem - try (but remove it later), to grant
"p" rights to the folder to anybody.
 cyradm> sam user.bbbart.Lists.gphoto.devel anyone p

If it works with that you'd have to play with authentication or use preauth
as a user listen in lmtp_admins - when doing that always think about the
possibility that anybody can save messages (but nor more) to any folder if
you make deliver runnable by any user and use preauthed connections with
the ACLs set in a way that procmail can write anywhere.

In that case: what you've seen is the expected behaviour. There is no
mailbox named Lists.ghoto.devel; cyrus deliver does not care about what
name the calling user has. The system is ignorant of the system users
by design - it's a black box.

I see. so are you telling me I should try the following?

bbbart@alex ~ $ echo "" | /usr/local/cyrus/bin/deliver -m
user.bbbart.Lists.gphoto.devel
+user.bbbart.Lists.gphoto.devel: Mailbox does not exist
No, I thought that you hadn't specified the user at all - however I was
apparently wrong.

So if you want to work around that, you could either specify the user,
create an alias in the shell or something similar.
However, you may run into permission trouble - as the mailboxes are in
some folder tree that belongs to the cyrus user, you cannot distinguish
the users there - either you allow anybody (including the nobody
account) to deliver mails anywhere or you just deny it to anybody
except the cyrus user or group.

hmmm... say my mailfolder is /var/spool/imap/ and there I have the a
subfolders user/bbbart/ and user/bbbart/Lists/gphoto/devel

you are right about the permissions: only the user cyrus has permission
any permissions on /var/spool/imap/user, but if that is the reason why I
can't deliver directly
into /var/spool/imap/user/bbbart/Lists/gphoto/devel, why is it possible
to deliver into /var/spool/imap/user/bbbart, where my INBOX lives?
That sounds like the permission problem.

Deliver probably talks to the Cyrus lmtpd via pre-authed LMTP on a unix
socket, so permissions to the files are not the problem. You should never care about how cyrus stores its data (except if you run into trouble here), as it's a black box design - never touch any file there manually except if
you really know what you're doing...

maybe I should just rephrase my question:

is it possible -- and if so: how? -- to have cyrus deliver mail into a
folder in the hierarchy underneith a user's INBOX folder or is all mail
bound to arrive in the top INBOX folder and is sorting to be done
afterwards?
It is possible. Alternatively, you can do Sieve filtering.

Baltasar

--
Baltasar Cevc

_____ former 03 gmbh
_____ infanteriestraße 19 haus 6 eg
_____ D-80797 muenchen

_____ http://www.former03.de

----
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux