[Dovecot] ssh tunneling and maildir

2007-07-11 Thread Joel Becker
Hello everyone, please keep my CC'd, I'm not on the list.
I've been using dovecot happily via an ssh tunnel.  My mutt is
configured to use IMAP, and the tunnel is as follows in my muttrc:

set tunnel=ssh -q mymailhost 'MBOX_LOCKS=fcntl MAIL=/home/jlbec/mail 
/usr/libexec/dovecot/imap'

It should be pretty obvious that this logs into mymailhost as me
(via SSH keyauth) and runs /usr/libexec/dovecot/imap directly as a
foreground process.  Setting MAIL, it points dovecot imap to my mbox
folders.  dovecot imap speaks imap over stdin/out, this goes over the
ssh to mutt.
It works great.  Really great.  I don't need root access at all,
the server isn't running dovecot globally, and I get IMAP through
firewalls if I can ssh through a firewall/vpn.  I'm using mbox and
fcntl, so my MTA has no trouble working in concert.
However, this doesn't appear to be documented anywhere.  A
friend showed it to me, and I don't even remember who that was.
I'm now considering changing to maildir folders.  I figure
dovecot imap might figure out a folder is maildir when stat says
S_IFDIR, but without documentation, I can't figure out how to tell
dovecot imap to use maildir when I create a folder.  I'm also unsure how
this will interact with my MTA.
For the latter, I'm thinking I just need to configure my MTA to
use dovecot's deliver program.  For the former, is there some magic
environment variable I need to add to my tunnel command line?

Thanks
Joel

-- 

The first requisite of a good citizen in this republic of ours
 is that he shall be able and willing to pull his weight.
- Theodore Roosevelt

http://www.jlbec.org/
[EMAIL PROTECTED]


[Dovecot] NFS and Filesystem quota

2007-07-11 Thread Joseba Torre
Hi,

I've recently moved my mailboxes to a NFS share (on an emc Celerra), and, as 
expected, the quota extensions no longer works.

However, I've read that adding http://dovecot.org/patches/quota-rquotad.c to 
$DOVECOT/src/plugins/quota, adding a line to 
$DOVECOT/src/plugins/quota/Makefile.am and rebuilding, it should work again. 
Unfortunately, it doesn't compile in my RHEL 4.0:

 /usr/bin/gcc4 -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 -I/usr/kerberos/include -MT 
