Re: [Dovecot] Post-login scripting - Trash cleanup

2012-02-28 Thread Robert Schetterer
Am 28.02.2012 20:26, schrieb l...@airstreamcomm.net:
> On Tue, 28 Feb 2012 19:26:11 +0100, Robert Schetterer
>  wrote:
>> Am 28.02.2012 19:11, schrieb l...@airstreamcomm.net:
>>> We are considering using the post-login scripting to clear trash older
>>> than 90 days from user accounts.  has anyone done this, and if so did
>>> this
>>> cause logins to slow down too much waiting for the trash to purge?  One
>>> idea was to execute the trash purge script once a day by tracking their
>>> logins and seeing that it has already ran that day.  Another idea was
> to
>>> call the trash purge script in the background and continue without
>>> acknowledging that it has finished to keep logins speedy.
>>
>> look here if this match/solve your problem
>>
>> http://wiki2.dovecot.org/Plugins/Expire
> 
> Expire looks to be useful, but it appears to be something that enhances
> expunging of messages rather than automates the process if I am reading
> correctly.  We would like to make the process for expunging old Trash
> messages as automated and inline as possible.

wouldnt
doveadm expunge -A mailbox Trash savedbefore 90d
as cron job do what you want ?
-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] Dovecot 2.1 with custom OpenSSL fails to build

2012-02-28 Thread Andreas M. Kirchwitz
Timo Sirainen  wrote:

 >> There seems to be a new dependency in some modules (eg, lib-storage,
 >> libdovecot-lda, libdovecot-ssl) on OpenSSL. In Dovecot 2.0, those
 >> modules didn't require OpenSSL, but 2.1 does.
 >> 
 >> For the linking process the path to the OpenSSL library isn't
 >> specified properly (SSL_LIBS). Dovecot fails to build if OpenSSL
 >> is in a non-standard path. (Haven't checked if SSL_CFLAGS isn't
 >> properly used as well.)
 >
 > Maybe http://hg.dovecot.org/dovecot-2.1/rev/c07415305d9e fixes
 > everything?
 
That's the way to go. Makes things better, but I've found three more
dependencies. This patch is against the daily snapshot 20120228.
(Sorry for the changes to Makefile.in which you won't need. But this way
I don't have to rebuild Makefile.in from Makefile.am when compiling. ;-)


diff -ur dovecot-20120228.original/src/auth/Makefile.am 
dovecot-20120228/src/auth/Makefile.am
--- dovecot-20120228.original/src/auth/Makefile.am  2012-02-26 
04:00:02.0 +0100
+++ dovecot-20120228/src/auth/Makefile.am   2012-02-29 01:38:41.0 
+0100
@@ -167,7 +167,7 @@
 libauthdb_imap_la_LIBADD = \
../lib-imap-client/libimap_client.la \
../lib-ssl-iostream/libssl_iostream.la \
-   $(LIBDOVECOT)
+   $(LIBDOVECOT) $(SSL_LIBS)
 libauthdb_imap_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
    -I$(top_srcdir)/src/lib-imap \
diff -ur dovecot-20120228.original/src/auth/Makefile.in 
dovecot-20120228/src/auth/Makefile.in
--- dovecot-20120228.original/src/auth/Makefile.in  2012-02-28 
04:00:12.0 +0100
+++ dovecot-20120228/src/auth/Makefile.in   2012-02-29 01:38:44.0 
+0100
@@ -499,7 +499,7 @@
 libauthdb_imap_la_LIBADD = \
../lib-imap-client/libimap_client.la \
../lib-ssl-iostream/libssl_iostream.la \
-   $(LIBDOVECOT)
+   $(LIBDOVECOT) $(SSL_LIBS)
 
 libauthdb_imap_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
diff -ur dovecot-20120228.original/src/lib-storage/Makefile.am 
dovecot-20120228/src/lib-storage/Makefile.am
--- dovecot-20120228.original/src/lib-storage/Makefile.am   2012-02-10 
04:00:02.0 +0100
+++ dovecot-20120228/src/lib-storage/Makefile.am2012-02-29 
01:38:21.0 +0100
@@ -85,7 +85,7 @@
 
 pkglib_LTLIBRARIES = libdovecot-storage.la
 libdovecot_storage_la_SOURCES = 
-libdovecot_storage_la_LIBADD = $(shlibs) $(MODULE_LIBS)
+libdovecot_storage_la_LIBADD = $(shlibs) $(MODULE_LIBS) $(SSL_LIBS)
 libdovecot_storage_la_DEPENDENCIES = $(shlibs)
 libdovecot_storage_la_LDFLAGS = -export-dynamic
 
diff -ur dovecot-20120228.original/src/lib-storage/Makefile.in 
dovecot-20120228/src/lib-storage/Makefile.in
--- dovecot-20120228.original/src/lib-storage/Makefile.in   2012-02-28 
04:00:15.0 +0100
+++ dovecot-20120228/src/lib-storage/Makefile.in2012-02-29 
01:38:21.0 +0100
@@ -397,7 +397,7 @@
 
 pkglib_LTLIBRARIES = libdovecot-storage.la
 libdovecot_storage_la_SOURCES = 
-libdovecot_storage_la_LIBADD = $(shlibs) $(MODULE_LIBS)
+libdovecot_storage_la_LIBADD = $(shlibs) $(MODULE_LIBS) $(SSL_LIBS)
 libdovecot_storage_la_DEPENDENCIES = $(shlibs)
 libdovecot_storage_la_LDFLAGS = -export-dynamic
 test_programs = \
diff -ur dovecot-20120228.original/src/login-common/Makefile.am 
dovecot-20120228/src/login-common/Makefile.am
--- dovecot-20120228.original/src/login-common/Makefile.am  2011-11-09 
04:00:01.0 +0100
+++ dovecot-20120228/src/login-common/Makefile.am   2012-02-29 
01:38:21.0 +0100
@@ -40,6 +40,6 @@
 
 pkglib_LTLIBRARIES = libdovecot-login.la
 libdovecot_login_la_SOURCES = 
-libdovecot_login_la_LIBADD = liblogin.la 
../lib-ssl-iostream/libssl_iostream.la ../lib-dovecot/libdovecot.la
+libdovecot_login_la_LIBADD = liblogin.la 
../lib-ssl-iostream/libssl_iostream.la ../lib-dovecot/libdovecot.la $(SSL_LIBS)
 libdovecot_login_la_DEPENDENCIES = liblogin.la
 libdovecot_login_la_LDFLAGS = -export-dynamic
diff -ur dovecot-20120228.original/src/login-common/Makefile.in 
dovecot-20120228/src/login-common/Makefile.in
--- dovecot-20120228.original/src/login-common/Makefile.in  2012-02-28 
04:00:18.0 +0100
+++ dovecot-20120228/src/login-common/Makefile.in   2012-02-29 
01:38:21.0 +0100
@@ -320,7 +320,7 @@
 pkginc_lib_HEADERS = $(headers)
 pkglib_LTLIBRARIES = libdovecot-login.la
 libdovecot_login_la_SOURCES = 
-libdovecot_login_la_LIBADD = liblogin.la 
../lib-ssl-iostream/libssl_iostream.la ../lib-dovecot/libdovecot.la
+libdovecot_login_la_LIBADD = liblogin.la 
../lib-ssl-iostream/libssl_iostream.la ../lib-dovecot/libdovecot.la $(SSL_LIBS)
 libdovecot_login_la_DEPENDENCIES = liblogin.la
 libdovecot_login_la_LDFLAGS = -export-dynamic
 all: all-am



Re: [Dovecot] Master user

2012-02-28 Thread Emiliano Rago

On 02/28/2012 08:09 PM, Timo Sirainen wrote:

On 28.2.2012, at 21.04, Emiliano Rago wrote:


USER#0113607363585#011rago#011uid=5000#011gid=5000#011home=/#011master_user=rago#011master_user=admin


Oh, right, it doesn't work because there are two master_users and the second 
one overrides the first one. This might be fixed in a newer version (maybe only 
in v2.1), since I remember doing something related to this. Another possibility 
for fixing this would be to use post-login script that sets MASTER_USER 
environment to same as USER, that'll definitely fix it. 
http://wiki2.dovecot.org/PostLoginScripting



Great, with postlogin script it works!

Thanks a lot,
Emiliano


Re: [Dovecot] quota warning script not working after upgrade to 2.1.1

2012-02-28 Thread Ralf Hildebrandt
* Ralf Hildebrandt :
> With 2.0.18 I was using a quota warning script like this:

Must have been a PEBKAC - I fixed my installation by harmonising
$PREFIX (seperate $PREFIX for 2.0 and 2.1, removig an old installation
along the way) as well as cleaning up some old scripts and alas:

Feb 28 22:13:15 postamt quota-warning2(lscxxxk) 90%: delivered!
Feb 28 22:15:40 postamt quota-warning2(sxxxwart) 85%: delivered!
Feb 28 22:17:39 postamt quota-warning2.1(sxxxwart) 90%: delivered!
Feb 28 22:27:55 postamt quota-warning2.1(rxxxid) 85%: delivered!

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: [Dovecot] Dovecot clustering with dsync-based replication

2012-02-28 Thread Charles Marcus

On 2012-02-28 9:43 AM, Timo Sirainen  wrote:

On Tue, 2012-02-28 at 09:27 -0500, Charles Marcus wrote:

On 2012-02-28 9:03 AM, Timo Sirainen  wrote:

This document describes a design for a dsync-replicated Dovecot cluster.




Wow, talk about timing... this looks like a perfect answer to my
previous question about setting up two servers in two different
locations to serve two different sets of users locally...



Yeah, I was delaying answering it until I posted this.


Cool, thanks - I look forward to any comments you might have on my 
current plan.



Looks like it wouldn't really matter which server they connected to
externally, as any changes would simply be replicated.



Well, preferably users would connect to the same server. If both servers
have done changes at the same time, there can be some temporary
(possibly user-visible) confusion.


Point taken - and thinking about it, the amount of traffic would be 
negligible, since users accessing emails remotely is much less than 
internally.


But a question out of curiosity: can the Director be configured to 
redirect userA to private IP #.#.#.# when connecting from a local 
subnet, but connect them to Public IP ##.##.##.##.## when accessing 
remotely? I don't know enough about routing to answer this myself... but 
if it is possible, then I could minimize traffic on  the inter-office 
link - but there really is not enough remote traffic to worry about this 
too much I think.



Timo, state above that this 'describes a design'... does this mean that
this is doable right now? Which of the following terms would you use to
describe it at this point in time?

Potentially problematic



Not finished yet, so closest to this. :) I'm planning on making our own
mails use this within a few weeks (currently it's a dsync in crontab
every 5 minutes).


