Re: [Dovecot] dovecot-2.0-managesieve make fails @ '...libdovecot-login.so: undefined reference to `login_process_preinit''

2009-10-13 Thread Stephan Bosch

PGNet Dev schreef:

building,

dovecot-2.0, HEAD:10054:5cb162da8708
dovecot-2.0-sieve,   1051:1d194d46d6e6

both build fine.

@,

dovecot-2.0-managesieve, 159:2236331aa0a3
cd /usr/local/src/dovecot-2.0-managesieve/

./configure \
--with-dovecot=/usr/local/src/dovecot-2.0 \
--with-dovecot-sieve=/usr/local/src/dovecot-2.0-sieve
make

fails @,
Unfortunately, the Sieve and ManageSieve implementations for v2.0 are 
not yet ready.


Regards,

--
Stephan Bosch
step...@rename-it.nl


Re: [Dovecot] Panic: file sieve-cmu.c: line 262 (part_save): assertion failed: (buf-used - 1 == part-body_size.physical_size)

2009-10-13 Thread Stephan Bosch

Thomas Leuxner schreef:

Am 13.10.2009 um 10:11 schrieb Raffael Schmid:

you can not run into the same problem as the Dovecot 1.2 series has a 
new Sieve implementation rewritten by Stephan Bosch. If there ought to 
be a similar problem it is most likely fixed in a later release (1.2.6 
is current).


Not entirely true. For CMUSieve, Timo used the Sieve compiler from the 
Cyrus project, but that does not implement the actual actions nor the 
acquisition of data for performing tests. This is implemented in the 
'glue' code in sieve-cmu.c.


When I rewrote the Sieve plugin, I discarded all Cyrus code, but I 
incorporated some of Timo's original glue code to implement actions and 
tests with the Dovecot API. The CMUSieve bug stated above is thereby 
propagated into the new Sieve plugin.


I've recently fixed the ':raw' part of the problem:

http://hg.rename-it.nl/dovecot-1.2-sieve/rev/a820e53138b8

The implementation of :content multipart and :content message/rfc822 
 is not working according to the specification yet. After fixing those 
issues, the body extension should work fully, except (as I noticed 
yesterday) for the UTF-8 requirements stated in the RFC.


Regards,

--
Stephan Bosch
step...@rename-it.nl


Re: [Dovecot] Panic: file sieve-cmu.c: line 262 (part_save): assertion failed: (buf-used - 1 == part-body_size.physical_size)

2009-10-13 Thread Thomas Leuxner

Am 13.10.2009 um 10:11 schrieb Raffael Schmid:


Hi everybody

We are running in the same issue as Maciej Polewczynski does in
http://www.dovecot.org/list/dovecot/2008-September/033645.html

Is there already a solution? I dont think so? In the TODO-File for  
1.2.2

this issue is still reported:

[...]
- sieve-cmu.c crash: i_assert(buf-used - 1 ==
part-body_size.physical_size);
[...]



-- snip --

About our system:
# dovecot --version
1.2.2



lda:
 postmaster_address: postmas...@nine.ch
 mail_plugins: sieve quota


Hi,

you can not run into the same problem as the Dovecot 1.2 series has a  
new Sieve implementation rewritten by Stephan Bosch. If there ought to  
be a similar problem it is most likely fixed in a later release (1.2.6  
is current).


Regards
Thomas


[Dovecot] Panic: file sieve-cmu.c: line 262 (part_save): assertion failed: (buf-used - 1 == part-body_size.physical_size)

2009-10-13 Thread Raffael Schmid
Hi everybody

We are running in the same issue as Maciej Polewczynski does in
http://www.dovecot.org/list/dovecot/2008-September/033645.html

Is there already a solution? I dont think so? In the TODO-File for 1.2.2
this issue is still reported:

[...]
 - sieve-cmu.c crash: i_assert(buf-used - 1 ==
part-body_size.physical_size);
[...]


I am not able to reproduce the problem but I think it has something to
do with the charset of a mail? Because the 2 bits which are used with
UTF-8 for special characters?

Dovecot is running in a 64bit vServer on a 64bit host. Both are debian
lenny with all patches. The dovecot-packages is backported.

Just write me if you need more informations.

Raffael

-- 
About our system:
# dovecot --version
1.2.2

# dovecot -n
# 1.2.2: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.22.18-nine-vserver-grsec2.1.11-vs2.2.0.6 x86_64 Debian
5.0.3 ufs
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s managesieve
ssl_cert_file: /etc/dovecot/dovecot.pem
ssl_key_file: /etc/dovecot/dovecot.pem
disable_plaintext_auth: no
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
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
login_process_per_connection: no
max_mail_processes: 1500
mail_max_userip_connections(default): 30
mail_max_userip_connections(imap): 30
mail_max_userip_connections(pop3): 10
mail_max_userip_connections(managesieve): 10
verbose_proctitle: yes
first_valid_uid: 70
last_valid_uid: 70
first_valid_gid: 70
last_valid_gid: 70
mail_uid: vmail
mail_gid: vmail
mail_location: maildir:/srv/vmail/%d/%n
maildir_very_dirty_syncs: yes
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_executable(managesieve): /usr/lib/dovecot/managesieve
mail_process_size: 756
mail_plugins(default): fts fts_squat quota imap_quota
mail_plugins(imap): fts fts_squat quota imap_quota
mail_plugins(pop3): quota fts fts_squat
mail_plugins(managesieve):
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
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
pop3_reuse_xuidl(default): no
pop3_reuse_xuidl(imap): no
pop3_reuse_xuidl(pop3): yes
pop3_reuse_xuidl(managesieve): no
namespace:
  type: private
  separator: .
  prefix: INBOX.
  inbox: yes
  list: yes
  subscriptions: yes
lda:
  postmaster_address: postmas...@nine.ch
  mail_plugins: sieve quota
  rejection_subject: Automatically rejected message: %s to %t
  rejection_reason: This_would_be_a_long_line
auth default:
  mechanisms: plain login
  user: vmail
  username_chars:
  master_user_separator: /
  passdb:
driver: passwd-file
args: /etc/dovecot/dovecot.masteruser
pass: yes
master: yes
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql-fallback.conf
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql-fallback.conf
  socket:
type: listen
master:
  path: /var/run/dovecot/auth-master
  mode: 432
  user: vmail
  group: mail
plugin:
  quota: dict:user::proxy::quotadict
  quota_rule: *:storage=500M
  quota_rule2: Trash:storage=10%%
  quota_warning: storage=95%% /usr/local/bin/nine-quota-warning.sh 95 %u
  quota_warning2: storage=80%% /usr/local/bin/nine-quota-warning.sh 80 %u
  quota_exceeded_message: Mailbox ist voll / Mailbox is full
  sieve: ~/.dovecot.sieve
  sieve_dir: /srv/sieve-recipes/%d/%n
  fts: squat
  fts_squat: partial=4 full=10
dict:
  quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf


Re: [Dovecot] Panic: file sieve-cmu.c: line 262 (part_save): assertion failed: (buf-used - 1 == part-body_size.physical_size)

