Re: [Dovecot] Trying to building a customized auth plugin

2010-11-16 Thread Antonio Perez-Aranda
 gcc -fPIC -shared -g -Wall \
  -I$DOVECOT \
  -I$DOVECOT/src/lib \
  -I$DOVECOT/src/lib-auth  \
  -I$DOVECOT/src/lib-sql \
  -I$DOVECOT/src/lib-settings \
  -I$DOVECOT/src/lib-ntlm \
  -I$DOVECOT/src/lib-master \
  -I$DOVECOT/src/auth \
  -DHAVE_CONFIG_H \
  -DAUTH_MODULE_DIR=\passdb-custom\\
  passdb-custom.c -o passdb-custom.o

With this I get:

error on auth-common.h
...
config.h Not found.


But config.h are in $DOVECOT path


2010/11/15 Timo Sirainen t...@iki.fi:
 On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:

 gcc -fPIC -shared -g -Wall -I$DOVECOT \
     -I$DOVECOT/src/lib \
     -I$DOVECOT/src/lib-auth  \
     -I$DOVECOT/src/lib-sql \
     -I$DOVECOT/src/lib-settings \
     -I$DOVECOT/src/lib-ntlm \
     -I$DOVECOT/src/lib-master \
     -I$DOVECOT/src/auth \
     passdb-passwd-file.c -o passdb-passwd-file.o

 With this, I get errors relate with uoff_t

 You need to add -DHAVE_CONFIG_H




Re: [Dovecot] Trying to building a customized auth plugin

2010-11-16 Thread Antonio Perez-Aranda
Well, I didn't execute ./configure on $DOVECOT path

2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
  gcc -fPIC -shared -g -Wall \
      -I$DOVECOT \
      -I$DOVECOT/src/lib \
      -I$DOVECOT/src/lib-auth  \
      -I$DOVECOT/src/lib-sql \
      -I$DOVECOT/src/lib-settings \
      -I$DOVECOT/src/lib-ntlm \
      -I$DOVECOT/src/lib-master \
      -I$DOVECOT/src/auth \
      -DHAVE_CONFIG_H \
      -DAUTH_MODULE_DIR=\passdb-custom\\
      passdb-custom.c -o passdb-custom.o

 With this I get:

 error on auth-common.h
 ...
 config.h Not found.


 But config.h are in $DOVECOT path


 2010/11/15 Timo Sirainen t...@iki.fi:
 On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:

 gcc -fPIC -shared -g -Wall -I$DOVECOT \
     -I$DOVECOT/src/lib \
     -I$DOVECOT/src/lib-auth  \
     -I$DOVECOT/src/lib-sql \
     -I$DOVECOT/src/lib-settings \
     -I$DOVECOT/src/lib-ntlm \
     -I$DOVECOT/src/lib-master \
     -I$DOVECOT/src/auth \
     passdb-passwd-file.c -o passdb-passwd-file.o

 With this, I get errors relate with uoff_t

 You need to add -DHAVE_CONFIG_H





Re: [Dovecot] OT: Single-instance storage is bad for you!

2010-11-16 Thread Dennis Guhl

Stan Hoeppner schrieb:

Dennis Guhl put forth on 11/15/2010 5:23 PM:


I think you might have, by now, noticed OPs the humour -- so I won't
stress it.


I did.  It was weak, but it was there.  If you noticed, I responded to a


Apparently humour and sarcasm is not your strong point :)


specific point within his post, not to the entire post.  I was making a
serious point, regardless of his original intent.  This happens quite
frequently with mailing list topics. :)


Yes, I saw it sometimes happen.


Re: [Dovecot] dsync mbox-mdbox: Unexpectedly lost From-line and other issues from a big conversion.

2010-11-16 Thread Axel Thimm
On Mon, 2010-11-15 at 18:32 +, Timo Sirainen wrote:
 On 15.11.2010, at 18.15, Axel Thimm wrote:
 
  dsync2.log.old1:dsync(user): Error: Next message unexpectedly lost from 
  mbox file /home/user/mail/lists/mplayerhq.hu/ffmpeg-devel at 58706201 
  (cached)
  dsync2.log.old1:dsync(user): Error: Next message unexpectedly lost from 
  mbox file /home/user/mail/lists/gnupg.org/gnupg-users at 6507197 (cached)
 
 Looks like public mailing list archives. Could you put the mbox file(s) 
 somewhere I can download them? Maybe I can easily reproduce the problem.

I sent you the URL in PM.

I checked the files and the mentioned offsets are one line off the next
from_ line. It looks like a content-length mismatch.

They also seem to mix CR+LF and simple LF endings within the same mail.
For example an otherwise CR+LF encoded mail would have a few headers w/o
CR at the bottom inserted (by dovecot?). Maybe the content-length
computation was therefore a few lines off.

I can probably salvage these mboxes by grepping out the content-length
header, but I wonder why the content-length header are off.
-- 
http://thimm.gr/ - http://ATrpms.net/


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


Re: [Dovecot] Trying to building a customized auth plugin

2010-11-16 Thread Antonio Perez-Aranda
Is it needed to include custom db on usedb.c and passdb.c ?

I can see at userdb.c:

void userdbs_init(void)

with all userdb registered, and similar at passdb.c


At now, I get the follow line loading the module and trying to access
vía imap login

Nov 16 17:54:28 auth: Error: module
/usr/lib64/dovecot/auth/libauthdb_custom.so: dlsym(authdb_custom_init)
failed: /usr/lib64/dovecot/auth/libauthdb_custom.so: undefined symbol:
authdb_custom_init
Nov 16 17:54:28 auth: Error: Module doesn't have init function:
/usr/lib64/dovecot/auth/libauthdb_custom.so



2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
 Well, I didn't execute ./configure on $DOVECOT path

 2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
  gcc -fPIC -shared -g -Wall \
      -I$DOVECOT \
      -I$DOVECOT/src/lib \
      -I$DOVECOT/src/lib-auth  \
      -I$DOVECOT/src/lib-sql \
      -I$DOVECOT/src/lib-settings \
      -I$DOVECOT/src/lib-ntlm \
      -I$DOVECOT/src/lib-master \
      -I$DOVECOT/src/auth \
      -DHAVE_CONFIG_H \
      -DAUTH_MODULE_DIR=\passdb-custom\\
      passdb-custom.c -o passdb-custom.o

 With this I get:

 error on auth-common.h
 ...
 config.h Not found.


 But config.h are in $DOVECOT path


 2010/11/15 Timo Sirainen t...@iki.fi:
 On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:

 gcc -fPIC -shared -g -Wall -I$DOVECOT \
     -I$DOVECOT/src/lib \
     -I$DOVECOT/src/lib-auth  \
     -I$DOVECOT/src/lib-sql \
     -I$DOVECOT/src/lib-settings \
     -I$DOVECOT/src/lib-ntlm \
     -I$DOVECOT/src/lib-master \
     -I$DOVECOT/src/auth \
     passdb-passwd-file.c -o passdb-passwd-file.o

 With this, I get errors relate with uoff_t

 You need to add -DHAVE_CONFIG_H






[Dovecot] child 23925 killed with signal 6

2010-11-16 Thread Jan Behrend
Dearest list,

just now I migrated a pine user to dovecot.  Nothing special so far, but
then I saw this in my syslog and the user reported, that he got this
error message:

MAIL FOLDER INBOX CLOSED DUE TO ACCESS ERROR

Obviously this problem is related to his local filter rules:
If commented out everything works like a charm.  The corresponding
filter rule looks for a From-Line in the email header but the filter
string itself is empty.  I know this filter rule does not make a lot of
sense, but nevertheless it shouldn't crash the imap process.  If there
is any additional information you need please ask.

--- snip ---
Nov 16 11:25:07 imap-mgt dovecot: imap(username): Panic: file
istream-header-filter.c: line 520 (i_stream_create_header_filter):
assertion failed: (ret  0)
Nov 16 11:25:07 imap-mgt dovecot: imap(username): Error: Raw backtrace:
/usr/lib/dovecot/libdovecot.so.0(+0x3e81b) [0x7f82a3bc381b] -
/usr/lib/dovecot/libdovecot.so.0(+0x3e876) [0x7f82a3bc3876] -
/usr/lib/dovecot/libdovecot.so.0(i_error+0) [0x7f82a3b9dacf] - /usr/lib/do
vecot/libdovecot.so.0(i_stream_create_header_filter+0x27b)
[0x7f82a3babf9b] -
/usr/lib/dovecot/libdovecot-storage.so.0(index_mail_get_header_stream+0x154)
[0x7f82a3e4cf04] -
/usr/lib/dovecot/libdovecot-storage.so.0(index_storage_search_next_nonblock+0x530)
[0x7f82a3e4e7
e0] -
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_search_next_nonblock+0x20)
[0x7f82a3e36630] - dovecot/imap() [0x416284] -
dovecot/imap(imap_search_start+0x106) [0x4166f6] -
dovecot/imap(cmd_search+0xc5) [0x40d535] - dovecot/imap() [0x41032d] -
dovecot/imap()
[0x41040d] - dovecot/imap(client_handle_input+0x135) [0x410635] -
dovecot/imap(client_input+0x5f) [0x410f5f] -
/usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xb5)
[0x7f82a3bcf205] - /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x18)
[0x7f82a3bce338] - /usr/lib
/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7f82a3bbd0e3] -
dovecot/imap(main+0x2d1) [0x418f91] -
/lib/libc.so.6(__libc_start_main+0xfd) [0x7f82a3436c4d] -
dovecot/imap() [0x408c39]
Nov 16 11:25:07 imap-mgt dovecot: master: Error: service(imap): child
23925 killed with signal 6 (core not dumped)
--- snip ---

doveconf -n:

# 2.0.7 (3aced5ececd7): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.26-2-amd64 x86_64 Debian 5.0.6 xfs
auth_gssapi_hostname = imap.mpifr-bonn.mpg.de
auth_mechanisms = plain login gssapi
auth_verbose = yes
listen = 134.104.18.77
mail_gid = 4
mail_location = mdbox:/var/mail/%Ln
mail_uid = 4
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope
encoded-character vacation subaddress comparator-i;ascii-numeric
relational regex imap4flags copy include variables body enotify
environment mailbox date
namespace {
  inbox = yes
  location =
  prefix =
  separator = .
}
passdb {
  args = /etc/dovecot/dovecot-ldap-passdb.conf.ext
  driver = ldap
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_after = /home/global-after.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp sieve
service auth {
  unix_listener auth-userdb {
group = vmail
  }
}
service lmtp {
  inet_listener lmtp {
address = 134.104.18.77
port = 24
  }
}
service managesieve-login {
  inet_listener sieve {
address = 134.104.18.77
port = 4190
  }
}
ssl = required
ssl_cert = /etc/ssl/certs/imap-server.pem
ssl_key = /etc/ssl/private/imap-server.key
userdb {
  args = /etc/dovecot/dovecot-ldap-userdb.conf.ext
  driver = ldap
}
protocol lmtp {
  mail_plugins =  sieve
}
protocol imap {
  ssl_cert = /etc/ssl/certs/imap-server.pem
  ssl_key = /etc/ssl/private/imap-server.key
}
protocol pop3 {
  ssl_cert = /etc/ssl/certs/pop3-server.pem
  ssl_key = /etc/ssl/private/imap-server.key
}

-- 
MAX-PLANCK-INSTITUT fuer Radioastronomie
Jan Behrend - Rechenzentrum

Auf dem Huegel 69, D-53121 Bonn
Tel: +49 (228) 525 359, Fax: +49 (228) 525 229
jbehr...@mpifr-bonn.mpg.de http://www.mpifr-bonn.mpg.de



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] Trying to building a customized auth plugin