Cool, it sounds like it may be safe to set this up then in say 2 or 3 
months? Since I'll most likely be contracting with your company to help 
with this, I'll wait and see what you say once we're ready to roll this 
out - and maybe you'll be willing to give us a deal on the 
implementation and/or support costs if we're willing to serve as guinea 
pigs. ;)


Thanks!

--

Best regards,

Charles


Re: [Dovecot] Post-login scripting - Trash cleanup

2012-02-28 Thread Ed W

On 28/02/2012 18:11, l...@airstreamcomm.net wrote:

We are considering using the post-login scripting to clear trash older
than 90 days from user accounts.  has anyone done this, and if so did this
cause logins to slow down too much waiting for the trash to purge?  One
idea was to execute the trash purge script once a day by tracking their
logins and seeing that it has already ran that day.  Another idea was to
call the trash purge script in the background and continue without
acknowledging that it has finished to keep logins speedy.


I think you can also use doveadm to achieve this?  So you could schedule 
something for all accounts at some out of hours period - should speed up 
backups also?


Ed W


Re: [Dovecot] Post-login scripting - Trash cleanup

2012-02-28 Thread list
On Tue, 28 Feb 2012 19:26:11 +0100, Robert Schetterer
 wrote:
> Am 28.02.2012 19:11, schrieb l...@airstreamcomm.net:
>> We are considering using the post-login scripting to clear trash older
>> than 90 days from user accounts.  has anyone done this, and if so did
>> this
>> cause logins to slow down too much waiting for the trash to purge?  One
>> idea was to execute the trash purge script once a day by tracking their
>> logins and seeing that it has already ran that day.  Another idea was
to
>> call the trash purge script in the background and continue without
>> acknowledging that it has finished to keep logins speedy.
> 
> look here if this match/solve your problem
> 
> http://wiki2.dovecot.org/Plugins/Expire

Expire looks to be useful, but it appears to be something that enhances
expunging of messages rather than automates the process if I am reading
correctly.  We would like to make the process for expunging old Trash
messages as automated and inline as possible.


Re: [Dovecot] Master user

2012-02-28 Thread Timo Sirainen
On 28.2.2012, at 21.04, Emiliano Rago wrote:

> USER#0113607363585#011rago#011uid=5000#011gid=5000#011home=/#011master_user=rago#011master_user=admin

Oh, right, it doesn't work because there are two master_users and the second 
one overrides the first one. This might be fixed in a newer version (maybe only 
in v2.1), since I remember doing something related to this. Another possibility 
for fixing this would be to use post-login script that sets MASTER_USER 
environment to same as USER, that'll definitely fix it. 
http://wiki2.dovecot.org/PostLoginScripting



Re: [Dovecot] Master user

2012-02-28 Thread Emiliano Rago

On 02/28/2012 07:47 PM, Timo Sirainen wrote:

On 28.2.2012, at 20.45, Emiliano Rago wrote:


userdb {
   args = uid=mailreader gid=mailreader allow_all_users=yes master_user=%u
   driver = static
}


Thanks,
but nothing has changed.


Set auth_debug=yes. What does it log when you login?


That's the log:

Feb 28 19:57:48 oneprivvm-239 dovecot: auth: Debug: client in: 
AUTH#0111#011PLAIN#011service=imap#011secured#011lip=127.0.0.1#011rip=127.0.0.1#011lport=143#011rport=60873#011resp=
Feb 28 19:57:48 oneprivvm-239 dovecot: auth: Debug: 
auth(admin,127.0.0.1,master): Master user lookup for login: rago
Feb 28 19:57:48 oneprivvm-239 dovecot: auth: Debug: 
passwd-file(admin,127.0.0.1,master): lookup: user=admin 
file=/etc/dovecot/master-shared
Feb 28 19:57:48 oneprivvm-239 dovecot: auth: 
passdb(admin,127.0.0.1,master): Master user logging in as rago
Feb 28 19:57:48 oneprivvm-239 dovecot: auth: Debug: client out: 
OK#0111#011user=rago
Feb 28 19:57:48 oneprivvm-239 dovecot: auth: Debug: master in: 
REQUEST#0113607363585#0112591#0111#0114d6e591e980edb0fabccfa9c1cd4e198
Feb 28 19:57:48 oneprivvm-239 dovecot: auth: Debug: master out: 
USER#0113607363585#011rago#011uid=5000#011gid=5000#011home=/#011master_user=rago#011master_user=admin
Feb 28 19:57:48 oneprivvm-239 dovecot: imap-login: Login: user=, 
method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=2596, secured