2009-10-13 Thread Raffael Schmid
Hi Thomas

Thomas Leuxner wrote:
 you can not run into the same problem as the Dovecot 1.2 series has a
 new Sieve implementation rewritten by Stephan Bosch. If there ought to
 be a similar problem it is most likely fixed in a later release (1.2.6
 is current).

Thank you for your answer but my mail.log shows something different:

Sep 19 18:52:01 vmail2 dovecot: deliver(mailaddr...@example.org): Panic:
file ext-body-common.c: line 149 (ext_body_part_save): assertion failed:
(buf-used - 1 == part-body_size.physical_size)

For me this really looks like the same bug or at least bug-race, even
if its not in the same file (line 262 (part_save):). Maybe some code
was taken over into the new implementation?

Regards
 raf


Re: [Dovecot] Homedir for sieve/LDAP

2009-10-13 Thread Edgar Fuß
 It doesn't matter if Dovecot's home directories are different from the
 users' primary home directories. It's probably even better if they're
 different.
Yes, I thought so.

 http://wiki.dovecot.org/VirtualUsers#homedirs should apply to your use
 case as well.
Yes, I read that one. But I couldn't figure out from that how to set home with 
userdb ldap.



Re: [Dovecot] Homedir for sieve/LDAP

2009-10-13 Thread Edgar Fuß
 .., =home=/import/mail/%u/home
Ah, using % Expansion works even if returned from an LDAP query? Great.

Is this nothing=Dovecot Param=Value form documented somewhere? I mean, is 
it documented that the LDAP Attribute is allowed to be empty?

Thanks.



[Dovecot] Error: NO Mailbox is locked

2009-10-13 Thread Giovanni Mancuso
Hi to all,

i migrate an imap server from courier-imap to dovecot 1.1.13. After the
migration i have often this error in imap communication:

* NO Mailbox is locked, will abort in 122 seconds
* NO Mailbox is locked, will abort in 92 seconds
* NO Mailbox is locked, will abort in 62 seconds
* NO Mailbox is locked, will abort in 32 seconds

I use maildir and all data are in nfs server.

My dovecot configuration is:

protocols = imap pop3 imaps pop3s
log_timestamp = %Y-%m-%d %H:%M:%S 
ssl_cert_file = /opt/dovecot/certs/imapd.pem
ssl_key_file = /opt/dovecot/certs/imapd.pem
login_user = dovecot
mail_location =  maildir:%h/Maildir
mail_uid = 104
mail_gid = 102
mail_privileged_group = vmail
first_valid_uid = 0
last_valid_uid = 0
first_valid_gid = 0
last_valid_gid = 0
ssl_disable = no
disable_plaintext_auth = no
mail_drop_priv_before_exec=yes
log_path = /opt/dovecot/logs/dovecot.log
mail_nfs_index = yes
mail_nfs_storage = yes
mmap_disable = yes

protocol imap {
  listen = *:143
  mail_plugins =  quota imap_quota
  ssl_listen = *:993
  mail_executable = /opt/dovecot/libexec/dovecot/automigrateimap
}

protocol pop3 {
  listen = *:110
  pop3_uidl_format = UID%u-%v
  ssl_listen = *:995
  mail_executable = /opt/dovecot/libexec/dovecot/automigratepop3
  mail_plugins =  quota
}

auth_debug = yes
auth_debug_passwords = yes
auth default {
  mechanisms = plain
#  passdb pam {
#  }
  passdb ldap {
args = /opt/dovecot/etc/dovecot-ldap.conf
  }
#  userdb passwd {
#  }
  userdb ldap {
args = /opt/dovecot/etc/dovecot-ldap.conf
  }
  user = root
}

dict {
}

plugin {
  quota = maildir
  quota_rule2 = Trash:storage=100M
}

namespace private {
  separator = .
  prefix = INBOX.
  inbox = yes
}


Have You any idea?

Thanks




Re: [Dovecot] Domain wild card aliases

2009-10-13 Thread Pascal Volk
On 10/11/2009 05:42 PM Jerry wrote:
 Using Postfix with Virtual Users/Virtual Domains, I have configured
 it with a wild card entry; i.e., *.mydomain.com
 
 This works fine in Postfix; however, using Dovecot for delivery is
 causing the message to bounce since Dovecot does not have an entry in
 the user passwd or userdb file. I want to store the catch-all
 addresses in a separate mailbox. Can I use sieve for this or will that
 fail also?

Sieve will also fail, because dovecot does not know the user.

You could try to translate whate...@ronadom.example.com in
spam...@example.com using http://wiki.dovecot.org/AuthDatabase/CheckPassword

Or you will need an regular expression virtual_alias_map (see
postconf(5), virtual(5) and regexp_table(5) or pcre_table(5)).


Regards,
Pascal
-- 
The trapper recommends today: fabaceae.0928...@localdomain.org


Re: [Dovecot] backup using rsync

2009-10-13 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Oct 09, 2009 at 03:41:40PM +0200, Robert Schetterer wrote:

[...]

 i ll do backups with rsync on maildirs with courier
 ( which has also : in filenames )

Stupid question: with CIFS as target filesystem?

Because there are some chars which are AFAIK taboo on Windows file
systems (colon being one, AFAIR -- luckily my memory on that is hazy :)

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFK1HzfBcgs9XrR2kYRAt54AJ43DEvC+n8KanSlgen/tvxYWIEAMwCeLNCQ
yd6sBUmE0imwK07f3M5I7/g=
=JR67
-END PGP SIGNATURE-


[Dovecot] Userdb prefetch vpopmail and autocreate plugin

2009-10-13 Thread Jose Luis Marin Perez

Dear Sirs 

 Yesterday consulted regarding autocreate plugin. 

 Userdb is configured as prefetch and vpopmail. 

 I need to configure the plugin autocreate for users of some domains that have 
hosted on the server. 

 How can I configure it?

Thanks

Jose Luis

dovecot -n

# 1.1.16: /usr/local/etc/dovecot.conf
# OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final)
log_path: /var/log/dovecot.log
listen: *:10143
ssl_listen: *:10943
disable_plaintext_auth: no
login_dir: /usr/local/var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
first_valid_uid: 89
last_valid_uid: 89
first_valid_gid: 89
last_valid_gid: 89
mail_uid: 89
mail_gid: 89
mail_location: maildir:~/Maildir
mail_debug: yes
mail_plugins: quota imap_quota expire mail_log
namespace:
  type: private
  separator: .
  prefix: INBOX.
  inbox: yes
  list: yes
  subscriptions: yes
auth default:
  passdb:
driver: checkpassword
args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh
  userdb:
driver: prefetch
args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u
  userdb:
driver: vpopmail
  socket:
type: listen
master:
  path: /usr/local/var/run/dovecot/auth-master
  mode: 384
  user: vpopmail
  group: vchkpw