2010-11-16 Thread Alex Baule
inside your plugin, have this function ? authdb_custom_init

Every plugin must have a init function and it must call plugin-name_init


2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es

 Is it needed to include custom db on usedb.c and passdb.c ?

 I can see at userdb.c:

 void userdbs_init(void)

 with all userdb registered, and similar at passdb.c


 At now, I get the follow line loading the module and trying to access
 vía imap login

 Nov 16 17:54:28 auth: Error: module
 /usr/lib64/dovecot/auth/libauthdb_custom.so: dlsym(authdb_custom_init)
 failed: /usr/lib64/dovecot/auth/libauthdb_custom.so: undefined symbol:
 authdb_custom_init
 Nov 16 17:54:28 auth: Error: Module doesn't have init function:
 /usr/lib64/dovecot/auth/libauthdb_custom.so



 2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
  Well, I didn't execute ./configure on $DOVECOT path
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
   gcc -fPIC -shared -g -Wall \
   -I$DOVECOT \
   -I$DOVECOT/src/lib \
   -I$DOVECOT/src/lib-auth  \
   -I$DOVECOT/src/lib-sql \
   -I$DOVECOT/src/lib-settings \
   -I$DOVECOT/src/lib-ntlm \
   -I$DOVECOT/src/lib-master \
   -I$DOVECOT/src/auth \
   -DHAVE_CONFIG_H \
   -DAUTH_MODULE_DIR=\passdb-custom\\
   passdb-custom.c -o passdb-custom.o
 
  With this I get:
 
  error on auth-common.h
  ...
  config.h Not found.
 
 
  But config.h are in $DOVECOT path
 
 
  2010/11/15 Timo Sirainen t...@iki.fi:
  On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:
 
  gcc -fPIC -shared -g -Wall -I$DOVECOT \
  -I$DOVECOT/src/lib \
  -I$DOVECOT/src/lib-auth  \
  -I$DOVECOT/src/lib-sql \
  -I$DOVECOT/src/lib-settings \
  -I$DOVECOT/src/lib-ntlm \
  -I$DOVECOT/src/lib-master \
  -I$DOVECOT/src/auth \
  passdb-passwd-file.c -o passdb-passwd-file.o
 
  With this, I get errors relate with uoff_t
 
  You need to add -DHAVE_CONFIG_H
 
 
 
 



Re: [Dovecot] Trying to building a customized auth plugin

2010-11-16 Thread Antonio Perez-Aranda
Not, userdb-custom and passdb-custom are copies from
userdb-passwd-file and passdb-passwd-file.

I try with this function now, thanks.

2010/11/16 Alex Baule alexwba...@gmail.com:
 inside your plugin, have this function ? authdb_custom_init

 Every plugin must have a init function and it must call plugin-name_init


 2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es

 Is it needed to include custom db on usedb.c and passdb.c ?

 I can see at userdb.c:

 void userdbs_init(void)

 with all userdb registered, and similar at passdb.c


 At now, I get the follow line loading the module and trying to access
 vía imap login

 Nov 16 17:54:28 auth: Error: module
 /usr/lib64/dovecot/auth/libauthdb_custom.so: dlsym(authdb_custom_init)
 failed: /usr/lib64/dovecot/auth/libauthdb_custom.so: undefined symbol:
 authdb_custom_init
 Nov 16 17:54:28 auth: Error: Module doesn't have init function:
 /usr/lib64/dovecot/auth/libauthdb_custom.so



 2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
  Well, I didn't execute ./configure on $DOVECOT path
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
   gcc -fPIC -shared -g -Wall \
       -I$DOVECOT \
       -I$DOVECOT/src/lib \
       -I$DOVECOT/src/lib-auth  \
       -I$DOVECOT/src/lib-sql \
       -I$DOVECOT/src/lib-settings \
       -I$DOVECOT/src/lib-ntlm \
       -I$DOVECOT/src/lib-master \
       -I$DOVECOT/src/auth \
       -DHAVE_CONFIG_H \
       -DAUTH_MODULE_DIR=\passdb-custom\\
       passdb-custom.c -o passdb-custom.o
 
  With this I get:
 
  error on auth-common.h
  ...
  config.h Not found.
 
 
  But config.h are in $DOVECOT path
 
 
  2010/11/15 Timo Sirainen t...@iki.fi:
  On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:
 
  gcc -fPIC -shared -g -Wall -I$DOVECOT \
      -I$DOVECOT/src/lib \
      -I$DOVECOT/src/lib-auth  \
      -I$DOVECOT/src/lib-sql \
      -I$DOVECOT/src/lib-settings \
      -I$DOVECOT/src/lib-ntlm \
      -I$DOVECOT/src/lib-master \
      -I$DOVECOT/src/auth \
      passdb-passwd-file.c -o passdb-passwd-file.o
 
  With this, I get errors relate with uoff_t
 
  You need to add -DHAVE_CONFIG_H
 
 
 
 




Re: [Dovecot] Trying to building a customized auth plugin

2010-11-16 Thread Antonio Perez-Aranda
Well, all modules start with ifdef like this:

#ifdef USERDB_CUSTOM

And in this case, this isn't defined. I commet out this ifdef/else/if
block and then I have got more errors, I can continure.

2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
 Not, userdb-custom and passdb-custom are copies from
 userdb-passwd-file and passdb-passwd-file.

 I try with this function now, thanks.

 2010/11/16 Alex Baule alexwba...@gmail.com:
 inside your plugin, have this function ? authdb_custom_init

 Every plugin must have a init function and it must call plugin-name_init


 2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es

 Is it needed to include custom db on usedb.c and passdb.c ?

 I can see at userdb.c:

 void userdbs_init(void)

 with all userdb registered, and similar at passdb.c


 At now, I get the follow line loading the module and trying to access
 vía imap login

 Nov 16 17:54:28 auth: Error: module
 /usr/lib64/dovecot/auth/libauthdb_custom.so: dlsym(authdb_custom_init)
 failed: /usr/lib64/dovecot/auth/libauthdb_custom.so: undefined symbol:
 authdb_custom_init
 Nov 16 17:54:28 auth: Error: Module doesn't have init function:
 /usr/lib64/dovecot/auth/libauthdb_custom.so



 2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
  Well, I didn't execute ./configure on $DOVECOT path
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
   gcc -fPIC -shared -g -Wall \
       -I$DOVECOT \
       -I$DOVECOT/src/lib \
       -I$DOVECOT/src/lib-auth  \
       -I$DOVECOT/src/lib-sql \
       -I$DOVECOT/src/lib-settings \
       -I$DOVECOT/src/lib-ntlm \
       -I$DOVECOT/src/lib-master \
       -I$DOVECOT/src/auth \
       -DHAVE_CONFIG_H \
       -DAUTH_MODULE_DIR=\passdb-custom\\
       passdb-custom.c -o passdb-custom.o
 
  With this I get:
 
  error on auth-common.h
  ...
  config.h Not found.
 
 
  But config.h are in $DOVECOT path
 
 
  2010/11/15 Timo Sirainen t...@iki.fi:
  On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:
 
  gcc -fPIC -shared -g -Wall -I$DOVECOT \
      -I$DOVECOT/src/lib \
      -I$DOVECOT/src/lib-auth  \
      -I$DOVECOT/src/lib-sql \
      -I$DOVECOT/src/lib-settings \
      -I$DOVECOT/src/lib-ntlm \
      -I$DOVECOT/src/lib-master \
      -I$DOVECOT/src/auth \
      passdb-passwd-file.c -o passdb-passwd-file.o
 
  With this, I get errors relate with uoff_t
 
  You need to add -DHAVE_CONFIG_H
 
 
 
 





[Dovecot] IMAP aggregation and MUPDATE protocolo

2010-11-16 Thread Ernesto Revilla Derksen
Hi.

I'm just having a look about aggregating several IMAP sources and a
IMAP aggregator proxy would come very handy.

I just read:
http://www.cyrusimap.org/mediawiki/index.php/Cyrus_Murder_Design

and found it very interesting.

Anyone did something similar based on:
http://tools.ietf.org/html/rfc3656

Thanx.
Erny


-- 
Ernesto Revilla
Yaco Sistemas
+34 954 500 057


[Dovecot] local users and virtual users

2010-11-16 Thread Egbert Jan van den Bussche

Hi list,

I'm facing this problem:
I have a e few local (system) users and a bunch of virtual users (in 
MySQL). To make it easy for the big group, I've set a default domain 
which is not the domain of the server (which is just the servername). So 
the big group logs in with there short name without @domain.


BUT the few system users (in passwd) cannot login to pop or imap because 
they get the non-local domain attached and cannot be found in the mysql 
db but they cannot be found in passdb either with their long name. The 
same applies when system users give their longname with the local domain 
which IS the localname of the server. This name is not in mysql nor 
passdb either.


Is there a way to find local users in passdb when the come in with a 
long name? Do I need another passwd like file  (i hope not...)


Recap:
local Domain is :mail-dev.hobby.nl
default domain added bij dovecot is kader.hcc.nl
kader users are found in mysql regardless if they give @kader.hcc.nl or 
not (then it is added)

system user are never found since longname is not in mysql nor in passdb.

dovecot -n:
r...@mail-dev:/etc/dovecot# dovecot -n
# 1.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-25-server x86_64 Ubuntu 10.04.1 LTS
log_path: /var/log/dovecot/error.log
info_log_path: /var/log/dovecot/info.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap pop3 imaps pop3s managesieve
listen: *, [::]
ssl_cert_file: /etc/ssl/certs/ssl-mail.pem
ssl_key_file: /etc/ssl/private/ssl-mail.key
ssl_cipher_list: 
ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM

disable_plaintext_auth: no
verbose_ssl: yes
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
mail_max_userip_connections(default): 10
mail_max_userip_connections(imap): 10
mail_max_userip_connections(pop3): 3
mail_max_userip_connections(managesieve): 10
verbose_proctitle: yes
first_valid_uid: 200
mail_privileged_group: vmail
mail_location: maildir:~/Maildir
mail_debug: yes
mmap_disable: yes
dotlock_use_excl: no
mail_nfs_storage: yes
mail_nfs_index: 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_plugins(default): convert autocreate
mail_plugins(imap): convert autocreate
mail_plugins(pop3): convert autocreate
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
imap_client_workarounds(default): outlook-idle delay-newmail
imap_client_workarounds(imap): outlook-idle delay-newmail
imap_client_workarounds(pop3):
imap_client_workarounds(managesieve):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve):
lda:
  postmaster_address: postmaster
  deliver_log_format: msgid=%m: %$
  rejection_reason: Your message to %t was automatically rejected:%n%r
  auth_socket_path: /var/run/dovecot/auth-master
