[Dovecot] when does dovecot create a mailbox

2010-01-22 Thread spamvoll
hi..

im using ldap. what happens when i add a new ldap user and that user
tryes to login to dovecot ?
does dovecot create the mailbox on first login? or do i have to send a
mail first ?

thx


Re: [Dovecot] feature question: local delivery from SMTP

2010-01-22 Thread Leonardo Rodrigues

Veiko Kukk escreveu:



Or can it receive
SMTP directly if there is no forwarding to do?  What about spam/virus
filtering in that case?


Dovecot has nothing to do with smtp. You need MTA like postfix or exim 
to deliver mail to mbox/maildir. Then dovecot can show those mailboxes 
to client.




   just a small correction  dovecot has its own delivery agent, 
which means it (dovecot) can handle the 'deliver mail to maildir' part. 
I'm not sure about mailbox, but maildir i'm sure dovecot delivery agent 
can handle.


   anyway, you'll still need an MTA to collect data from the network 
(via SMTP) and then forward it to dovecot delivery agent.


   dovecot is not an MTA so it cannot talk SMTP.


--


Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br

Minha armadilha de SPAM, NÃO mandem email
gertru...@solutti.com.br
My SPAMTRAP, do not email it






Re: [Dovecot] Conditionally use a sieve script with deliver?

2010-01-22 Thread Kārlis Repsons
On Thursday 21 January 2010 15:18:28 Steffen Kaiser wrote:
 One thing, that Sieve is not able to do, is to
 deliver to multiple users without re-sending the mail.
Just what did you mean by multiple users?


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


Re: [Dovecot] Conditionally use a sieve script with deliver?

2010-01-22 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 22 Jan 2010, Kārlis Repsons wrote:


On Thursday 21 January 2010 15:18:28 Steffen Kaiser wrote:

One thing, that Sieve is not able to do, is to
deliver to multiple users without re-sending the mail.

Just what did you mean by multiple users?


Well, more than user, e.g. if you want to file a message into the mailbox 
of two or more users.


Maildrop's shell-like capability allows you lots of tricks.

Regards,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBS1mTrL+Vh58GPL/cAQIr2wf+O1yT19j1RgDS7s2oNQZt8hTj506bSO1J
8ZV7Zes1/4x3Hw3hXhtftI9R7zOauI3/57xz1NddqYjOd9W7OKknZ8nyBbTlHgNL
tp4eeiAPWIED33CTLACsmhfj4PyHvcA0lpVykG737cWxlXQoKnfeqMd56uHrECZk
B/A3r/ZzWR9eJB/JW2F0L1nZI6p6DjfivJhJ3pz/MIbbPUWHYKEqxSyrsLsxt+2Y
aHELYHNb+PhEuxAoe2jP8UTIfNpipgGXjrLl6ofBWgy/pHv0a1QZSwkcHVGNWeIC
l7A7g7/O5hFX0daFDOHbonkPUZt2WEOjX/nGd7LS1Xzqq7OiW/vltQ==
=8E2G
-END PGP SIGNATURE-

Re: [Dovecot] feature question: local delivery from SMTP

2010-01-22 Thread Phil Howard
I saw something in the documentation called LDA that looked like it was
accepting some kind of connection and delivering mail into mailboxes.

On Fri, Jan 22, 2010 at 4:09 AM, Veiko Kukk veiko.k...@ekp.ee wrote:

 Phil Howard wrote:

 Does Dovecot really need a separate MTA for inbound mail?


 Why do you thing it might need?


  Or can it receive
 SMTP directly if there is no forwarding to do?  What about spam/virus
 filtering in that case?


 Dovecot has nothing to do with smtp. You need MTA like postfix or exim to
 deliver mail to mbox/maildir. Then dovecot can show those mailboxes to
 client.

 --
 Veiko




-- 
Phil Howard KA9WGN - ka9...@gmail.com


[Dovecot] Seen flag bug in Mozilla Thunderbird - BugID 541337 - old messages are marked as unread

2010-01-22 Thread Christian Rohmann
Just wanted to share the bad news:

https://bugzilla.mozilla.org/show_bug.cgi?id=541337


It seems that Dovecot is really showing the Mozilla Thunderbird team how
to read and use an RFC ;-)


-- 
Christian Rohmann

Content Delivery Server u. Dienste
Network Engineering  Design


NETCOLOGNE Gesellschaft für Telekommunikation mbH
Am Coloneum 9 | 50829 Köln
Tel: 0221 -5751 | Fax: 0221 -75751
http://www.netcologne.de

 Geschäftsführer:
 Werner Hanf
 Dipl.-Ing. Karl-Heinz Zankel
 HRB 25580, AG Köln


Re: [Dovecot] Modifying the underlying maildir externally (webmail, replication)

2010-01-22 Thread Tony Rutherford

Timo Sirainen wrote:

On 20.1.2010, at 22.21, Attila Nagy wrote:

  

After running through http://wiki.dovecot.org/IndexFiles I'm not sure how well 
would Dovecot work with other programs modifying the maildirs (adding, 
deleting, moving messages, folders etc).
The Main index section says The index file is synchronized against mailbox only 
if the syncing information changes., where syncing information consists or cur and new 
directories' timestamps.
Does that mean I am safe there?



Yes. The worst that can happen is that Dovecot doesn't see external changes for 
2 seconds. And that's only if your filesystem doesn't support sub-second 
timestamps.

  

Are the above right, and can Dovecot use its indexes and caches safely with 
others using the same maildirs?



Yes. I've only recently added maildir_very_dirty_syncs=yes that improves 
performance but makes it work less safely when other programs modify the 
maildir.

Although there is kind of a potential problem if other programs modify the 
maildir without locking. http://wiki.dovecot.org/MailboxFormat/Maildir#Locking 
but that isn't unique to Dovecot. That would cause problems with all programs 
accessing maildir. Dovecot just logs an error about it, instead of silently 
giving broken information to IMAP clients.
  
We have the exact same configuration, and we had similar concerns.  I'm 
happy to say that we (so far) have been pleasantly surprised by how well 
Dovecot handles this situation and keeps its index files in synch while 
other 3rd parties (web, etc.) are changing the Maildirs.  It seems very 
reliable, and we haven't seen any problems.


Tony


Re: [Dovecot] Seen flag bug in Mozilla Thunderbird - BugID 541337 - old messages are marked as unread

2010-01-22 Thread David Halik

On 01/22/2010 09:15 AM, Christian Rohmann wrote:

Just wanted to share the bad news:

https://bugzilla.mozilla.org/show_bug.cgi?id=541337


It seems that Dovecot is really showing the Mozilla Thunderbird team how
to read and use an RFC ;-)


   


Yeah, I brought this up yesterday. They've been trying to fix it for the 
last two releases. So far the alpha build for 3.0.2 is working for me.


https://bugzilla.mozilla.org/show_bug.cgi?id=517461
https://bugzilla.mozilla.org/show_bug.cgi?id=524902

--

David Halik
System Administrator
OIT-CSS Rutgers University
dha...@jla.rutgers.edu




Re: [Dovecot] Files Moving From /New to /Cur

2010-01-22 Thread Tony Rutherford

Steffen Kaiser wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 18 Jan 2010, Tony Rutherford wrote:

We have our own delivery pushing messages to the /new and then /cur 
folder
eventually.  When I have an IMAP client attached, there is apparently 
some
sort of race going on.  I believe that Dovecot is moving files from 
/new to

/cur (and renaming them) before our own delivery gets the job done.

This is causing a problem for us.  Is there a way to disable this in
Dovecot?  I have the LDA section commented out of the config file..so I


No :-) this is part of Maildir
Well, yes: patch Dovecot's sources.

don't think that's in play.   Bottom line is that I don't want 
Dovecot to
move any files around whether an IMAP client is attached or not 
(except for

handling the IMAP COPY/APPEND).