plugin:
  quota: maildir
  quota_rule: ?:storage=0
  quota_rule2: Trash:ignore
  expire: INBOX.Spam 1 INBOX.Spam.* 1
  expire_dict: proxy::expire
  mail_log_events: delete undelete expunge copy mailbox_delete
  mail_log_group_events:
  mail_log_fields: uid box msgid size
dict:
  expire: mysql:/usr/local/etc/dovecot-dict-expire.conf
  
_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline

Re: [Dovecot] Homedir for sieve/LDAP

2009-10-13 Thread Edgar Fuß

.., =home=/import/mail/%u/home

Unfortunately, the whole thing doesn't work.
I'm using Postfix with mailbox_command set to dovecot's deliver.
Now, Postfix seems to use nss to get the user's home dir and passes  
this to mailbox_command as HOME.
It looks like deliver prefers the environment variable over an LDAP  
lookup: we have nss_override_attribute_value homeDirectory /tmp
in nss_ldap.conf, and deliver uses /tmp as the home directory. The  
only way it may get /tmp appears to be via nss, but we use userdb  
ldap. So I think it's the value of HOME set by postfix that deliver  
uses.
Is there a way to override the environment? How would deliver behave  
if I use something like

env HOME= deliver ..., i.e. HOME is set, but empty?




[Dovecot] failing to deliver to one of multiple destinations

2009-10-13 Thread Edgar Fuß
Is it defined whether, in case a message should be delivered to  
multiple destinations via a sieve script, and one of those  
destinations fail, then the whole delivery is to be considered as  
successful or not?


My case:
A sieve script forwarding to and external destinations plus local keep.
The keep fails (configuration error, wrong homedir, .dovecot.lda- 
dupes not writable).

According to postfix logs, dovecot deliver returned success.
The mail was NOT delivered to the local destination and NOT bounced.

Is this expected behaviour?



Re: [Dovecot] backup using rsync

2009-10-13 Thread Robert Schetterer
to...@tuxteam.de schrieb:
 On Fri, Oct 09, 2009 at 03:41:40PM +0200, Robert Schetterer wrote:
 
 [...]
 
 i ll do backups with rsync on maildirs with courier
 ( which has also : in filenames )
 
 Stupid question: with CIFS as target filesystem?

no never, why should i do this, nfs , ssh etc should be faster and more
secure etc

 
 Because there are some chars which are AFAIK taboo on Windows file
 systems (colon being one, AFAIR -- luckily my memory on that is hazy :)

jo as i said cifs may not like some stuff, but i see no reason what
force using cifs, after all you can rsync the maildir dir to another dir
on the source server,
tar it afterwards and copy it over cifs, as workaround
this should work ever, and easy scriptable

 
 Regards
 -- tomás

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] v2.0.alpha1 released

2009-10-13 Thread Odhiambo Washington
On Tue, Oct 13, 2009 at 1:45 AM, Timo Sirainen t...@iki.fi wrote:

 http://dovecot.org/releases/2.0/alpha/dovecot-2.0.alpha1.tar.gz
 http://dovecot.org/releases/2.0/alpha/dovecot-2.0.alpha1.tar.gz.sig

 So here's the first alpha version of Dovecot v2.0. There are still a
 couple of things left to do, but in general it should work for most
 people. I started using it for my own mails a few days ago and it seems
 to work without errors.


On my FreeBSD 7.2-STABLE:

./configure \
--cache-file=../cache_file \
--prefix=/opt/dovecot2 \
--with-ioloop=kqueue \
--with-notify=kqueue \
--with-sql=yes \
--with-mysql \
--with-zlib \
--with-bzlib \
--with-ssl=openssl \
--with-sql-drivers

And this is how I end up:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib
-I../../src/lib-test -I../../src/lib-charset -std=gnu99 -g -O2 -Wall -W
-Wmissing-prototypes -Wmissing-declarations -Wpointer-arith
-Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wstrict-aliasing=2 -MT
mbox-from.lo -MD -MP -MF .deps/mbox-from.Tpo -c mbox-from.c  -fPIC -DPIC -o
.libs/mbox-from.o
mbox-from.c: In function 'mbox_from_parse':
mbox-from.c:240: error: wrong type argument to unary minus
gmake[2]: *** [mbox-from.lo] Error 1
gmake[2]: Leaving directory
`/usr/home/wash/Tools/Dovecot/dovecot-2.0/dovecot-2.0.alpha1/src/lib-mail'
gmake[1]: *** [install-recursive] Error 1
gmake[1]: Leaving directory
`/usr/home/wash/Tools/Dovecot/dovecot-2.0/dovecot-2.0.alpha1/src'
gmake: *** [install-recursive] Error 1



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
If you have nothing good to say about someone, just shut up!.
  -- Lucky Dube


Re: [Dovecot] Capability info in hello message not complete?

2009-10-13 Thread Michal Hlavinka
On Tuesday 06 October 2009 15:35:20 Michal Hlavinka wrote:
 On Thursday 01 October 2009 15:15:09 Timo Sirainen wrote:
  On Thu, 2009-10-01 at 14:59 +0200, Michal Hlavinka wrote:
   Hi,
  
   one Fedora user complains about not some troubles after update to
   dovecot 1.2. He suspects wrong capability information given by dovecot
   1.2
  
   In dovecot.conf he uses imap_capability= option. While response to 'A
   CAPABILITY' respects imap_capability value, the capability info in
   hello message does not.
  
   for imap_capability=IMAP4 IMAP4rev1 ACL NAMESPACE CHILDREN SORT QUOTA
   THREAD=ORDEREDSUBJECT UNSELECT IDLE STARTTLS AUTH=PLAIN
 
  I suppose he's using Dovecot as a proxy? Because Dovecot doesn't support
  IMAP4 or THREAD=ORDEREDSUBJECT.
 
 yes, dovecot is used as proxy
 
   but hello message is:
   * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
   STARTTLS AUTH=PLAIN] Dovecot ready.
 
  Hmm. Yeah..
 
   But it seems even when imap_capability is not used capability in hello
   message is not complete:
 
  ..
 
   is this expected? Do you think capability information in hello message
   really can befool clients?
 
  The capability in greeting message is short on purpose. It's only enough
  capabilities to get client logged in. After login Dovecot sends an
  updated full capability list to the client. It uses a few different
  tricks to get most clients understand the change.
 
  So the only potential problem I see here is if client understands the
  greeting capability and permanently remembers that the server supports
  LITERAL+, ID and ENABLE after login but the destination server actually
  doesn't. The other capabilities are relevant only before login. I'm not
  entirely sure what, if anything, I should do about this.

would it be possible to:
a) send content of imap_capability in greeting message? It should be user's 
responsibility if it's set to something weird

b) don't send capability in greeting message if imap_capability is set

c) resurrect login_greeting_capability option

d) something else? :)

 
  I'd anyway like to hear what exactly is the problem and with what
  client, preferably with IMAP traffic logs showing what's happening
  wrong.
 
 forwarded info:
 The imap-server is dbmail which supports IMAP4 IMAP4rev1 ACL NAMESPACE
 CHILDREN SORT QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE and with dovecot
 version 1.1 it worked fine
 
 The problem sue is LITERAL+ what dbmail does not support.
 The problem client was apple iphone
 