auth default:
  mechanisms: plain login
  realms: kader.hcc.nl hobby.nl
  default_realm: kader.hcc.nl
  cache_size: 1024
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
driver: pam
args: failure_show_msg=yes cache_key=%u dovecot
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: passwd
args: mail=maildir:~/Maildir
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  socket:
type: listen
client:
  path: /var/spool/postfix/private/dovecot-auth
  mode: 432
  user: postfix
  group: postfix
master:
  path: /var/run/dovecot/auth-master
  mode: 384
  user: vmail
  group: vmail
plugin:
  convert_mail: mbox:/disk/mail/convert/%n
  autocreate: Trash
  autocreate2: Sent
  autocreate3: Drafts
  autocreate4: Spam
  autosubscribe: Trash
  autosubscribe2: Sent
  autosubscribe3: Drafts
  autosubscribe4: Spam

Pse help. TIA!
Egbert Jan


Re: [Dovecot] Trying to building a customized auth plugin

2010-11-16 Thread Alex Baule
Dovecot plugins works with hooks. This hooks allow you customize some
actions.

You need to find the authentication hook, and rewrite it's actions.

Inside the userdb.c have it void userdbs_init(void), but you change the
shared name, so you need to change inside your plugin too.

But, you're trying to do something with auth, you can use PAM, it's more
easy. (i think)

2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es

 Well, all modules start with ifdef like this:

 #ifdef USERDB_CUSTOM

 And in this case, this isn't defined. I commet out this ifdef/else/if
 block and then I have got more errors, I can continure.

 2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
  Not, userdb-custom and passdb-custom are copies from
  userdb-passwd-file and passdb-passwd-file.
 
  I try with this function now, thanks.
 
  2010/11/16 Alex Baule alexwba...@gmail.com:
  inside your plugin, have this function ? authdb_custom_init
 
  Every plugin must have a init function and it must call
 plugin-name_init
 
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es
 
  Is it needed to include custom db on usedb.c and passdb.c ?
 
  I can see at userdb.c:
 
  void userdbs_init(void)
 
  with all userdb registered, and similar at passdb.c
 
 
  At now, I get the follow line loading the module and trying to access
  vía imap login
 
  Nov 16 17:54:28 auth: Error: module
  /usr/lib64/dovecot/auth/libauthdb_custom.so: dlsym(authdb_custom_init)
  failed: /usr/lib64/dovecot/auth/libauthdb_custom.so: undefined symbol:
  authdb_custom_init
  Nov 16 17:54:28 auth: Error: Module doesn't have init function:
  /usr/lib64/dovecot/auth/libauthdb_custom.so
 
 
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
   Well, I didn't execute ./configure on $DOVECOT path
  
   2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
gcc -fPIC -shared -g -Wall \
-I$DOVECOT \
-I$DOVECOT/src/lib \
-I$DOVECOT/src/lib-auth  \
-I$DOVECOT/src/lib-sql \
-I$DOVECOT/src/lib-settings \
-I$DOVECOT/src/lib-ntlm \
-I$DOVECOT/src/lib-master \
-I$DOVECOT/src/auth \
-DHAVE_CONFIG_H \
-DAUTH_MODULE_DIR=\passdb-custom\\
passdb-custom.c -o passdb-custom.o
  
   With this I get:
  
   error on auth-common.h
   ...
   config.h Not found.
  
  
   But config.h are in $DOVECOT path
  
  
   2010/11/15 Timo Sirainen t...@iki.fi:
   On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:
  
   gcc -fPIC -shared -g -Wall -I$DOVECOT \
   -I$DOVECOT/src/lib \
   -I$DOVECOT/src/lib-auth  \
   -I$DOVECOT/src/lib-sql \
   -I$DOVECOT/src/lib-settings \
   -I$DOVECOT/src/lib-ntlm \
   -I$DOVECOT/src/lib-master \
   -I$DOVECOT/src/auth \
   passdb-passwd-file.c -o passdb-passwd-file.o
  
   With this, I get errors relate with uoff_t
  
   You need to add -DHAVE_CONFIG_H
  
  
  
  
 
 
 



[Dovecot] 2.0.7: emails read emails become unread

2010-11-16 Thread KTamas
Hi

My users are reporting that in public folders, emails that were past
read suddenly got unread, sometimes even after marking them as read
again. Didn't have such problems with 2.0.6 I think.

My dovecot -n:

# 2.0.7: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.26-2-xen-amd64 x86_64 Debian 5.0.6
auth_mechanisms = plain login
disable_plaintext_auth = no
listen = *
mail_location = maildir:~/Maildir
mail_plugins = acl
maildir_very_dirty_syncs = yes
namespace {
  inbox = yes
  location =
  prefix =
  separator = .
  type = private
}
namespace {
  location = maildir:/home/_shared/projects:INDEX=~/Maildir/_shared
  prefix = shared.
  separator = .
  subscriptions = no
  type = public
}
passdb {
  driver = pam
}
plugin {
  acl = vfile
  mail_log_events = delete undelete expunge copy mailbox_delete
mailbox_rename flag_change append
  mail_log_fields = uid box msgid from subject size vsize flags
  mail_log_group_events = yes
}
protocols = imap pop3
service imap {
  executable = imap
}
ssl_cert = /etc/ssl/certs/dovecot.pem
ssl_key = /etc/ssl/private/dovecot.pem
userdb {
  driver = passwd
}
verbose_proctitle = yes
protocol imap {
  mail_max_userip_connections = 40
  mail_plugins = acl imap_acl
}


Re: [Dovecot] Trying to building a customized auth plugin

2010-11-16 Thread Antonio Perez-Aranda
Maybe, but I haven't got any experience with PAM modules as with dovecot.

I have a preauthcustom.c from courier which I have to migrate to dovecot.

2010/11/16 Alex Baule alexwba...@gmail.com:
 Dovecot plugins works with hooks. This hooks allow you customize some
 actions.

 You need to find the authentication hook, and rewrite it's actions.

 Inside the userdb.c have it void userdbs_init(void), but you change the
 shared name, so you need to change inside your plugin too.

 But, you're trying to do something with auth, you can use PAM, it's more
 easy. (i think)

 2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es

 Well, all modules start with ifdef like this:

 #ifdef USERDB_CUSTOM

 And in this case, this isn't defined. I commet out this ifdef/else/if
 block and then I have got more errors, I can continure.

 2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
  Not, userdb-custom and passdb-custom are copies from
  userdb-passwd-file and passdb-passwd-file.
 
  I try with this function now, thanks.
 
  2010/11/16 Alex Baule alexwba...@gmail.com:
  inside your plugin, have this function ? authdb_custom_init
 
  Every plugin must have a init function and it must call
 plugin-name_init
 
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es
 
  Is it needed to include custom db on usedb.c and passdb.c ?
 
  I can see at userdb.c:
 
  void userdbs_init(void)
 
  with all userdb registered, and similar at passdb.c
 
 
  At now, I get the follow line loading the module and trying to access
  vía imap login
 
  Nov 16 17:54:28 auth: Error: module
  /usr/lib64/dovecot/auth/libauthdb_custom.so: dlsym(authdb_custom_init)
  failed: /usr/lib64/dovecot/auth/libauthdb_custom.so: undefined symbol:
  authdb_custom_init
  Nov 16 17:54:28 auth: Error: Module doesn't have init function:
  /usr/lib64/dovecot/auth/libauthdb_custom.so
 
 
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
   Well, I didn't execute ./configure on $DOVECOT path
  
   2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
    gcc -fPIC -shared -g -Wall \
        -I$DOVECOT \
        -I$DOVECOT/src/lib \
        -I$DOVECOT/src/lib-auth  \
        -I$DOVECOT/src/lib-sql \
        -I$DOVECOT/src/lib-settings \
        -I$DOVECOT/src/lib-ntlm \
        -I$DOVECOT/src/lib-master \
        -I$DOVECOT/src/auth \
        -DHAVE_CONFIG_H \
        -DAUTH_MODULE_DIR=\passdb-custom\\
        passdb-custom.c -o passdb-custom.o
  
   With this I get:
  
   error on auth-common.h
   ...
   config.h Not found.
  
  
   But config.h are in $DOVECOT path
  
  
   2010/11/15 Timo Sirainen t...@iki.fi:
   On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:
  
   gcc -fPIC -shared -g -Wall -I$DOVECOT \
       -I$DOVECOT/src/lib \
       -I$DOVECOT/src/lib-auth  \
       -I$DOVECOT/src/lib-sql \
       -I$DOVECOT/src/lib-settings \
       -I$DOVECOT/src/lib-ntlm \
       -I$DOVECOT/src/lib-master \
       -I$DOVECOT/src/auth \
       passdb-passwd-file.c -o passdb-passwd-file.o
  
   With this, I get errors relate with uoff_t
  
   You need to add -DHAVE_CONFIG_H
  
  
  
  
 
 
 




Re: [Dovecot] Trying to building a customized auth plugin

2010-11-16 Thread Alex Baule
What the preauthcustom.c does ? something special or setting some rights
from users ?

If was only auth, PAM is much more easy

2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es

 Maybe, but I haven't got any experience with PAM modules as with dovecot.

 I have a preauthcustom.c from courier which I have to migrate to dovecot.

 2010/11/16 Alex Baule alexwba...@gmail.com:
  Dovecot plugins works with hooks. This hooks allow you customize some
  actions.
 
  You need to find the authentication hook, and rewrite it's actions.
 
  Inside the userdb.c have it void userdbs_init(void), but you change the
  shared name, so you need to change inside your plugin too.
 
  But, you're trying to do something with auth, you can use PAM, it's more
  easy. (i think)
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es
 
  Well, all modules start with ifdef like this:
 
  #ifdef USERDB_CUSTOM
 
  And in this case, this isn't defined. I commet out this ifdef/else/if
  block and then I have got more errors, I can continure.
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
   Not, userdb-custom and passdb-custom are copies from
   userdb-passwd-file and passdb-passwd-file.
  
   I try with this function now, thanks.
  
   2010/11/16 Alex Baule alexwba...@gmail.com:
   inside your plugin, have this function ? authdb_custom_init
  
   Every plugin must have a init function and it must call
  plugin-name_init
  
  
   2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es
  
   Is it needed to include custom db on usedb.c and passdb.c ?
  
   I can see at userdb.c:
  
   void userdbs_init(void)
  
   with all userdb registered, and similar at passdb.c
  
  
   At now, I get the follow line loading the module and trying to
 access
   vía imap login
  
   Nov 16 17:54:28 auth: Error: module
   /usr/lib64/dovecot/auth/libauthdb_custom.so:
 dlsym(authdb_custom_init)
   failed: /usr/lib64/dovecot/auth/libauthdb_custom.so: undefined
 symbol:
   authdb_custom_init
   Nov 16 17:54:28 auth: Error: Module doesn't have init function:
   /usr/lib64/dovecot/auth/libauthdb_custom.so
  
  
  
   2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