quota-rquotad.lo -MD -MP -MF .deps/quota-rquotad.Tpo -c 
quota-rquotad.c  -fPIC -DPIC -o .libs/quota-rquotad.o
quota-rquotad.c: In function 'debugmsg':
quota-rquotad.c:50: warning: implicit declaration of function 'i_vinfo'
quota-rquotad.c: In function 'rquotad_quota_add_storage':
quota-rquotad.c:90: error: storage size of 'statbuf' isn't known
quota-rquotad.c:97: warning: implicit declaration of function 'statfs'
quota-rquotad.c:99: error: 'MNT_LOCAL' undeclared (first use in this function)
quota-rquotad.c:99: error: (Each undeclared identifier is reported only once
quota-rquotad.c:99: error: for each function it appears in.)
quota-rquotad.c:104: error: 'MNAMELEN' undeclared (first use in this function)
quota-rquotad.c:90: warning: unused variable 'statbuf'
quota-rquotad.c: At top level:
quota-rquotad.c:225: warning: initialization from incompatible pointer type
quota-rquotad.c: In function 'rquota_get':
quota-rquotad.c:256: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
quota-rquotad.c:267: warning: passing argument 3 of 'clnt-cl_ops-cl_call' 
from incompatible pointer type
quota-rquotad.c:267: warning: passing argument 4 of 'clnt-cl_ops-cl_call' 
from incompatible pointer type
quota-rquotad.c:267: warning: passing argument 5 of 'clnt-cl_ops-cl_call' 
from incompatible pointer type
quota-rquotad.c:267: warning: passing argument 6 of 'clnt-cl_ops-cl_call' 
from incompatible pointer type
quota-rquotad.c: In function 'rquotad_quota_root_update':
quota-rquotad.c:275: error: storage size of 'statfsbuf' isn't known
quota-rquotad.c:291: error: 'MNT_LOCAL' undeclared (first use in this 
function)
quota-rquotad.c:275: warning: unused variable 'statfsbuf'
make[4]: *** [quota-rquotad.lo] Error 1
make[4]: Leaving directory 
`/home/lgstosej/dovecot/dovecot-1.0.1/src/plugins/quota'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/lgstosej/dovecot/dovecot-1.0.1/src/plugins'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/lgstosej/dovecot/dovecot-1.0.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lgstosej/dovecot/dovecot-1.0.1'
make: *** [all] Error 2

Any help? Is there any plan to have official support for this?

Aagur.
-- 
Joseba Torre. CIDIR Bizkaia.


pgpSB6p0Dn5PG.pgp
Description: PGP signature


Re: [Dovecot] About a simultaneous session of Dovecot(IMAP)

2007-07-11 Thread Hermann wacker

2007/7/11, Takateru Ueda [EMAIL PROTECTED]:

The construction of the mail server with Postfix+Dovecot(IMAP) is examined.

・The number of mailboxes is about 1000.
・The reception protocol uses IMAP and the Maildir form.
・OS is Redhat Enterprise Linux ES4.
・MUA uses Outlook Express.
・Postfix and Dovecot use latest Ver.

In the above-mentioned environment, it is understanding person. how
much the number of maximum sessions (number of people) that can be
used at the same time becomes from MUA
(When grounds of the calculation are understood, it is the best. )


Maybe you should tell what kind of Hardware is running your Mailsystem
(CPU, RAID?, NIC)?


Re: [Dovecot] Connecting to dovecot/imap without a password

2007-07-11 Thread Don Russell

Timo Sirainen wrote:

On 11.7.2007, at 0.07, Don Russell wrote:

I have written a script that connects (localhost) to the dovecot/imap 
server and performs various maintenance on my mail, by folder. 
deleting old stuff, keeping the n most recent, that sort of crap, er 
good stuff. :-)


My script is written in php (I use the various imap_* functions), and 
it connects to the imap server running on the same machine... is 
there a way to connect to the server without having to specify my 
user name and password?


I was thinking there may be some form of implied logon if a request 
from user don requests to log on to user don, then there's no 
need for a password check, when the connection is via localhost.


How about using master users? 
http://wiki.dovecot.org/Authentication/MasterUsers


The master user password can be empty of course also.. You can limit 
the allowed IPs with 
http://wiki.dovecot.org/PasswordDatabase/ExtraFields/AllowNets


Thank you. I think this will work well for me.


[Dovecot] target doesn't allow inferior mailboxes

2007-07-11 Thread Adam Williams
Using Seamonkey as my email client, and IMAP to check mail.  If I create 
a new IMAP folder, and then delete it, I get the error:


The current command did not succeed. The mail server responded: Target 
mailbox doesn't allow inferior mailboxes.


Tried a google search, didn't really come up with anything.  I have rw 
permissions on /home/awilliam/Mail/* and delete the files fine using rm 
-rf /home/awilliam/Mail/whatever and editing the folder out of 
.subscriptions.  Any ideas?


[EMAIL PROTECTED] ~]# dovecot --version
1.0.1
[EMAIL PROTECTED] ~]# dovecot -n
# 1.0.1: /etc/dovecot.conf
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_location: mbox:~/Mail/:INBOX=/var/spool/mail/%u
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
auth default:
 passdb:
   driver: pam
 userdb:
   driver: passwd



Re: [Dovecot] target doesn't allow inferior mailboxes

2007-07-11 Thread Scott Silva
Adam Williams spake the following on 7/11/2007 8:45 AM:
 Using Seamonkey as my email client, and IMAP to check mail.  If I create
 a new IMAP folder, and then delete it, I get the error:
 
 The current command did not succeed. The mail server responded: Target
 mailbox doesn't allow inferior mailboxes.
 
 Tried a google search, didn't really come up with anything.  I have rw
 permissions on /home/awilliam/Mail/* and delete the files fine using rm
 -rf /home/awilliam/Mail/whatever and editing the folder out of
 .subscriptions.  Any ideas?
 
 [EMAIL PROTECTED] ~]# dovecot --version
 1.0.1
 [EMAIL PROTECTED] ~]# dovecot -n
 # 1.0.1: /etc/dovecot.conf
 login_dir: /var/run/dovecot/login
 login_executable(default): /usr/libexec/dovecot/imap-login
 login_executable(imap): /usr/libexec/dovecot/imap-login
 login_executable(pop3): /usr/libexec/dovecot/pop3-login
 mail_location: mbox:~/Mail/:INBOX=/var/spool/mail/%u
 mail_executable(default): /usr/libexec/dovecot/imap
 mail_executable(imap): /usr/libexec/dovecot/imap
 mail_executable(pop3): /usr/libexec/dovecot/pop3
 mail_plugin_dir(default): /usr/lib/dovecot/imap
 mail_plugin_dir(imap): /usr/lib/dovecot/imap
 mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
 auth default:
  passdb:
driver: pam
  userdb:
driver: passwd
 
 
Your MUA is trying to delete the mailbox by moving it to the trash folder. But
if you are using mbox, you can't do that, because the trash folder is also
mbox so it errors out. Thunderbird does the same thing if told to delete to
the server side trash.

-- 

MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't



Re: [Dovecot] About a simultaneous session of Dovecot(IMAP)

2007-07-11 Thread Takateru Ueda
 Maybe you should tell what kind of Hardware is running your Mailsystem
 (CPU, RAID?, NIC)?

The assumed hardware spec becomes the following. 

CPU   :Intel Xeon 5160 3GHz 1x4MB L2 Dual Core 
Memory:4GB
RAID  :RAID1+0
NIC   :100Mbps

My best regards.

- Original Message -
From: Hermann wacker [EMAIL PROTECTED]
Sent: Wed, 11 Jul 2007 14:00:04 +0200
Subject: Re: [Dovecot] About a simultaneous session of Dovecot(IMAP)


 2007/7/11, Takateru Ueda [EMAIL PROTECTED]:
  The construction of the mail server with Postfix+Dovecot(IMAP) is examined.
 
  ・The number of mailboxes is about 1000.
  ・The reception protocol uses IMAP and the Maildir form.
  ・OS is Redhat Enterprise Linux ES4.
  ・MUA uses Outlook Express.
  ・Postfix and Dovecot use latest Ver.
 
  In the above-mentioned environment, it is understanding person. how
  much the number of maximum sessions (number of people) that can be
  used at the same time becomes from MUA
  (When grounds of the calculation are understood, it is the best. )
 
 Maybe you should tell what kind of Hardware is running your Mailsystem
 (CPU, RAID?, NIC)?
 






Re: [Dovecot] NFS cache flush tester

2007-07-11 Thread Timo Sirainen
On Wed, 2007-07-11 at 22:21 +0300, Timo Sirainen wrote:
 http://dovecot.org/tools/nfstest.c

I've done several updates for this. Updated results for Linux 2.6:

Info: O_EXCL works
Info: Testing attribute cache..
Info: Attr cache flush fchown(-1, -1): failed
Info: Attr cache flush fchown(uid, -1): OK
Info: Attr cache flush fchmod(mode): OK
Info: Attr cache flush chown(-1, -1): failed
Info: Attr cache flush chown(uid, -1): OK
Info: Attr cache flush chmod(mode): OK
Info: Testing write flushing..
Info: Write flush no caching: failed
Info: Write flush fcntl(shared): OK
Info: Write flush fcntl(exclusive): OK
Info: Write flush flock(shared): OK
Info: Write flush flock(exclusive): OK
Info: Write flush reopen: OK
Info: Testing data cache..
Info: data cache: Reading EOF requires attribute cache flush
Info: data cache (no caching): failed
Info: data cache (attr cache): OK
Info: data cache (fcntl(shared)): OK
Info: data cache (fcntl(exclusive)): OK
Info: data cache (flock(shared)): OK
Info: data cache (flock(exclusive)): OK
Info: data cache (dotlock): failed
Info: data cache (O_DIRECT): OK



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


[Dovecot] Problem with Dovecot SASL in Postfix

2007-07-11 Thread Chris McMacken

I'm trying to configure my postfix server to use Dovecot as an SASL
server and running into some problems. My server supports a couple of
domain, I have multiple user/password files for multiple domains to
make the files a little easier to manage. Not sure if this question
should belong in the dovecot mailing list or the postfix one, but here
goes anyway. I have everything configured to use CRAM-MD5
authentication, including my mail client.

Here the auth section of my dovecot conf.

auth default {
mechanisms = plain cram-md5

passdb passwd-file {
  # Path for passwd-file
  args = /usr/local/etc/dovecot/%d/passwd
}

userdb passwd-file {
  # Path for passwd-file
  args = /usr/local/etc/dovecot/%d/passwd
}

user = root

# It's possible to export the authentication interface to other programs:
socket listen {
  client {
# The client socket is generally safe to export to everyone. Typical use
# is to export it to your SMTP server so it can do SMTP AUTH lookups
# using it.
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
  }
}
}

heres a sample line from one of the passwd files:

chrism:{CRAM-MD5}a67a65704086a046b3f875d1eaac8cb5c6fd13406507fead30d9bcb1bf82b:1003:1003::/home/vmail/example.com

and to login through SASL I am trying to use the username
[EMAIL PROTECTED] when I use the full email address like this to
login like this I get this output into my postfix log:

Jul 10 18:46:59 mail postfix/smtpd[57343]: connect from unknown[12.244.148.123]
Jul 10 18:46:59 mail postfix/smtpd[57343]: NOQUEUE: reject: RCPT from
unknown[12.244.148.123]: 554 5.7.1 [EMAIL PROTECTED]: Relay access
denied; from=[EMAIL PROTECTED] to=[EMAIL PROTECTED] proto=ESMTP
helo=[192.168.1.14]
Jul 10 18:47:00 mail postfix/smtpd[57343]: disconnect from
unknown[12.244.148.123]

(not actually using example.com but I changed it here)
heres my smtpd_recipient_restricitons from postconf

smtpd_recipient_restrictions = permit_mynetworks,
reject_unauth_destination, permit_sasl_authenticated

so when I use the full user name ([EMAIL PROTECTED]) it doesn't
appear to even attempt logging into the sasl server. If I change it to
simply chrism, heres the output:

Jul 10 18:50:36 mail postfix/smtpd[57356]: connect from unknown[12.244.148.123]
Jul 10 18:50:38 mail postfix/smtpd[57356]: warning:
unknown[12.244.148.123]: SASL CRAM-MD5 authentication failed:
PDI3NjU4MTE4NDExMTQzN0BtYWlsPg==
Jul 10 18:50:39 mail postfix/smtpd[57356]: lost connection after AUTH
from unknown[12.244.148.123]
Jul 10 18:50:39 mail postfix/smtpd[57356]: disconnect from
unknown[12.244.148.123]

if I put my user name in as chrism and don't add the @example.com it
tried to login but it can't login.

anyone have any ideas?


Re: [Dovecot] NFS cache flush tester

2007-07-11 Thread Doug Council

On Thu, 12 Jul 2007, Timo Sirainen wrote:

On Wed, 2007-07-11 at 22:21 +0300, Timo Sirainen wrote:

http://dovecot.org/tools/nfstest.c

I've done several updates for this. Updated results for Linux 2.6:


Different result this time:

Info: Connected: client
Info: O_EXCL works
Info: Testing attribute cache..
Fatal: open(/mnt/nfs/blah) failed: Stale NFS file handle

This is on FreeBSD 6.2-RELEASE-p5 and a NetApp NFS server.  I'm wondering 
if it is the same issue with the NFS client cache that I had to workaround 
in the past with dotlocking 
(http://www.dovecot.org/list/dovecot/2007-May/022883.html).


Before I implement the same workaround, I wanted to check if it would 
invalidate the test results assuming the workaround worked?


-Doug


Re: [Dovecot] NFS cache flush tester

2007-07-11 Thread Timo Sirainen
On Wed, 2007-07-11 at 15:06 -0700, Doug Council wrote:
 On Thu, 12 Jul 2007, Timo Sirainen wrote:
  On Wed, 2007-07-11 at 22:21 +0300, Timo Sirainen wrote:
  http://dovecot.org/tools/nfstest.c
  I've done several updates for this. Updated results for Linux 2.6:
 
 Different result this time:
 
 Info: Connected: client
 Info: O_EXCL works
 Info: Testing attribute cache..
 Fatal: open(/mnt/nfs/blah) failed: Stale NFS file handle

Hmm. I updated the nfstest.c to now just retry if this happens. Does it
help?

 This is on FreeBSD 6.2-RELEASE-p5 and a NetApp NFS server.  I'm wondering 
 if it is the same issue with the NFS client cache that I had to workaround 
 in the past with dotlocking 
 (http://www.dovecot.org/list/dovecot/2007-May/022883.html).

If it didn't help, then I suppose chown() is needed..



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


Re: [Dovecot] NFS cache flush tester

2007-07-11 Thread Doug Council

On Thu, 12 Jul 2007, Timo Sirainen wrote:

Hmm. I updated the nfstest.c to now just retry if this happens. Does it
help?


Yes, that worked.

Here are the results for FreeBSD 6.2-RELEASE-p5 and a NetApp NFS server. 
FYI, the fcntl errors also appeared on the server instance.


Info: Connected: client
Info: O_EXCL works
Info: Testing attribute cache..
Info: Attr cache flush fchown(-1, -1): OK
Info: Attr cache flush fchown(uid, -1): OK
Info: Attr cache flush fchmod(mode): OK
Info: Attr cache flush chown(-1, -1): OK
Info: Attr cache flush chown(uid, -1): OK
Info: Attr cache flush chmod(mode): OK
Info: Testing write flushing..
Info: Write flush no caching: failed
Info: Write flush fcntl(shared): failed
Info: Write flush fcntl(exclusive): failed
Info: Write flush flock(shared): failed
Info: Write flush flock(exclusive): failed
Info: Write flush reopen: OK
Info: Testing data cache..
Info: data cache: Reading EOF requires attribute cache flush
Info: Data cache flush no caching: failed
Info: Data cache flush attr cache: OK
Error: fcntl(setlk, read) failed: Operation not supported
Info: Data cache flush fcntl(shared): failed
Error: fcntl(setlk, write) failed: Operation not supported
Info: Data cache flush fcntl(exclusive): failed
Info: Data cache flush flock(shared): failed
Info: Data cache flush flock(exclusive): failed
Info: Data cache flush dotlock: failed
Info: Data cache flush O_DIRECT: failed

-Doug


[Dovecot] v1.1 status and benchmarks

2007-07-11 Thread Timo Sirainen
v1.1 plans have changed a bit. I'll release v1.1.alpha1 soon and hope to
have a stable v1.1 in a month or two. The rest of the features that
didn't make it into v1.1 will go to v1.2. I'll write more about this
when v1.1 alpha is released.

I also did a bit of benchmarking. v1.1's performance improvements are
looking pretty great, it seems to be twice as fast as v1.0.

v1.0: Maildir, dovecot-1.0 hg + inotify dotlock wait patch, mmap_disable=yes
v1.1: Maildir, dovecot hg, mmap_disable=no
cydir: Cydir, dovecot hg, mmap_disable=no

1 client


./imaptest logout=0 seed=1 secs=10 clients=1
  Logi List Stat Sele Fetc  Fet2 Stor Dele Expu Appe 
  100%  50%  50% 100% 100%  100%  50% 100% 100% 100% 
 30%  5% 
v1.0:1 1221 11791 2420  3458  323 1934 2419 2552 
v1.1:1 2606 25971 5221  7352  688 4181 5221 5489 
cydir:   1 4495 45341 8960 12786 1216 7224 8959 9434 

10 clients
--

./imaptest logout=0 seed=1 secs=10 clients=10
  Logi List Stat Sele  Fetc  Fet2 Stor  Dele  Expu  Appe 
  100%  50%  50% 100%  100%  100%  50%  100%  100%  100% 
  30% 5% 
v1.0:   10 2058 2102   10  4157  6019 1426  3348  4157  4391 
v1.1:   10 5029 5072   10 10064 14352 3176  8092 10064 10624 
cydir:  10 6332 6393   10 12664 17965 3958 10154 12663 13336 



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


Re: [Dovecot] 1.0.1: corrupt index on fresh mailbox, ideas?

2007-07-11 Thread Timo Sirainen
On Wed, 2007-07-11 at 15:18 +0200, Chris Laif wrote:
 On 7/10/07, Timo Sirainen [EMAIL PROTECTED] wrote:
  On Mon, 2007-07-09 at 11:45 -0700, Troy Engel wrote:
   dovecot: Jul 09 09:38:54 Error: IMAP(xxx): Maildir
   /home/x/xxx/Maildir sync: UIDVALIDITY changed (1183406107 - 
   1183999134)
 
  Fixed: http://hg.dovecot.org/dovecot-1.0/rev/90ea01bfaf82
 
 
 Thanks. I applied this patch to 1.0.1 and after some hours I got:
 
 Error: IMAP(box1909): file maildir-uidlist.c: line 979
 (maildir_uidlist_sync_deinit): assertion failed:
 (ctx-uidlist-uid_validity != 0)

How about this then: http://hg.dovecot.org/dovecot-1.0/rev/b6753fd66298



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


[Dovecot] v1.0.2 release candidate

2007-07-11 Thread Timo Sirainen
http://dovecot.org/tmp/dovecot-1.0.2-rc.tar.gz

Unless someone finds something broken, I'll release v1.0.2 in a few
days. The most important changes since v1.0.1:

* dbox isn't built anymore by default. It will be redesigned so it
  shouldn't be used.

+ Maildir: Support reading dovecot-uidlist (v3) files created by
  Dovecot v1.1.
- Maildir: UIDVALIDITY changed errors could happen with newly
  created mailboxes
- If INBOX. namespace was used, LIST returned it with \HasNoChildren
  which caused some clients not to show any other mailboxes.
- Maildir++ quota: If multiple processes were updating maildirsize
  at the same time, we failed with Unknown error.
- IMAP: IDLE didn't actually disconnect client after 30 minutes of
  inactivity.
- LDAP passdb/userdb was leaking memory
- deliver: %variables in plugin {} weren't expanded



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