Re: [Dovecot] Doveadm

2010-11-18 Thread Alex Baule
Tks timo!

I will take a look in this socket to use it with my schedule.

Em 18/11/2010 16:48, "Timo Sirainen" escreveu:

On Thu, 2010-11-18 at 16:21 -0200, Alex Baule wrote:
> I will create a schedule to expurge older ema...
Yes, in that case the dates are looked up from dovecot.index.cache
files.


> Maybe i will create a application that makes a pipe to doveadm and call it
> to do the job.
BTW. It's possible to talk to doveadm server as well via unix/tcp
sockets. By default there is $base_dir/doveadm-server unix socket.


Re: [Dovecot] version_ignore=yes

2010-11-18 Thread Timo Sirainen
On Thu, 2010-11-18 at 14:27 -0600, Mike Abbott wrote:
> > Also note that because of a change in how (upcoming) v2.0.8 checks if
> > imap/pop3/lmtp has been started from command line, version_ignore=yes is
> > effectively always enabled for them when older master process is
> > running.
> 
> I don't understand this.  Can you please elaborate?  Thanks.

In <= v2.0.7 imap, pop3 and lmtp does getenv("GENERATION") at startup.
If that's NULL, they assume that they're running standalone and don't do
any version checks.

But this environment could already be set, because Java uses it also. So
I changed >= v2.0.8 to do getenv("DOVECOT_CHILD_PROCESS") != NULL check
instead.

Now the problem is that if you have v2.0.7 dovecot master running, it
doesn't set DOVECOT_CHILD_PROCESS environment. Then if you upgrade imap
executable to v2.0.8 it thinks that it's running standalone because that
environment isn't set. It'll probably fail with:

Nov 18 20:40:57 imap: Error: Fatal: USER environment missing




Re: [Dovecot] auth: Error: net_connect_unix(anvil-auth-penalty) failed: Permission denied

2010-11-18 Thread Timo Sirainen
On Tue, 2010-11-09 at 17:18 +0100, mail...@securitylabs.it wrote:
> Hello, just upgraded one of my testing machine from dovecot 1.2.15 to 
> 2.0.7. After some trouble with permissions now all seems working, but 
> when I stop dovecot I have these errors in log:
> 
> Nov  9 17:08:07 in dovecot: master: Warning: Killed with signal 15 (by 
> pid=20362 uid=0 code=kill)
> Nov  9 17:08:07 in dovecot: pop3-login: Error: read(anvil) failed: EOF

http://hg.dovecot.org/dovecot-2.0/rev/67fbf09d3fa5 fixes these.

> Nov  9 17:08:07 in dovecot: auth: Error: read(anvil-auth-penalty) 
> failed: EOF
> Nov  9 17:08:07 in dovecot: auth: Error: 
> net_connect_unix(anvil-auth-penalty) failed: Permission denied

http://hg.dovecot.org/dovecot-2.0/rev/3e4a65a74c40 fixes this so that if
anvil actually does die too early, auth process kills itself.




Re: [Dovecot] version_ignore=yes

2010-11-18 Thread Mike Abbott
> Also note that because of a change in how (upcoming) v2.0.8 checks if
> imap/pop3/lmtp has been started from command line, version_ignore=yes is
> effectively always enabled for them when older master process is
> running.

I don't understand this.  Can you please elaborate?  Thanks.

Re: [Dovecot] version_ignore=yes

2010-11-18 Thread Timo Sirainen
Also note that because of a change in how (upcoming) v2.0.8 checks if
imap/pop3/lmtp has been started from command line, version_ignore=yes is
effectively always enabled for them when older master process is
running.