Well, I didn't execute ./configure on $DOVECOT path
   
2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
 gcc -fPIC -shared -g -Wall \
 -I$DOVECOT \
 -I$DOVECOT/src/lib \
 -I$DOVECOT/src/lib-auth  \
 -I$DOVECOT/src/lib-sql \
 -I$DOVECOT/src/lib-settings \
 -I$DOVECOT/src/lib-ntlm \
 -I$DOVECOT/src/lib-master \
 -I$DOVECOT/src/auth \
 -DHAVE_CONFIG_H \
 -DAUTH_MODULE_DIR=\passdb-custom\\
 passdb-custom.c -o passdb-custom.o
   
With this I get:
   
error on auth-common.h
...
config.h Not found.
   
   
But config.h are in $DOVECOT path
   
   
2010/11/15 Timo Sirainen t...@iki.fi:
On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:
   
gcc -fPIC -shared -g -Wall -I$DOVECOT \
-I$DOVECOT/src/lib \
-I$DOVECOT/src/lib-auth  \
-I$DOVECOT/src/lib-sql \
-I$DOVECOT/src/lib-settings \
-I$DOVECOT/src/lib-ntlm \
-I$DOVECOT/src/lib-master \
-I$DOVECOT/src/auth \
passdb-passwd-file.c -o passdb-passwd-file.o
   
With this, I get errors relate with uoff_t
   
You need to add -DHAVE_CONFIG_H
   
   
   
   
  
  
  
 
 



Re: [Dovecot] Trying to building a customized auth plugin

2010-11-16 Thread Antonio Perez-Aranda
It take login user, pass and other dat from connection like remote ip
and send to a Java App with special security. If the result of Java
App is correct (more difficult to explain), then it pass ask to
standard courier ldap plugin.

2010/11/16 Alex Baule alexwba...@gmail.com:
 What the preauthcustom.c does ? something special or setting some rights
 from users ?

 If was only auth, PAM is much more easy

 2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es

 Maybe, but I haven't got any experience with PAM modules as with dovecot.

 I have a preauthcustom.c from courier which I have to migrate to dovecot.

 2010/11/16 Alex Baule alexwba...@gmail.com:
  Dovecot plugins works with hooks. This hooks allow you customize some
  actions.
 
  You need to find the authentication hook, and rewrite it's actions.
 
  Inside the userdb.c have it void userdbs_init(void), but you change the
  shared name, so you need to change inside your plugin too.
 
  But, you're trying to do something with auth, you can use PAM, it's more
  easy. (i think)
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es
 
  Well, all modules start with ifdef like this:
 
  #ifdef USERDB_CUSTOM
 
  And in this case, this isn't defined. I commet out this ifdef/else/if
  block and then I have got more errors, I can continure.
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
   Not, userdb-custom and passdb-custom are copies from
   userdb-passwd-file and passdb-passwd-file.
  
   I try with this function now, thanks.
  
   2010/11/16 Alex Baule alexwba...@gmail.com:
   inside your plugin, have this function ? authdb_custom_init
  
   Every plugin must have a init function and it must call
  plugin-name_init
  
  
   2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es
  
   Is it needed to include custom db on usedb.c and passdb.c ?
  
   I can see at userdb.c:
  
   void userdbs_init(void)
  
   with all userdb registered, and similar at passdb.c
  
  
   At now, I get the follow line loading the module and trying to
 access
   vía imap login
  
   Nov 16 17:54:28 auth: Error: module
   /usr/lib64/dovecot/auth/libauthdb_custom.so:
 dlsym(authdb_custom_init)
   failed: /usr/lib64/dovecot/auth/libauthdb_custom.so: undefined
 symbol:
   authdb_custom_init
   Nov 16 17:54:28 auth: Error: Module doesn't have init function:
   /usr/lib64/dovecot/auth/libauthdb_custom.so
  
  
  
   2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
Well, I didn't execute ./configure on $DOVECOT path
   
2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
 gcc -fPIC -shared -g -Wall \
     -I$DOVECOT \
     -I$DOVECOT/src/lib \
     -I$DOVECOT/src/lib-auth  \
     -I$DOVECOT/src/lib-sql \
     -I$DOVECOT/src/lib-settings \
     -I$DOVECOT/src/lib-ntlm \
     -I$DOVECOT/src/lib-master \
     -I$DOVECOT/src/auth \
     -DHAVE_CONFIG_H \
     -DAUTH_MODULE_DIR=\passdb-custom\\
     passdb-custom.c -o passdb-custom.o
   
With this I get:
   
error on auth-common.h
...
config.h Not found.
   
   
But config.h are in $DOVECOT path
   
   
2010/11/15 Timo Sirainen t...@iki.fi:
On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:
   
gcc -fPIC -shared -g -Wall -I$DOVECOT \
    -I$DOVECOT/src/lib \
    -I$DOVECOT/src/lib-auth  \
    -I$DOVECOT/src/lib-sql \
    -I$DOVECOT/src/lib-settings \
    -I$DOVECOT/src/lib-ntlm \
    -I$DOVECOT/src/lib-master \
    -I$DOVECOT/src/auth \
    passdb-passwd-file.c -o passdb-passwd-file.o
   
With this, I get errors relate with uoff_t
   
You need to add -DHAVE_CONFIG_H
   
   
   
   
  
  
  
 
 




Re: [Dovecot] Trying to building a customized auth plugin

2010-11-16 Thread Alex Baule
Humm... if you get the remote ip, sometimes the PAM don't have this
information to use...

Well...it's better you do the plugin.



2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es

 It take login user, pass and other dat from connection like remote ip
 and send to a Java App with special security. If the result of Java
 App is correct (more difficult to explain), then it pass ask to
 standard courier ldap plugin.

 2010/11/16 Alex Baule alexwba...@gmail.com:
  What the preauthcustom.c does ? something special or setting some rights
  from users ?
 
  If was only auth, PAM is much more easy
 
  2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es
 
  Maybe, but I haven't got any experience with PAM modules as with
 dovecot.
 
  I have a preauthcustom.c from courier which I have to migrate to
 dovecot.
 
  2010/11/16 Alex Baule alexwba...@gmail.com:
   Dovecot plugins works with hooks. This hooks allow you customize some
   actions.
  
   You need to find the authentication hook, and rewrite it's actions.
  
   Inside the userdb.c have it void userdbs_init(void), but you change
 the
   shared name, so you need to change inside your plugin too.
  
   But, you're trying to do something with auth, you can use PAM, it's
 more
   easy. (i think)
  
   2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es
  
   Well, all modules start with ifdef like this:
  
   #ifdef USERDB_CUSTOM
  
   And in this case, this isn't defined. I commet out this ifdef/else/if
   block and then I have got more errors, I can continure.
  
   2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
Not, userdb-custom and passdb-custom are copies from
userdb-passwd-file and passdb-passwd-file.
   
I try with this function now, thanks.
   
2010/11/16 Alex Baule alexwba...@gmail.com:
inside your plugin, have this function ? authdb_custom_init
   
Every plugin must have a init function and it must call
   plugin-name_init
   
   
2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es
   
Is it needed to include custom db on usedb.c and passdb.c ?
   
I can see at userdb.c:
   
void userdbs_init(void)
   
with all userdb registered, and similar at passdb.c
   
   
At now, I get the follow line loading the module and trying to
  access
vía imap login
   
Nov 16 17:54:28 auth: Error: module
/usr/lib64/dovecot/auth/libauthdb_custom.so:
  dlsym(authdb_custom_init)
failed: /usr/lib64/dovecot/auth/libauthdb_custom.so: undefined
  symbol:
authdb_custom_init
Nov 16 17:54:28 auth: Error: Module doesn't have init function:
/usr/lib64/dovecot/auth/libauthdb_custom.so
   
   
   
2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
 Well, I didn't execute ./configure on $DOVECOT path

 2010/11/16 Antonio Perez-Aranda aperezara...@yaco.es:
  gcc -fPIC -shared -g -Wall \
  -I$DOVECOT \
  -I$DOVECOT/src/lib \
  -I$DOVECOT/src/lib-auth  \
  -I$DOVECOT/src/lib-sql \
  -I$DOVECOT/src/lib-settings \
  -I$DOVECOT/src/lib-ntlm \
  -I$DOVECOT/src/lib-master \
  -I$DOVECOT/src/auth \
  -DHAVE_CONFIG_H \
  -DAUTH_MODULE_DIR=\passdb-custom\\
  passdb-custom.c -o passdb-custom.o

 With this I get:

 error on auth-common.h
 ...
 config.h Not found.


 But config.h are in $DOVECOT path


 2010/11/15 Timo Sirainen t...@iki.fi:
 On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:

 gcc -fPIC -shared -g -Wall -I$DOVECOT \
 -I$DOVECOT/src/lib \
 -I$DOVECOT/src/lib-auth  \
 -I$DOVECOT/src/lib-sql \
 -I$DOVECOT/src/lib-settings \
 -I$DOVECOT/src/lib-ntlm \
 -I$DOVECOT/src/lib-master \
 -I$DOVECOT/src/auth \
 passdb-passwd-file.c -o passdb-passwd-file.o

 With this, I get errors relate with uoff_t

 You need to add -DHAVE_CONFIG_H




   
   
   
  
  
 
 



[Dovecot] Restarting dovecot-auth stops authentication

2010-11-16 Thread Attila Nagy

Hi,

The Dovecot wiki states that Dovecot's master restarts all died 
processes, which is good for availability. But when I kill dovecot/auth 
(to simulate an error condition which happened on a machine), the 
authentication fails with:
Nov 16 14:32:40 be dovecot: imap: Error: net_connect_unix(auth-master) 
failed: No such file or directory


It seems -albeit it gets restarted- dovecot/auth doesn't re-create its 
socket file.

Before:
# ls /var/run/dovecot/
anvil   auth-worker doveadm-server
anvil-auth-penalty  config  dovecot.conf
auth-client dictempty
auth-login  director-admin  lmtp
auth-master director-userdb login
auth-userdb dns-client  master.pid
# ps auwx | grep dovecot/auth
dovecot   87455  0.0  0.0 20024  3832  ??  S 2:34PM   0:00.01 
dovecot/auth

# rm /var/run/dovecot/auth-master; kill 87455
# ps auwx | grep dovecot/auth
dovecot   88815  0.0  0.0 20024  3776  ??  S 2:36PM   0:00.01 
dovecot/auth

# ls /var/run/dovecot/
anvil   config  dovecot.conf
anvil-auth-penalty  dictempty
auth-client director-admin  lmtp
auth-login  director-userdb login
auth-userdb dns-client  master.pid
auth-worker doveadm-server