Thanks for answering,
Emiliano


[Dovecot] quota warning script not working after upgrade to 2.1.1

2012-02-28 Thread Ralf Hildebrandt
With 2.0.18 I was using a quota warning script like this:

plugin {
...
# Quota
  quota = maildir
  quota_rule = INBOX.Trash:storage=+2048M
  quota_warning  = storage=99%% quota-warning 99 %u
  quota_warning2 = storage=95%% quota-warning 95 %u
  quota_warning3 = storage=90%% quota-warning 90 %u
  quota_warning4 = storage=85%% quota-warning 85 %u
}

# der schickt die Quota warnmails
service quota-warning {
  executable = script /usr/local/scripts/quota-warning2.1
  user = root
  unix_listener quota-warning {
mode = 0666
user = vmail
group = users
  }
}

-rwxr-xr-x 1 root staff 3081 Feb 28 16:56 /usr/local/scripts/quota-warning2.1

But now I'm gettting this in my log:
Feb 28 19:19:03 postamt quota-warning2(phxxxpsu): writing message failed
Feb 28 19:19:03 postamt dovecot: quota-warning: Fatal: master: 
service(quota-warning): child 15065 returned error 1
Feb 28 19:40:13 postamt quota-warning2(lxxxve): writing message failed
Feb 28 19:40:13 postamt dovecot: quota-warning: Fatal: master: 
service(quota-warning): child 3318 returned error 1

What is failing here?

#!/bin/sh
#
# Should be run by the Local Delivery Agent
#

#set -x

SCRIPT_NAME="quota-warning2"

MAIL_TO=$2
MAIL_FROM="postmas...@charite.de"
MAIL_QUOTA_PERCENT=$1
MAIL_SUBJECT="Ihre Mailbox ist zu "$1"% voll!"

BIN_CAT="/bin/cat"
BIN_DATE="/bin/date"
BIN_HOSTNAME="/bin/hostname"
BIN_LOGGER="/usr/bin/logger"
BIN_MV="/bin/mv"
BIN_STAT="/usr/bin/stat"

#set -x 

# set misc values
HOSTNAME="`${BIN_HOSTNAME}`"

# set mail value
MAIL_DATE="`${BIN_DATE} '+%a, %d %b %Y %T %z (%Z)'`"
MAIL_MESSAGE_ID="`${BIN_DATE} '+%Y%m%d%H%M%S'`@${HOSTNAME}"
#To: ${MAIL_TO}

# write out message
${BIN_CAT} << EOF | /usr/local/dovecot-2.1/libexec/dovecot/dovecot-lda -d 
$MAIL_TO -o "plugin/quota=maildir::noenforcing"
From: ${MAIL_FROM}
Subject: ${MAIL_SUBJECT}
Message-Id: <${MAIL_MESSAGE_ID}>
Date: ${MAIL_DATE}
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

some warning in german

EOF
[ "$?" -gt 0 ] && \
${BIN_LOGGER} -p mail.error -t "${SCRIPT_NAME}(${MAIL_TO})" \
"writing message failed" && exit 1

# log warning attempt
${BIN_LOGGER} -p mail.info -t "${SCRIPT_NAME}(${MAIL_TO}) 
${MAIL_QUOTA_PERCENT}%" "delivered!"

echo "${MAIL_DATE}: ${SCRIPT_NAME}(${MAIL_TO}) ${MAIL_QUOTA_PERCENT}% 
delivered!" >> /home/${SCRIPT_NAME}.log

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de
#!/bin/sh
#
# Should be run by the Local Delivery Agent
#

#set -x

SCRIPT_NAME="quota-warning2"

MAIL_TO=$2
MAIL_FROM="postmas...@charite.de"
MAIL_QUOTA_PERCENT=$1
MAIL_SUBJECT="Ihre Mailbox ist zu "$1"% voll!"

BIN_CAT="/bin/cat"
BIN_DATE="/bin/date"
BIN_HOSTNAME="/bin/hostname"
BIN_LOGGER="/usr/bin/logger"
BIN_MV="/bin/mv"
BIN_STAT="/usr/bin/stat"

#set -x 

# set misc values
HOSTNAME="`${BIN_HOSTNAME}`"

# set mail value
MAIL_DATE="`${BIN_DATE} '+%a, %d %b %Y %T %z (%Z)'`"
MAIL_MESSAGE_ID="`${BIN_DATE} '+%Y%m%d%H%M%S'`@${HOSTNAME}"
#To: ${MAIL_TO}

# write out message
${BIN_CAT} << EOF | /usr/local/dovecot-2.1/libexec/dovecot/dovecot-lda -d 
$MAIL_TO -o "plugin/quota=maildir::noenforcing"
From: ${MAIL_FROM}
Subject: ${MAIL_SUBJECT}
Message-Id: <${MAIL_MESSAGE_ID}>
Date: ${MAIL_DATE}
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Was ist los?


Wir haben festgestellt, dass Ihre Mailbox auf dem Server
postamt.charite.de das erlaubte Grössenlimit zu mindestens 
${MAIL_QUOTA_PERCENT}%
ausschöpft. 

D.h. die maximal erlaubte Gesamtgröße der Mailbox wird bald erreicht
sein oder ist es sogar schon!

Was kann ich nun tun?
=

Bitte schaffen Sie Platz in Ihrer Mailbox, indem Sie die Mails z.B.
auf dem Server löschen oder in Ihre lokale Mailbox auf Ihrem eigenen
Rechner verschieben und so wieder Platz auf dem Server schaffen!

Wie kann ich die Füllung meines Postfaches auf dem Server überprüfen?
=

Sie können die Füllung Ihres Postfaches über Webmail

  https://webmail.charite.de/

leicht überprüfen:   Nach dem Anmelden erscheint im linken Rahmen unter
Ihrer Ordnerliste ein Link namens "Ordnergrößen". 

Sie können in Webmail ggf. auch gleich die Mails löschen (vergessen
Sie hinterher nicht, den Papierkorb / Trash Ordner zu leeren!).

Warum ist mein Postfach überhaupt so voll?
==

Dies kann z.B. passieren, wenn Sie mehrere Rechner nutzen um Ihre Mail
zu lesen und statt des IMAP Protokolls das POP3-Protokoll mit der
aktivierten Option "Leave Mail on Server" / "Mail auf Server belassen"
in Ihrem Mailprogramm verwenden.

Oft wird auch vergessen, daß der Ordner mit den "G

Re: [Dovecot] Master user

2012-02-28 Thread Timo Sirainen
On 28.2.2012, at 20.45, Emiliano Rago wrote:

>> userdb {
>>   args = uid=mailreader gid=mailreader allow_all_users=yes master_user=%u
>>   driver = static
>> }
> 
> Thanks,
> but nothing has changed.

Set auth_debug=yes. What does it log when you login?