[Dovecot] Thunderbird saved searches, tags and Dovecot oddity

2009-10-13 Thread Michael Durket
In converting everyone at our site from UW-IMAP I've run into a  
problem with a few

Thunderbird users and I'm wondering if anyone has some recommendations.

We're running dovecot 1.0.13 (yes I know it's old but we don't upgrade  
production
facilities that often). The affected Thunderbird users are running  
version 2.0023.


What's happening is this:

1) The user creates a filter rule which looks for, say, the From:  
header on a
 message, and then tags that message with a Thunderbird tag  
that they've

 defined (in this case ToDo).

2) The user also defines a search folderthat shows all mail items  
tagged ToDo.


3) Every day, the user opens the folder, handles all the ToDo  
messages and
 untags them as they are handled, causing them to disappear  
from the

 folder.

4) The next day (or the next time Thunderbird is started), all  
the previously

 tagged messages are back (in addition to newer ones).

 This doesn't happen with UW-IMAP (version imap-2007e which I think  
is the
last version with bug fixes ever issued). I haven't traced out the  
IMAP commands
going back and forth yet to see what might be different between the  
two servers -
I thought I'd ask here first to see if this is a known issue for which  
there is a solution

(like upgrading dovecot to a specific version).




Re: [Dovecot] failing to deliver to one of multiple destinations

2009-10-13 Thread Stephan Bosch

Edgar Fuß schreef:
Is it defined whether, in case a message should be delivered to multiple 
destinations via a sieve script, and one of those destinations fail, 
then the whole delivery is to be considered as successful or not?


My case:
A sieve script forwarding to and external destinations plus local keep.
The keep fails (configuration error, wrong homedir, .dovecot.lda-dupes 
not writable).

According to postfix logs, dovecot deliver returned success.
The mail was NOT delivered to the local destination and NOT bounced.

Is this expected behaviour?
No, when delivery fails entirely, the deliver binary should give an 
appropriate exit code, indicating that the MTA needs to try again later 
or bounce the message. What do the Dovecot and MTA logs say? 
Furthermore, the output of dovecot -n would help us find and solve the 
issue. And finally, your Sieve script may also be relevant.


Regards,

--
Stephan Bosch
step...@rename-it.nl


Re: [Dovecot] Capability info in hello message not complete?

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 17:26 +0200, Michal Hlavinka wrote:
 would it be possible to:
 a) send content of imap_capability in greeting message? It should be user's 
 responsibility if it's set to something weird

I guess I could do this.

 b) don't send capability in greeting message if imap_capability is set
 
 c) resurrect login_greeting_capability option

These have the problem of making Dovecot non-compliant with LEMONADE
extensions.


signature.asc
Description: This is a digitally signed message part


[Dovecot] docs for anvil?

2009-10-13 Thread PGNet Dev
are there any docs for anvil config  usage in 2.0?

afaict, nothing's mentioned in the wiki ...

thx.


Re: [Dovecot] docs for anvil?

2009-10-13 Thread Pascal Volk
On 10/13/2009 07:27 PM PGNet Dev wrote:
 are there any docs for anvil config  usage in 2.0?
 
 afaict, nothing's mentioned in the wiki ...
 

The wiki is not yet 'v2.0-ready'. Anvil works in the background.
Usage: $PREFIX/sbin/dovecot [starts also anvil]
   $PREFIX/sbin/dovecot stop [stops also anvil]
;-)

Configuration via master.conf.


Regards,
Pascal
-- 
The trapper recommends today: 5e1f1e55.0928...@localdomain.org


Re: [Dovecot] docs for anvil?

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 10:27 -0700, PGNet Dev wrote:
 are there any docs for anvil config  usage in 2.0?

I wasn't really planning on writing any docs for it. If you need to talk
to it, the source code will tell you the protocol. :) There's nothing to
configure in it beyond the normal service {} settings.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Thunderbird saved searches, tags and Dovecot oddity

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 08:50 -0700, Michael Durket wrote:
  4) The next day (or the next time Thunderbird is started), all  
 the previously
   tagged messages are back (in addition to newer ones).

I guess you're using mbox format? Apparently there's some bug that
sometimes doesn't write flags to mbox file. mbox_lazy_writes=no should
fix that, although it also makes performance somewhat worse.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Homedir for sieve/LDAP

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 12:44 +0200, Edgar Fuß wrote:
  .., =home=/import/mail/%u/home
 Ah, using % Expansion works even if returned from an LDAP query? Great.
 
 Is this nothing=Dovecot Param=Value form documented somewhere? I mean, 
 is it documented that the LDAP Attribute is allowed to be empty?

Yeah. http://wiki.dovecot.org/AuthDatabase/LDAP/Userdb



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Homedir for sieve/LDAP

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 15:25 +0200, Edgar Fuß wrote:
  .., =home=/import/mail/%u/home
 Unfortunately, the whole thing doesn't work.
 I'm using Postfix with mailbox_command set to dovecot's deliver.
 Now, Postfix seems to use nss to get the user's home dir and passes  
 this to mailbox_command as HOME.

If you're not giving -d parameter to deliver, it doesn't do userdb
lookup at all.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Autocreate plugin for some domains

2009-10-13 Thread Timo Sirainen
On Mon, 2009-10-12 at 15:48 -0500, Jose Luis Marin Perez wrote:
   passdb:
 driver: checkpassword
 args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh
   userdb:
 driver: prefetch
 args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u

So basically you get the configuration from checkpassword script. You
can change vchkpw-wrapper.sh to set environment variables:

AUTOCREATE=box1
AUTOCREATE2=box2
EXTRA=autocreate autocreate2
etc.

Insert your own logic there to figure out for what domains that needs to
be done.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] docs for anvil?

2009-10-13 Thread PGNet Dev
On Tue, Oct 13, 2009 at 10:49 AM, Timo Sirainen t...@iki.fi wrote:
 On Tue, 2009-10-13 at 10:27 -0700, PGNet Dev wrote:
 are there any docs for anvil config  usage in 2.0?

 I wasn't really planning on writing any docs for it. If you need to talk
 to it, the source code will tell you the protocol. :) There's nothing to
 configure in it beyond the normal service {} settings.

How about just what it does?

Is it postfix's anvil (http://linux.die.net/man/8/anvil)?

If it _is_, there are certainly a number of configuration parameters
available ... the process_limit in master.conf NOT being one of
them.

Is it _only_ for use with postfix?  If we don't use postfix,
can/should we disable it?


Re: [Dovecot] docs for anvil?

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 11:00 -0700, PGNet Dev wrote:
  I wasn't really planning on writing any docs for it. If you need to talk
  to it, the source code will tell you the protocol. :) There's nothing to
  configure in it beyond the normal service {} settings.
 
 How about just what it does?
 
 Is it postfix's anvil (http://linux.die.net/man/8/anvil)?