On Thu, 2010-11-18 at 19:48 +, interfaSys sàrl wrote:
> I'll check ASAP.
> Thank you.
> 
> On 18/11/2010 19:03, Timo Sirainen wrote:
> > On Thu, 2010-11-11 at 17:30 +, interfaSys sàrl wrote:
> >> Hello,
> >> When upgrading Dovecot, I get this:
> >> Dovecot version mismatch: Master is v2.0.6, imap-login is v2.0.7 (if you
> >> don't care, set version_ignore=yes)
> >>
> >> This should not occur as version_ignore=yes is in dovecot.conf, at the top.
> > 
> > Should be fixed by http://hg.dovecot.org/dovecot-2.0/rev/656da7e0d6b9
> > 
> > 
> 




Re: [Dovecot] version_ignore=yes

2010-11-18 Thread interfaSys sàrl
I'll check ASAP.
Thank you.

On 18/11/2010 19:03, Timo Sirainen wrote:
> On Thu, 2010-11-11 at 17:30 +, interfaSys sàrl wrote:
>> Hello,
>> When upgrading Dovecot, I get this:
>> Dovecot version mismatch: Master is v2.0.6, imap-login is v2.0.7 (if you
>> don't care, set version_ignore=yes)
>>
>> This should not occur as version_ignore=yes is in dovecot.conf, at the top.
> 
> Should be fixed by http://hg.dovecot.org/dovecot-2.0/rev/656da7e0d6b9
> 
> 


Re: [Dovecot] Question about mbox_snarf and dovecot2.0

2010-11-18 Thread Jonathan Siegle

On Nov 18, 2010, at 2:08 PM, Timo Sirainen wrote:

> On Thu, 2010-04-29 at 11:11 -0400, Jonathan Siegle wrote:
> 
>> As I need this to function, I've been thinking about your words above
>> and been reading http://wiki.dovecot.org/Design/Storage/Plugins. The
>> mentality of it reminds me of the lazy-expunge-plugin, but this API is
>> taking some time getting used to. Any pointers would be appreciated.
> 
> So I guess you never got around to implementing it? I finally did:
> http://dovecot.org/list/dovecot/2010-November/055020.html
> 
> 

I did do it. I've been testing it for a few months now. Sorry. Should have said 
something.

Re: [Dovecot] Question about mbox_snarf and dovecot2.0

2010-11-18 Thread Timo Sirainen
On Thu, 2010-04-29 at 11:11 -0400, Jonathan Siegle wrote:

> As I need this to function, I've been thinking about your words above
> and been reading http://wiki.dovecot.org/Design/Storage/Plugins. The
> mentality of it reminds me of the lazy-expunge-plugin, but this API is
> taking some time getting used to. Any pointers would be appreciated.

So I guess you never got around to implementing it? I finally did:
http://dovecot.org/list/dovecot/2010-November/055020.html




Re: [Dovecot] Dovecot and user's quota

2010-11-18 Thread Timo Sirainen
On Wed, 2010-11-10 at 13:09 +0100, oriol llistes wrote:

> We are planning to use Dovecot-2.0.5 (Maildir format) as IMAP server.
..
> 1)Postfix must use /var/mail partition for new mails.
> 2)Dovecot must move these mails to user’s HOME.
> 3)User’s HOME must be in Maildir format.

