On Fri, Oct 16, 2009 at 06:43:33PM +0200, Bartosz Fenski aka fEnIo wrote:

> I asked for help on #dovecot but one suggestion I got was setting sieve
> variable explicitly but unfortunatelly that didn't help.
> 
> I'm trying to set up sieve to be able to use vacation module.
> So in the lda section I put:
> 
> mail_plugins = sieve
> 
> And in plugins section:
> 
> sieve = ~/.dovecot.sieve
> 
> Then I put .dovecot.sieve file in the user's directory.
> 
> This is what I get in Dovecot's log when trying to deliver to that mailbox:
> 
> 2009-10-16 18:37:52 deliver(t...@domain.pl): Error: sieve: stat((null)) 
> failed: Bad address (using global script path in stead)
> 2009-10-16 18:37:52 deliver(t...@domain.pl): Info: 
> msgid=<20091016163757.gk19...@asdy.pl>: saved mail to INBOX

With a help from Pascal Volk (Faxe) on IRC I've finally set it up.

Basically I probably didn't understand what exacly Dovecot expects to get 
from database and I had wrong settings for mail_locations stuff.

Right now it is:

mail_location = maildir:~/Maildir

And SQL query looks this like:

user_query = \
   SELECT '/home/vmail/' || maildir as home, 5000 AS uid, 5000 AS gid \
   FROM mailbox WHERE local_part = '%n' AND active = 't'

I also had to change the way Postfix talks to Dovecot:

# Dovecot LDA
dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d 
${user}

There was -d ${recipient} before.

My configuration looks pretty strange but I end up with it cause my client
wanted to have accounts in one domain, and rest of domains have to be only
aliases to that main domain.
Additionaly they wanted to authorize only using user part of login (without
@domain). So I end up with such config.

Thanks for attention and once again many thanks to Pascal for help.

regards
fEnIo

-- 
  ,''`.  Bartosz Fenski | mailto:fe...@debian.org | pgp:0x13fefc40 | irc:fEnIo
 : :' :       32-050 Skawina - Glowackiego 3/15 - malopolskie v. - Poland
 `. `'           phone:+48602383548 | proud Debian maintainer and user
   `-            http://fenski.pl | xmpp:fe...@jabber.org | rlu:172001

Attachment: signature.asc
Description: Digital signature

Reply via email to