[Dovecot] 2.1.1: subscriptions: Removing invalid entry

2012-02-28 Thread Ralf Hildebrandt
Admittedly, it's not a valid folder name and dovecot is right in
removing it:

Feb 28 17:50:05 postamt dovecot: imap(kbaessle): Warning: Subscriptions file 
/home/k/b/kbaessle/Maildir/subscriptions: Removing invalid entry: Entw�rfe

...but when looking at the subscription file AFTER the removal, that file
contained an empty line. I don't think that's correct.

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: [Dovecot] Master user

2012-02-28 Thread Emiliano Rago

On 02/28/2012 04:37 PM, Timo Sirainen wrote:

On Tue, 2012-02-28 at 16:11 +, Emiliano Rago wrote:


I'd like to have a master user that can read the other users mailboxes.
I have only one user who read and write the mail (i.e. I use the static
userdb) and I use namespace for public and shared mailboxes.
I can authenticate to the server but I am not able to list the mailboxes:


With ACL plugin enabled, the master user's ACLs are used. And your
master user has no ACLs, so nothing is shown. The proper fix for this
would be to set a default ACL for the master user, but default ACLs
don't exist yet. So you'll have to kludge this, by changing the master
user back to the login username. Try if this works:

userdb {
   args = uid=mailreader gid=mailreader allow_all_users=yes master_user=%u
   driver = static
}


Thanks,
but nothing has changed.

Emiliano


Re: [Dovecot] Question: Is Server Side Search announced somehow via the IMAP CAPABILITY string?

2012-02-28 Thread Timo Sirainen
On 28.2.2012, at 20.29, Charles Marcus wrote:

> Off the top of your head, do you know if Cyrus or GMail (I guess the two 
> other most popular IMAP servers that support server side indexes) advertise 
> SEARCH=FUZZY?

Neither. Probably no servers besides Dovecot. But it is less than a year old 
RFC..




Re: [Dovecot] Question: Is Server Side Search announced somehow via the IMAP CAPABILITY string?

2012-02-28 Thread Charles Marcus

On 2012-02-28 11:51 AM, Timo Sirainen  wrote:

On 28.2.2012, at 18.38, Timo Sirainen wrote:


Well, okay, actually if server advertises FUZZY extension you can
be quite certain that it supports indexed server side searches.


I meant SEARCH=FUZZY


Thanks for the replies Timo...

Off the top of your head, do you know if Cyrus or GMail (I guess the two 
other most popular IMAP servers that support server side indexes) 
advertise SEARCH=FUZZY?


Thanks again... hopefully something will comes of this for Thunderbird.

--

Best regards,

Charles


Re: [Dovecot] Post-login scripting - Trash cleanup

2012-02-28 Thread Robert Schetterer
Am 28.02.2012 19:11, schrieb l...@airstreamcomm.net:
> We are considering using the post-login scripting to clear trash older
> than 90 days from user accounts.  has anyone done this, and if so did this
> cause logins to slow down too much waiting for the trash to purge?  One
> idea was to execute the trash purge script once a day by tracking their
> logins and seeing that it has already ran that day.  Another idea was to
> call the trash purge script in the background and continue without
> acknowledging that it has finished to keep logins speedy.

look here if this match/solve your problem

http://wiki2.dovecot.org/Plugins/Expire

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


[Dovecot] Post-login scripting - Trash cleanup

2012-02-28 Thread list
We are considering using the post-login scripting to clear trash older
than 90 days from user accounts.  has anyone done this, and if so did this
cause logins to slow down too much waiting for the trash to purge?  One
idea was to execute the trash purge script once a day by tracking their
logins and seeing that it has already ran that day.  Another idea was to
call the trash purge script in the background and continue without
acknowledging that it has finished to keep logins speedy.


[Dovecot] migrating/converting from system users -> virtual users

2012-02-28 Thread Steve Platt

Hello all,

We currently have a traditional mail server  where all users have system 
accounts (ie entries in the NIS passwd map) and mbox-format mail folders in 
their (system) home directories.

I'm trying to setup a dovecot server in which we want all users to have 
"virtual" accounts (in dovecot) and no entry in the passwd file at all (ie no 
access to the mail server).

This is for security reasons, we want to imagine that users connecting to the 
mail server in future will not be able to access any resources on the server 
other than access their email messages. To this end we've set up a "vmail" 
user that owns all the messages in the Maildir directories.


Most of this is working but I'm stuck on how to convert users' mail folders 
from the existing setup to the new one. I'm using the convert plugin but of 
course the problem is that the plugin executes as the "vmail" user and cannot 
access the existing mail folders that belong to the users: and I'd be worried 
if it could, of course!

So I've converted a few users already by making copies of their old-world 
mailboxes, changing the ownership of the copies and pointing the convert 
plugin to these copies, instead of the originals.

This works (modulo the dreaded "timeouted" error messages) but is very ugly.

So I tried looking at the convert-tool but can't find a man page for it so am 
not sure what I'm doing with it!

I have the idea that I should be able to run some command (as a privileged 
user) on the mail server and have it do the conversion for me, changing the 
ownership/permissions on the way.

Can convert-tool do this?

I'd prefer to go with the automatic (plugin) conversion if I can bodge the 
ownership issues somehow. Failing that, some tool or script may be the next 
best answer.

This is Dovecot 1.2 by the way on Solaris 10.

Any suggestions would be welcome!

Steve Platt



Re: [Dovecot] Question: Is Server Side Search announced somehow via the IMAP CAPABILITY string?

2012-02-28 Thread Timo Sirainen
On 28.2.2012, at 18.38, Timo Sirainen wrote:

> Well, okay, actually if server advertises FUZZY extension you can be quite 
> certain that it supports indexed server side searches.

I meant SEARCH=FUZZY

> And that reminds me, I should hide that extension when FTS isn't enabled in 
> Dovecot..

v2.1.2 will no longer advertise it unless fts=solr or fts=lucene: 
http://hg.dovecot.org/dovecot-2.1/rev/bdc881838b00



Re: [Dovecot] Question: Is Server Side Search announced somehow via the IMAP CAPABILITY string?

2012-02-28 Thread Timo Sirainen
On 28.2.2012, at 18.33, Charles Marcus wrote:

> This question is a result of an ongoing discussion on the mozilla enterprise 
> list...
> 
> Is there a standard/reliable way for an IMAP client to determine that an IMAP 
> server supports server side search

All IMAP servers are required to support SEARCH command. Some crappy ones 
don't, but I think all widely used ones do.

> (with indexes)?

No way to know that.

Well, okay, actually if server advertises FUZZY extension you can be quite 
certain that it supports indexed server side searches. And that reminds me, I 
should hide that extension when FTS isn't enabled in Dovecot.. (I don't know if 
there are any other servers besides Dovecot implementing FUZZY.)



[Dovecot] Question: Is Server Side Search announced somehow via the IMAP CAPABILITY string?

2012-02-28 Thread Charles Marcus

Hey Timo,

Subject says it all...

This question is a result of an ongoing discussion on the mozilla 
enterprise list...


Is there a standard/reliable way for an IMAP client to determine that an 
IMAP server supports server side search (with indexes)?


Thanks,

--

Best regards,

Charles


Re: [Dovecot] testing fts-solr?

2012-02-28 Thread Charles Marcus

On 2012-02-28 11:05 AM, kfx  wrote:

Ok I feel ashame... it was a third party init scrip who was the problem :(

Sorry for the noise and thank you for dovecot


So... you're saying that Thunderbird now correctly uses server side search?

--

Best regards,

Charles


Re: [Dovecot] testing fts-solr?

2012-02-28 Thread kfx

Ok I feel ashame... it was a third party init scrip who was the problem :(

Sorry for the noise and thank you for dovecot


Re: [Dovecot] Master user

2012-02-28 Thread Timo Sirainen
On Tue, 2012-02-28 at 16:11 +, Emiliano Rago wrote:

> I'd like to have a master user that can read the other users mailboxes.
> I have only one user who read and write the mail (i.e. I use the static
> userdb) and I use namespace for public and shared mailboxes.
> I can authenticate to the server but I am not able to list the mailboxes:

With ACL plugin enabled, the master user's ACLs are used. And your
master user has no ACLs, so nothing is shown. The proper fix for this
would be to set a default ACL for the master user, but default ACLs
don't exist yet. So you'll have to kludge this, by changing the master
user back to the login username. Try if this works:

userdb {
  args = uid=mailreader gid=mailreader allow_all_users=yes master_user=%u
  driver = static
}

Also don't set your home to /. Better not to set it at all.
http://wiki2.dovecot.org/VirtualUsers/Home




[Dovecot] Master user

2012-02-28 Thread Emiliano Rago

Hi,

I'd like to have a master user that can read the other users mailboxes.
I have only one user who read and write the mail (i.e. I use the static
userdb) and I use namespace for public and shared mailboxes.
I can authenticate to the server but I am not able to list the mailboxes:


emiliano@dovecot:~$ telnet localhost imap
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE

IDLE AUTH=PLAIN] Dovecot ready.

1 login user*master password
1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE

IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND
UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE
QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS ACL
RIGHTS=texk] Logged in

5 LIST "" *
* LIST (\Unmarked) "." "INBOX"
* LIST (\Noselect \HasNoChildren) "." "shared"
* LIST (\Noselect \HasChildren) "." "public"
5 OK List completed.
* BYE Server shutting down.
Connection closed by foreign host.


This is my conf:


# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-131.0.15.el6.x86_64 x86_64 Scientific Linux

release 6.1 (Carbon) ext4

auth_master_user_separator = *
disable_plaintext_auth = no
mail_location =

maildir:/data/MAIL/MAILDIR/%u:INBOX=/data/MAIL/INBOX/%u:INDEX=/data/MAIL/METADATA/%u

mbox_write_locks = fcntl
namespace {
  inbox = yes
  location =
  prefix =
  separator = .
  type = private
}
namespace {
  list = yes
  location =

maildir:/data/MAIL/MAILDIR/%%u:INDEX=/data/MAIL/MAILDIR/shared/%u/%%u

  prefix = shared.%%u.
  separator = .
  subscriptions = no
  type = shared
}
namespace {
  list = yes
  location = maildir:/data/MAIL/SHARED
  prefix = public.
  separator = .
  subscriptions = no
  type = public
}
passdb {
  driver = pam
}
passdb {
  args = /etc/dovecot/master-shared
  driver = passwd-file
  master = yes
}
plugin {
  acl = vfile:/etc/dovecot/global-acls:cache_secs=300
  acl_anyone = allow
  acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes.db
}
protocols = imap
service auth {
  unix_listener auth-userdb {
group = mailreader
mode = 0600
user = mailreader
  }
}
ssl = no
ssl_cert = 

And in /etc/dovecot/master-shared:


master:{PLAIN}password


What I did wrong?

Thanks,
Emiliano


Re: [Dovecot] testing fts-solr?

2012-02-28 Thread Timo Sirainen
On Tue, 2012-02-28 at 15:47 +0100, kfx wrote:
> > Did you enable the 'Run search on server' option in the Advanced Search
> > window? Doing this *should* result in Thunderbird using dovecots indexes
> > server side.
> >
> 
> Yes I did.
> 
> Some more info:
> 
> by telnet'ing directly and issuing:
> c search text pattern
> * SEARCH 1208
> c OK Search completed (0.003 secs).

So, Solr in Dovecot works perfectly.