Its idea and name was stolen from Postfix, but that's all.

 Is it _only_ for use with postfix?  If we don't use postfix,
 can/should we disable it?

It's disabled automatically if it's not needed. It's currently only used
by mail_max_userip_connections setting to track how many connections a
user+ip combination has to the server.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] failing to deliver to one of multiple destinations

2009-10-13 Thread Edgar Fuß
 No, when delivery fails entirely, the deliver binary should give an  
 appropriate exit code, indicating that the MTA needs to try again later  
 or bounce the message.
OK, I would have expected that.

 What do the Dovecot and MTA logs say?  
I will send you that information in private mail.

 Furthermore, the output of dovecot -n would help us find and solve the  
 issue. And finally, your Sieve script may also be relevant.
See above.

Thanks for your help.



[Dovecot] Dovecot lock problem

2009-10-13 Thread Simon Gao

Hi,

We have a few users experiencing locking problem. When starting 
Thunderbird, there is no new emails in Inbox. Dovecot createa a lock file 
/var/spool/mail/user.lock. It never completes openning Inbox. If closing 
the mail client, the open imap session does not get closed, nor the lock 
file get deleted.


Here are the errors in log:

dovecot: Oct 13 11:18:35 Warning: IMAP(user1): Our dotlock file 
/var/mail/user1.lock was deleted (kept it 88 secs)
dovecot: Oct 13 11:18:35 Error: IMAP(user1): file_dotlock_delete() 
failed with mbox file /var/mail/user1: No such file or directory


We are running Dovecot 1.1.2. Any pointer to resolve this problem is 
appreciated.


Simon


Re: [Dovecot] multiple quota roots complains

2009-10-13 Thread Kostik
Hello.

Actually it is a problem for me.

Introduction:
If dovecot LDA save failed to mbox (not enough disk space, for example),
it does not do rollback. Then my mailbox was corrupted. Last message is
dropped in the middle of headers(body, attachments, etc).

Same if I use file system quota, but does not set quota plugin
for LDA. If user receives message which is over quota:
save failed, no rollback, mbox corrupted. But if I set
quota plugin for LDA, then LDA works fine.

In my case, this problem occurs when:
-- use file system quota
-- and set quota plugin for LDA
-- and set multiple quota roots: dirsize + fs
-- and mail dir size less than all user files
(if user have mail and some other files on it home dir).

If user receives message which is over FS quota but under dirsize
quota, then dirsize quota plugin say: OK. But fs quota plugin
say: stat((null)) failed: Bad address. And LDA tries to deliver
message to mbox: save failed, no rollback, mbox corrupted.

Timo or anybody! Please! Help me! :)

=kostik

 With dovecot-1.2.6 multiple quota roots complains:
 stat((null)) failed: Bad address to log file.

 My setup is:
 ---
 plugin {
   quota = dirsize:dirsize quota
   quota2 = fs:fs quota:group
 }
 ---

 Complains from (plugins/quota/quota-fs.c):
 ---
 if (stat(root-storage_mount_path, rst)  0) {
if (_root-quota-set-debug) {
  i_error(stat(%s) failed: %m,
  root-storage_mount_path);
}
return FALSE;
 }
 ---
 root-storage_mount_path is NULL here.

 But single quota setup (dirsize or fs) works fine.


 Full log (multiple quota):
 ---
 Quota root: name=dirsize quota backend=dirsize args=
 Quota rule: root=dirsize quota mailbox=* bytes=48234496 messages=0
 Quota root: name=fs quota backend=fs args=group
 mbox: data=~/:INBOX=/var/virtual/mail/I/I/koc:INDEX=MEMORY
 fs: root=/var/virtual/home/I/I/koc, index=, control=,
 inbox=/var/virtual/mail/I/I/koc
 fs quota add storage dir = /var/virtual/home/I/I/koc
 fs quota block device = nfsf:/export
 fs quota mount point = /mount/m6
 stat((null)) failed: Bad address
 stat((null)) failed: Bad address
 stat((null)) failed: Bad address
 ...
 ---

 Full log (single fs quota):
 ---
 Quota root: name=fs quota backend=fs args=group
 Quota rule: root=fs quota mailbox=* bytes=48234496 messages=0
 mbox: data=~/:INBOX=/var/virtual/mail/I/I/koc:INDEX=MEMORY
 fs: root=/var/virtual/home/I/I/koc, index=, control=,
 inbox=/var/virtual/mail/I/I/koc
 fs quota add storage dir = /var/virtual/home/I/I/koc
 fs quota block device = nfsf:/export
 fs quota mount point = /mount/m6
 quota-fs: host=nfsf, path=/export, gid=52304385, bytes
 quota-fs: gid=52304385, value=48660480, limit=52428800, active=1
 ---



Re: [Dovecot] failing to deliver to one of multiple destinations

2009-10-13 Thread Edgar Fuß
 I will send you that information in private mail.
OH NO! It seems to be entirely our fault.

After spending about an hour excerpting, editing and commenting the mail log 
(Postfix-Dspam-Postfix-deliver/Sieve plus forward), and finally pasting the 
Sieve script, I noticed there seems to be an error in my colleagues 
forward-to-Sieve tranlation ommitting the keep after a redirect if the forward 
file contains both an external address and the local one.

Sorry for the noise.



Re: [Dovecot] Autocreate plugin for some domains

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 14:45 -0500, Jose Luis Marin Perez wrote:
 Dear Timo,
 
 Thanks for your reply. 
 
  In the case of having two domains, eg:
 
  dominio1.com 
  dominio2.com 
 
  And I just want to use the plugin autocreate for dominio2.com, how could 
 configure vchkpw-wrapper.sh? 

something like:

DOMAIN=`echo $USER|sed s/^.*@//`
if [ $DOMAIN = domain2.com ]; then
  export AUTOCREATE=box1
  export AUTOCREATE2=box2
  export EXTRA=AUTOCREATE AUTOCREATE2
fi
exec ...


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Autocreate plugin for some domains

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 15:58 -0400, Timo Sirainen wrote:
 if [ $DOMAIN = domain2.com ]; then
   export AUTOCREATE=box1
   export AUTOCREATE2=box2
   export EXTRA=AUTOCREATE AUTOCREATE2

Oh, actually:

export USERDB_AUTOCREATE=box1
export USERDB_AUTOCREATE2=box2
export EXTRA=USERDB_AUTOCREATE USERDB_AUTOCREATE2



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Homedir for sieve/LDAP

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 21:57 +0200, Edgar Fuß wrote:
 Wouldn't it be much simpler to either
 -- make sieve (optionally) put .dovecot.lda-dupes in sieve_dir
 -- have a dovecot.conf home_dir parameter that, like mail_location, may be 
 overridden by userdb?

See if this works:

plugin {
  home = /blah/%u
}



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Homedir for sieve/LDAP

2009-10-13 Thread Edgar Fuß
 See if this works:
 
 plugin {
   home = /blah/%u
 }
YES! Thanks!