v1.x supported that with mbox-snarf, but only with mbox -> mbox. In v2.0
the mbox-snarf plugin has been broken and it's been a bit difficult to
fix. I now redesigned it and named it snarf. So if you get the latest
code from hg (or tomorrow's nightly snapshot or wait for v2.0.8) you can
do something like:

mail_plugins = snarf

namespace default {
  prefix = 
  separator = .
  inbox = yes
}
namespace snarf {
  prefix = .snarf
  separator = .
  location = mbox:/var/run/dovecot/empty:INBOX=/var/mail/%u:INDEX=MEMORY
}

plugin {
  snarf = .snarf/INBOX
}

(Using the separator as the first character in snarf namespace prefix
guarantees that there won't be collisions with user's mailbox names.)



Re: [Dovecot] version_ignore=yes

2010-11-18 Thread Timo Sirainen
On Thu, 2010-11-11 at 17:30 +, interfaSys sàrl wrote:
> Hello,
> When upgrading Dovecot, I get this:
> Dovecot version mismatch: Master is v2.0.6, imap-login is v2.0.7 (if you
> don't care, set version_ignore=yes)
> 
> This should not occur as version_ignore=yes is in dovecot.conf, at the top.

Should be fixed by http://hg.dovecot.org/dovecot-2.0/rev/656da7e0d6b9




Re: [Dovecot] Doveadm

2010-11-18 Thread Timo Sirainen
On Thu, 2010-11-18 at 16:21 -0200, Alex Baule wrote:
> I will create a schedule to expurge older emails than a date, like 3, 6
> months.

Yes, in that case the dates are looked up from dovecot.index.cache
files.

> Maybe i will create a application that makes a pipe to doveadm and call it
> to do the job.

BTW. It's possible to talk to doveadm server as well via unix/tcp
sockets. By default there is $base_dir/doveadm-server unix socket.




Re: [Dovecot] Doveadm

2010-11-18 Thread Alex Baule
I will create a schedule to expurge older emails than a date, like 3, 6
months.

Maybe i will create a application that makes a pipe to doveadm and call it
to do the job.



2010/11/18 Timo Sirainen 

> On Thu, 2010-11-18 at 10:08 -0200, Alex Baule wrote:
>
> > How doveadm purge a email ?
>
> By "purge" do you actually mean the "doveadm purge" command that works
> only for multi-dbox? Or I'm guessing more likely you mean "doveadm
> expunge"?
>
> > It's search using the index or scan every directory and open the email to
> > match the search criteria ?
>
> This doesn't have much to do with expunging, or even doveadm really.
> It's done the same way for all doveadm's mail commands (search, fetch,
> expunge, altmove, etc.) The actual search code is also the same as used
> by IMAP SEARCH.
>
> So, yeah, it'll use indexes as best as it can, but if you try to search
> based on something that's not in index/cache file (like message body),
> it'll have to open the mails.
>
>
>


Re: [Dovecot] problems with folders in another server (2nd. issue)

2010-11-18 Thread Timo Sirainen
On Thu, 2010-11-18 at 17:58 +, Jose Luis Faria wrote:
> pass_attrs = uid=user,userPassword=password,=y=proxy_maybe,mailHost=host
> ...
> Nov 18 17:54:11 auth: Debug: client out: OK 1 user=cx1 
> host=193.136.19.24  y=proxy_maybe

See the "y=proxy_maybe". It should be "proxy_maybe=y", meaning you
should set:

pass_attrs = uid=user,userPassword=password,=proxy_maybe=y,mailHost=host

(Some day I need to redesign this LDAP configuration. It's horribly
ugly.)



Re: [Dovecot] problems with folders in another server (2nd. issue)

2010-11-18 Thread Jose Luis Faria

Hello Timo,

I'm using qmail-LDAP in cluster with 2 servers:

mx1.di.uminho.pt and mx2.di.uminho.pt

the email cx1 is on mx1 and I want to get access using both servers.

dovecot-ldap.conf.ext:
...
pass_attrs = uid=user,userPassword=password,=y=proxy_maybe,mailHost=host
...

every user on LDAP have the attribute

mailHost=mx1.di.uminho.pt

or

mailHost=mx2.di.uminho.pt


dovecot_debug.log:
---
Nov 18 17:54:11 auth: Debug: ldap(cx1,127.0.0.1): result: uid(user)=cx1 
userPassword(password)= mailHost(host)=193.136.19.24
Nov 18 17:54:11 auth: Debug: client out: OK 1 user=cx1 
host=193.136.19.24  y=proxy_maybe
Nov 18 17:54:11 auth: Debug: master in: REQUEST 1 31148 1 
4e4916b2f719ec9b4f6df62d8b007b3a
Nov 18 17:54:11 auth: Debug: ldap(cx1,127.0.0.1): user search: 
base=dc=di, dc=uminho, dc=pt scope=subtree 
filter=(&(objectClass=qmailUser)(uid=cx1)) 
fields=mailMessageStore,qmailUID,qmailGID
Nov 18 17:54:11 auth: Debug: ldap(cx1,127.0.0.1): result: 
mailMessageStore(home)=/var/qmail/maildirs1/cx1 qmailGID(gid)=800 
qmailUID(uid)=800
Nov 18 17:54:11 auth: Debug: master out: USER 1 cx1 
home=/var/qmail/maildirs1/cx1 gid=800 uid=800





#dovecot -n
-
# 2.0.2: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.9-42.0.2.ELsmp x86_64 CentOS release 4.3 (Final)
auth_debug = yes
auth_mechanisms = plain login
base_dir = /var/run/dovecot/
debug_log_path = /var/log/dovecot/dovecot_debug.log
default_client_limit = 100
default_login_user = nobody
director_servers = /etc/dovecot/director
disable_plaintext_auth = no
info_log_path = /var/log/dovecot/dovecot_mail.log
listen = *
log_path = /var/log/dovecot/dovecot.log
mail_location = maildir:~/Maildir
managesieve_notify_capability = mailto
managesieve_sieve_capability = comparator-i;octet 
comparator-i;ascii-casemap fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex 
imap4flags copy include variables body enotify environment mailbox date 
imapflags notify

passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete 
mailbox_rename

  setting_name = sieve
  sieve = ~/sieve/dovecot.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +notify +imapflags
  sieve_max_actions = 32
  sieve_max_redirects = 4
  sieve_max_script_size = 1M
}
postmaster_address = j...@di.uminho.pt
protocols = imap pop3 sieve
service imap-login {
  inet_listener imap {
port = 143
  }
  inet_listener imaps {
port = 993
ssl = yes
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  process_min_avail = 0
  service_count = 1
  vsz_limit = 134217728
}
service pop3-login {
  inet_listener pop3 {
port = 110
  }
  inet_listener pop3s {
port = 995
ssl = yes
  }
}
ssl_cert = 
On Thu, 2010-11-18 at 12:55 +, Jose Luis Faria wrote:


we are using two servers, with dovecot 2.0.5, Sx and Sy,
with:

cat dovecot-ldap-ext:
...
pass_attrs = uid=user,userPassword=password,=y=proxy,mailHost=host
...


When I access server Sx via IMAP I see all my folders.
When I access server Sy via IMAP it do not proxy to Sx.


It doesn't look like it's even trying to proxy. Otherwise your login to
Sx would fail with "Proxying loops to itself" error. So..

1) Change =y=proxy to =y=proxy_maybe

2) Show your doveconf -n output

