Bartosz Fenski aka fEnIo
2009-Oct-16 16:43 UTC
[Dovecot] Dovecot can't find users' sieve files
Hello.
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(test at domain.pl): Error: sieve: stat((null))
failed: Bad address (using global script path in stead)
2009-10-16 18:37:52 deliver(test at domain.pl): Info:
msgid=<20091016163757.GK19565 at asdy.pl>: saved mail to INBOX
Some infos about system:
Dovecot 1.2.5
Debian squeeze/testing
x86_64
ext3
(root)~#dovecot -n
# 1.2.5: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.30-1-amd64 x86_64 Debian squeeze/sid ext3
log_path: /var/log/dovecot.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
mail_privileged_group: mail
mail_location: maildir:/home/vmail/%u
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
lda:
postmaster_address: postmaster at domain.pl
mail_plugins: sieve
log_path: /var/log/dovecot-deliver.log
auth_socket_path: /var/run/dovecot/auth-master
auth default:
passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
socket:
type: listen
client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
master:
path: /var/run/dovecot/auth-master
mode: 384
user: vmail
group: vmail
plugin:
sieve: ~/.dovecot.sieve
(root)~#
And dovecot-sql.conf:
driver = pgsql
connect = host=localhost dbname=postfix user=postfix password = xxxxxxxx
password_query = \
SELECT local_part, password \
FROM mailbox WHERE local_part = '%n' AND active = 't'
user_query = \
SELECT maildir, 5000 AS uid, 5000 gid \
FROM mailbox WHERE local_part = '%n' AND active = 't'
Delivering works perfectly but I can't figure out why it's not able to
find that .dovecot.sieve file:
(root at germany)~#ls -al /home/vmail/test at domain.pl/.dovecot.sieve
-rw-r--r-- 1 vmail vmail 314 2009-10-16 13:09 /home/vmail/test at
domain.pl/.dovecot.sieve
(root at germany)~#
Any help would be very appreciated.
regards
fEnIo
--
,''`. Bartosz Fenski | mailto:fenio at 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:fenio at jabber.org | rlu:172001
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20091016/1bf096a7/attachment-0002.bin>
Bartosz Fenski aka fEnIo
2009-Oct-16 17:44 UTC
[Dovecot] Dovecot can't find users' sieve files
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(test at domain.pl): Error: sieve: stat((null)) failed: Bad address (using global script path in stead) > 2009-10-16 18:37:52 deliver(test at domain.pl): Info: msgid=<20091016163757.GK19565 at asdy.pl>: saved mail to INBOXWith 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:fenio at 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:fenio at jabber.org | rlu:172001 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20091016/d76d7395/attachment-0002.bin>