onsdag 22 februari 2012 01:32:56 skrev Timo Sirainen: > On 21.2.2012, at 14.56, Dag Nygren wrote: > > Just migrated out UW-IMAP installation to Dovecot and so far so good. > > > > Had small teething problems though which left me with one question. > > > > The scenario was that I have a set of public folders that are only > > needed by the main company group (gid = company). Then there are some > > external users as well, not directly in the company group. > > So this is in a public namespace?
Yep, it was. The definition: namespace { type = public separator = / prefix = MailingLists/ location = mdbox:/usr/local/var/mail/MailingLists inbox = no subscriptions = no # v1.1+ } > > I set up the public mailbox with permissions 660, owner me and group > > "company". That is the externals didn't have access to the mail folder. > > > > At this point all looked fine, but later there was an email to an > > external person and this was passed on to deliver by procmail. Procmail > > logs says all was OK, but there is an entry about the public folder not > > accessible in the Dovecot log. The email is nowhere to be found. > > Exact error message would be helpful. Was the error from deliver, or > imap/pop3? If it was from deliver, it probably returned temporary failure. The log parts with final names and groups changed.. Deliver error: Feb 21 10:02:24 dag dovecot: lda(extuser): Error: user extuser: Initialization failed: Namespace 'MailingLists/': stat(/usr/local/var/mail/MailingLists/mailboxes) failed: Permission denied (euid=2002(extuser) egid=2002(extgroup) missing +x perm: /usr/local/var/mail/MailingLists, euid is not dir owner) Feb 21 10:02:24 dag dovecot: lda(extuser): Fatal: Invalid user settings. Refer to server log for more information. Procmail log: >From mailing-1341698764...@mailpv.net Tue Feb 21 10:02:24 2012 Subject: =?CP1250?Q?P=E4=E4si=E4issuunnitelmat?= Folder: deliver -d extuser -m inbox 56979 > > Where is the delivered email? > > Have you checked what happens if deliver tempfails (e.g. make procmail call > tempfail.sh script that just exits with 75), does procmail also correctly > tempfail and tell MTA to retry the delivery later? No, haven't done that. yet. And I don't think it will pass on the failure code. Procmail settings are all from the HOWTO:s though. The .forward file looks like this: "|IFS=' ' && exec /usr/bin/procmail -f- || exit 75 #extuser" And the applicable rule in .procmailrc: :0 w { :0 | $DELIVERYAGENT -d $LOGNAME -m inbox } Have to point out that this case wasn't important, but I wouldn't like the system to loose an important mail later.