What are you mean with move? The move from new to cur, when the 
message has been seen? Or the rename of the filename for status / 
keyword change?


===

Maildir defines the delivery process as:

1) create the file in tmp/
2) dump all data into it, hence, close it
3) rename() the file into new or cur.
4) be done with the file (aka don't try to re-open)

There is no race-condition that way.

Bye,

- -- Steffen Kaiser

I'd like to apologize a bit for this thread.  It stems from me being a 
relative newbie to email protocols/specs and who is responsible for 
what.  I think I have it a bit straighter in my mind now.  The real 
issue with our scenario is that the delivery software we have in place 
is breaking spec, and attempting to deliver to /new and then (after 
performing a few actions), rename to /cur.   Long story, but the problem 
is made far worse by the few actions that the lda performs...resulting 
in an inconsistent state if the attempted rename to /cur fails because 
the file has already made it to /cur via th MUA.  Anyhow, I have made 
changes on the delivery side as this is where the root of the problem 
lies.  Thanks for the help.


Tony


[Dovecot] config file option to switch off CONDSTORE support?

2010-01-22 Thread Harald Dunkel
Hi folks,

Is there some config file option to switch off CONDSTORE
support?

Of course I checked the manual on the Wiki, but I haven't
seen CONDSTORE mentioned at all. Forgive me if I am too
blind to see.


Many thanx

Harri


Re: [Dovecot] config file option to switch off CONDSTORE support?

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 16:28 +0100, Harald Dunkel wrote:
 Is there some config file option to switch off CONDSTORE
 support?

Set imap_capability string explicitly and Thunderbird won't use it. The
string shouldn't contain AUTH=* or STARTTLS. Easiest if you just:

telnet localhost 143
a login user pass
b capability

Then from that capability just remove CONDSTORE and put it to
imap_capability.



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


[Dovecot] ldap login with userid

2010-01-22 Thread spamvoll
hi..

Dovecot Version 1.2.9

im trying to login to dovecot with my ldap uid.

currently im using:
user_attrs = homeDirectory=home,uid=mail=maildir:/mail/%$
user_filter = 
((objectClass=gosaMailAccount)(|(mail=%u)(gosaMailAlternateAddress=%u)))
to match the mailaddress and deliver the mail to the users homdir
(/mail/uid_of_the_user)

But i cant login to dovecot:
pass_attrs = uid=user,userPassword=password
pass_filter = ((objectClass=gosaMailAccount)(uid=%u))

the Log:
Jan 22 17:21:51 testimap dovecot: auth(default): client in:
AUTH1   PLAIN   service=imapsecured lip=10.0.0.15   rip=10.0.0.20   
lport=993   rport=36879
Jan 22 17:21:51 testimap dovecot: auth(default): client out: CONT   1   
Jan 22 17:21:51 testimap dovecot: auth(default): client in:
CONT1   AG1zbWlhdGVrAHRpYWFrdGVuZXI=
Jan 22 17:21:51 testimap dovecot: auth(default):
ldap(myuser,10.0.0.20): bind search: base=dc=example,dc=com
filter=((objectClass=gosaMailAccount)(uid=myuser))
Jan 22 17:21:51 testimap dovecot: auth(default):
ldap(myuser,10.0.0.20): result: uid(user)=myuser
Jan 22 17:21:51 testimap dovecot: auth(default): client out: OK 1   
user=myuser
Jan 22 17:21:51 testimap dovecot: auth(default): master in: REQUEST 1   
25411
Jan 22 17:21:51 testimap dovecot: auth(default):
passwd(myuser,10.0.0.20): lookup
Jan 22 17:21:51 testimap dovecot: auth(default):
passwd(myuser,10.0.0.20): unknown user
Jan 22 17:21:51 testimap dovecot: auth(default):
ldap(myuser,10.0.0.20): user search: base=dc=example,dc=com
scope=subtree 
filter=((objectClass=gosaMailAccount)(|(mail=myuser)(gosaMailAlternateAddress=myuser)))
fields=homeDirectory,uid
Jan 22 17:21:51 testimap dovecot: auth(default):
ldap(myuser,10.0.0.20): Unknown user
Jan 22 17:21:51 testimap dovecot: auth(default):
userdb(myuser,10.0.0.20): user not found from any userdbs
Jan 22 17:21:51 testimap dovecot: auth(default): master out: NOTFOUND   1
Jan 22 17:21:51 testimap dovecot: imap-login: Internal login failure
(auth failed, 1 attempts): user=myuser, method=PLAIN, rip=10.0.0.20,
lip=10.0.0.15, TLS

any ideas ?


Re: [Dovecot] ldap login with userid

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 16:42 +0100, spamv...@googlemail.com wrote:
 currently im using:
 user_attrs = homeDirectory=home,uid=mail=maildir:/mail/%$
 user_filter = 
 ((objectClass=gosaMailAccount)(|(mail=%u)(gosaMailAlternateAddress=%u)))
 to match the mailaddress and deliver the mail to the users homdir
 (/mail/uid_of_the_user)
 
 But i cant login to dovecot:
 pass_attrs = uid=user,userPassword=password
 pass_filter = ((objectClass=gosaMailAccount)(uid=%u))

passdb lookup succeeds, because uid=%u matches. But then you're doing a
userdb lookup from mail or gosaMailAlternateAddress, instead of from uid
field like with passdb.

Two possibilities I guess:

a) add |(uid=%u) to user_filter

b) Change username to gosaMailAccount's value in passdb lookup, by
using:

pass_attrs = gosaMailAccount=user,userPassword=password

Dunno which one would be correct in your case.


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


Re: [Dovecot] feature question: local delivery from SMTP

2010-01-22 Thread Joseph Yee
Mail client interacts with MTA (sendmail, postfix, exim, etc) and then
MTA 'calls' the delivery agent (LDA, some MTA, etc) to deliver the
mail to mailboxes.  Common mail clients do not interact with delivery
agent directly, even it's inbound. So yes, you need MTA for inbound
mail.

HTH
Joseph

On Fri, Jan 22, 2010 at 7:11 AM, Phil Howard ka9...@gmail.com wrote:
 I saw something in the documentation called LDA that looked like it was
 accepting some kind of connection and delivering mail into mailboxes.

 On Fri, Jan 22, 2010 at 4:09 AM, Veiko Kukk veiko.k...@ekp.ee wrote:

 Phil Howard wrote:

 Does Dovecot really need a separate MTA for inbound mail?


 Why do you thing it might need?


  Or can it receive
 SMTP directly if there is no forwarding to do?  What about spam/virus
 filtering in that case?


 Dovecot has nothing to do with smtp. You need MTA like postfix or exim to
 deliver mail to mbox/maildir. Then dovecot can show those mailboxes to
 client.

 --
 Veiko




 --
 Phil Howard KA9WGN - ka9...@gmail.com



[Dovecot] Compilation error

2010-01-22 Thread Heiko Schlichting
Hi,

the latest revision of dovecot 1.1 tree (576020ceda60) produces errors
during compilation on Debian Lenny:

[...]
Making all in quota
make[4]: Entering directory 
`/scratch/heiko/dovecot/dovecot-1-1-576020ceda60/src/plugins/quota'
if /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. 
-I../../..  -I../../../src/lib -I../../../src/lib-dict -I../../../src/lib-index 
-I../../../src/lib-mail -I../../../src/lib-storage 
-I../../../src/lib-storage/index -I../../../src/lib-storage/index/maildir   
-std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations 
-Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast 
-Wstrict-aliasing=2-MT quota-storage.lo -MD -MP -MF 
.deps/quota-storage.Tpo -c -o quota-storage.lo quota-storage.c; \
then mv -f .deps/quota-storage.Tpo .deps/quota-storage.Plo; else rm 
-f .deps/quota-storage.Tpo; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../src/lib 
-I../../../src/lib-dict -I../../../src/lib-index -I../../../src/lib-mail 
-I../../../src/lib-storage -I../../../src/lib-storage/index 
-I../../../src/lib-storage/index/maildir -std=gnu99 -g -O2 -Wall -W 
-Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts 
-Wformat=2 -Wbad-function-cast -Wstrict-aliasing=2 -MT quota-storage.lo -MD -MP 
-MF .deps/quota-storage.Tpo -c quota-storage.c  -fPIC -DPIC -o 
.libs/quota-storage.o
quota-storage.c: In function 'quota_mailbox_sync_notify':
quota-storage.c:339: error: 'namespaces' undeclared (first use in this function)
quota-storage.c:339: error: (Each undeclared identifier is reported only once
quota-storage.c:339: error: for each function it appears in.)

Previous revision (af6526158608, 1.1.20) compiles without problems.

Heiko

Heiko Schlichting  Freie Universität Berlin
he...@cis.fu-berlin.de Zentraleinrichtung für Datenverarbeitung (ZEDAT)
Telefon +49 30 838-54327   Fabeckstraße 32
Telefax +49 30 838454327   14195 Berlin


Re: [Dovecot] Modifying the underlying maildir externally (webmail, replication)

2010-01-22 Thread Attila Nagy

Tony Rutherford wrote:

Timo Sirainen wrote:

On 20.1.2010, at 22.21, Attila Nagy wrote:

 
After running through http://wiki.dovecot.org/IndexFiles I'm not 
sure how well would Dovecot work with other programs modifying the 
maildirs (adding, deleting, moving messages, folders etc).
The Main index section says The index file is synchronized 
against mailbox only if the syncing information changes., where 
syncing information consists or cur and new directories' timestamps.

Does that mean I am safe there?



Yes. The worst that can happen is that Dovecot doesn't see external 
changes for 2 seconds. And that's only if your filesystem doesn't 
support sub-second timestamps.


 
Are the above right, and can Dovecot use its indexes and caches 
safely with others using the same maildirs?



Yes. I've only recently added maildir_very_dirty_syncs=yes that 
improves performance but makes it work less safely when other 
programs modify the maildir.


Although there is kind of a potential problem if other programs 
modify the maildir without locking. 
http://wiki.dovecot.org/MailboxFormat/Maildir#Locking but that isn't 
unique to Dovecot. That would cause problems with all programs 
accessing maildir. Dovecot just logs an error about it, instead of 
silently giving broken information to IMAP clients.
  
We have the exact same configuration, and we had similar concerns.  
I'm happy to say that we (so far) have been pleasantly surprised by 
how well Dovecot handles this situation and keeps its index files in 
synch while other 3rd parties (web, etc.) are changing the Maildirs.  
It seems very reliable, and we haven't seen any problems.

Great to hear that, thanks for sharing!


[Dovecot] quick question

2010-01-22 Thread David Halik


Timo (and anyone else who feels like chiming in),

I was just wondering if you'd be able to tell me if the amount of 
corruption I see on a daily basis is what you consider average for our 
current setup and traffic. Now that we are no longer experiencing any 
core dumps with the latest patches since our migration from courier two 
months ago, I'd like to know what is expected as operational norms. 
Prior to this we had never used Dovecot, so I have nothing to go on.


Our physical setup is 10 Centos 5.4 x86_64 IMAP/POP servers, all with 
the same NFS backend where the index, control, and Maildir's for the 
users reside. Accessing this are direct connections from clients, plus 
multiple squirrelmail webservers, and pine users, all at the same time 
with layer4 switch connection load balancing.


Each server has an average of about 400 connections, for a total of 
around concurrent 4000 during a normal business day. This is out of a 
possible user population of about 15,000.


All our dovecot servers syslog to one machine, and on average I see 
about 50-75 instances of file corruption per day. I'm not counting each 
line, since some instances of corruption generate a log message for each 
uid that's wrong. This is just me counting user A was corrupted once at 
10:00, user B was corrupted at 10:25 for example.


Examples of the corruption are as follows:

###
Corrupted transaction log file /dovecot/.INBOX/dovecot.index.log seq 
28: Invalid transaction log size (32692 vs 32800): 
./dovecot/.INBOX/dovecot.index.log (sync_offset=32692)


Corrupted index cache file ./dovecot/.Sent 
Messages/dovecot.index.cache: Corrupted physical size for uid=624: 0 != 
53490263


Corrupted transaction log file /dovecot/.INBOX/dovecot.index.log seq 
66: Unexpected garbage at EOF (sync_offset=21608)


Corrupted transaction log file 
./dovecot/.Trash.RFA/dovecot.index.log seq 2: indexid changed 
1264098644 - 1264098664 (sync_offset=0)


Corrupted index cache file ./dovecot/.INBOX/dovecot.index.cache: 
invalid record size


Corrupted index cache file ./dovecot/.INBOX/dovecot.index.cache: 
field index too large (33 = 19)


Corrupted transaction log file /dovecot/.INBOX/dovecot.index.log seq 
40: record size too small (type=0x0, offset=5788, size=0) (sync_offset=5812)

##

These are most of the unique messages I could find, although the 
majority are the same as the first two I posted. So, my question, is 
this normal for a setup such as ours? I've been arguing with my boss 
over this since the switch. My opinion is that with a setup such as ours 
where a user can be logged in using Thunderbird, Squirrelmail, and their 
Blackberry all concurrently at the same time, there will always be the 
occasional index/log corruption.


Unfortunately, he is of the opinion that there should rarely be any and 
there is a design flaw in how Dovecot is designed to work with multiple 
services with an NFS backend.


What has been your experience so far?

Thanks,
-Dave

--

David Halik
System Administrator
OIT-CSS Rutgers University
dha...@jla.rutgers.edu




Re: [Dovecot] quick question

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 11:24 -0500, David Halik wrote:

 Unfortunately, he is of the opinion that there should rarely be any
 and 
 there is a design flaw in how Dovecot is designed to work with
 multiple 
 services with an NFS backend. 

Well, he is pretty much correct. I thought I could add enough NFS cache
flushes to code to make it work well, but that's highly dependent on
what OS or even kernel version the NFS clients are running on. Looking
at the problems with people using NFS it's pretty clear that this
solution just isn't going to work properly.

But then again, Dovecot is the only (free) IMAP server that even
attempts to support this kind of behavior. Or sure, Courier does too,
but disabling index files on Dovecot should get the same stability.

I see only two proper solutions:

1) Change your architecture so that all mail accesses to a specific user
go through a single server. Install Dovecot proxy so all IMAP/POP3
connections go through it to the correct server.

Later once v2.0 is stable install LMTP and make all mail deliveries go
through it too (possibly also LMTP proxy if your MTA can't figure out
the correct destination server). In the mean time use deliver with a
configuration that doesn't update index files.

This guarantees that only a single server ever accesses the user's mails
simultaneously. This is the only guaranteed way to make it work in near
future. With this setup you should see zero corruption.

2) Long term solution will be for Dovecot to not use NFS server for
inter-process communication, but instead connect to other Dovecot
servers directly via network. Again in this setup there would be only a
single server reading/writing user's index files.


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


Re: [Dovecot] quick question

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 19:16 +0200, Timo Sirainen wrote:
 2) Long term solution will be for Dovecot to not use NFS server for
 inter-process communication, but instead connect to other Dovecot
 servers directly via network. 

Actually not NFS server, but filesystem. So this would be done even
when not using NFS.



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


Re: [Dovecot] quick question

2010-01-22 Thread Cor Bosman

On Jan 22, 2010, at 1:19 PM, Timo Sirainen wrote:

 On Fri, 2010-01-22 at 19:16 +0200, Timo Sirainen wrote:
 2) Long term solution will be for Dovecot to not use NFS server for
 inter-process communication, but instead connect to other Dovecot
 servers directly via network. 
 
 Actually not NFS server, but filesystem. So this would be done even
 when not using NFS.
 

Is this the situation we discussed once where a dovecot instance becomes a 
proxy if it detects that a user should be on a different server?  The one thing 
I remember sorta missing from that idea at the time was a fallback to local 
spool if the other dovecot server isnt available. 

Cor



Re: [Dovecot] quick question

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 13:23 -0400, Cor Bosman wrote:
 On Jan 22, 2010, at 1:19 PM, Timo Sirainen wrote:
 
  On Fri, 2010-01-22 at 19:16 +0200, Timo Sirainen wrote:
  2) Long term solution will be for Dovecot to not use NFS server for
  inter-process communication, but instead connect to other Dovecot
  servers directly via network. 
  
  Actually not NFS server, but filesystem. So this would be done even
  when not using NFS.
  
 
 Is this the situation we discussed once where a dovecot instance becomes a 
 proxy if it detects that a user should be on a different server?

No, that was my 1) plan :) And this is already possible with
proxy_maybe: http://wiki.dovecot.org/PasswordDatabase/ExtraFields/Proxy

 The one thing I remember sorta missing from that idea at the time was a 
 fallback to local spool if the other dovecot server isnt available. 

Right. This still isn't supported. Also it's not really the safest
solution either, because it could place user's connections to different
servers due to some temporary problems. Or if primary has failed, user
has connections on secondary server, primary comes back up, now new
connections go to primary and old connections haven't been killed from
secondary so you'll potentially get corruption.

Better would be to have some kind of a database that externally monitors
what servers are up and where users currently have connections, and
based on that decide where to redirect a new connection. Although that's
also slightly racy unless done carefully.


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


Re: [Dovecot] quick question

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 19:31 +0200, Timo Sirainen wrote:
  Is this the situation we discussed once where a dovecot instance becomes a 
  proxy if it detects that a user should be on a different server?
 
 No, that was my 1) plan :) And this is already possible with
 proxy_maybe: http://wiki.dovecot.org/PasswordDatabase/ExtraFields/Proxy

So, clarification: Either using dedicated proxies or using proxy_maybe
works for 1). I just didn't remember proxy_maybe. I suppose that's a
better/easier solution since it doesn't require new hardware or network
changes.



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


Re: [Dovecot] quick question

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 19:31 +0200, Timo Sirainen wrote:
 Better would be to have some kind of a database that externally monitors
 what servers are up and where users currently have connections, and
 based on that decide where to redirect a new connection. Although that's
 also slightly racy unless done carefully.

Wonder if something like this would work:

servers (
  id integer,
  host varchar,
  ip varchar,
  last_time_healty timestamp,
  connection_count integer,
  new_connections_ok boolean
);

user_connections (
  user_id integer primary key,
  server_id integer,
  last_lookup timestamp,
  imap_connections integer
);

Then some kind of logic that:

 - if user already exists in user_connections table AND
(imap_connections  0 OR last_lookupnow() - 1 hour) use the old
server_id

 - otherwise figure out a new server for it based on servers'
connection_count and new_connections_ok.

 - when inserting, handle on duplicate key error

 - when updating, use update user_connections .. where user_id = $userid
and server_id = $old_server_id, and be prepared to handle when this
returns 0 rows updated.

Once in a while maybe clean up stale rows from user_connections. And
properly keeping track of imap_connections count might also be
problematic, so maybe once in a while somehow check from all servers if
the user actually still has any connections.


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


Re: [Dovecot] quick question

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 19:54 +0200, Timo Sirainen wrote:
  - otherwise figure out a new server for it based on servers'
 connection_count and new_connections_ok.

Or in case of proxy_maybe and a external load balancer, maybe just use
the local server in this situation.



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


Re: [Dovecot] quick question

2010-01-22 Thread Timo Sirainen
One more spam about this :)

On Fri, 2010-01-22 at 19:54 +0200, Timo Sirainen wrote:
 Then some kind of logic that:
 
  - if user already exists in user_connections table AND
 (imap_connections  0 OR last_lookupnow() - 1 hour) use the old
 server_id

AND new_connections_ok also here. The idea being that something
externally monitors servers' health and if it's down for n seconds (n=30
or so?), this field gets updated to FALSE, so new connections for users
that were in the broken server go elsewhere.



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


Re: [Dovecot] Thinderbird+delete+move to Trash folder

2010-01-22 Thread Lex Brugman
On Wed, 13 Jan 2010 22:18:31 +0100, Papp Tamás tom...@martos.bme.hu
wrote:
 Lex Brugman wrote, On 2010. 01. 12. 0:01:
 [..]

 I can't think of anything to distinguish this behavior from a normal 
 delete action by any other mail client and using Shift-Delete in 
 Thunderbird (server-side), if you know one, please let me know and I 
 will try to implement it.
   
 
 
 hi Lex,
 
 I don't know quite a lot about IMAP.
 
 I just know courier and cyrus and how the way they work with TB.
 With them TB expunge the message if I delete it by SHIFT+DEL.
 
 What I can see with courier is if I press DEL, it marks the message as 
 deleted and copy it to Trash. I say this, because it leaves the marked 
 message in the mailbox (maildir) and for example I can see and undelete 
 it by mutt.
 If I press SHIFT+DEL, it does not move the message to Trash, only marks 
 it as deleted.
 
 I apologize if I was not exact and I didn't use the right phrases.
 
 Thank you,
 
 tamas
I understand the difference between the actions in the mail client, but 
to be able to do something with this in the plugin I need to know how 
it is different from a normal delete action on the server-side.

Lex


Re: [Dovecot] quick question

2010-01-22 Thread Brandon Davidson
David,

 -Original Message-
 From: dovecot-bounces+brandond=uoregon@dovecot.org
[mailto:dovecot-
 Our physical setup is 10 Centos 5.4 x86_64 IMAP/POP servers, all with
 the same NFS backend where the index, control, and Maildir's for the
 users reside. Accessing this are direct connections from clients, plus
 multiple squirrelmail webservers, and pine users, all at the same time
 with layer4 switch connection load balancing.
 
 Each server has an average of about 400 connections, for a total of
 around concurrent 4000 during a normal business day. This is out of a
 possible user population of about 15,000.
 
 All our dovecot servers syslog to one machine, and on average I see
 about 50-75 instances of file corruption per day. I'm not counting
each
 line, since some instances of corruption generate a log message for
each
 uid that's wrong. This is just me counting user A was corrupted once
at
 10:00, user B was corrupted at 10:25 for example.

We have a much similar setup - 8 POP/IMAP servers running RHEL 5.4,
Dovecot 1.2.9 (+ patches), F5 BigIP load balancer cluster
(active/standby) in a L4 profile distributing connections round-robin,
maildirs on two Netapp Filers (clustered 3070s with 54k RPM SATA disks),
10k peak concurrent connections for 45k total accounts. We used to run
with the noac mount option, but performance was abysmal, and we were
approaching 80% CPU utilization on the filers at peak load. After
removing noac, our CPU is down around 30%, and our NFS ops/sec rate is
maybe 1/10th of what it used to be.

The downside to this is that we've started seeing significantly more
crashing and mailbox corruption. Timo's latest patch seems to have fixed
the crashing, but the corruption just seems to be the cost of
distributing users at random across our backend servers.

We've thought about enabling IP-based session affinity on the load
balancer, but this would concentrate the load of our webmail clients, as
well as not really solving the problem for users that leave clients open
on multiple systems. I've done a small bit of looking at nginx's imap
proxy support, but it's not really set up to do what we want, and would
require moving the IMAP virtual server off our load balancers and on to
something significantly less supportable. Having the dovecot processes
'talk amongst themselves' to synchronize things, or go into proxy mode
automatically, would be fantastic.

Anyway, that's where we're at with the issue. As a data point for your
discussion with your boss:
* With 'noac', we would see maybe 1 or two 'corrupt' errors a day. Most
of these were related to users going over quota.
* After removing 'noac', we saw 5-10 'Corrupt' errors and 20-30 crashes
a day. The crashes were highly visible to the users, as their mailbox
would appear to be empty until the rebuild completed.
* Since applying the latest patch, we've seen no crashes, and 60-70
'Corrupt' errors a day. We have not had any new user complaints.

Hope that helps,

-Brad


Re: [Dovecot] quick question

2010-01-22 Thread David Halik

On 01/22/2010 12:16 PM, Timo Sirainen wrote:

Looking at the problems with people using NFS it's pretty clear that this
solution just isn't going to work properly.
   


Actually, considering the amount of people and servers we're throwing at 
it, I think that it's dealing with it pretty well. I'm sure there are 
always more tweaks and enhancements that can be done, but look at how 
much better 1.2 is over 1.0 releases. it's definitely not broken, just 
maybe not quite production ready as it could be. Honestly, at this point 
my users are very happy with the speed increase and as long as their 
imap process isn't dying they don't seem to notice the behind the scenes 
corruption because of the self healing code.



But then again, Dovecot is the only (free) IMAP server that even
attempts to support this kind of behavior. Or sure, Courier does too,
but disabling index files on Dovecot should get the same stability.
   


By the way, I didn't want to give the impression that we were unhappy 
with the product, rather I think what you've accomplished with dovecot 
is great even by non-free enterprise standards, not to mention the level 
of support you've given us has been excellent and I appreciate it 
greatly. It was a clear choice for us over courier once NFS support 
became a reality. Loads on the exact same hardware dropped from an 
average of 5 to 0.5, quite amazing, not to mention the speed benefit of 
the indexes. Our users with extremely large Maildir's were very satisfied.




I see only two proper solutions:

1) Change your architecture so that all mail accesses to a specific user
go through a single server. Install Dovecot proxy so all IMAP/POP3
connections go through it to the correct server.
   


We've discussed this internally and are still considering layer7 
username balancing as a possibility, but I haven't worked too much on 
the specifics yet. We've only been running for two months on dovecot, so 
we wanted to give it some burn in time and see how things progressed. 
Now that the core dumps are fixed, I think we might be able to live with 
the corruption for awhile. The only user visible issue that I was aware 
of was the the users' mailbox disappearing when the processes died, but 
since that's not happening any more I'll have to see if anyone notices 
the corruption.


Thanks for all the feedback. I'm going over some of the ideas you 
suggested and we'll be thinking about long term solutions.


--

David Halik
System Administrator
OIT-CSS Rutgers University
dha...@jla.rutgers.edu




Re: [Dovecot] quick question

2010-01-22 Thread David Halik

On 01/22/2010 01:15 PM, Brandon Davidson wrote:


We have a much similar setup - 8 POP/IMAP servers running RHEL 5.4,
Dovecot 1.2.9 (+ patches), F5 BigIP load balancer cluster
(active/standby) in a L4 profile distributing connections round-robin,
maildirs on two Netapp Filers (clustered 3070s with 54k RPM SATA disks),
10k peak concurrent connections for 45k total accounts. We used to run
with the noac mount option, but performance was abysmal, and we were
approaching 80% CPU utilization on the filers at peak load. After
removing noac, our CPU is down around 30%, and our NFS ops/sec rate is
maybe 1/10th of what it used to be.
   


Wow, that's almost the exact same setup we use, except we have 10 
IMAP/POP and a clustered pair of FAS920's with 10K drives which are 
getting replaced in a few weeks. We also have a pair of clustered 
3050's, but they're not running dovecot (yet).


You're right about noac though, it absolutely destroyed our netapps. Of 
course the corruption was all but eliminated, but the filer performance 
was so bad our users immediately noticed. Definitely not an option.



The downside to this is that we've started seeing significantly more
crashing and mailbox corruption. Timo's latest patch seems to have fixed
the crashing, but the corruption just seems to be the cost of
distributing users at random across our backend servers.
   


Yep, I agree. Like I said in the last email, we'll going to deal with it 
for now and see if anyone really notices. I can live with it if the 
users don't care.


Timo, speaking of which, I'm guessing everyone is happy with the latest 
patches, any ETA on 1.2.10? ;)



We've thought about enabling IP-based session affinity on the load
balancer, but this would concentrate the load of our webmail clients, as
well as not really solving the problem for users that leave clients open
on multiple systems.
   


We currently have IP session 'sticky' on our L4's and it didn't help all 
that much. yes, it reduces thrashing on the backend, but ultimately it 
won't help the corruption. Like you said, multiple logins will still go 
to different servers when the IP's are different.


How if your webmail architecture setup? We're using imapproxy to spread 
them them out across the same load balancer, so essentially all traffic 
from outside and inside get's balanced. The trick is we have an internal 
load balanced virtual IP that spreads the load out for webmail on 
private IP space. If they were to go outside they would get NAT'd as one 
outbound IP, so we just go inside and get the benefit of balancing.




Anyway, that's where we're at with the issue. As a data point for your
discussion with your boss:
* With 'noac', we would see maybe 1 or two 'corrupt' errors a day. Most
of these were related to users going over quota.
* After removing 'noac', we saw 5-10 'Corrupt' errors and 20-30 crashes
a day. The crashes were highly visible to the users, as their mailbox
would appear to be empty until the rebuild completed.
* Since applying the latest patch, we've seen no crashes, and 60-70
'Corrupt' errors a day. We have not had any new user complaints.
   


That's where we are, and as long as the corruptions stay user invisible, 
I'm fine with it. Crashes seem to be the only user visible issue so far, 
with noac being out of the question unless they buy a ridiculously 
expensive filer.


--

David Halik
System Administrator
OIT-CSS Rutgers University
dha...@jla.rutgers.edu




Re: [Dovecot] quick question

2010-01-22 Thread David Halik



We've thought about enabling IP-based session affinity on the load
balancer,
   


Brandon, I just thought of something. Have you always been running 
without IP affinity across all your connections? We've always had it 
turned on because we were under the impression that certain clients like 
Outlook had major issues without it. Basically, as the client spawns new 
connections and they go to other servers rather than the same one the 
client begins to fight itself. IP affinity always seemed like a more 
stable option, but if you've been running without it for a long time, 
maybe it's not such a problem after all. Anyway, what has you experience 
been?


--

David Halik
System Administrator
OIT-CSS Rutgers University
dha...@jla.rutgers.edu




[Dovecot] mailbox format w/ separate headers/data

2010-01-22 Thread Frank Cusack

In the future, it would be cool if there were a mailbox format (dbox2?)
where mail headers and each mime part were stored in separate files.
This would enable the zfs dedup feature to be used to maximum benefit.

In the zfs filesystem, there is a dedup feature which stores only 1 copy
of duplicate blocks.  In a normal mail file, the headers will be
different for each recipient and the chances of the content of the message
being able to be dedup'd are close to zero, because the differences in
header length changes the block boundaries for the rest of the message.
But if each mime part is stored in a separate file, you get massive
compression for free.

-frank


Re: [Dovecot] quick question

2010-01-22 Thread Cor Bosman

 Wow, that's almost the exact same setup we use, except we have 10 IMAP/POP 
 and a clustered pair of FAS920's with 10K drives which are getting replaced 
 in a few weeks. We also have a pair of clustered 3050's, but they're not 
 running dovecot (yet).

Pretty much the same as us as well.  35 imap servers. 10 pop servers.  
clustered pair of 6080s, with about 250 15K disks. We're seeing some corruption 
as well. I myself am using imap extensively and regularly have problems with my 
inbox disappearing. Im not running the patch yet though. Is 1.2.10 imminent or 
should i just patch 1.2.9?

Cor



Re: [Dovecot] mailbox format w/ separate headers/data

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 23:05 +0200, Timo Sirainen wrote:
 It would also be possible to already write such Maildir feature. Someone
 on this list already wrote header/body separation code, which was pretty
 easy to do with a plugin.

Someone = Alex Baule



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


Re: [Dovecot] quick question

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 17:05 -0400, Cor Bosman wrote:

 Is 1.2.10 imminent or should i just patch 1.2.9?

I'll try to get 1.2.10 out on Sunday. There are still some mails I
should read through and maybe fix some other stuff.



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


Re: [Dovecot] mailbox format w/ separate headers/data

2010-01-22 Thread Frank Cusack

On January 22, 2010 11:05:22 PM +0200 Timo Sirainen t...@iki.fi wrote:

Dunno about zfs, but I've heard that at least in one NetApp installation
deduplication was way too heavyweight.


zfs dedup is pretty resources intensive -- for writes.  For mail I
suspect reads overwhelm writes?

-frank


Re: [Dovecot] mailbox format w/ separate headers/data

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 16:09 -0500, Frank Cusack wrote:
 On January 22, 2010 11:05:22 PM +0200 Timo Sirainen t...@iki.fi wrote:
  Dunno about zfs, but I've heard that at least in one NetApp installation
  deduplication was way too heavyweight.
 
 zfs dedup is pretty resources intensive -- for writes.  For mail I
 suspect reads overwhelm writes?

I don't have any evidence, but my logic goes like: Mail is written to
disk once. Most users use a single client, which downloads the message
once. Or maybe they're using webmail, and they read the same message
approximately once (or maybe max. 1.1 times). In both cases read:write
is about 1:1.

Index files are of course a different thing. They're read a lot more
often. But dedup doesn't help with them.



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


Re: [Dovecot] mailbox format w/ separate headers/data

2010-01-22 Thread Timo Sirainen
On Fri, 2010-01-22 at 23:12 +0200, Timo Sirainen wrote:

 I don't have any evidence, but my logic goes like: Mail is written to
 disk once. Most users use a single client, which downloads the message
 once. Or maybe they're using webmail, and they read the same message
 approximately once (or maybe max. 1.1 times). In both cases read:write
 is about 1:1.

Also if message is read close to after it was read, it's already in
cache and won't have to be read from disk. In those cases read:write
might be close to 0:1..



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


Re: [Dovecot] mailbox format w/ separate headers/data

2010-01-22 Thread Frank Cusack

On January 22, 2010 11:05:22 PM +0200 Timo Sirainen t...@iki.fi wrote:

On Fri, 2010-01-22 at 15:53 -0500, Frank Cusack wrote:

In the future, it would be cool if there were a mailbox format (dbox2?)
where mail headers and each mime part were stored in separate files.
This would enable the zfs dedup feature to be used to maximum benefit.


This is more or less what dbox's single instance storage is going to do.
Maybe in half a year or so.. And you don't even need filesystem
deduplication feature. :)


But if the mail system has to handle it, it only knows about mails
written at the same time.  For example, if postfix delivers mail
with a single recipient per mail (the recommended config somewhere,
not sure if recommended by postfix or by dovecot), dbox won't get
the opportunity to dedup.

And for mails which are re-forwarded (pretty common occurrence), again
dbox won't get the chance to dedup.

Or will there be a global index?

-frank


Re: [Dovecot] mailbox format w/ separate headers/data

2010-01-22 Thread Timo Sirainen
On 22.1.2010, at 23.14, Frank Cusack wrote:

 This is more or less what dbox's single instance storage is going to do.
 Maybe in half a year or so.. And you don't even need filesystem
 deduplication feature. :)
 
 But if the mail system has to handle it, it only knows about mails
 written at the same time.  For example, if postfix delivers mail
 with a single recipient per mail (the recommended config somewhere,
 not sure if recommended by postfix or by dovecot), dbox won't get
 the opportunity to dedup.

Well, doing the multiple-recipients-at-a-time already works with v1.1+ with 
Maildir.

 And for mails which are re-forwarded (pretty common occurrence), again
 dbox won't get the chance to dedup.
 
 Or will there be a global index?

Yes. That's what dbox SIS is about. You have a global repository of (large) 
MIME parts, indexed by their SHA1 sum (or something).



Re: [Dovecot] quick question

2010-01-22 Thread Brandon Davidson
Cor,

On 1/22/10 1:05 PM, Cor Bosman c...@xs4all.nl wrote:
 
 Pretty much the same as us as well.  35 imap servers. 10 pop servers.
 clustered pair of 6080s, with about 250 15K disks. We're seeing some
 corruption as well. I myself am using imap extensively and regularly have
 problems with my inbox disappearing. Im not running the patch yet though. Is
 1.2.10 imminent or should i just patch 1.2.9?

You guys must serve a pretty heavy load. What's your peak connection count
across all those machines? How's the load? We recently went through a
hardware replacement cycle, and were targeting  25% utilization at peak
load so we can lose one of our sites (half of our machines are in each site)
without running into any capacity problems. We're actually at closer to 10%
at peak, if that... Probably less now that we've disabled noac. Dovecot is
fantastic :)

-Brad



Re: [Dovecot] mailbox format w/ separate headers/data

2010-01-22 Thread Timo Sirainen
On 22.1.2010, at 23.39, Frank Cusack wrote:

 On January 22, 2010 11:21:09 PM +0200 Timo Sirainen t...@iki.fi wrote:
 Or will there be a global index?
 
 Yes. That's what dbox SIS is about. You have a global repository of
 (large) MIME parts, indexed by their SHA1 sum (or something).
 
 In the case of zfs then, the filesystem may as well do the dedup'ing.

Or dbox may as well do the deduping? :) I guess it comes down to whose 
algorithm is fastest. I suppose they're more or less the same, if it's possible 
to tell zfs to dedup files only in /mail/attachments/ directory (I guess you 
can create a separate filesystem for that).



Re: [Dovecot] quick question

2010-01-22 Thread Cor Bosman
 
 You guys must serve a pretty heavy load. What's your peak connection count
 across all those machines? How's the load? We recently went through a
 hardware replacement cycle, and were targeting  25% utilization at peak
 load so we can lose one of our sites (half of our machines are in each site)
 without running into any capacity problems. We're actually at closer to 10%
 at peak, if that... Probably less now that we've disabled noac. Dovecot is
 fantastic :)

I think the peak is around 1 concurrent connections, out of about 500,000 
mailboxes. The servers are way overspecced, so we can lose half of them. The 
netapps are also being used for webservices.

Cor

Re: [Dovecot] mailbox format w/ separate headers/data

2010-01-22 Thread Frank Cusack

On January 22, 2010 11:44:07 PM +0200 Timo Sirainen t...@iki.fi wrote:

On 22.1.2010, at 23.39, Frank Cusack wrote:


On January 22, 2010 11:21:09 PM +0200 Timo Sirainen t...@iki.fi wrote:

Or will there be a global index?


Yes. That's what dbox SIS is about. You have a global repository of
(large) MIME parts, indexed by their SHA1 sum (or something).


In the case of zfs then, the filesystem may as well do the dedup'ing.


Or dbox may as well do the deduping? :) I guess it comes down to whose
algorithm is fastest.


Yeah, I just meant that if dbox has a global hash list then either
method should have similar overhead.  zfs checksums every single block
written anyway (regardless of dedup) so I think it would be faster
vs dbox.

Of course dbox can be used on systems without zfs.

I would suggest that using zfs would give you more portability (mail
files appear normal and copied or manipulated however you care to),
however normal mail files do not separate the headers and the message
parts so that isn't valid.

-frank


Re: [Dovecot] quick question

2010-01-22 Thread Brandon Davidson
David,

On 1/22/10 12:34 PM, David Halik dha...@jla.rutgers.edu wrote:
 
 We currently have IP session 'sticky' on our L4's and it didn't help all
 that much. yes, it reduces thrashing on the backend, but ultimately it
 won't help the corruption. Like you said, multiple logins will still go
 to different servers when the IP's are different.
 
 How if your webmail architecture setup? We're using imapproxy to spread
 them them out across the same load balancer, so essentially all traffic
 from outside and inside get's balanced. The trick is we have an internal
 load balanced virtual IP that spreads the load out for webmail on
 private IP space. If they were to go outside they would get NAT'd as one
 outbound IP, so we just go inside and get the benefit of balancing.

We have two webmail interfaces - one is an old in-house open-source project
called Alphamail, the new one is Roundcube. Both of them point at the same
VIP that we point users at, with no special rules. We're running straight
round-robin L4 connection distribution, with no least-connections or
sticky-client rules.

We've been running this way for about 3 years I think.. I've only been here
a year. We made a number of changes in sequence starting about three and a
half years ago - Linux NFS to Netapp, Courier to Dovecot, mbox to Maildir+,
LVS to F5 BigIP; not necessarily in that order. At no point have we ever had
any sort of session affinity.
 
 That's where we are, and as long as the corruptions stay user invisible,
 I'm fine with it. Crashes seem to be the only user visible issue so far,
 with noac being out of the question unless they buy a ridiculously
 expensive filer.

Yeah, as long as the users don't see it, I'm happy to live with the messages
in the log file.

-Brad



[Dovecot] how to create maildir on local mail delivery

2010-01-22 Thread Sebastian Logar
Hi!

 

I am using Dovecot 1.0.10 with LDA/postfix option reading user data from
ldap, but the problem would be nonexistent maildir. Connection with ldap
should be fine since reading proper maildir folder. Is it possible to
auto creating maildir folders even on received mail since the you can
auto create when user login with mail_executable scripts as it's seen
from configuration I am doing for pop3 and imap. 

 

Jan 23 00:23:17 dovecot postfix/qmgr[14579]: 75AADD212F:
from=someu...@domain.tld, size=354, nrcpt=1 (queue active)

Jan 23 00:23:17 dovecot deliver(erikp): Loading modules from directory:
/usr/lib/dovecot/modules/lda

Jan 23 00:23:17 dovecot deliver(erikp): Module loaded:
/usr/lib/dovecot/modules/lda/lib10_quota_plugin.so

Jan 23 00:23:17 dovecot deliver(erikp): auth input: erikp

Jan 23 00:23:17 dovecot deliver(erikp): auth input:
home=/nas/5b/7d/5f/erikp/www

Jan 23 00:23:17 dovecot deliver(erikp): auth input: uid=5000

Jan 23 00:23:17 dovecot deliver(erikp): auth input: gid=5000

Jan 23 00:23:17 dovecot deliver(erikp): auth input:
mail=/nas/5b/7d/5f/erikp/Maildir/

Jan 23 00:23:17 dovecot deliver(erikp): auth input:
quota=maildir:storage=1

Jan 23 00:23:17 dovecot deliver(erikp): Home dir not found:
/nas/5b/7d/5f/erikp/www

Jan 23 00:23:17 dovecot deliver(erikp): maildir autodetect:
stat(/nas/5b/7d/5f/erikp/Maildir//cur) failed: No such file or directory

Jan 23 00:23:17 dovecot deliver(erikp): mbox autodetect:
data=/nas/5b/7d/5f/erikp/Maildir/

Jan 23 00:23:17 dovecot deliver(erikp): mbox autodetect: INBOX file:
stat(/nas/5b/7d/5f/erikp/Maildir/) failed: No such file or directory

Jan 23 00:23:17 dovecot deliver(erikp): mbox autodetect: has .imap/:
stat(/nas/5b/7d/5f/erikp/Maildir//.imap) failed: No such file or
directory

Jan 23 00:23:17 dovecot deliver(erikp): mbox autodetect: has inbox:
stat(/nas/5b/7d/5f/erikp/Maildir//inbox) failed: No such file or
directory

Jan 23 00:23:17 dovecot deliver(erikp): mbox autodetect: has mbox:
stat(/nas/5b/7d/5f/erikp/Maildir//mbox) failed: No such file or
directory

Jan 23 00:23:17 dovecot deliver(erikp): Ambiguous mail location setting,
don't know what to do with it: /nas/5b/7d/5f/erikp/Maildir/ (try
prefixing it with mbox: or maildir:)

Jan 23 00:23:17 dovecot deliver(erikp): Failed to create storage for
'erikp' with mail '/nas/5b/7d/5f/erikp/Maildir/'

Jan 23 00:23:17 dovecot postfix/pipe[15537]: 75AADD212F:
to=er...@somelocaldomain.tld, relay=dovecot, delay=2146,
delays=2146/0.02/0/0.02, dsn=4.3.0, status=deferred (temporary failure)

dovecot -n

# 1.0.10: /etc/dovecot/dovecot.conf

log_timestamp: %Y-%m-%d %H:%M:%S

protocols: imap pop3

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

mail_privileged_group: mail

mail_debug: yes

mail_executable(default): /usr/lib/dovecot/imap.sh

mail_executable(imap): /usr/lib/dovecot/imap.sh

mail_executable(pop3): /usr/lib/dovecot/pop3.sh

mail_plugins(default): quota imap_quota

mail_plugins(imap): quota imap_quota

mail_plugins(pop3): quota

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

pop3_uidl_format(default):

pop3_uidl_format(imap):

pop3_uidl_format(pop3): %08Xu%08Xv

auth default:

  passdb:

driver: ldap

args: /etc/dovecot/dovecot-ldap.conf

  userdb:

driver: ldap

args: /etc/dovecot/dovecot-ldap.conf

  socket:

type: listen

client:

  path: /var/run/dovecot/auth-client

  mode: 432

  user: postfix

  group: postfix

master:

  path: /var/run/dovecot/auth-master

  mode: 384

  user: vmail

  group: vmail

plugin:

  quota: maildir:storage=10

 

Regards,

Sebastian



Re: [Dovecot] how to create maildir on local mail delivery

2010-01-22 Thread Timo Sirainen
On 23.1.2010, at 1.45, Sebastian Logar wrote:

 I am using Dovecot 1.0.10 with LDA/postfix option reading user data from
 ldap, but the problem would be nonexistent maildir. Connection with ldap
 should be fine since reading proper maildir folder. Is it possible to
 auto creating maildir folders even on received mail since the you can
 auto create when user login with mail_executable scripts as it's seen
 from configuration I am doing for pop3 and imap. 

Yes.

 Jan 23 00:23:17 dovecot deliver(erikp): Ambiguous mail location setting,
 don't know what to do with it: /nas/5b/7d/5f/erikp/Maildir/ (try
 prefixing it with mbox: or maildir:)

This is your problem. You need to prefix it with maildir:.

 # 1.0.10: /etc/dovecot/dovecot.conf

v1.0 might not make this easy..

  userdb:
 
driver: ldap
 
args: /etc/dovecot/dovecot-ldap.conf

What's in your user_attrs?


Re: [Dovecot] how to create maildir on local mail delivery

2010-01-22 Thread Sebastian Logar
Hi Timo,

First of all thank you for responding so fast. So i need to change
maildir ldap entry to maildir:/nas/5b/7d/5f/erikp/Maildir/ or i just can
change user_attrs?

What version would you suggest, probably latest? I installed this one
from ubuntu repository.

My user_attrs is
user_attrs =
homeDirectory=home,uidNumber=uid,gidNumber=gid,mailMessageStore=mail,mai
lQuota=quota=maildir:storage

regards,
Sebastian

-Original Message-
From: Timo Sirainen [mailto:t...@iki.fi] 
Sent: Saturday, January 23, 2010 12:52 AM
To: Sebastian Logar
Cc: dovecot@dovecot.org
Subject: Re: [Dovecot] how to create maildir on local mail delivery

On 23.1.2010, at 1.45, Sebastian Logar wrote:

 I am using Dovecot 1.0.10 with LDA/postfix option reading user data
from
 ldap, but the problem would be nonexistent maildir. Connection with
ldap
 should be fine since reading proper maildir folder. Is it possible to
 auto creating maildir folders even on received mail since the you can
 auto create when user login with mail_executable scripts as it's seen
 from configuration I am doing for pop3 and imap. 

Yes.

 Jan 23 00:23:17 dovecot deliver(erikp): Ambiguous mail location
setting,
 don't know what to do with it: /nas/5b/7d/5f/erikp/Maildir/ (try
 prefixing it with mbox: or maildir:)

This is your problem. You need to prefix it with maildir:.

 # 1.0.10: /etc/dovecot/dovecot.conf

v1.0 might not make this easy..

  userdb:
 
driver: ldap
 
args: /etc/dovecot/dovecot-ldap.conf

What's in your user_attrs?


Re: [Dovecot] how to create maildir on local mail delivery

2010-01-22 Thread Timo Sirainen
On 23.1.2010, at 2.36, Sebastian Logar wrote:

 What version would you suggest, probably latest? I installed this one
 from ubuntu repository.

Latest, yeah. But..:

 My user_attrs is
 user_attrs =
 homeDirectory=home,uidNumber=uid,gidNumber=gid,mailMessageStore=mail,mai
 lQuota=quota=maildir:storage

You can change this to be:

user_attrs = .., mailMessageStore=home, ..

and in dovecot.conf:

mail_location = maildir:%h



Re: [Dovecot] how to create maildir on local mail delivery

2010-01-22 Thread Timo Sirainen

On 23.1.2010, at 2.40, Timo Sirainen wrote:

 My user_attrs is
 user_attrs =
 homeDirectory=home,uidNumber=uid,gidNumber=gid,mailMessageStore=mail,mai
 lQuota=quota=maildir:storage
 
 You can change this to be:
 
 user_attrs = .., mailMessageStore=home, ..
 
 and in dovecot.conf:
 
 mail_location = maildir:%h

Reading again.. what's the relationship between homeDirectory and 
mailMessageStore? Perhaps you should just drop mailMessageSotre and use:

mail_location = maildir:%h/Maildir



Re: [Dovecot] feature question: local delivery from SMTP

2010-01-22 Thread Phil Howard
Then I guess I will need to let Postfix do the delivery so it can be aware
of what users exist and not, to be sure it will do all rejections when the
SMTP MX connection is still up to let it reject back over that connection.
So Dovecot would just be the IMAP daemon, and some webmail program used on
top of that.

On Fri, Jan 22, 2010 at 10:59 AM, Joseph Yee joseph@gmail.com wrote:

 Mail client interacts with MTA (sendmail, postfix, exim, etc) and then
 MTA 'calls' the delivery agent (LDA, some MTA, etc) to deliver the
 mail to mailboxes.  Common mail clients do not interact with delivery
 agent directly, even it's inbound. So yes, you need MTA for inbound
 mail.

 HTH
 Joseph

 On Fri, Jan 22, 2010 at 7:11 AM, Phil Howard ka9...@gmail.com wrote:
  I saw something in the documentation called LDA that looked like it was
  accepting some kind of connection and delivering mail into mailboxes.
 
  On Fri, Jan 22, 2010 at 4:09 AM, Veiko Kukk veiko.k...@ekp.ee wrote:
 
  Phil Howard wrote:
 
  Does Dovecot really need a separate MTA for inbound mail?
 
 
  Why do you thing it might need?
 
 
   Or can it receive
  SMTP directly if there is no forwarding to do?  What about spam/virus
  filtering in that case?
 
 
  Dovecot has nothing to do with smtp. You need MTA like postfix or exim
 to
  deliver mail to mbox/maildir. Then dovecot can show those mailboxes to
  client.
 
  --
  Veiko
 
 
 
 
  --
  Phil Howard KA9WGN - ka9...@gmail.com
 




-- 
Phil Howard KA9WGN - ka9...@gmail.com


Re: [Dovecot] mailbox format w/ separate headers/data

2010-01-22 Thread Charles Sprickman

On Fri, 22 Jan 2010, Frank Cusack wrote:


On January 22, 2010 11:05:22 PM +0200 Timo Sirainen t...@iki.fi wrote:

Dunno about zfs, but I've heard that at least in one NetApp installation
deduplication was way too heavyweight.


zfs dedup is pretty resources intensive -- for writes.  For mail I
suspect reads overwhelm writes?


Sorry for the tangent, but I wonder if anyone here is running lots of 
Maildirs on zfs?  I just recently started experimenting with it on our 
backups server (FBSD 8.0), and I really am liking it.  I was also 
surprised at how my little 4 drive raidz volume performed in benchmarks - 
quite impressive.


I'd seen some comments here in the past that zfs+maildirs = bad.  Anything 
to back that up?  Any comparisons to UFS2 on FBSD?


For a number of reasons, running zfs on my main mail host would be very 
handy (backups and easy expansion being the two big ones).


Thanks,

Charles


-frank



[Dovecot] maildir on zfs (was: mailbox format w/ separate headers/data)

2010-01-22 Thread Frank Cusack
On January 22, 2010 9:03:42 PM -0500 Charles Sprickman sp...@bway.net 
wrote:

Sorry for the tangent,


You should probably start a new thread when changing the subject.  Then
you don't have to be sorry. :)


but I wonder if anyone here is running lots of Maildirs on zfs?


When you say lots of Maildirs I assume you mean filesystem-per-user?
You can of course use lots of Maildirs yet have only a single zfs
filesystem but that doesn't seem to me to be worth questioning.

I am running that way but it's less than 100 users so probably not what
you would consider lots.


I'd seen some comments here in the past that zfs+maildirs = bad.


I can't imagine why that would be the case.  There are some problem
loads for zfs (zfs-backed NFS writes, e.g.) but why maildir would be
particularly singled out I wouldn't know.

For filesystem-per-user, if by lots you mean 1000 or 1000s then you
have the problem that it takes forever to mount all of those filesytems
on reboot.  That's not a maildir-specific problem though.

-frank


Re: [Dovecot] maildir on zfs (was: mailbox format w/ separate headers/data)

2010-01-22 Thread Dave McGuire

On Jan 22, 2010, at 9:22 PM, Frank Cusack wrote:

but I wonder if anyone here is running lots of Maildirs on zfs?


When you say lots of Maildirs I assume you mean filesystem-per-user?
You can of course use lots of Maildirs yet have only a single zfs
filesystem but that doesn't seem to me to be worth questioning.

I am running that way but it's less than 100 users so probably not  
what

you would consider lots.


  I'm in the same usage range for my ZFS-backed mail server.


I'd seen some comments here in the past that zfs+maildirs = bad.


I can't imagine why that would be the case.  There are some problem
loads for zfs (zfs-backed NFS writes, e.g.) but why maildir would be
particularly singled out I wouldn't know.


  I'm doing everything on ZFS now (database loads, web services,  
etc) and will never go back to UFS. (or ext3, etc)  Zero problems,  
with anything, ever.



For filesystem-per-user, if by lots you mean 1000 or 1000s then you
have the problem that it takes forever to mount all of those  
filesytems

on reboot.  That's not a maildir-specific problem though.


  I'm running filesystem-per-domain; I've found that's a good way to  
do it for my situation.


 -Dave

--
Dave McGuire
Port Charlotte, FL