I've deleted the auth-master socket because if I don't, you can't see 
that it's not re-created. :)


Is this a normal behaviour? I understand that killing dovecot/auth is 
not, but Dovecot could survive this easily, if recreating and re-using 
the new socket file would work. And loosing dovecot/auth happens 
sometimes (I don't yet now why).


Thanks,


[Dovecot] Email backend monitor script for Director

2010-11-16 Thread Aliet Santiesteban Sifontes
Hi people, I know I saw this at some point in the list but can't find it, I
need a script wich monitor the health of the email backend and if a node
fails remove it from the director server, once is up again add it, I plan tu
run the script at the load balancer, if you have some let me know..
thank's in advance


Re: [Dovecot] Dovecot + vpopmail + shared folders

2010-11-16 Thread qmail

Anyone has any ideas ?

I also realized that not only can domains be placed within another  
sub-folder if there are too many, but so can users.


For example, if a domain has 1000 users, its path might be something like:

/usr/home/vpopmail/domains/8/xyz.com/A/myuser

Therefore a static location is not feasible at all.


I'm using dovecot 1.2.14 with vpopmail.

I've enabled shared folders and the default setup was not working.  
The default setup being this line:


location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u

Going through the Archives I saw a message from Timo that said to  
apply a patch and use this line instead:



location =  
maildir:/usr/home/vpopmail/domains/%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u


It seems like the patch is already existing in version 1.2.14 and  
that line works well for shared folders for domains directly under  
/usr/home/vpopmail/domains.


However, with vpopmail after a certain number of domains, it starts  
putting them in /usr/home/vpopmail/domains/A, ..domains/B, etc.


Shared folders do not work for those domains since my location line  
is forcing it to look directly in /usr/home/vpopmail/domains/xyz.com  
instead of /usr/home/vpopmail/domains/A/xyz.com


Any workaround this ? How come we can't use %h or ~/ directly ?










Re: [Dovecot] proctitle woes in 2.0.7 vs. 2.0.6

2010-11-16 Thread Timo Sirainen
On Tue, 2010-11-16 at 10:39 -0500, Patrick Fay wrote:

 Is there any chance this bug is related to MacOS proc titles being  
 mis-identified (e.g. containing garbage) in the 1.2.x tree? 

No. Also, I've never heard of proctitles problems with OSX. With v1.2 it
doesn't even use those ugly hacks that v2.0 does, unless you manually
enabled them?




[Dovecot] Help - custom vpopmail

2010-11-16 Thread Rick Romero

Hi,

 First, I'm not sure if dovecot should alter this, but it seems vpopmail
writes the IP into the 'remote_ip' field instead of the auth type. Dovecot
still writes the auth type.  I want both.

 So I modified my vpopmail install to write an additional field into the
lastauth table.  My custom vpopmail writes the remote IP into remote_ip,
and the auth type into a 'type' field. I tested with qmail's POP3 daemon to
verify vchkpw would fill the table correcly.

 But I'm not sure how to get dovecot to do it:

 I know this is close, but there is something not right in
src/auth/userdb-vpopmail.c line 99.
 vset_lastauth(vpop_user, vpop_domain, auth_request-remote_ip,
t_strdup_noconst(auth_request-service));

 I'm, by far, NOT a C programmer - Feel free to laugh at my code publicly
:)

 Thanks,

 Rick


Re: [Dovecot] Dovecot + vpopmail + shared folders

2010-11-16 Thread Timo Sirainen
On Fri, 2010-11-12 at 14:43 -0500, qm...@top-consulting.net wrote:
 I'm using dovecot 1.2.14 with vpopmail.
 
 I've enabled shared folders and the default setup was not working. The  
 default setup being this line:
 
 location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
 
 Going through the Archives I saw a message from Timo that said to  
 apply a patch and use this line instead:
 
 
 location =  
 maildir:/usr/home/vpopmail/domains/%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u

I'm not sure why I would have said that (maybe you misunderstood or I
was talking only about some specific situation or some workaround for
something). %%h is cleaner, although it does require a userdb lookup.

Why isn't %%h working? Set auth_debug=yes and mail_debug=yes and show
what the logs say when trying to access a shared mailbox then. Also
instead of using a client, talk IMAP protocol directly
(http://wiki.dovecot.org/TestInstallation), something like:

a LIST  *
b SELECT shared/user/some-shared-box

What do the commands reply?



Re: [Dovecot] Restarting dovecot-auth stops authentication

2010-11-16 Thread Timo Sirainen
On Tue, 2010-11-16 at 14:52 +0100, Attila Nagy wrote:
  Nov 16 14:32:40 be dovecot: imap: Error: net_connect_unix(auth-master) 
  failed: No such file or directory
 Of course I forgot to tell it's 2.0.6.

2.0.7 fixed this.

 BTW, sending SIGUSR2 to dovecot/auth doesn't lot anything, while sending 
 SIGHUP logs the clearing cache message. The wiki says on USR2 it 
 should log cache statistics.

Works here:

Nov 16 17:26:25 auth: Info: Authentication cache hits 0/2 (0%)
Nov 16 17:26:25 auth: Info: Authentication cache inserts: positive: 2 95B, 
negative: 0 0B

So .. Since SIGHUP works, I don't really know. They should be using
exactly the same code right next to each others. I guess something could
disable SIGUSR2 somewhere somehow. What passdb/userdb do you use?



Re: [Dovecot] 2.0.7: emails read emails become unread

2010-11-16 Thread Timo Sirainen
On Tue, 2010-11-16 at 12:32 +0100, Kádár Tamás (KTamas) wrote:

 My users are reporting that in public folders, emails that were past
 read suddenly got unread, sometimes even after marking them as read
 again. 

Any errors in Dovecot's logs?

 Didn't have such problems with 2.0.6 I think.

I don't think I've changed anything related to this..

 namespace {
   location = maildir:/home/_shared/projects:INDEX=~/Maildir/_shared

You do have dovecot-shared files for all those folders
in /home/_shared/projects/, right?

Anyway, losing seen flags for shared mailboxes basically means that
Dovecot ignored/lost the index files in ~/Maildir/_shared/ for some
reason.




[Dovecot] POP users complaining about multiple copies of mail

2010-11-16 Thread H. Wade Minter
Hello,

We just switched from UW to Dovecot for our mail server.  The transition went 
smoothly, except we have some users complaining about their email clients 
re-downloading mail or getting multiple copies of emails.  When we go into 
their accounts, we only see one copy of the email, so I'm assuming there's 
something odd in the communication between their client and us that's causing 
the mail to get downloaded repeatedly.

The clients that we've heard about are Outlook and one called Goldmine.

Has anyone run across this before?  Scanning the archives didn't show me 
anything.  This is Dovecot 1.2.12-1ubuntu8 on Ubuntu 10.10.  Here's my config:

# 1.2.12: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.35.4-rscloud x86_64 Ubuntu 10.10 
log_timestamp: %Y-%m-%d %H:%M:%S 
protocols: imap imaps pop3 pop3s managesieve
ssl_ca_file: /etc/ssl/certs/ca.pem
ssl_cert_file: /etc/ssl/certs/wildcard.skiltech.com.pem
ssl_key_file: /etc/ssl/private/wildcard.skiltech.com.key
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
mail_privileged_group: mail
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_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
imap_client_workarounds(default): outlook-idle delay-newmail
imap_client_workarounds(imap): outlook-idle delay-newmail
imap_client_workarounds(pop3): 
imap_client_workarounds(managesieve): 
pop3_enable_last(default): no
pop3_enable_last(imap): no
pop3_enable_last(pop3): yes
pop3_enable_last(managesieve): no
pop3_client_workarounds(default): 
pop3_client_workarounds(imap): 
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve): 
lda:
  postmaster_address: postmaster
  mail_plugins: sieve
  quota_full_tempfail: yes
  deliver_log_format: msgid=%m: %$
  rejection_reason: Your message to %t was automatically rejected:%n%r
auth default:
  mechanisms: plain login
  passdb:
driver: pam
  userdb:
driver: passwd
  socket:
type: listen
client:
  path: /var/spool/postfix/private/dovecot-auth
  mode: 432
  user: postfix
  group: postfix
plugin:
  sieve: ~/.dovecot.sieve
  sieve_dir: ~/sieve



Re: [Dovecot] Help - custom vpopmail

2010-11-16 Thread Timo Sirainen
On Tue, 2010-11-16 at 10:30 -0600, Rick Romero wrote:

   So I modified my vpopmail install to write an additional field into the
 lastauth table.  My custom vpopmail writes the remote IP into remote_ip,
 and the auth type into a 'type' field. I tested with qmail's POP3 daemon to
 verify vchkpw would fill the table correcly.
 
   But I'm not sure how to get dovecot to do it:
 
   I know this is close, but there is something not right in
 src/auth/userdb-vpopmail.c line 99.
   vset_lastauth(vpop_user, vpop_domain, auth_request-remote_ip,
 t_strdup_noconst(auth_request-service));

1) You need to modify vpopmail's vset_lastauth() function to actually
support this.

2) Once you do have the extra field (const char *ip) added, you can use:

vset_lastauth(vpop_user, vpop_domain,
net_ip2addr(auth_request-remote_ip),
t_strdup_noconst(auth_request-service));

Or maybe you could use vchkpw with Dovecot too via passdb checkpassword?



Re: [Dovecot] POP users complaining about multiple copies of mail

2010-11-16 Thread Timo Sirainen
On Tue, 2010-11-16 at 12:33 -0500, H. Wade Minter wrote:

 The clients that we've heard about are Outlook and one called
 Goldmine.
 
 Has anyone run across this before?  Scanning the archives didn't show
 me anything.

I've heard it several times, and it's always been Outlook. It just seems
to go nuts when server changes. No one who has complained about this has
ever come back to say if they managed to fix it somehow.

My guess: recreate the account in Outlook and hope for best.




Re: [Dovecot] POP users complaining about multiple copies of mail

2010-11-16 Thread Timo Sirainen
On Tue, 2010-11-16 at 17:40 +, Timo Sirainen wrote:
 I've heard it several times, and it's always been Outlook. It just seems
 to go nuts when server changes. No one who has complained about this has
 ever come back to say if they managed to fix it somehow.
 
 My guess: recreate the account in Outlook and hope for best.

Oh, the other possibility of course: You seem to be using mbox format?
If the message's IMAP UIDs change, the POP3 UIDL changes and the
messages get redownloaded.

You should at least explicitly set mail_location setting so Dovecot
doesn't use autodetection. Also look for Dovecot errors in log file.




Re: [Dovecot] Dovecot + vpopmail + shared folders

2010-11-16 Thread qmail

I might have forgotten to mention that I am using . (dot) as separator.

Your original message that proposed that fix is here:
http://www.mail-archive.com/dovecot@dovecot.org/msg20706.html

I am running the IMAP commands directly through telnet and although  
the namespace exists, it doesn't show up at all:


2 namespace
* NAMESPACE (( .)(Labels. .)) ((shared. .)) NIL