Regarding your response time, sometimes I'm convinced that ,,Timo Sirainen'' is 
really a pseudonym for a group of some ten people operating in 12-hour shifts, 
half of whose keep hacking on dovecot around the clock while the other half 
keep answering stupid and non-stupid questions around the clock.



Re: [Dovecot] Autocreate plugin for some domains

2009-10-13 Thread Jose Luis Marin Perez

Dear Timo, 

 I am currently using the vchkpw-wrapper.sh script to register users connected 
to the server. 

 So adding the configuration that tells me and would be as follows: 

#!/bin/bash

DOMAIN=`echo $USER|sed s/^.*@//`
if [ $DOMAIN = domain2.com ]; then
  export USERDB_AUTOCREATE=box1
  export USERDB_AUTOCREATE2=box2
  export EXTRA=USERDB_AUTOCREATE USERDB_AUTOCREATE2 
fi

unset USER
exec $*

 This properly configured? 

 This would be the same procedure for using any plugins (Example expires) in a 
certain domain?

Thanks

Jose Luis


 Subject: Re: [Dovecot] Autocreate plugin for some domains
 From: t...@iki.fi
 To: dovecot@dovecot.org
 CC: jolumape...@hotmail.com
 Date: Tue, 13 Oct 2009 15:58:57 -0400
 
 On Tue, 2009-10-13 at 15:58 -0400, Timo Sirainen wrote:
  if [ $DOMAIN = domain2.com ]; then
export AUTOCREATE=box1
export AUTOCREATE2=box2
export EXTRA=AUTOCREATE AUTOCREATE2
 
 Oh, actually:
 
 export USERDB_AUTOCREATE=box1
 export USERDB_AUTOCREATE2=box2
 export EXTRA=USERDB_AUTOCREATE USERDB_AUTOCREATE2
 
  
_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

Re: [Dovecot] v2.0.alpha1 released

2009-10-13 Thread Ed W

Timo Sirainen wrote:

+ Redesigned master process. It's now more modular and there is less
  code running as root


Hi, some really interesting stuff coming out of this.  Looks cool!

Something I had been pondering recently (I started using a cell phone 
with imap idle support), was a previous poster mentioning the huge 
increase in battery life from turning off the radio for as long as 
possible. It appears that just turning on the radio (wifi or 3G) 
consumes much more energy than the transmitting of a few bytes of data 
after it's on.  In particular synchronising certain types of infrequent 
transmissions may have a dramatic increase in battery life for mobile 
devices - I'm thinking mainly of the NOOPs when the connection is idling


Is this something that could be implemented with the current 
architecture?  Are there other types of application where synchronising 
stuff happening to multiple connections from the same client could be 
helpful?


Just a thought...

Ed W





Re: [Dovecot] Homedir for sieve/LDAP

2009-10-13 Thread Charles Marcus
On 10/13/2009, Edgar Fuß (e...@math.uni-bonn.de) wrote:
 Regarding your response time, sometimes I'm convinced that ,,Timo
 Sirainen'' is really a pseudonym for a group of some ten people
 operating in 12-hour shifts, half of whose keep hacking on dovecot
 around the clock while the other half keep answering stupid and
 non-stupid questions around the clock.

Rotflmao!

I've had similar thoughts on more than one occasion...


Re: [Dovecot] v2.0.alpha1 released

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 21:38 +0100, Ed W wrote:
 Something I had been pondering recently (I started using a cell phone 
 with imap idle support), was a previous poster mentioning the huge 
 increase in battery life from turning off the radio for as long as 
 possible. It appears that just turning on the radio (wifi or 3G) 
 consumes much more energy than the transmitting of a few bytes of data 
 after it's on.  In particular synchronising certain types of infrequent 
 transmissions may have a dramatic increase in battery life for mobile 
 devices - I'm thinking mainly of the NOOPs when the connection is idling
 
 Is this something that could be implemented with the current 
 architecture?  Are there other types of application where synchronising 
 stuff happening to multiple connections from the same client could be 
 helpful?

No matter how many times I read the above, I've no idea what you're
trying to ask. :) This seems like entirely a client-dependent issue and
Dovecot can't much alter clients' behavior. Unless you're talking about
running Dovecot on a cell phone?..


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Autocreate plugin for some domains

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 15:31 -0500, Jose Luis Marin Perez wrote:
 #!/bin/bash
 
 DOMAIN=`echo $USER|sed s/^.*@//`
 if [ $DOMAIN = domain2.com ]; then
   export USERDB_AUTOCREATE=box1
   export USERDB_AUTOCREATE2=box2
   export EXTRA=USERDB_AUTOCREATE USERDB_AUTOCREATE2 
 fi
 
 unset USER
 exec $*
 
  This properly configured? 

Looks right. Try and see.

  This would be the same procedure for using any plugins (Example expires) in 
 a certain domain?

Right. You can override any settings that way.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] v2.0.alpha1 released

2009-10-13 Thread Timo Sirainen
On Tue, 2009-10-13 at 18:00 +0300, Odhiambo Washington wrote:
 On my FreeBSD 7.2-STABLE:
 
 mbox-from.c: In function 'mbox_from_parse':
 mbox-from.c:240: error: wrong type argument to unary minus

Yeah, BSDs have a timezone() function instead of a timezone variable. I
don't think the code is correct for Linux either.. I'll have to figure
out something.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] v2.0.alpha1 released

2009-10-13 Thread Patrick Ben Koetter
* Timo Sirainen dovecot@dovecot.org:
 On Tue, 2009-10-13 at 21:38 +0100, Ed W wrote:
  Something I had been pondering recently (I started using a cell phone 
  with imap idle support), was a previous poster mentioning the huge 
  increase in battery life from turning off the radio for as long as 
  possible. It appears that just turning on the radio (wifi or 3G) 
  consumes much more energy than the transmitting of a few bytes of data 
  after it's on.  In particular synchronising certain types of infrequent 
  transmissions may have a dramatic increase in battery life for mobile 
  devices - I'm thinking mainly of the NOOPs when the connection is idling

Idling consumes lots of battery on mobiles, because it requires an active TCP
session. Cell phone providers use a trick to circumvent that. They send a SMS
(with a service signature that hides it from regular SMS readers) containing a
trigger signal which causes the mobile to check for new mail.

This uses less battery. You may want to check if you application/mobile
supports this.

p...@rick



  
  Is this something that could be implemented with the current 
  architecture?  Are there other types of application where synchronising 
  stuff happening to multiple connections from the same client could be 
  helpful?
 
 No matter how many times I read the above, I've no idea what you're
 trying to ask. :) This seems like entirely a client-dependent issue and
 Dovecot can't much alter clients' behavior. Unless you're talking about
 running Dovecot on a cell phone?..




signature.asc
Description: Digital signature


Re: [Dovecot] virtual Folder Plugin with . Separator: [NONEXISTENT] Mailbox doesn't exist

2009-10-13 Thread Elmar Weber

Hello,

Elmar Weber wrote:

I'm getting the message [NONEXISTENT] Mailbox doesn't exist: name from
Thunderbird when I try to access any virtual folder.