> But the same search in thunderbird return "No matches found" :(

Thunderbird problem, nothing you can do about it from Dovecot's side.




Re: [Dovecot] testing fts-solr?

2012-02-28 Thread kfx

On 02/28/2012 03:23 PM, Charles Marcus wrote:

On 2012-02-28 8:41 AM, kfx  wrote:

Dovecot 2.1.1 and latest solr. Indexing seems ok because the size of the
solr's data directory is growing and log shows things like this:

Feb 28 14:30:45 indexer-worker(username): Info: Indexed 12239 messages
in SubFolder


but thunderbird returns nothing (it says not match found for "hello"
for example).


*How* are you testing with Thunderbird?

Did you enable the 'Run search on server' option in the Advanced Search
window? Doing this *should* result in Thunderbird using dovecots indexes
server side.



Yes I did.

Some more info:

by telnet'ing directly and issuing:
c search text pattern
* SEARCH 1208
c OK Search completed (0.003 secs).


But the same search in thunderbird return "No matches found" :(


Here are the solr logs, first search is the "c search text pattern" 
second is from thunderbird:


Feb 28, 2012 3:26:21 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select 
params={fl=uid,score&sort=uid+asc&fq=%2Bbox:d8f5c7250ed14c4f1a5d3ea484a8+%2Buser:"username"&q=(hdr:"pattern"+OR+body:"pattern")&rows=108227} 
hits=1 status=0 QTime=1


Feb 28, 2012 3:27:49 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select 
params={fl=uid,score&sort=uid+asc&fq=%2Bbox:d8f5c7250ed14c4f1a5d3ea484a8+%2Buser:"username"&q=body:"pattern"&rows=108227} 
hits=0 status=0 QTime=1


It seems thunderbird is only searching in the body and not the header 
unlike the "c search text" method and that the pattern was found in the 
header of some random email. So none of the two method is working when 
searching in the body of the emails but work for the headers (???).



fts_solr module seems to be correctly launched:
Feb 28 15:07:53 imap: Debug: Module loaded: 
/usr/local/lib/dovecot/lib20_fts_plugin.so
Feb 28 15:07:53 imap: Debug: Module loaded: 
/usr/local/lib/dovecot/lib21_fts_solr_plugin.so


[root@server log]# grep -R mail_plugins /usr/local/etc/dovecot/ | grep -v \#
/usr/local/etc/dovecot/conf.d/10-mail.conf:mail_plugins = autocreate fts 
fts_solr quota
/usr/local/etc/dovecot/conf.d/15-lda.conf:  mail_plugins = $mail_plugins 
sieve


[root@server log]# grep fts /usr/local/etc/dovecot/conf.d/90-plugin.conf
  fts = solr
  fts_solr = url=http://127.0.0.1:8983/solr/ break-imap-search


Don't know where to search :(





Re: [Dovecot] Dovecot clustering with dsync-based replication

2012-02-28 Thread Timo Sirainen
On Tue, 2012-02-28 at 09:27 -0500, Charles Marcus wrote:
> On 2012-02-28 9:03 AM, Timo Sirainen  wrote:
> > This document describes a design for a dsync-replicated Dovecot cluster.
> 
> 
> 
> Wow, talk about timing... this looks like a perfect answer to my 
> previous question about setting up two servers in two different 
> locations to serve two different sets of users locally...

Yeah, I was delaying answering it until I posted this.

> Looks like it wouldn't really matter which server they connected to 
> externally, as any changes would simply be replicated.

Well, preferably users would connect to the same server. If both servers
have done changes at the same time, there can be some temporary
(possibly user-visible) confusion.

> Timo, state above that this 'describes a design'... does this mean that 
> this is doable right now? Which of the following terms would you use to 
> describe it at this point in time?
> 
> Potentially problematic

Not finished yet, so closest to this. :) I'm planning on making our own
mails use this within a few weeks (currently it's a dsync in crontab
every 5 minutes).



Re: [Dovecot] Dovecot clustering with dsync-based replication

2012-02-28 Thread Charles Marcus

On 2012-02-28 9:03 AM, Timo Sirainen  wrote:

This document describes a design for a dsync-replicated Dovecot cluster.




Wow, talk about timing... this looks like a perfect answer to my 
previous question about setting up two servers in two different 
locations to serve two different sets of users locally...


Looks like it wouldn't really matter which server they connected to 
externally, as any changes would simply be replicated.


Timo, state above that this 'describes a design'... does this mean that 
this is doable right now? Which of the following terms would you use to 
describe it at this point in time?


Potentially problematic

Reliable

Rock-solid

Thanks!!

--

Best regards,

Charles


Re: [Dovecot] fts size

2012-02-28 Thread Timo Sirainen
On Tue, 2012-02-28 at 15:02 +0100, Jan-Frode Myklebust wrote:
> Does anybody have any numbers for how large storage one will need for
> the fts indexing server? I see the wiki says 30% of mailbox size for
> Squat (partial=4 full=4). Is it similar for lucene/solr?

My initial tests for CLucene were that it would take 30% of mailbox size
(compared to 50% for Xapian). But this was before I actually implemented
it to Dovecot.. I haven't really looked at how large the indexes
actually are.

Looking at Lucene indexes now for all of Dovecot and Dovecot-cvs mailing
list archives, the indexes are 29.1% of the original mbox sizes.

> Do I understand correctly if I think 
> http://wiki2.dovecot.org/Plugins/FTS/Lucene 
> will create an index for each user in his home directory? 

Yes.

> Will this be accounted for in the users' quota?

Only if you're using filesystem quota.




Re: [Dovecot] testing fts-solr?

2012-02-28 Thread Charles Marcus

On 2012-02-28 8:41 AM, kfx  wrote:

Dovecot 2.1.1 and latest solr. Indexing seems ok because the size of the
solr's data directory is growing and log shows things like this:

Feb 28 14:30:45 indexer-worker(username): Info: Indexed 12239 messages
in SubFolder


but thunderbird returns nothing (it says not match found for "hello"
for example).


*How* are you testing with Thunderbird?

Did you enable the 'Run search on server' option in the Advanced Search 
window? Doing this *should* result in Thunderbird using dovecots indexes 
server side.


--

Best regards,

Charles


Re: [Dovecot] testing fts-solr?

2012-02-28 Thread Timo Sirainen
On Tue, 2012-02-28 at 14:41 +0100, kfx wrote:
>   but thunderbird returns nothing (it says not match found for "hello" 
> for example).

Test by talking IMAP protocol, not by using Thunderbird.




[Dovecot] Dovecot clustering with dsync-based replication

2012-02-28 Thread Timo Sirainen
This document describes a design for a dsync-replicated Dovecot cluster.
This design can be used to build at least two different types of dsync
clusters, which are both described here. Ville has also drawn overview
pictures of these two setups, see
http://www.dovecot.org/img/dsync-director-replication.png and
http://www.dovecot.org/img/dsync-director-replication-ssh.png

First of all, why dsync replication instead of block level filesystem
replication?

 - dsync won't replicate filesystem corruption.

 - A cold restart of replication won't go through all of the data in the
disks, but instead quickly finds out what has changed.

 - Split brain won't result in downtime or losing any data. If both
sides did changes, the changes are merged without data loss.

 - If using more than 2 storages, the users' replicas can be divided
among the other storages. So if one storage goes down, the extra load is
shared by all the other storages, not just one.

Replication mail plugin
---

This is a simple plugin based on notify plugin. It listens for all
changes that happen to mailboxes (new mails, flag changes, etc.) Once it
sees a change, it sends an asynchronous (username, priority)
notification to replication-notify-fifo. The priority can be either high
(new mails) or low (everything else).

Optionally the replication plugin can also support synchronous
replication of new mail deliveries. In this way it connects to
replication-notify UNIX socket, tells it to replicate the user with sync
(=highest) priority and waits until it is done or
replication_sync_timeout occurs. The IMAP/LMTP client won't see an "OK"
reply until the mail is replicated (or the replication has failed). The
synchronous replication probably adds a noticeable delay, so it might
not be acceptable for IMAP, but might be for LMTP.

So, what is listening in those replication-notify* sockets? It depends
on if Dovecot is running on director-based setup or not.

Aggregator
--

When running in Dovecot director-based setup, all of the Dovecot
backends (where replication plugin runs) also run "aggregator" process.
Its job is very simple: It proxies the notifications from mail plugin
and sends them via a single TCP connection to the replicator process
running in Dovecot proxies. This is simply an optimization to avoid tons
of short lived TCP connections directly from replication plugin to
director server.

When not running in Dovecot director setup (i.e. there is only a single
Dovecot instance that handles all of the users), there is no point in
having an aggregator proxy, because the replicator process is running on
the same server. In this kind of setup the replicator process directly
listens on the replication-notify* sockets.

Replicator
--

The initial design for replicator isn't very complex either: It keeps a
priority queue of all users, and replicates those users at the top of
the queue. Notifications about changes to user's mailboxes (may) move
the user up in the priority queue. If the user at the top of the queue
already has been replicated "recently enough", the replicator stops its
work until new changes arrive or the "recently enough" is no longer
that.

dsync can do two types of syncs: quick syncs and full syncs. A quick
sync trusts indexes and does the replication with the least amount of
work and network traffic. A quick sync is normally enough to replicate
all changes, but just in case something has gone wrong there's also the
full sync option, which guarantees that the mailboxes end up being fully
synced. A full sync is slower though, and uses more network traffic.

The priority queue is sorted by:

 1. Priority (updated by a notification from replication plugin)

 2. If priority!=none: Last fast sync (those users are replicated first
whose last replication time is oldest)

 2. If priority=none: Last full sync (these users should already be
fully synced, but do a full sync for them once in a while anyway)

All users get added to the replication queue at replicator startup with
"none" priority. The list of users is looked up via userdb iteration. If
the previous replication state is found from a disk dump, it's used to
update the priorities, last_*_sync timestamps and other replication
state. Replicator process creates such dumps periodically [todo: every
few mins? maybe a setting?].

Replicator starts replicating users at the top of the queue, setting
their priorities to "none" before starting. This means that if another
change notification arrives during replication, the priority is bumped
up and no changes get lost. replication_max_conns setting specifies how
many users are replicated simultaneously. If the user's last_full_sync
is older than replication_full_sync_interval setting, a full sync is
done instead of a fast sync. If the user at the top of the queue has
"none" priority and the last_full_sync is newer than
replication_full_sync_interval, the replication stops. [todo: it would
be nice to prefer doin

[Dovecot] fts size

2012-02-28 Thread Jan-Frode Myklebust
Does anybody have any numbers for how large storage one will need for
the fts indexing server? I see the wiki says 30% of mailbox size for
Squat (partial=4 full=4). Is it similar for lucene/solr?

Do I understand correctly if I think 
http://wiki2.dovecot.org/Plugins/FTS/Lucene 
will create an index for each user in his home directory? Will this be
accounted for in the users' quota?


  -jf


Re: [Dovecot] testing fts-solr?

2012-02-28 Thread kfx

On 02/28/2012 03:04 AM, Timo Sirainen wrote:

On 28.2.2012, at 2.14, Jean-Daniel Beaubien wrote:


Ok, I had to fix a few things. First of all, I had to declare mail_plugins
= fts fts_solr in global file (dovecot.conf). After doing that, running
doveadm fts optimize stopped giving me errors.

I ran doveadm index -user INBOX (and other folders). I'm assuming this
actually did something because java/tomcat6 were really busy for a few mins
and I could see the solr logs going nuts (/var/log/tomcat6/catalina.out).


OK, so it's indexing.


Dovecot 2.1.1 and latest solr. Indexing seems ok because the size of the 
solr's data directory is growing and log shows things like this:


Feb 28 14:30:45 indexer-worker(username): Info: Indexed 12239 messages 
in SubFolder



 but thunderbird returns nothing (it says not match found for "hello" 
for example).


I dont know what more can I do to debug this... Solr is working as the 
nobody user, is it OK for dovecot ? Does dovecot need to be have write 
access to the solr's data directory ?


Thanks


Re: [Dovecot] Deny create folders

2012-02-28 Thread Charles Marcus

On 2012-02-28 6:14 AM, Jacek Osiecki  wrote:

Some IMAP clients (especially outlooks) create junk/sent/etc.
folders with various names, depending on national settings.
Is it possible to provide a - let's say - dictionary, which would always
return the same folder (like Sent) no matter if client asks for "Sent",
"Sent Mail" or "Elementy wys&AUI-ane"?



This has been discussed before, this is probably the most recent thread 
about it, but it is quite long:


http://www.dovecot.org/list/dovecot/2011-December/062327.html

--

Best regards,

Charles


Re: [Dovecot] testing fts-solr?

2012-02-28 Thread Charles Marcus

On 2012-02-27 9:04 PM, Timo Sirainen  wrote:

On 28.2.2012, at 2.14, Jean-Daniel Beaubien wrote:

However, whenever I run a search thru thunderbird (searching the
from/to/subject/body fields),



I think Thunderbird does this search internally, not via IMAP.


You could test by opening the Advanced Search window (CTRL-SHIFT-F or 
Edit > Find > Search Messages), check the box to 'Run search on server', 
make sure the right account is selected, then perform a search...


There are 2 bugs open for Thunderbird dealing with server side IMAP 
searches, please feel free to go vote for one or both of them:


Main one:

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

and one that is tangentially related:

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

--

Best regards,

Charles


Re: [Dovecot] Deny create folders

2012-02-28 Thread Jacek Osiecki

On Sun, 26 Feb 2012, Jerry wrote:


On Sun, 26 Feb 2012 22:31:35 +0100
S. Kremer articulated:

Every user's mailbox has a directory called Spam and Ham. I scan this
two folders by a script to learn my spamassassin database.
This script does not scan folders like spam, ham, junk-email etc.
But some users have such folders in their mailbox so spamassassin does
not learn from these folders.


[...]


Couldn't you just make a soft link between the two folders and save
yourself and your clientele a lot of trouble? I have not messed with
"spamassassin" in years; however, I thought it was configurable on what
it scans.


Oh, it reminds me of one thing I would like to have - maybe it is 
possible? Some IMAP clients (especially outlooks) create junk/sent/etc. 
folders with various names, depending on national settings.

Is it possible to provide a - let's say - dictionary, which would always
return the same folder (like Sent) no matter if client asks for "Sent",
"Sent Mail" or "Elementy wys&AUI-ane"?

Hmm... Now, when I formed the question it seems that this MIGHT be a 
problem :) What should dovecot provide when client asks for list of 
subscribed folders? If I know that there is a polish version of MS Outlook,

I should provide "Elementy wys&AUI-ane", but "Sent" if it is roundcube...

Greetings,
--
Jacek Osiecki jos...@ceti.pl GG:3828944
I don't want something I need. I want something I want.


[Dovecot] ANN: automx - automated mail account provisioning

2012-02-28 Thread Patrick Ben Koetter
automx

I am pleased to announce automx a tool that makes setting up a mail account
easy. All your users need to provide is real name, mail address and password.
Their mail client and automx will safely handle the rest.

Say goodbye to mistyped server settings! Put an end to endless phone calls
trying to coach users to configure settings, whose dialogs they can't find.
Raise user satisfaction, relieve support and regain time to work on other
issues.

automx unifies Microsofts and Mozillas mail account provisioning standards in
one powerful Open Source tool. Choose from many backends, including LDAP and
SQL, and let automx create standard and individualized profiles for multiple
domains on the fly!

See the details on http://automx.org.

p@rick

-- 
state of mind ()
Digitale Kommunikation

http://www.state-of-mind.de

Franziskanerstraße 15  Telefon +49 89 3090 4664
81669 München  Telefax +49 89 3090 4666

Amtsgericht MünchenPartnerschaftsregister PR 563



smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] testing fts-solr?