here's my config for it:

namespace shared {
  separator = .
  prefix = shared.%%u.
  location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  #location =  
maildir:/usr/home/vpopmail/domains/P/%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u

  subscriptions = no
  list = children
}

If I use the location that I commented out, shared folders will work  
for all the domains that exist under /usr/home/vpopmail/domains/P


Thanks Timo!

Quoting Timo Sirainen t...@iki.fi:


On Fri, 2010-11-12 at 14:43 -0500, qm...@top-consulting.net wrote:

I'm using dovecot 1.2.14 with vpopmail.

I've enabled shared folders and the default setup was not working. The
default setup being this line:

location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u

Going through the Archives I saw a message from Timo that said to
apply a patch and use this line instead:


location =
maildir:/usr/home/vpopmail/domains/%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u


I'm not sure why I would have said that (maybe you misunderstood or I
was talking only about some specific situation or some workaround for
something). %%h is cleaner, although it does require a userdb lookup.

Why isn't %%h working? Set auth_debug=yes and mail_debug=yes and show
what the logs say when trying to access a shared mailbox then. Also
instead of using a client, talk IMAP protocol directly
(http://wiki.dovecot.org/TestInstallation), something like:

a LIST  *
b SELECT shared/user/some-shared-box

What do the commands reply?









Re: [Dovecot] POP users complaining about multiple copies of mail

2010-11-16 Thread H. Wade Minter

On Nov 16, 2010, at 12:43 PM, Timo Sirainen wrote:

 On Tue, 2010-11-16 at 17:40 +, Timo Sirainen wrote:
 I've heard it several times, and it's always been Outlook. It just seems
 to go nuts when server changes. No one who has complained about this has
 ever come back to say if they managed to fix it somehow.
 
 My guess: recreate the account in Outlook and hope for best.
 
 Oh, the other possibility of course: You seem to be using mbox format?
 If the message's IMAP UIDs change, the POP3 UIDL changes and the
 messages get redownloaded.
 
 You should at least explicitly set mail_location setting so Dovecot
 doesn't use autodetection. Also look for Dovecot errors in log file.

I've just gone in and set mail_location

r...@bunning:~# dovecot -n | grep mail_loc
mail_location: maildir:~/Maildir

Is there anything I need to do about the mbox/UIDL issue?  Config variables to 
tweak?

--Wade



Re: [Dovecot] Dovecot + vpopmail + shared folders

2010-11-16 Thread Timo Sirainen
On Tue, 2010-11-16 at 12:44 -0500, qm...@top-consulting.net wrote:
 I might have forgotten to mention that I am using . (dot) as separator.
 
 Your original message that proposed that fix is here:
 http://www.mail-archive.com/dovecot@dovecot.org/msg20706.html

I just copied the location value from what the guy was already using.
The important part was that . in usernames was messing things up, and
you could now avoid that by using:

 namespace shared {
separator = .
prefix = shared.%%u.

prefix = shared.%%n.

(This of course prevents users from sharing mailboxes across different
domains.)

 I am running the IMAP commands directly through telnet and although  
 the namespace exists, it doesn't show up at all:
 
 If I use the location that I commented out, shared folders will work  
 for all the domains that exist under /usr/home/vpopmail/domains/P

1) Find out some mailbox name with the location=/usr/home/etc. that you
can actually successfully select, i.e. something like:

a SELECT shared.user.boxname

2) Switch to %%h, set mail_debug=yes and try the same again. What does
the command reply? What do the logs show?



Re: [Dovecot] POP users complaining about multiple copies of mail

2010-11-16 Thread Timo Sirainen
On Tue, 2010-11-16 at 12:47 -0500, H. Wade Minter wrote:
 I've just gone in and set mail_location
 
 r...@bunning:~# dovecot -n | grep mail_loc
 mail_location: maildir:~/Maildir

What, you're using maildir after all? Then you should remove this
setting:

mail_privileged_group = mail

 Is there anything I need to do about the mbox/UIDL issue?  Config variables 
 to tweak?

If you're using Maildir, there's almost no chance of UIDLs changing. You
could of course manually log in and check:

telnet localhost 110
user foo
pass bar
uidl

Save the output - look at it again after user redownloaded mails -
compare the output to see if it had changed (besides the intentional
message deletions and new messages).



Re: [Dovecot] POP users complaining about multiple copies of mail

2010-11-16 Thread H . Wade Minter

On Nov 16, 2010, at 12:57 PM, Timo Sirainen wrote:

 On Tue, 2010-11-16 at 12:47 -0500, H. Wade Minter wrote:
 I've just gone in and set mail_location
 
 r...@bunning:~# dovecot -n | grep mail_loc
 mail_location: maildir:~/Maildir
 
 What, you're using maildir after all? Then you should remove this
 setting:
 
 mail_privileged_group = mail
 
 Is there anything I need to do about the mbox/UIDL issue?  Config variables 
 to tweak?
 
 If you're using Maildir, there's almost no chance of UIDLs changing. You
 could of course manually log in and check:
 
 telnet localhost 110
 user foo
 pass bar
 uidl
 
 Save the output - look at it again after user redownloaded mails -
 compare the output to see if it had changed (besides the intentional
 message deletions and new messages).

Yes, I'm using Maildir, sorry.  I've removed that mail_privileged_group setting 
(I think I had it set when I was testing some migration FROM mbox).

The UIDL seems to be staying the same, so maybe the answer is having them 
delete/recreate their Outlook POP accounts?



Re: [Dovecot] Email backend monitor script for Director

2010-11-16 Thread Aliet Santiesteban Sifontes
Found it:
http://www.dovecot.org/list/dovecot/2010-August/051946.html

It would be great if director include it self this feature..
best regards

2010/11/16 Aliet Santiesteban Sifontes alietsantieste...@gmail.com

 Hi people, I know I saw this at some point in the list but can't find it, I
 need a script wich monitor the health of the email backend and if a node
 fails remove it from the director server, once is up again add it, I plan tu
 run the script at the load balancer, if you have some let me know..
 thank's in advance



Re: [Dovecot] Dovecot + vpopmail + shared folders

2010-11-16 Thread qmail

Ok. We are getting closer I believe:

If I run with a hardcoded location, my list  * shows the shared folders:

* LIST (\HasNoChildren) . shared.dev1.Sent items
* LIST (\HasNoChildren) . shared.qmail.INBOX
* LIST (\HasNoChildren) . shared.radius.INBOX

If I run with %%h I don't see the shared. folders and the logs show:

Nov 16 13:07:35 pop dovecot: dict: mysql: Connected to 192.168.1.7 (dovecot)
Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net): userdb  
lookup: connect(/var/run/dovecot/auth-master) failed: No

such file or directory
Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net):  
Namespace 'shared.': Could not lookup home for user d...@top-con

sulting.net
Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net): userdb  
lookup: connect(/var/run/dovecot/auth-master) failed: No

such file or directory
Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net):  
Namespace 'shared.': Could not lookup home for user d...@top-con

sulting.net
Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net): userdb  
lookup: connect(/var/run/dovecot/auth-master) failed: No

such file or directory
Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net):  
Namespace 'shared.': Could not lookup home for user qm...@top-co

nsulting.net
Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net): userdb  
lookup: connect(/var/run/dovecot/auth-master) failed: No

such file or directory
Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net):  
Namespace 'shared.': Could not lookup home for user rad...@top-c

onsulting.net
Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net): userdb  
lookup: connect(/var/run/dovecot/auth-master) failed: No

such file or directory
Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net):  
Namespace 'shared.': Could not lookup home for user @top-consult

ing.net


Now, for authentication I use the vpopmail module like so:

auth default {
  mechanisms = plain login

  passdb vpopmail {
args = webmail=192.168.1.4
  }

  userdb vpopmail {
args = quota_template=quota_rule=*:backend=%q
  }


Thanks!

Quoting Timo Sirainen t...@iki.fi:


On Tue, 2010-11-16 at 12:44 -0500, qm...@top-consulting.net wrote:

I might have forgotten to mention that I am using . (dot) as separator.

Your original message that proposed that fix is here:
http://www.mail-archive.com/dovecot@dovecot.org/msg20706.html


I just copied the location value from what the guy was already using.
The important part was that . in usernames was messing things up, and
you could now avoid that by using:


namespace shared {
   separator = .
   prefix = shared.%%u.


prefix = shared.%%n.

(This of course prevents users from sharing mailboxes across different
domains.)


I am running the IMAP commands directly through telnet and although
the namespace exists, it doesn't show up at all:

If I use the location that I commented out, shared folders will work
for all the domains that exist under /usr/home/vpopmail/domains/P


1) Find out some mailbox name with the location=/usr/home/etc. that you
can actually successfully select, i.e. something like:

a SELECT shared.user.boxname

2) Switch to %%h, set mail_debug=yes and try the same again. What does
the command reply? What do the logs show?









Re: [Dovecot] Dovecot + vpopmail + shared folders

2010-11-16 Thread Timo Sirainen
On Tue, 2010-11-16 at 13:16 -0500, qm...@top-consulting.net wrote:
 Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net): userdb  
 lookup: connect(/var/run/dovecot/auth-master) failed: No
 such file or directory

It should be connecting to auth-userdb. You probably have
auth_socket_path changed. You could just comment it out.

The second part is that you most likely have to change auth-userdb
socket's permissions as well. From example 10-master.conf:

service auth {
  # auth_socket_path points to this userdb socket by default. It's typically
  # used by dovecot-lda, doveadm, possibly imap process, etc. Its default
  # permissions make it readable only by root, but you may need to relax these
  # permissions. Users that have access to this socket are able to get a list
  # of all usernames and get results of everyone's userdb lookups.
  unix_listener auth-userdb {
#mode = 0600
#user = 
#group = 
  }

So probably just set user = vmail there.



Re: [Dovecot] Dovecot + vpopmail + shared folders

2010-11-16 Thread qmail
Maybe I'm missing some part of the configuration. I don't have a  
service auth { part and the auth_socket_path is commented out. Here is  
my full config:





# 1.2.14: /usr/local/etc/dovecot.conf
# OS: FreeBSD 7.0-RELEASE i386
protocols: imap pop3 imaps pop3s
listen(default): *:143
listen(imap): *:143
listen(pop3): *:110
ssl_listen(default): *:993
ssl_listen(imap): *:993
ssl_listen(pop3): *:995
ssl_ca_file: /usr/local/gtech/certs/gd_bundle.crt
ssl_cert_file: /usr/local/gtech/certs/pop.crt
ssl_key_file: /usr/local/gtech/certs/rsa.pop.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
login_greeting: Emailarray ready.
mail_max_userip_connections(default): 100
mail_max_userip_connections(imap): 100
mail_max_userip_connections(pop3): 10
verbose_proctitle: yes
first_valid_uid: 89
first_valid_gid: 89
mail_privileged_group: mail
mail_uid: 89
mail_gid: 89
mail_location: maildir:~/Maildir
mail_debug: yes
mmap_disable: yes
mail_nfs_storage: yes
mail_nfs_index: yes
lock_method: dotlock
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota fts fts_solr virtual acl imap_acl
mail_plugins(imap): quota imap_quota fts fts_solr virtual acl imap_acl
mail_plugins(pop3): virtual
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
imap_client_workarounds(default): delay-newmail netscape-eoh  
tb-extra-mailbox-sep

imap_client_workarounds(imap): delay-newmail netscape-eoh tb-extra-mailbox-sep
imap_client_workarounds(pop3):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
namespace:
  type: private
  separator: .
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: private
  separator: .
  prefix: INBOX.
  hidden: yes
  list: no
  subscriptions: yes
namespace:
  type: private
  separator: .
  prefix: Labels.
  location: virtual:~/Maildir/Labels:INDEX=MEMORY
  list: yes
  subscriptions: yes
namespace:
  type: shared
  separator: .
  prefix: shared.%%n.
  location: maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  list: children
lda:
  sendmail_path: /usr/sbin/sendmail
auth default:
  mechanisms: plain login
  username_format: %Lu
  verbose: yes
  passdb:
driver: vpopmail
args: webmail=192.168.1.4
  userdb:
driver: vpopmail
args: quota_template=quota_rule=*:backend=%q
plugin:
  fts: solr
  fts_solr: break-imap-search url=http://192.168.1.4:8983/solr/
  quota: maildir
  quota_rule: ?:storage=0
  acl: vfile
  acl_shared_dict: proxy::acl
dict:
  acl: mysql:/usr/local/etc/dovecot-dict-sql.conf



Here are also the files that exist in /var/run/dovecot:

ls -laR /var/run/dovecot/
total 8
drwxr-xr-x  3 root  wheel 512 Nov 16 13:07 .
drwxr-xr-x  8 root  wheel1024 Nov 16 13:07 ..
srw---  1 root  wheel   0 Nov 16 13:07 auth-worker.86474
srwxrwxrwx  1 root  wheel   0 Nov 16 13:07 dict-server
lrwx--  1 root  wheel  27 Nov 16 13:07 dovecot.conf -  
/usr/local/etc/dovecot.conf

drwxr-x---  2 root  dovecot   512 Nov 16 13:07 login
-rw---  1 root  wheel   6 Nov 16 13:07 master.pid

/var/run/dovecot/login:
total 6
drwxr-x---  2 root  dovecot  512 Nov 16 13:07 .
drwxr-xr-x  3 root  wheel512 Nov 16 13:07 ..
srw-rw  1 root  dovecot0 Nov 16 13:07 default
-rw-r--r--  2 root  wheel230 Nov 15 06:18 ssl-parameters.dat

Thanks!

Quoting Timo Sirainen t...@iki.fi:


On Tue, 2010-11-16 at 13:16 -0500, qm...@top-consulting.net wrote:

Nov 16 13:07:35 pop dovecot: IMAP(she...@top-consulting.net): userdb
lookup: connect(/var/run/dovecot/auth-master) failed: No
such file or directory


It should be connecting to auth-userdb. You probably have
auth_socket_path changed. You could just comment it out.

The second part is that you most likely have to change auth-userdb
socket's permissions as well. From example 10-master.conf:

service auth {
  # auth_socket_path points to this userdb socket by default. It's typically
  # used by dovecot-lda, doveadm, possibly imap process, etc. Its default
  # permissions make it readable only by root, but you may need to  
relax these

  # permissions. Users that have access to this socket are able to get a list
  # of all usernames and get results of everyone's userdb lookups.
  unix_listener auth-userdb {
#mode = 0600
#user =
#group =
  }

So probably just set user = vmail there.









Re: [Dovecot] dsync mbox-mdbox: Unexpectedly lost From-line and other issues from a big conversion.

2010-11-16 Thread Timo Sirainen
On Mon, 2010-11-15 at 20:15 +0200, Axel Thimm wrote:

  dsync2.log.old1:dsync(user): Error: Next message unexpectedly lost from 
  mbox file /home/user/mail/lists/mplayerhq.hu/ffmpeg-devel at 58706201 
  (cached)
  dsync2.log.old1:dsync(user): Error: read(msg input) failed: Invalid argument

For everyone else too: These were caused by having CRLF linefeeds in the
mbox files, which Dovecot doesn't much like. I should fix it some day.




Re: [Dovecot] dsync mbox-mdbox: Unexpectedly lost From-line and other issues from a big conversion.

2010-11-16 Thread Timo Sirainen
On Tue, 2010-11-16 at 12:01 +0200, Axel Thimm wrote:

 I checked the files and the mentioned offsets are one line off the next
 from_ line. It looks like a content-length mismatch.
 
 They also seem to mix CR+LF and simple LF endings within the same mail.
 For example an otherwise CR+LF encoded mail would have a few headers w/o
 CR at the bottom inserted (by dovecot?). Maybe the content-length
 computation was therefore a few lines off.
 
 I can probably salvage these mboxes by grepping out the content-length
 header, but I wonder why the content-length header are off.

Oh, didn't read this message before replying / checking the files :)
Yeah, you're right. It's the combination of CRLF + wrong Content-Length:
headers. Normally broken Content-Length: value is detected and fixed,
but I guess there's a bug with CRLF line feeds.




Re: [Dovecot] sieve fileinto public shared mbox?

2010-11-16 Thread Timo Sirainen
On Sat, 2010-11-13 at 11:27 -0800, RParr wrote:

 I quess deliver still does not support include?

In v2.0 yes, in v1.x no.

 Does deliver honor multiple -c options?

No.

 Or does deliver's lack of include support mean I must put all dovecot 
 config in one file? (eg /etc/dovecot/dovecot.conf)

Yeah.

 11/13/10 11:14:39 amn3dovecotdeliver(tarts): utime() failed 
 with mbox file /var/mail/public/SPAM/SPAMMM: Operation not permitted

Fixed for v2.0: http://hg.dovecot.org/dovecot-2.0/rev/3daec8435d29
http://hg.dovecot.org/dovecot-2.0/rev/586d549732f5

You can do basically the same for v1.2 (or just ignore the errors -
everything works anyway).



Re: [Dovecot] dovecot.conf settings

2010-11-16 Thread Timo Sirainen
On Sun, 2010-11-14 at 06:35 -0800, Marc Perkel wrote:
 OK - I'm not sure how they get set that way. I must have copied 
 something. Here is my new settings. Is there anything else to change or add?
 
 service imap-login {
process_limit = 800
process_min_avail = 10
service_count = 0
 }
 service pop3-login {
process_limit = 800
process_min_avail = 10
service_count = 0
 }

The above process_limits are still much higher than useful. They aren't
really harmful, but could be confusing.. I'd just remove them and let
them be defaults (default=100).



Re: [Dovecot] REpeated POP3 mail

2010-11-16 Thread Timo Sirainen
On Fri, 2010-11-05 at 22:13 -0600, The Doctor wrote:
   You mean POP3 client keeps downloading the same mail again? Usually
   seems to be Outlook bug..
 
 mail_location = mbox:~/mail:INBOX=/var/mail/%u

Could be because of mbox. If the mbox UIDs change, the POP3 UIDLs
change. Dovecot should log errors if this happens though.

   pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s

You could add , uidl=%u to this. It's intended to make it easier to
figure out if the UIDLs are changing or if the client is just being
broken. Then once someone redownloads messages, grep for their last
logout lines and show me what they contain (basically it'll say
uidl=old/new and previous line's new should match the next line's
old value).




Re: [Dovecot] Virtual Folder by user.

2010-11-16 Thread Timo Sirainen
On Mon, 2010-11-08 at 11:29 -0200, Henrique Fernandes wrote:
 Can i only set a virtual folder for especific users ?

Any setting can be overridden by userdb:
http://wiki2.dovecot.org/UserDatabase/ExtraFields

So depending on your userdb, yes or no.




Re: [Dovecot] auth-worker ownership issue

2010-11-16 Thread Timo Sirainen
On Mon, 2010-11-08 at 23:58 -0500, Jason 'XenoPhage' Frisvold wrote:

 Nov  8 23:36:53 myserver dovecot: auth: Fatal: net_connect_unix(auth-worker) 
 in directory /var/run/dovecot failed: Permission denied (euid=89(vpopmail) 
 egid=89(vchkpw) missing +r perm: auth-worker, euid is not dir owner)

It's not a very good idea to run auth process as vpopmail. The default
is dovecot, which you should also run it as. So just remove:

service auth {
  user = vpopmail
}




Re: [Dovecot] dovecot.conf settings

2010-11-16 Thread Mark Moseley
On Tue, Nov 16, 2010 at 10:54 AM, Timo Sirainen t...@iki.fi wrote:
 On Sun, 2010-11-14 at 06:35 -0800, Marc Perkel wrote:
 OK - I'm not sure how they get set that way. I must have copied
 something. Here is my new settings. Is there anything else to change or add?

 service imap-login {
    process_limit = 800
    process_min_avail = 10
    service_count = 0
 }
 service pop3-login {
    process_limit = 800
    process_min_avail = 10
    service_count = 0
 }

 The above process_limits are still much higher than useful. They aren't
 really harmful, but could be confusing.. I'd just remove them and let
 them be defaults (default=100).



Just FYI on the odd imap-login vsz_limit, if I don't specify a
vsz_limit for either pop3-login or imap-login, they show up as '64 B'
for me too. That appears to be what's hardcoded as the default in
./src/imap-login/imap-login-settings.c and
./src/pop3-login/pop3-login-settings.c. Should that be jacked up?


Re: [Dovecot] 2.0.7: emails read emails become unread

2010-11-16 Thread KTamas
Yes I have dovecot-shared files in their appropriate spaces.

I'll turn on debug mode tomorrow and see if I get any errors related to indexes.

KTamas

On Tue, Nov 16, 2010 at 6:33 PM, Timo Sirainen t...@iki.fi wrote:
 On Tue, 2010-11-16 at 12:32 +0100, Kádár Tamás (KTamas) wrote:

 My users are reporting that in public folders, emails that were past
 read suddenly got unread, sometimes even after marking them as read
 again.

 Any errors in Dovecot's logs?

 Didn't have such problems with 2.0.6 I think.

 I don't think I've changed anything related to this..

 namespace {
   location = maildir:/home/_shared/projects:INDEX=~/Maildir/_shared

 You do have dovecot-shared files for all those folders
 in /home/_shared/projects/, right?

 Anyway, losing seen flags for shared mailboxes basically means that
 Dovecot ignored/lost the index files in ~/Maildir/_shared/ for some
 reason.





Re: [Dovecot] dovecot.conf settings

2010-11-16 Thread Timo Sirainen
On Tue, 2010-11-16 at 11:27 -0800, Mark Moseley wrote:

 Just FYI on the odd imap-login vsz_limit, if I don't specify a
 vsz_limit for either pop3-login or imap-login, they show up as '64 B'
 for me too. That appears to be what's hardcoded as the default in
 ./src/imap-login/imap-login-settings.c and
 ./src/pop3-login/pop3-login-settings.c. Should that be jacked up?

Yeah, you're right. Fixed: 
http://hg.dovecot.org/dovecot-2.0/rev/ddd929c68c0f




Re: [Dovecot] Help - custom vpopmail

2010-11-16 Thread Rick Romero

Quoting Timo Sirainen t...@iki.fi:

On Tue, 2010-11-16 at 10:30 -0600, Rick Romero wrote:

  
     So I modified my vpopmail install to write an additional
field into the
   lastauth table.  My custom vpopmail writes the remote IP into remote_ip,
   and the auth type into a 'type' field. I tested with qmail's
POP3 daemon to
   verify vchkpw would fill the table correcly.
  
     But I'm not sure how to get dovecot to do it:
  
     I know this is close, but there is something not right in
   src/auth/userdb-vpopmail.c line 99.
     vset_lastauth(vpop_user, vpop_domain, auth_request-remote_ip,
   t_strdup_noconst(auth_request-service));
  
   1) You need to modify vpopmail's vset_lastauth() function to actually
   support this.
  
   2) Once you do have the extra field (const char *ip) added, you can use:
  
   vset_lastauth(vpop_user, vpop_domain,
           net_ip2addr(auth_request-remote_ip),
           t_strdup_noconst(auth_request-service));
  
   Or maybe you could use vchkpw with Dovecot too via passdb checkpassword?

I already did 1) - that's working fine.
2) is becoming frustrating.  I thought net_ip2addr() would be what I
needed, but I guess not.  Although I only used (char *type) not (const
char *type)..   No compile issues, nothing.  It doesn't appear to even try
and write to the table. (I locked the table to see :)