3) Set auth_debug=yes and show the logs when logging in to Sy.






smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] dovecot with Active Directory problem

2010-11-18 Thread Timo Sirainen
On Sun, 2010-11-14 at 21:31 +0900, marie ot wrote:

> I am using dovecot-2.0.6 with NetBSD amd64.
..
> hosts = xxx.xxx.xxx.xxx:389
> dn = cn=Mail Administrator, cn=Users, dc=example, dc=com
> dnpass = *

dn is set, so Dovecot does a bind before doing anything else.

> Both dovecot and postfix the first "bindRequest" was quite
> the same demand and the results.
> 
> Next, dovecot demanded query of "userPrincipalName" and "unixUserPassword".
> It seems to be ok for the result.
> # This fails if it doesn't add to "Account Operators" group.

Looks right.

> However, "name" and "simple" were issued by the blank (anonymously?)

What do you mean by "name" and "simple"?

> as for the following next demand (bindRequest).

Since you have auth_bind=no, there should be only a single bind request
at the beginning of LDAP connection, nothing afterwards.

> In addition, query of "userPrincipalName" and "unixUserPassword" is issued
> to
> "cn=Configuration, dc=example, dc=com" afterwards.

Where's that Configuration coming from? It's not in your config file, so
I don't see why Dovecot would go querying it. Unless perhaps it's
OpenLDAP library that goes doing this stuff internally.