2012-02-28 Thread Timo Sirainen
On 28.2.2012, at 12.15, Robin wrote:

> I too was bitten by the configuration issue.  The wiki/docs suggest that you 
> only need to put the fts fts_solr plugin spec into imap "section", which 
> never worked for me, unlike fts_squat which did). Putting it into the 
> "global" plugin list made it all work for me.

That reads only in wiki1 docs, in wiki2 docs it should only talk about globals..

I wonder if it would be a bad idea to show some kind of a popup in wiki1 asking 
if you really want to be reading it or not, and use a cookie to remember it?..



Re: [Dovecot] POP/IMAP on proxy rip issue

2012-02-28 Thread Tomislav Mihalicek

Mhm, thanks for the answer. I wanted to upgrade to 2.1 anyway because of the
LMTP.

t.


Urban Loesch-2 wrote:
> 
> Same here on 2.0.x.
> But I think this is because it's only implemented for IMAP.
> 
> See e-mail from Timo 2 days ago:
> 
> ...
> 
> Subject: Proxying improvements in v2.1.2
> 
> I just committed a couple of features that will make life easier for some
> types of proxying setups:
> 
> 1. IMAP proxying has already for a while supported sending local/remote
> IP/port to backend server, which can use it for logging and other
> purposes. 
> I've now implemented this for POP3 as well, although only the remote
> IP/port is forwarded, not local IP/port. I implemented this also for LMTP
> in v2.2 
> tree, but haven't bothered to backport that change. Both POP3 and LMTP
> uses XCLIENT command that is compatible to Postfix's (XCLIENT ADDR=1.2.3.4 
> PORT=110).
> 
> 2. proxy_maybe=yes + host=host.example.com actually works now. As long as
> host.example.com DNS lookup returns one IP that belongs to the current 
> server the proxying is skipped.
> 
> 3. auth_proxy_self = 1.2.3.4 setting means that if proxy_maybe=yes and
> host=1.2.3.4 then Dovecot assumes that this is a local login and won't
> proxy 
> it, even if 1.2.3.4 isn't the actual local IP. This can be helpful if the
> host field contains load balancer's IP address instead of the server's.
> You 
> can add more than one IP (space separated) and of course everything
> related to this works just as well with hostnames as with IPs (even when
> hostname 
> expands to multiple IPs).
> 
> 
> 
> regards
> Urban
> 
> 
> On 27.02.2012 16:30, Tomislav Mihalicek wrote:
>>
>> I have a proxy setup for pop/imap. The proxies are defined in
>> login_trusted_networks = x.x.x.x and for the imap it works fine but for
>> pop3
>> connections displays the ip address of proxy IP... Dovecots are both 1.2
>> from the debian repo deb http://xi.rename-it.nl/debian/
>> stable-auto/dovecot-1.2 main
>>
>> thanks
> 
> 