namespace private {
  prefix = virtual.
  separator = .
  location = virtual:~/.maildir/.virtual
}

 [...]


I did some testing, and everything works when I seperate the folders 
with / instead with ., so when I create a folder 
~/.maildir/.virtual/test with a dovecot-virtual file everything works, 
not when I following the naming scheme I'd derive from the 
configuration: ~/.maildir/.virtual.test


Is this a problem of me missunderstanding or a configuration error?

ciao,
Elmar




Re: [Dovecot] v2.0.alpha1 released

2009-10-13 Thread Ed W

Timo Sirainen wrote:

On Tue, 2009-10-13 at 21:38 +0100, Ed W wrote:
  
Something I had been pondering recently (I started using a cell phone 
with imap idle support), was a previous poster mentioning the huge 
increase in battery life from turning off the radio for as long as 
possible. It appears that just turning on the radio (wifi or 3G) 
consumes much more energy than the transmitting of a few bytes of data 
after it's on.  In particular synchronising certain types of infrequent 
transmissions may have a dramatic increase in battery life for mobile 
devices - I'm thinking mainly of the NOOPs when the connection is idling


Is this something that could be implemented with the current 
architecture?  Are there other types of application where synchronising 
stuff happening to multiple connections from the same client could be 
helpful?



No matter how many times I read the above, I've no idea what you're
trying to ask. :) This seems like entirely a client-dependent issue and
Dovecot can't much alter clients' behavior. Unless you're talking about
running Dovecot on a cell phone?..
  


Perhaps I misunderstand, but doesn't dovecot send a keepalive on 
connections which are idling?  It's been discussed on the list 
previously, google turns up this (not from the list, but related):

   http://doubleukay.com/node/12

I hadn't previously twigged for example that the real reason using my 
old Nokia N95 as a wifi SIP phone was caning the battery could have been 
the short re-registration interval as much as actually having the phone 
on wifi.  I now have an N97 and the buggers disabled the SIP phone bit, 
but there is some hope it will be re-enabled on the next firmware update 
- I was planning to do a bit of research on this if so.


The point being that for wireless users there is a massive cost to 
turn on the radio and transmit any data, the actual transmission of 
incremental data after that is cheap.  So applications and servers which 
may operate over wireless networks can massively increase battery life 
if they give some thought to significantly batching up network traffic


I can imagine that in the case of a typical cell phone with say 3 email 
accounts, there will be likely three idle connections (or more) to 
dovecot and each will end up sending keepalive packets at slightly 
different intervals for each connection.  By synchronising this network 
traffic you would potentially increase battery life by up to a factor of 
3 (ie turn on the radio to send the keepalive for all connections in one 
go, rather than turning the radio on three times as often)... (I think 
perhaps that's optimistic, but you can see that quite large gains might 
be possible here)


Nokia make a rather neat battery optimisation tool which allows you to 
log power consumed very precisely (and hopefully to correlate it to what 
your app is doing) - I would like to find the time to break this out to 
have a closer peak at some of this stuff, but it remains on my todo list 
right now...


Cheers

Ed W


Re: [Dovecot] Autocreate plugin for some domains

2009-10-13 Thread Jose Luis Marin Perez

Dear Timo, 

 I tried with the script you mentioned and did not create the directories are 
configured. 

Additionally I have made this modification: 

#!/bin/bash

DOMAIN=`echo $USER|sed s/^.*@//`
if [ $DOMAIN = domain2.com ]; then
  export USERDB_AUTOCREATE=INBOX.box1
  export USERDB_AUTOCREATE2=INBOX.box2
  export EXTRA=USERDB_AUTOCREATE USERDB_AUTOCREATE2
fi

unset USER
exec $*


 But it does not work, and dovecot.log not log any information about the plugin 
autocreate

In that I am wrong?

Thanks

Jose Luis

dovecot -n

# 1.1.16: /usr/local/etc/dovecot.conf
# OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final)
log_path: /var/log/dovecot.log
listen: *:10143
ssl_listen: *:10943
disable_plaintext_auth: no
login_dir: /usr/local/var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
first_valid_uid: 89
last_valid_uid: 89
first_valid_gid: 89
last_valid_gid: 89
mail_uid: 89
mail_gid: 89
mail_location: maildir:~/Maildir
mail_debug: yes
mail_plugins: quota imap_quota expire mail_log autocreate
namespace:
  type: private
  separator: .
  prefix: INBOX.
  inbox: yes
  list: yes
  subscriptions: yes
auth default:
  passdb:
driver: checkpassword
args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh
  userdb:
driver: prefetch
args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u
  userdb:
driver: vpopmail
  socket:
type: listen
master:
  path: /usr/local/var/run/dovecot/auth-master
  mode: 384
  user: vpopmail
  group: vchkpw
plugin:
  quota: maildir
  quota_rule: ?:storage=0
  quota_rule2: Trash:ignore
  expire: INBOX.Spam 1 INBOX.Spam.* 1
  expire_dict: proxy::expire
  mail_log_events: delete undelete expunge copy mailbox_delete
  mail_log_group_events:
  mail_log_fields: uid box msgid size
dict:
  expire: mysql:/usr/local/etc/dovecot-dict-expire.conf


 Subject: Re: [Dovecot] Autocreate plugin for some domains
 From: t...@iki.fi
 To: jolumape...@hotmail.com
 CC: dovecot@dovecot.org
 Date: Tue, 13 Oct 2009 17:58:43 -0400
 
 On Tue, 2009-10-13 at 15:31 -0500, Jose Luis Marin Perez wrote:
  #!/bin/bash
  
  DOMAIN=`echo $USER|sed s/^.*@//`
  if [ $DOMAIN = domain2.com ]; then
export USERDB_AUTOCREATE=box1
export USERDB_AUTOCREATE2=box2
export EXTRA=USERDB_AUTOCREATE USERDB_AUTOCREATE2 
  fi
  
  unset USER
  exec $*
  
   This properly configured? 
 
 Looks right. Try and see.
 
   This would be the same procedure for using any plugins (Example expires) 
  in a certain domain?
 
 Right. You can override any settings that way.
 
  
_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

Re: [Dovecot] v2.0.alpha1 released

2009-10-13 Thread Timo Sirainen

On Oct 13, 2009, at 6:28 PM, Ed W wrote:

Perhaps I misunderstand, but doesn't dovecot send a keepalive on  
connections which are idling?


Yes, it's configurable nowadays:

  # How many seconds to wait between OK Still here notifications when
  # client is IDLEing.
  #imap_idle_notify_interval = 120

And I did think of that in my previous mail, but then thought it  
wasn't relevant because client was only receiving data, but now I  
realized that of course the client will also have to send back TCP ACK.


I can imagine that in the case of a typical cell phone with say 3  
email accounts, there will be likely three idle connections (or  
more) to dovecot and each will end up sending keepalive packets at  
slightly different intervals for each connection.  By synchronising  
this network traffic you would potentially increase battery life by  
up to a factor of 3 (ie turn on the radio to send the keepalive for  
all connections in one go, rather than turning the radio on three  
times as often)... (I think perhaps that's optimistic, but you can  
see that quite large gains might be possible here)