> errorMessage: 04DC: LdapErr: DSID-0C0906DC, comment: In order to perform
> this operation a successful bind must be completed on the connection., data
> 0, v1db0

I don't see how this could happen, except if the previous LDAP reply
contains some kind of a reference elsewhere and OpenLDAP automatically
goes connecting there.



Re: [Dovecot] Restarting dovecot-auth stops authentication

2010-11-18 Thread Timo Sirainen
On Wed, 2010-11-17 at 21:17 +0100, Attila Nagy wrote:

> pop3-login: Error: net_connect_unix(pop3) failed: Connection refused

Right. This is the main problem. So the question becomes why is the
connection being refused.

> I've checked, auth's start time is yesterday, so it wasn't restarted. I 
> guess what remains is the resource limit (client_limit maybe?).

If that happens, there should be a log entry. You can grep process_limit
and client_limit from logs.

> The strange thing is according to tcpdump, dovecot does very few LDAP 
> lookups, and they are answered in a reasonable time, but I haven't done 
> a strict correlation with the above errors.

This shouldn't have anything to do with authentication.

> How does dovecot logs timed out LDAP lookups?

"Connection appears to be hanging, reconnecting"

I usually log errors to a different log file. Normally that file should
be empty, so you can easily see all the errors and warnings that could
be causing problems.

log_path = /var/log/dovecot-errors.log
info_log_path = /var/log/dovecot-info.log




Re: [Dovecot] dsync mbox->mdbox II: highest_modseq changed

2010-11-18 Thread Timo Sirainen
On Thu, 2010-11-18 at 18:57 +0200, Axel Thimm wrote:

> dsync(athimm): Info: old/speicher: highest_modseq changed: 1 != 10
> dsync(athimm): Info: root/root-heretic: highest_modseq changed: 1 != 10
> dsync(athimm): Info: lists/ccrma.stanford.edu/planetccrma: highest_modseq 
> changed: 11 != 14 

These don't really matter. It just couldn't sync the modseqs correctly.
I should try to fix those somehow some day, but I think the problem here
is that mbox code can't handle this correctly. It should have increased
the modseqs to 10, 10, 14 but apparently it didn't.



Re: [Dovecot] Doveadm

2010-11-18 Thread Timo Sirainen
On Thu, 2010-11-18 at 10:08 -0200, Alex Baule wrote:

> How doveadm purge a email ?

By "purge" do you actually mean the "doveadm purge" command that works
only for multi-dbox? Or I'm guessing more likely you mean "doveadm
expunge"?

> It's search using the index or scan every directory and open the email to
> match the search criteria ?

This doesn't have much to do with expunging, or even doveadm really.
It's done the same way for all doveadm's mail commands (search, fetch,
expunge, altmove, etc.) The actual search code is also the same as used
by IMAP SEARCH.

So, yeah, it'll use indexes as best as it can, but if you try to search
based on something that's not in index/cache file (like message body),
it'll have to open the mails.




Re: [Dovecot] problems with folders in another server (2nd. issue)

2010-11-18 Thread Timo Sirainen
On Thu, 2010-11-18 at 12:55 +, Jose Luis Faria wrote:

> we are using two servers, with dovecot 2.0.5, Sx and Sy,
> with:
> 
> cat dovecot-ldap-ext:
> ...
> pass_attrs = uid=user,userPassword=password,=y=proxy,mailHost=host
> ...
> 
> 
> When I access server Sx via IMAP I see all my folders.
> When I access server Sy via IMAP it do not proxy to Sx.

It doesn't look like it's even trying to proxy. Otherwise your login to
Sx would fail with "Proxying loops to itself" error. So..

1) Change =y=proxy to =y=proxy_maybe