-- 
View this message in context: 
http://old.nabble.com/POP-IMAP-on-proxy-rip-issue-tp33400491p33405654.html
Sent from the Dovecot mailing list archive at Nabble.com.



Re: [Dovecot] testing fts-solr?

2012-02-28 Thread Robin

I think Thunderbird does this search internally, not via IMAP. You can test 
this by talking IMAP protocol directly:

telnet localhost 143
a login user pass
b select inbox
c search text hello


Yes, you definitely want to check things are being accelerated by 
issuing direct IMAP commands via telnet. Many clients try to "help" by 
performing local searches, which will only obfuscate things for you. 
Even with 150K+ messages, it shouldn't take fts_solr more than 20ms or 
so to give you results.


I too was bitten by the configuration issue.  The wiki/docs suggest that 
you only need to put the fts fts_solr plugin spec into imap "section", 
which never worked for me, unlike fts_squat which did). Putting it into 
the "global" plugin list made it all work for me.


You can check your solr index data directory too.  A freshly installed 
solr index occupies almost no space, but that grows QUICKLY once it's 
indexed anything.


=R=


Re: [Dovecot] POP/IMAP on proxy rip issue

2012-02-28 Thread Tomislav Mihalicek

Mhm, thanks for the answer. I wanted to upgrade to 2.1 anyway because of the
LMTP.

t.


Urban Loesch-2 wrote:
> 
> Same here on 2.0.x.
> But I think this is because it's only implemented for IMAP.
> 
> See e-mail from Timo 2 days ago:
> 
> ...
> 
> Subject: Proxying improvements in v2.1.2
> 
> I just committed a couple of features that will make life easier for some
> types of proxying setups:
> 
> 1. IMAP proxying has already for a while supported sending local/remote
> IP/port to backend server, which can use it for logging and other
> purposes. 
> I've now implemented this for POP3 as well, although only the remote
> IP/port is forwarded, not local IP/port. I implemented this also for LMTP
> in v2.2 
> tree, but haven't bothered to backport that change. Both POP3 and LMTP
> uses XCLIENT command that is compatible to Postfix's (XCLIENT ADDR=1.2.3.4 
> PORT=110).
> 
> 2. proxy_maybe=yes + host=host.example.com actually works now. As long as
> host.example.com DNS lookup returns one IP that belongs to the current 
> server the proxying is skipped.
> 
> 3. auth_proxy_self = 1.2.3.4 setting means that if proxy_maybe=yes and
> host=1.2.3.4 then Dovecot assumes that this is a local login and won't
> proxy 
> it, even if 1.2.3.4 isn't the actual local IP. This can be helpful if the
> host field contains load balancer's IP address instead of the server's.
> You 
> can add more than one IP (space separated) and of course everything
> related to this works just as well with hostnames as with IPs (even when
> hostname 
> expands to multiple IPs).
> 
> 
> 
> regards
> Urban
> 
> 
> On 27.02.2012 16:30, Tomislav Mihalicek wrote:
>>
>> I have a proxy setup for pop/imap. The proxies are defined in
>> login_trusted_networks = x.x.x.x and for the imap it works fine but for
>> pop3
>> connections displays the ip address of proxy IP... Dovecots are both 1.2
>> from the debian repo deb http://xi.rename-it.nl/debian/
>> stable-auto/dovecot-1.2 main
>>
>> thanks
> 
> 

-- 
View this message in context: 
http://old.nabble.com/POP-IMAP-on-proxy-rip-issue-tp33400491p33405413.html
Sent from the Dovecot mailing list archive at Nabble.com.



Re: [Dovecot] remove messages once downloaded

2012-02-28 Thread Thomas Leuxner
Am 28.02.2012 um 09:46 schrieb Thomas Leuxner:

> Assuming this is the task you could also use:
> 
> $ doveadm expunge -u jane@example.org before 2012-02-01 unseen
> 
> Play around with the scope a bit before you actually run it:
> 
> $ doveadm search -u jane@example.org before 2012-02-01 unseen | wc -l

Of course this was supposed to read 'seen' :/

signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Dovecot] remove messages once downloaded

2012-02-28 Thread Thomas Leuxner
Am 28.02.2012 um 09:17 schrieb Nick Warr:
> Il 28/02/2012 9.09, Jacek Osiecki ha scritto:
>> On Fri, 24 Feb 2012, Michael Sidoric wrote:
>> 
 I need some help with the dovecot configuration. I want to remove
 downloaded messages from Mail Server once the messages have been
 successfully downloaded by pop3-clients, even when the clients have been
 configured to save copy of messages in the Server.
> I'd suggest this:
> 
> http://archivemail.sourceforge.net/
> 
> You can chose to skip unread email, and decide when read mail gets 
> archived/deleted, it suports mbox/maildir, etc..

Assuming this is the task you could also use:

$ doveadm expunge -u jane@example.org before 2012-02-01 unseen

Play around with the scope a bit before you actually run it:

$ doveadm search -u jane@example.org before 2012-02-01 unseen | wc -l

signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Dovecot] remove messages once downloaded

2012-02-28 Thread Nick Warr

Il 28/02/2012 9.09, Jacek Osiecki ha scritto:

On Fri, 24 Feb 2012, Michael Sidoric wrote:


I need some help with the dovecot configuration. I want to remove
downloaded messages from Mail Server once the messages have been
successfully downloaded by pop3-clients, even when the clients have 
been

configured to save copy of messages in the Server.
timo is quite correct -- consider imap instead, that's why the 
protocol exists.


This rather seems like anti-imap - kind of desperate search for free 
disk space... IMAP does quite the opposite thing, since users acutally 
never remove emails :)


Greetings,

I'd suggest this:

http://archivemail.sourceforge.net/

You can chose to skip unread email, and decide when read mail gets 
archived/deleted, it suports mbox/maildir, etc..


Re: [Dovecot] remove messages once downloaded

2012-02-28 Thread Jacek Osiecki

On Fri, 24 Feb 2012, Michael Sidoric wrote:


I need some help with the dovecot configuration. I want to remove
downloaded messages from Mail Server once the messages have been
successfully downloaded by pop3-clients, even when the clients have been
configured to save copy of messages in the Server.

timo is quite correct -- consider imap instead, that's why the protocol exists.


This rather seems like anti-imap - kind of desperate search for free disk 
space... IMAP does quite the opposite thing, since users acutally never 
remove emails :)


Greetings,
--
Jacek Osiecki jos...@ceti.pl GG:3828944
I don't want something I need. I want something I want.