Oh. That does sound like a good idea. Hmm. I think there's an easy way  
to implement this:


next_still_here_sending_timestamp = imap_idle_notify_interval -
  (time(NULL) + crc32(username)) % imap_idle_notify_interval;

The username CRC32 is there to avoid network/load spikes when all the  
processes try to send the Still here at the same time.


Re: [Dovecot] v2.0.alpha1 released

2009-10-13 Thread Ed W

Timo Sirainen wrote:


I can imagine that in the case of a typical cell phone with say 3 
email accounts, there will be likely three idle connections (or more) 
to dovecot and each will end up sending keepalive packets at slightly 
different intervals for each connection.  By synchronising this 
network traffic you would potentially increase battery life by up to 
a factor of 3 (ie turn on the radio to send the keepalive for all 
connections in one go, rather than turning the radio on three times 
as often)... (I think perhaps that's optimistic, but you can see that 
quite large gains might be possible here)


Oh. That does sound like a good idea. Hmm. I think there's an easy way 
to implement this:


next_still_here_sending_timestamp = imap_idle_notify_interval -
  (time(NULL) + crc32(username)) % imap_idle_notify_interval;

The username CRC32 is there to avoid network/load spikes when all the 
processes try to send the Still here at the same time.



Just to kick this around a bit - I guess it's possible for one username 
to be logged in on three different computers (eg I have several laptops 
with identical config and sometimes several of them are on at once).  On 
the other hand my original idea was to compromise on hashing by IP 
address, this is obviously wrong in the sense that frequently multiple 
users are behind large NAT ranges, especially if they are on some sort 
of WAN connection


I don't think either situation is actually a problem because it would 
appear that the only failure mode is to send too few keepalives, 
sending a few too many now is unlikely to be a drain given we then send 
fewer subsequently.


However, I guess for maximum polish it would be optimal to hash based on 
both username and ip address?  This would appear to be useful in your 
algorithm above anyway though?


Thanks for listening!

Ed W


Re: [Dovecot] v2.0.alpha1 released

2009-10-13 Thread Ed W

Ed W wrote:
Actually, here's the original Nokia paper - just reading it now, seems 
quite interesting:


http://research.nokia.com/files/NRCTR2008002.pdf


Contrary to the results in the nokia paper I find a few low quality 
results from users who used the nokia battery monitor app to show that 
an IDLEing wifi connection burns much more battery than a 3G 
connection... The punchline either way you slice it is to reduce the 
amount of time you wakeup the radio module, batch stuff up.


I need to go and grab my N95 and play with the voip stuff again - I 
wonder if I can easily double the battery life just by raising the 
re-register interval...


Ed W


Re: [Dovecot] Autocreate plugin for some domains

2009-10-13 Thread Timo Sirainen

On Oct 13, 2009, at 6:32 PM, Jose Luis Marin Perez wrote:


Additionally I have made this modification:

#!/bin/bash

DOMAIN=`echo $USER|sed s/^.*@//`
if [ $DOMAIN = domain2.com ]; then
 export USERDB_AUTOCREATE=INBOX.box1
 export USERDB_AUTOCREATE2=INBOX.box2
 export EXTRA=USERDB_AUTOCREATE USERDB_AUTOCREATE2


Are you sure this code gets called? Maybe add something here such as:

echo yeah i got here  /tmp/autocreate


fi

unset USER
exec $*


But it does not work, and dovecot.log not log any information about  
the plugin autocreate


What does it log with auth_debug=yes enabled?




Re: [Dovecot] Autocreate plugin for some domains

2009-10-13 Thread Jose Luis Marin Perez

Dear Timo,

I added the line you mentioned 

echo yeah i got here  /tmp/autocreate

and did not create the file /tmp/autocreate 

 This is the script with the real domain:

#!/bin/bash

DOMAIN=`echo $USER|sed s/^.*@//`
if [ $DOMAIN = operaciones.qnet.com.pe ]; then
  export USERDB_AUTOCREATE=INBOX.spam1
  export USERDB_AUTOCREATE2=INBOX.spam2
  export EXTRA=USERDB_AUTOCREATE USERDB_AUTOCREATE2
  echo yeah i got here  /tmp/autocreate
fi

unset USER
exec $*

What could be happening?

Thanks

Jose Luis

 From: t...@iki.fi
 To: jolumape...@hotmail.com
 Date: Tue, 13 Oct 2009 20:58:47 -0400
 CC: dovecot@dovecot.org
 Subject: Re: [Dovecot] Autocreate plugin for some domains
 
 On Oct 13, 2009, at 6:32 PM, Jose Luis Marin Perez wrote:
 
  Additionally I have made this modification:
 
  #!/bin/bash
 
  DOMAIN=`echo $USER|sed s/^.*@//`
  if [ $DOMAIN = domain2.com ]; then
   export USERDB_AUTOCREATE=INBOX.box1
   export USERDB_AUTOCREATE2=INBOX.box2
   export EXTRA=USERDB_AUTOCREATE USERDB_AUTOCREATE2
 
 Are you sure this code gets called? Maybe add something here such as:
 
 echo yeah i got here  /tmp/autocreate
 
  fi
 
  unset USER
  exec $*
 
 
  But it does not work, and dovecot.log not log any information about  
  the plugin autocreate
 
 What does it log with auth_debug=yes enabled?
 
 
  
_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

Re: [Dovecot] backup using rsync

2009-10-13 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, Oct 13, 2009 at 04:15:02PM +0200, Robert Schetterer wrote:
 to...@tuxteam.de schrieb:
  On Fri, Oct 09, 2009 at 03:41:40PM +0200, Robert Schetterer wrote:
  
  [...]
  
  i ll do backups with rsync on maildirs with courier
  ( which has also : in filenames )
  
  Stupid question: with CIFS as target filesystem?
 
 no never, why should i do this, nfs , ssh etc should be faster and more
 secure etc

Nor would I, for that. But I can afford the luxury to see CIFS once a
couple of years :)

  Because there are some chars which are AFAIK taboo on Windows file
  systems (colon being one, AFAIR -- luckily my memory on that is hazy :)
 
 jo as i said cifs may not like some stuff, but i see no reason what
 force using cifs, after all you can rsync the maildir dir to another dir
 on the source server,
 tar it afterwards and copy it over cifs, as workaround
 this should work ever, and easy scriptable

Of course you lose the network bandwith savings rsync offers to you,
then :-(

OTOH, it might make sense experimenting with rsyncing the tar (if it
doesn't change much), or, when gzipping it, using the --rsyncable
option. Maybe not all is lost.

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFK1Wg3Bcgs9XrR2kYRAjLAAJ9VLmhtWI+qXx8b+Y9dAo1ZTyQ0AACfeaSp
AXk4iAf6OMVw8DYdMGGdiUo=
=eajr
-END PGP SIGNATURE-