2) Show your doveconf -n output

3) Set auth_debug=yes and show the logs when logging in to Sy.




[Dovecot] dsync mbox->mdbox II: highest_modseq changed

2010-11-18 Thread Axel Thimm
Hi again,

after replacing CRLF in 4 mboxes dsync was able to sync all of the 30+GB
mailstore to mdbox.

Now the (repeated) calling of dsync yields info messages of the kind

dsync(athimm): Info: old/speicher: highest_modseq changed: 1 != 10
dsync(athimm): Info: root/root-heretic: highest_modseq changed: 1 != 10
dsync(athimm): Info: lists/ccrma.stanford.edu/planetccrma: highest_modseq 
changed: 11 != 14

I actually have 987 such messages for a total of 1115 mboxes. I checked
a couple of them to see whether this is a CRLF issue and found no CRLF,
so it's probably something different.

As long as the mboxes were still being delivered to or read from I
thought it was normal, but I'd like to see a silent dsync which would
give me more confidence in the migration process. So I kept from
delivering to the mbox store as well as reading from it and performed
multiple dsyncs.

The output of dsync became stable, e.g. the "highest_modseq changed"
messages were exactly the same. Before nuking all indexes from the mbox
storage and the mdbox itself and then repeating the whole process (which
does take a long time), I wanted to know whether I should debug
something.

Thanks!
-- 
http://thimm.gr/ - http://ATrpms.net/


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


[Dovecot] problems with folders in another server (2nd. issue)

2010-11-18 Thread Jose Luis Faria

Hello ppl,


we are using two servers, with dovecot 2.0.5, Sx and Sy,
with:

cat dovecot-ldap-ext:
...
pass_attrs = uid=user,userPassword=password,=y=proxy,mailHost=host
...


When I access server Sx via IMAP I see all my folders.
When I access server Sy via IMAP it do not proxy to Sx.

I want to see my IMAP folders independently of the server.

any help?


--
:)   cumprimentos
--
José Luís Faria
Network Eng./Administrador de Sistemas
Departamento de Informática
Universidade do Minho
Braga, Portugal




smime.p7s
Description: S/MIME Cryptographic Signature


[Dovecot] Doveadm

2010-11-18 Thread Alex Baule
How doveadm purge a email ?

It's search using the index or scan every directory and open the email to
match the search criteria ?


[Dovecot] problems with folders in another server

2010-11-18 Thread Jose Luis Faria

Hello ppl,


we are using two servers, with dovecot 2.0.5, Sx and Sy,
with:

cat dovecot-ldap-ext:
...
pass_attrs = uid=user,userPassword=password,=y=proxy,mailHost=host
...


When I access server Sx via IMAP I see all my folders.
When I access server Sy via IMAP I only see the INBOX.

I want to see my IMAP folders independently of the server.

any help?


--
   :)   cumprimentos
--
José Luís Faria
Network Eng./Administrador de Sistemas
Departamento de Informática
Universidade do Minho
Braga, Portugal



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] Multiple MYSQL hosts as passdb backend

2010-11-18 Thread moody_cz


Thanks a lot, that makes the trick.


Timo Sirainen wrote:
> 
> On Tue, 2010-11-16 at 15:44 -0800, moody_cz wrote:
> 
>> Everything works fine as long as 10.0.0.3 is up and running. However,
>> when I
>> shutdown mysql server on 10.0.0.3, dovecot won't even try the other host
>> 10.0.0.4 as it is told to do in the conf.
> 
> That was a bug, fixed:
> http://hg.dovecot.org/dovecot-2.0/rev/666fd046ab7f
> 
> Also this improves the failure handling for both mysql/pgsql:
> http://hg.dovecot.org/dovecot-2.0/rev/990abbb6d3dd
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Multiple-MYSQL-hosts-as-passdb-backend-tp30234196p30240802.html
Sent from the Dovecot mailing list archive at Nabble.com.