For giggles I tried using checkpassword just to see what would happen
(though I know it works for qmail-pop3d), but apparently Dovecot can't use
checkpassword with CRAM-MD5 :/   Not sure if that's a bug or expected, but
means I can't convert.  I don't want to remove functionality.

I don't expect much more help unless you see something jump out - This
function just returns an error if MySQL throws an error (in vpopmail's
vauth.c), any other errors and it's silently skipped over - so
troubleshooting this is going to be a little drawn out.

Thanks,

Rick


[Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-16 Thread Thomas Leuxner
Latest Mercurial seems to miss defaults for some services e.g. 'managesieve' 
and 'lmtp'. Example error message upon start:

dovecotdoveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: 
service(managesieve-login): vsz_limit is too low failed!

Regards
Thomas



Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-16 Thread David Ford
I believe Timo is already patching these.

On 11/16/10 16:09, Thomas Leuxner wrote:
 Latest Mercurial seems to miss defaults for some services e.g. 'managesieve' 
 and 'lmtp'. Example error message upon start:

 dovecotdoveconf: Fatal: Error in configuration file 
 /etc/dovecot/dovecot.conf: service(managesieve-login): vsz_limit is too low 
 failed!

 Regards
 Thomas



Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-16 Thread Robert Schetterer
Am 16.11.2010 22:09, schrieb Thomas Leuxner:
 Latest Mercurial seems to miss defaults for some services e.g. 'managesieve' 
 and 'lmtp'. Example error message upon start:
 
 dovecotdoveconf: Fatal: Error in configuration file 
 /etc/dovecot/dovecot.conf: service(managesieve-login): vsz_limit is too low 
 failed!
 
 Regards
 Thomas
 

i am not sure but i think this is a warning new to 2.0.7
high the limits or/and configure dependend parameters right and see if
it works

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] Dovecot + vpopmail + shared folders

2010-11-16 Thread qmail

Another issue appeared however. I added these lines:

  socket listen {
master {
  # Typically under base_dir/, if not the directory must be created.
  path = /var/run/dovecot/auth-master

  mode = 0600
  user = vpopmail # User running deliver
  #group = mail # Or alternatively mode 0660 + deliver user in this group
}
  }

and shared folders work just fine. However, I am seeing a lot of new  
errors like these in the maillog file now:


Nov 16 17:20:46 mx dovecot: auth(default): vpopmail(@domain1.com):  
unknown user
Nov 16 17:20:51 mx dovecot: auth(default): vpopmail(@domain2.com):  
unknown user


As far as I can tell the users are not having any issues logging in  
and haven't received any complaints.


I tried with mail_debug=yes but it didn't offer any other clues since  
I don't know who the user is.



Quoting qm...@top-consulting.net:


It works...wow!

I was sure it would have required some massive modifications but it didn't.

Thank you Timo!



On Tue, 2010-11-16 at 13:27 -0500, qm...@top-consulting.net wrote:

Maybe I'm missing some part of the configuration. I don't have a
service auth { part and the auth_socket_path is commented out. Here is
my full config:




# 1.2.14: /usr/local/etc/dovecot.conf


Oh, I thought you had v2.0. In that case you need to add the auth-master
socket, as explained by http://wiki.dovecot.org/LDA#Virtual_users

(v2.0 prefers auth-userdb instead of auth-master, you can name it either
way for now.)















[Dovecot] Dovecot ldap connection reconnecting after inactivity

2010-11-16 Thread Aliet Santiesteban Sifontes
Hi people, I have a setup configured using ldap, I have noticed that after a
period of user inactivity if a client open connections to dovecot first
attemps fails with this:

Nov 16 19:34:43 cl05-02 dovecot: auth: Error:
ldap(u...@xxx.xx.xx,172.29.13.26):
Connection appears to be hanging, reconnecting

After the connections to ldap has been restablished everything starts
working ok, is this a expected behavior or I'm missing something??

Best regards


[Dovecot] Single-instance storage Thank You

2010-11-16 Thread Daniel L. Miller

Timo,

On following my previous thread that went somewhat off-topic, I noticed 
- or rather failed to notice - any response from you.  This leaves me to 
draw one of the following conclusions:


1.  You didn't see it.
2.  You ignored it.
3.  You saw it, took offense, and disregarded it.
4.  You saw it, accepted the compliment for what it was - and didn't 
bother to respond.


On the chance any of options 1-3 apply - please allow me to state as 
clearly as possible:  your creation, that of Dovecot in general, and 
single-instance mdbox storage in particular, have significantly 
contributed to my own ease of system administration - and I offer my 
sincere thanks and admiration.

--
Daniel


Re: [Dovecot] Single-instance storage Thank You

2010-11-16 Thread Timo Sirainen
On 17.11.2010, at 1.01, Daniel L. Miller wrote:

 4.  You saw it, accepted the compliment for what it was - and didn't bother 
 to respond.

Yeah, I don't often reply when there isn't a question..



[Dovecot] qmail + dovecot-lda

2010-11-16 Thread ckubu
hallo,

i am changing my mailsetups to qmail+vpopmail+dovecot.

is it possible to let dovecot's lda deliver mail into mailboxes but also 
deliver mails to forward-addresses in .qmail-files, if exists?

b.t.w. i know, its not an dovecot issue, but maybe anyone knows: i have setup 
defaultdelivery in qmail-control directory, but vadddomain ignors it. is 
there a way to make that entry the default for .qmail-default files?

thanks
christoph


Re: [Dovecot] qmail + dovecot-lda

2010-11-16 Thread Rick Romero

Google vdelivermail + dovecot for some code snippets

Are you running latest vpopmail for qmailamim integration?

Rick

Sent from my iPhone

On Nov 16, 2010, at 8:55 PM, ckubu ck...@so36.net wrote:


hallo,

i am changing my mailsetups to qmail+vpopmail+dovecot.

is it possible to let dovecot's lda deliver mail into mailboxes but  
also

deliver mails to forward-addresses in .qmail-files, if exists?

b.t.w. i know, its not an dovecot issue, but maybe anyone knows: i  
have setup
defaultdelivery in qmail-control directory, but vadddomain ignors  
it. is

there a way to make that entry the default for .qmail-default files?

thanks
christoph



Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-16 Thread Thomas Leuxner
Am 16.11.2010 um 23:26 schrieb Robert Schetterer:
 i am not sure but i think this is a warning new to 2.0.7
 high the limits or/and configure dependend parameters right and see if
 it works

Well it does not start at all when it throws that. So it's kind of a deadly 
ultimate warning.

Thomas

Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-16 Thread Timo Sirainen
On 16.11.2010, at 21.09, Thomas Leuxner wrote:

 Latest Mercurial seems to miss defaults for some services e.g. 'managesieve' 
 and 'lmtp'. Example error message upon start:
 
 dovecotdoveconf: Fatal: Error in configuration file 
 /etc/dovecot/dovecot.conf: service(managesieve-login): vsz_limit is too low 
 failed!

Upgrade your pigeonhole too.



Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-16 Thread Thomas Leuxner
Am 17.11.2010 um 05:15 schrieb Timo Sirainen:
 Latest Mercurial seems to miss defaults for some services e.g. 'managesieve' 
 and 'lmtp'. Example error message upon start:
 
 dovecotdoveconf: Fatal: Error in configuration file 
 /etc/dovecot/dovecot.conf: service(managesieve-login): vsz_limit is too low 
 failed!
 
 Upgrade your pigeonhole too.

Guess it's not committed there yet as I'm pulling from Stephan's auto-build 
repo. As for 'lmtp' I remember seeing the same error for that as well, so not 
sure what other services would also miss the defaults. Stopped trying after 
those two...

Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-16 Thread Timo Sirainen
On 17.11.2010, at 4.37, Thomas Leuxner wrote:

 Am 17.11.2010 um 05:15 schrieb Timo Sirainen:
 Latest Mercurial seems to miss defaults for some services e.g. 
 'managesieve' and 'lmtp'. Example error message upon start:
 
 dovecotdoveconf: Fatal: Error in configuration file 
 /etc/dovecot/dovecot.conf: service(managesieve-login): vsz_limit is too low 
 failed!
 
 Upgrade your pigeonhole too.
 
 Guess it's not committed there yet as I'm pulling from Stephan's auto-build 
 repo.

It's there: http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/c2a76570d736

I don't know about autobuild repos though.

 As for 'lmtp' I remember seeing the same error for that as well, so not sure 
 what other services would also miss the defaults. Stopped trying after those 
 two...

LMTP shouldn't have had that problem.. Unless you've explicitly changed those 
in the config file? See doveconf -n|grep vsz_limit



Re: [Dovecot] Dovecot 2.0.7 (8793036f6de8) seems to miss some defaults for vsz_limit

2010-11-16 Thread Thomas Leuxner
Am 17.11.2010 um 06:01 schrieb Timo Sirainen:

 It's there: http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/c2a76570d736
 
 I don't know about autobuild repos though.

Pulled another source this morning and it did not seem to work.

 As for 'lmtp' I remember seeing the same error for that as well, so not sure 
 what other services would also miss the defaults. Stopped trying after those 
 two...
 
 LMTP shouldn't have had that problem.. Unless you've explicitly changed those 
 in the config file? See doveconf -n|grep vsz_limit

No defaults changed here. Verified with grep. It threw the same error on 
'20-lmtp.conf' after I manually set a default for '20-managesieve.conf'.