Re: [Dovecot] v1.1.rc8 released

2008-06-03 Thread Ed W

Timo Sirainen wrote:

On Mon, 2008-06-02 at 23:25 +0100, Ed W wrote:
  

Hi



+ deliver: Added -c parameter to provide path to delivered mail.
  This allows maildir to save identical mails to multiple recipients
  using hard links.
  
  
Funnily enough it was on my todo list to whip up a small perl program to 
go and scan my maildirs and figure out if this theoretical idea actually 
amounted to anything. 


Algorithm would be this:

Open each message,
scan for first blank line. 
SHA the rest of the message, store the SHA in a hash (along with the 
message size)
rinse and repeat and see if we end up with any hashes showing count 
greater than 1...


This would represent the best case that we could achieve assuming body 
content fixed and we find some way to manage variable headers.



Somewhat faster way would be to get a list of file sizes first and not
bother checksumming any files which have a unique size.
  



Could do, but I was trying to expand to the case that the headers were 
different, but the body was the same (eg I suspect that mailing list 
managers might deliver emails one by one (verp), but the body is not 
customised.  Anyway, just wanted to checksum the body of the message not 
the whole message


Actually the motivation for this was I was wondering about the benefit 
of a storage backend where the body was stored per file and the headers 
were stored separately (perhaps in a maildir type format).  I haven't 
looked to see if this is what dbox does already...


I have been looking at git and brackup for backing up maildirs and it's 
got me thinking a bit more about mail storage algorithms


Ed W


Re: [Dovecot] v1.0.14 released (managesieve updated)

2008-06-03 Thread Stephan Bosch
Timo Sirainen wrote:
 http://dovecot.org/releases/1.0/dovecot-1.0.14.tar.gz
 http://dovecot.org/releases/1.0/dovecot-1.0.14.tar.gz.sig
   
Refreshed ManageSieve patch for new Dovecot v1.0 release:

http://www.rename-it.nl/dovecot/1.0/dovecot-1.0.14-MANAGESIEVE-v9.3.diff.gz
http://www.rename-it.nl/dovecot/1.0/dovecot-1.0.14-MANAGESIEVE-v9.3.diff.gz.sig

Regards,

Stephan.


Re: [Dovecot] v1.1.rc8 released

2008-06-03 Thread Geert Hendrickx
On Tue, Jun 03, 2008 at 10:27:32AM +0200, Jost Krieger wrote:
 On Tue, Jun 03, 2008 at 07:11:33AM +0100, Ed W wrote:
 
  Could do, but I was trying to expand to the case that the headers were 
  different, but the body was the same (eg I suspect that mailing list 
  managers might deliver emails one by one (verp), but the body is not 
  customised.  Anyway, just wanted to checksum the body of the message not 
  the whole message
 
 That could lead to slight problems, like hardlinking totally unrelated
 messages, e.g. empty messages. Some Headers like From:, To:, Date:,
 Subject: should probably be identical.

Message-ID perhaps? :-)

 For some consistency, just removing  *locally* generated trace headers
 before fingerprinting might lead to better results.

That may still leave identical messages not hard-linked thus wasting space.
Eg. if they come from MTA's that do recipient splitting, or messages that
are routed via different systems.  The Received headers will be different
but the body generally identical.

I think a better solution is what was suggested here before, ie. to keep
the (unique) message headers in a Maildir-like format, containing links to
(single-instance stored) message bodies in a a separate location.

Geert




[Dovecot] mbox: extra linefeed after Content-Length header in 1.1.rc8

2008-06-03 Thread Diego Liziero
mbox messages gets header corruption caused by an extra linefeed after
Content-Length

Users sees their mails in Sent mbox folder without the from and to
fields, without attachments and with the date of 1/1/1970

Diego.
---
Here is an anonymized header:

From [EMAIL PROTECTED]  Tue Jun 03 09:14:33 2008
Message-ID: [EMAIL PROTECTED]
X-UID: 3913
Status: RO
X-Keywords:
Content-Length: 6817

: xxx, xx xxx  xx:xx:xx +
: xxx  [EMAIL PROTECTED]
-x: xxx x.x.x.x (xxx/)
-xxx: x.x
xx: [EMAIL PROTECTED] [EMAIL PROTECTED]
xx:  [EMAIL PROTECTED],
 xx x [EMAIL PROTECTED],
 xxx xxx [EMAIL PROTECTED]
xxx: xx: x: xx: x
xx: [EMAIL PROTECTED]
xx-x-xx: [EMAIL PROTECTED]
xxx-: /x; xxx=xxx-x; xx=xx
xxx--: 


Re: [Dovecot] overview of patches used in Fedora

2008-06-03 Thread Dan Horák

Timo Sirainen píše v Po 02. 06. 2008 v 21:50 +0300:
 On Fri, 2008-05-30 at 15:49 +0200, Dan Horák wrote:
  Hi,
  
  I have gone through the patches that are used in the Fedora package and
  probably only the mkcert-permissions [1] can be considered to be
  included upstream. It is dated into package version 1.0-0.beta2.3, but I
  cannot find any particular reason for the inclusion (like a bug in
  bugzilla, etc.). 
 
 Certificate file is public data, so chmoding it to 0600 doesn't really
 do any good. As for chowning the files to root:root, that's probably
 good if you use the script to generate certificates automatically, but I
 don't think the script should always do that since it may be run as
 non-root.
 

The script is run during package installation with the goal to be ready
to run for the general user.

  Some (winbind support, quota warnings) were obsoleted
  by dovecot 1.1, two are used for distro specific settings. So the only
  real patch that remains is the pam_setcred [2] patch that fixes
  https://bugzilla.redhat.com/show_bug.cgi?id=146198
 
 Unnecessary (with v1.0 too). pam_setcred() is called only if setcred=yes
 is added to pam args.
 

Thanks for the info. I will update the package appropriately.


Dan




Re: [Dovecot] v1.1.rc8 released (managesieve updated)

2008-06-03 Thread Stephan Bosch
Timo Sirainen wrote:
 http://dovecot.org/releases/1.1/rc/dovecot-1.1.rc8.tar.gz
 http://dovecot.org/releases/1.1/rc/dovecot-1.1.rc8.tar.gz.sig
I refreshed the ManageSieve patch for the new Dovecot v1.1 release:

http://www.rename-it.nl/dovecot/1.1/dovecot-1.1.rc8-managesieve-0.10.2.diff.gz
http://www.rename-it.nl/dovecot/1.1/dovecot-1.1.rc8-managesieve-0.10.2.diff.gz.sig

Regards,

Stephan.


Re: [Dovecot] v1.1.rc6 released (managesieve updated)

2008-06-03 Thread Stephan Bosch
Asheesh Laroia wrote:
 On Fri, 30 May 2008, Stephan Bosch wrote:

 Timo Sirainen schreef:
 http://dovecot.org/releases/1.1/rc/dovecot-1.1.rc6.tar.gz
 http://dovecot.org/releases/1.1/rc/dovecot-1.1.rc6.tar.gz.sig
 Previous managesieve wont compile against rc6, so I made a quick new
 release (expecting rc7 to arrive soon):

 http://www.rename-it.nl/dovecot/1.1/dovecot-1.1.rc6-managesieve-0.10.2.diff.gz

 http://www.rename-it.nl/dovecot/1.1/dovecot-1.1.rc6-managesieve-0.10.2.diff.gz.sig


 Out of curiosity, have you considered maintaining your managesieve
 work using a Mercurial branch off Timo's tree? I think that might be
 easier for you, and I think it might make things easier for others
 using your patch.

 You could use hg bisect to find the exact commits of his that break
 your patch, which would presumably be nice for you.

 And, it would be a nice little application of distributed revision
 control that Timo's working with.
Actually, I am already using mercurial. I use the quilt-like Mercurial
Queues to maintain the patches and the v1.1 managesieve implementation
is a loose repository. However, thus far I did not publish the
repositories because the new (highly experimental) Sieve implementation
is located there as well. I'll equip the Sieve implementation with some
extra documentation and warnings to prevent people from installing this
work-in-progress on production systems and then I'll give you the public
hg url. So, as a bonus you can then get a sneak peak into my progress
towards a first release of the new Sieve implementation.

Regards,

Stephan.






Re: [Dovecot] v1.0.14 released

2008-06-03 Thread Curtis Maloney

Matthias Andree wrote:

On Mon, 02 Jun 2008, Timo Sirainen wrote:


- proxy: Login success reply was sent in two IP packets, which
  confused some IMAP/POP3 clients


So? Fix the clients or have the kernel reassemble packets.
They can't control who and when is fragmenting and why anyways.

I'm not against the change, but it's not a solution.


So include the work-around (that doesn't break anything) in Dovecot, and 
notify the maintainers of the broken clients to Get a clue(tm) :P


It does improve login latency for everyone... sure, not by much for most, 
but hey... :P


--
Curtis Maloney
[EMAIL PROTECTED]



Re: [Dovecot] v1.0.14 released

2008-06-03 Thread Matthias Andree
On Mon, 02 Jun 2008, Timo Sirainen wrote:

   - proxy: Login success reply was sent in two IP packets, which
 confused some IMAP/POP3 clients

So? Fix the clients or have the kernel reassemble packets.
They can't control who and when is fragmenting and why anyways.

I'm not against the change, but it's not a solution.

-- 
Matthias Andree


Re: [Dovecot] v1.1.rc8 released

2008-06-03 Thread Jost Krieger
On Tue, Jun 03, 2008 at 07:11:33AM +0100, Ed W wrote:

 Could do, but I was trying to expand to the case that the headers were 
 different, but the body was the same (eg I suspect that mailing list 
 managers might deliver emails one by one (verp), but the body is not 
 customised.  Anyway, just wanted to checksum the body of the message not 
 the whole message

That could lead to slight problems, like hardlinking totally unrelated
messages, e.g. empty messages. Some Headers like From:, To:, Date:,
Subject: should probably be identical.

For some consistency, just removing  *locally* generated trace headers
before fingerprinting might lead to better results.

Jost
-- 
| Helft Spam ausrotten!HTML in Mail ist unhöflich. |
| Postmaster, JAPH, manchmal Wahrsager   am RZ der RUB |
| Wahre Worte sind nicht gefällig, gefällige Worte sind nicht wahr.|
|  Lao Tse, Tao Te King 81 |


smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] v1.0.14 released

2008-06-03 Thread Matthias Andree
On Tue, 03 Jun 2008, Curtis Maloney wrote:

 Matthias Andree wrote:
 On Mon, 02 Jun 2008, Timo Sirainen wrote:

 - proxy: Login success reply was sent in two IP packets, which
   confused some IMAP/POP3 clients

 So? Fix the clients or have the kernel reassemble packets.
 They can't control who and when is fragmenting and why anyways.

 I'm not against the change, but it's not a solution.

 So include the work-around (that doesn't break anything) in Dovecot, and  
 notify the maintainers of the broken clients to Get a clue(tm) :P

Yup. Buffered reads are a virtue :-)

 It does improve login latency for everyone... sure, not by much for most, 
 but hey... :P

By how long? Generation time of the 2nd packet *header* providing it's
not reassembled along the path? Wow, impressive. Not. Buys you some 300
bits, that's perhaps 70 µs on my DSL, as the 2nd packet would usually be
within the TCP congestion window and be sent back to back to the 1st
packet of the response, so no additional round trip delays. I'd be
surprised if anyone noticed beyond my broken client got pampered up.

OK, let's stop here and not be derisive or defaitist or otherwise
destructive, it's a Pareto optimization and as such probably justified.

-- 
Matthias Andree


Re: [Dovecot] spamassassin, postfix with dovecot lda?

2008-06-03 Thread George Mamalakis

Hello Nicolas,

I tried the mailbox_transport = dovecot directive, with no luck, since I 
was using virtual mailboxes, where virtual_transport is responsible for 
delivery. What really helped, though, was the dovecot line in master.cf, 
which after a few tweaks allowed me to make things work eventually!


Thank you again for your help, 



Hello,

I am currently running a similar setup, with spamc called per user at
delivery time, from postfix. I use the following settings (on a Debian
Etch system, so installation paths must be adapated).

- dovecot's deliver binary must be set setuid root,

- /etc/postfix/main.cf:

mailbox_transport = dovecot
dovecot_destination_recipient_limit = 1


- /etc/postfix/master.cf:

#
# dovecot
#
dovecot unix-   n   n   -   1   pipe
  flags=Rh user=dovecot argv=/usr/bin/spamc -u ${user} -e 
/usr/lib/dovecot/deliver -d ${user} -f ${sender}


  



--
George Mamalakis

IT Officer
Electrical and Computer Engineer (Aristotle Un. of Thessaloniki),
MSc (Imperial College of London)

Department of Electrical and Computer Engineering
Faculty of Engineering
Aristotle University of Thessaloniki




Re: [Dovecot] v1.1.rc8 released

2008-06-03 Thread Jost Krieger
On Tue, Jun 03, 2008 at 10:45:20AM +0200, Geert Hendrickx wrote:
 On Tue, Jun 03, 2008 at 10:27:32AM +0200, Jost Krieger wrote:
...
  That could lead to slight problems, like hardlinking totally unrelated
  messages, e.g. empty messages. Some Headers like From:, To:, Date:,
  Subject: should probably be identical.
 
 Message-ID perhaps? :-)

Yep, add that ...
 
  For some consistency, just removing  *locally* generated trace headers
  before fingerprinting might lead to better results.
 
 That may still leave identical messages not hard-linked thus wasting space.
 Eg. if they come from MTA's that do recipient splitting, or messages that
 are routed via different systems.  The Received headers will be different
 but the body generally identical.

True, but these headers are quite important sometimes.

 I think a better solution is what was suggested here before, ie. to keep
 the (unique) message headers in a Maildir-like format, containing links to
 (single-instance stored) message bodies in a a separate location.

Probably better, but to make this transparent for the users, it would
need quite a bit of work in dovecot.

Jost
-- 
| Helft Spam ausrotten!HTML in Mail ist unhöflich. |
| Postmaster, JAPH, manchmal Wahrsager   am RZ der RUB |
| Wahre Worte sind nicht gefällig, gefällige Worte sind nicht wahr.|
|  Lao Tse, Tao Te King 81 |


smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Johannes Berg
On Tue, 2008-06-03 at 00:51 +0200, Juan Asensio Sánchez wrote:
 Well
 
 Finally i found the error. It look like antispam is not compatible
 with quota plugin.
 
 mail_plugins = quota imap_quota autocreate antispam
 
 If i remove quota and imap_quota plugins from imap protocol,
 everything works fine and the message is saved in sent folder.
 
 mail_plugins = autocreate antispam

Ok, that explains why I don't see that problem.

 If i enable again the plugins, the error happens again. Any solution?

  Now i have compiled dovecot-antispam plugin with the -g3 option in
  CFLAGS. What to do now?

http://dovecot.org/bugreport.html

The debugging hangs section is what I usually do: start mail client, 
gdb -p $(pidof imap), enter cont in gdb, do operation in mail client
that crashes, get backtrace from gdb.

johannes


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


Re: [Dovecot] mbox: extra linefeed after Content-Length header in 1.1.rc8

2008-06-03 Thread Timo Sirainen
On Tue, 2008-06-03 at 10:34 +0200, Diego Liziero wrote:
 mbox messages gets header corruption caused by an extra linefeed after
 Content-Length

Fixed: http://hg.dovecot.org/dovecot-1.1/rev/e043135e971d

I guess 1.1.rc9 will still come. But I'll wait a couple of days before
releasing it to see if there are more bugs..



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


Re: [Dovecot] v1.1.rc8 released

2008-06-03 Thread Timo Sirainen
On Tue, 2008-06-03 at 07:11 +0100, Ed W wrote:
 Actually the motivation for this was I was wondering about the benefit 
 of a storage backend where the body was stored per file and the headers 
 were stored separately (perhaps in a maildir type format).  I haven't 
 looked to see if this is what dbox does already...

dbox is half-designed to support this. It supports arbitrary metadata
(unlike maildir) and I've already written 3 lines of code to get this
implemented ;)

/* Pointer to external message data. Format is:
   1*(start offset byte count ref) */
DBOX_METADATA_EXT_REF   = 'X',

There's no code to actually read/write such metadata though. Also I'm
not exactly sure what the ref is. Maybe just a filename used to store
the data.



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


Re: [Dovecot] Wrong message information

2008-06-03 Thread Timo Sirainen
On Tue, 2008-06-03 at 17:28 +0200, Anders wrote:
 I have not been able to reproduce this at will, but do see 1-Jan-1970 in
 rawlog about two times every day now (with some 80 accounts and probably
 thousands of deliveries).

Could you try with the attached debug patch? What does it log when it
happens?

diff -r e043135e971d src/lib-storage/index/maildir/maildir-mail.c
--- a/src/lib-storage/index/maildir/maildir-mail.c	Tue Jun 03 16:04:32 2008 +0300
+++ b/src/lib-storage/index/maildir/maildir-mail.c	Tue Jun 03 18:54:27 2008 +0300
@@ -116,8 +116,10 @@
 	if (index_mail_get_received_date(_mail, date_r) == 0)
 		return 0;
 
-	if (maildir_mail_stat(_mail, st)  0)
+	if (maildir_mail_stat(_mail, st)  0) {
+		i_warning(received date lookup failed);
 		return -1;
+	}
 
 	*date_r = data-received_date = st.st_mtime;
 	return 0;
diff -r e043135e971d src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c	Tue Jun 03 16:04:32 2008 +0300
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c	Tue Jun 03 18:54:27 2008 +0300
@@ -831,6 +831,7 @@
 		   enum maildir_uidlist_rec_flag *flags_r)
 {
 	const char *fname;
+	bool refresh = FALSE;
 
 	fname = maildir_uidlist_lookup_nosync(uidlist, uid, flags_r);
 	if (fname == NULL) {
@@ -839,6 +840,7 @@
 			   after the last mailbox sync */
 			if (maildir_uidlist_refresh(uidlist)  0)
 return NULL;
+			refresh = TRUE;
 		} else {
 			/* the uidlist doesn't exist. */
 			if (maildir_storage_sync_force(uidlist-mbox, uid)  0)
@@ -847,6 +849,8 @@
 
 		/* try again */
 		fname = maildir_uidlist_lookup_nosync(uidlist, uid, flags_r);
+		i_warning(uidlist: uid=%u not found, refreshed=%d, again=%s,
+			  uid, refresh, fname == NULL ?  : fname);
 	}
 
 	return fname;
diff -r e043135e971d src/lib-storage/index/maildir/maildir-util.c
--- a/src/lib-storage/index/maildir/maildir-util.c	Tue Jun 03 16:04:32 2008 +0300
+++ b/src/lib-storage/index/maildir/maildir-util.c	Tue Jun 03 18:54:27 2008 +0300
@@ -24,9 +24,10 @@
 	int ret;
 
 	fname = maildir_uidlist_lookup(mbox-uidlist, uid, flags);
-	if (fname == NULL)
+	if (fname == NULL) {
+		i_warning(do_try: uid=%u file name not found, uid);
 		return -2; /* expunged */
-
+	}
 	if ((flags  MAILDIR_UIDLIST_REC_FLAG_NEW_DIR) != 0) {
 		/* probably in new/ dir */
 		T_BEGIN {
@@ -45,6 +46,8 @@
 		path = t_strconcat(mbox-path, /cur/, fname, NULL);
 		ret = callback(mbox, path, context);
 	} T_END;
+	if (ret == 0)
+		i_warning(do_try: uid=%u file=%s not found, uid, fname);
 	return ret;
 }
 


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


[Dovecot] How to set MDNSent flag on a large amount of mails?

2008-06-03 Thread Patrick Nagel
Hi,

after having moved a big mail archive to IMAP, I've now got the following
problem: The MUA asks to send an MDN on all those old messages that contain
the 'Disposition-Notification-To' header when opened. I'd like to set the
$MDNSent flag on those (1 in a deeply nested directory structure)
mails.

After having read http://wiki.dovecot.org/MailboxFormat/Maildir I wrote a
script that changed the filename of mails in all directories that contained
the header, so that the filename contained a 'b' in the last part of the
filename (after the comma), because I found '1 $MDNSent' in
Maildir/dovecot-keywords. I then discovered that there can be a
'dovecot-keywords' file in each directory, and all of those files can have
different flags in different order.

Do I really need to write a script that evaluates each dovecot-keywords
file, figures out which letter corresponds to the flag and rename the files
(per directory) accordingly? Isn't there a more simple way?

Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 3462 7688 x 826 Fax:   +86 (21) 3462 7779

PGP key: https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005



Re: [Dovecot] How to set MDNSent flag on a large amount of mails?

2008-06-03 Thread Timo Sirainen
On Wed, 2008-06-04 at 00:33 +0800, Patrick Nagel wrote:
 after having moved a big mail archive to IMAP, I've now got the following
 problem: The MUA asks to send an MDN on all those old messages that contain
 the 'Disposition-Notification-To' header when opened. I'd like to set the
 $MDNSent flag on those (1 in a deeply nested directory structure)
 mails.
..
 Do I really need to write a script that evaluates each dovecot-keywords
 file, figures out which letter corresponds to the flag and rename the files
 (per directory) accordingly? Isn't there a more simple way?

How about making your script use IMAP protocol?

1 list  *
2 select each mailbox
3 uid search header Disposition-Notification-To 
4 uid store search result as msgset +flags $MDNSent



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


Re: [Dovecot] How to set MDNSent flag on a large amount of mails?

2008-06-03 Thread Patrick Nagel
Hi,

On Tue, 03 Jun 2008 19:37:50 +0300, Timo Sirainen [EMAIL PROTECTED] wrote:
 How about making your script use IMAP protocol?
 
 1 list  *
 2 select each mailbox
 3 uid search header Disposition-Notification-To 
 4 uid store search result as msgset +flags $MDNSent

Thanks, Timo! Never thought of that :)

I'll give it a try tomorrow... netcat would be the bridge between my shell
and dovecot then, I guess?

Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 3462 7688 x 826 Fax:   +86 (21) 3462 7779

PGP key: https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005



Re: [Dovecot] v1.0.14 released

2008-06-03 Thread Timo Sirainen
On Tue, 2008-06-03 at 10:55 -0700, Kenneth Porter wrote:
 --On Tuesday, June 03, 2008 5:56 PM +1000 Curtis Maloney 
 [EMAIL PROTECTED] wrote:
 
  So include the work-around (that doesn't break anything) in Dovecot, and
  notify the maintainers of the broken clients to Get a clue(tm) :P
 
 Which clients/versions? Can we name names?

http://dovecot.org/list/dovecot/2008-April/030245.html

I also remember someone having a similar problem with Dovecot's old
POP3 code which also sent CRLF separately, but don't remember what the
client was. Mailing list archives could tell.



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


Re: [Dovecot] How to set MDNSent flag on a large amount of mails?

2008-06-03 Thread Johannes Berg
On Wed, 2008-06-04 at 01:17 +0800, Patrick Nagel wrote:
 Hi,
 
 On Tue, 03 Jun 2008 19:37:50 +0300, Timo Sirainen [EMAIL PROTECTED] wrote:
  How about making your script use IMAP protocol?
  
  1 list  *
  2 select each mailbox
  3 uid search header Disposition-Notification-To 
  4 uid store search result as msgset +flags $MDNSent
 
 Thanks, Timo! Never thought of that :)
 
 I'll give it a try tomorrow... netcat would be the bridge between my shell
 and dovecot then, I guess?

That'll work, I tend to use python because it comes with error checking,
you can use http://johannes.sipsolutions.net/files/cleanspam.txt and
modify.

johannes


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


[Dovecot] Scriptable protocol design

2008-06-03 Thread Timo Sirainen
On Tue, 2008-06-03 at 19:37 +0300, Timo Sirainen wrote:
 1 list  *
 2 select each mailbox
 3 uid search header Disposition-Notification-To 
 4 uid store search result as msgset +flags $MDNSent

I've once in a while thought about creating a new protocol to make
things like these easier. So it wouldn't attempt to replace IMAP (at
least initially :) but rather make scripting a lot easier. Perhaps the
syntax could be something similar to a programming language. Like:

list( *)  ($box) (
  select($box)
  search(header Disposition-Notification-To )  ($msg) (
store($msg + $MDNSent)
fetch($msg header subject)
  )
)

Hmm. Or I don't know. Anyone have some great ideas? :) Ideally it should
be something command/event-oriented like IMAP, but with ability to pipe
command results to other commands (but without allowing infinite loops).


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


Re: [Dovecot] v1.0.14 released

2008-06-03 Thread Kenneth Porter
--On Tuesday, June 03, 2008 5:56 PM +1000 Curtis Maloney 
[EMAIL PROTECTED] wrote:



So include the work-around (that doesn't break anything) in Dovecot, and
notify the maintainers of the broken clients to Get a clue(tm) :P


Which clients/versions? Can we name names?



Re: [Dovecot] How to set MDNSent flag on a large amount of mails?

2008-06-03 Thread Patrick Nagel
Hi,

On Tue, 03 Jun 2008 19:20:43 +0200, Johannes Berg
[EMAIL PROTECTED] wrote:
 On Wed, 2008-06-04 at 01:17 +0800, Patrick Nagel wrote:
 I'll give it a try tomorrow... netcat would be the bridge between my
shell
 and dovecot then, I guess?
 
 That'll work, I tend to use python because it comes with error checking,
 you can use http://johannes.sipsolutions.net/files/cleanspam.txt and
 modify.

Thanks, Johannes :) My python skills are very limited, but your example
script looks straight forward, and the 'difficult' part isn't even needed
for my task, so I'll give it a try.

Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 3462 7688 x 826 Fax:   +86 (21) 3462 7779

PGP key: https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005



Re: [Dovecot] How to set MDNSent flag on a large amount of mails?

2008-06-03 Thread Kenneth Porter
--On Wednesday, June 04, 2008 1:17 AM +0800 Patrick Nagel 
[EMAIL PROTECTED] wrote:



I'll give it a try tomorrow... netcat would be the bridge between my shell
and dovecot then, I guess?


Another possibility would be to use the c-client library, part of the 
uw-imap package:


http://www.washington.edu/imap/


Re: [Dovecot] expire plugin - setgid failed

2008-06-03 Thread e-frog

Hi,

I'm still having problems to get the expire plugin working. Now I get 
the following error when running the expire-tool.


Error: stat(/root/mail/.Trash/tmp) failed: Permission denied (euid=2005 
egid=100)


Somehow it tries to access root's mailbox with a standard user account. 
I'm already on v1.1rc8.


--Helmut

 Original Message  
Subject: Re: [Dovecot] expire plugin - setgid failed
From: e-frog [EMAIL PROTECTED]
To: Dovecot Mailing List [EMAIL PROTECTED]
Date: 27.05.2008 20:06


On Sat, 2008-05-17 at 13:58 +0200, e-frog wrote:

If I run the expire tool I get the following error:
server:~# dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool
Fatal: setgid(100) failed with euid=2005, gid=0, egid=0: Operation not 
permitted

Does this help? http://hg.dovecot.org/dovecot-1.1/rev/5b27f5cbf016



Yes, the setgid failure is gone! Thanks Timo!



Re: [Dovecot] expire plugin - setgid failed

2008-06-03 Thread Timo Sirainen

On Jun 3, 2008, at 9:27 PM, e-frog wrote:

I'm still having problems to get the expire plugin working. Now I  
get the following error when running the expire-tool.


Error: stat(/root/mail/.Trash/tmp) failed: Permission denied  
(euid=2005 egid=100)


Somehow it tries to access root's mailbox with a standard user  
account. I'm already on v1.1rc8.


I guess it takes /root from $HOME environment? What happens if you  
unset HOME before running expire-tool? Or do you really have a root  
user in the expire database? (why/how?)




PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] v1.1.rc8 released

2008-06-03 Thread Kenneth Porter

--On Tuesday, June 03, 2008 3:49 PM +0300 Timo Sirainen [EMAIL PROTECTED] 
wrote:


dbox is half-designed to support this. It supports arbitrary metadata
(unlike maildir) and I've already written 3 lines of code to get this
implemented ;)

/* Pointer to external message data. Format is:
   1*(start offset byte count ref) */
DBOX_METADATA_EXT_REF   = 'X',

There's no code to actually read/write such metadata though. Also I'm
not exactly sure what the ref is. Maybe just a filename used to store
the data.


LOL, so I'm not the only one who designs like that. I think of it like 
sculpting: Throw some clay on the table and then scrape away anything 
that's not part of my objective. It's the right-brain side of programming. 
(And the hardest part.)





Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Juan Asensio Sánchez
Wow. Thanks for your quick answer. I don't know much about compiling
or debugging. Could anyone say me how to do that or give some tips?

Thanks in advance.

2008/6/3 Johannes Berg [EMAIL PROTECTED]:

 Program received signal SIGSEGV, Segmentation fault.
 0x0809ea67 in mail_get_physical_size ()
 (gdb) bt full
 #0  0x0809ea67 in mail_get_physical_size ()
 No symbol table info available.
 #1  0xb7e795c5 in quota_mail_storage_created () from
 /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
 No symbol table info available.
 #2  0xb7e6d02d in antispam_save_finish (ctx=0x813b720) at
 antispam-storage-1.1.c:178
   asbox = (struct antispam_mailbox *) 0x8124320
   ast = (struct antispam_internal_context *) 0x8134978
   dest_mail = (struct mail *) 0x8137310
   ret = 135092783
 #3  0x0805a1c8 in _start ()
 No symbol table info available.

 Hmm. Can you compile dovecot and the quota plugin with debugging symbols
 too? This doesn't look too useful.

 johannes



Re: [Dovecot] expire plugin - setgid failed

2008-06-03 Thread e-frog
You are right. When I unset HOME before running expire-tool I don't get 
the error message. I'm not sure how to add a user to the expire 
database. All I configured is using passwd as userdb. I have include my 
configuration below:


[EMAIL PROTECTED]:/var/lib/dovecot# dovecot -n
# 1.1.rc8: /etc/dovecot.conf
log_path: /var/log/mail/dovecot.log
info_log_path: /var/log/mail/dovecot.log
ssl_disable: yes
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
login_process_size: 16
max_mail_processes: 16
mail_location: maildir:%h/mail
umask: 7
mail_plugins: expire quota imap_quota mail_log
namespace:
  type: public
  separator: /
  prefix: Public/
  location: 
maildir:/home/public/mail:CONTROL=%h/mail/control/public:INDEX=%h/mail/index/public

  list: yes
  subscriptions: yes
namespace:
  type: private
  separator: /
  inbox: yes
  list: yes
  subscriptions: yes
auth default:
  verbose: yes
  passdb:
driver: pam
  userdb:
driver: passwd
  socket:
type: listen
client:
  path: /var/run/dovecot/auth-client
  mode: 432
  user: dovecot
  group: mail
master:
  path: /var/run/dovecot/auth-master
  mode: 384
plugin:
  quota: maildir
  quota_rule: *:storage=1GB
  quota_rule2: Trash:storage=10%%
  expire: Trash 1
  expire_dict: proxy::expire
dict:
  expire: db:/var/lib/dovecot/expire.db



 Original Message  
Subject: Re: [Dovecot] expire plugin - setgid failed
From: Timo Sirainen [EMAIL PROTECTED]
To: e-frog [EMAIL PROTECTED]
Date: 03.06.2008 20:37


On Jun 3, 2008, at 9:27 PM, e-frog wrote:

I'm still having problems to get the expire plugin working. Now I  
get the following error when running the expire-tool.


Error: stat(/root/mail/.Trash/tmp) failed: Permission denied  
(euid=2005 egid=100)


Somehow it tries to access root's mailbox with a standard user  
account. I'm already on v1.1rc8.


I guess it takes /root from $HOME environment? What happens if you  
unset HOME before running expire-tool? Or do you really have a root  
user in the expire database? (why/how?)




Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Juan Asensio Sánchez
Hi

Thanks for the help, This is the result of the running commands:

pdc-server:~# dpkg -l | grep gdb
ii  gdb   6.4.90.dfsg-1
The GNU Debugger
ii  libgdbm3  1.8.3-3
GNU dbm database routines (runtime version)
pdc-server:~# dpkg -l | grep dovecot
ii  dovecot-common1.1.rc7-0~auto+1
secure mail server that supports mbox and ma
ii  dovecot-dev   1.1.rc7-0~auto+1
header files for the dovecot mail server
ii  dovecot-imapd 1.1.rc7-0~auto+1
secure IMAP server that supports mbox and ma
ii  dovecot-pop3d 1.1.rc7-0~auto+1
secure POP3 server that supports mbox and ma
pdc-server:~# ps aux | grep imap
dovecot   2749  0.0  0.5   3312  1512 ?S20:45   0:00 imap-login
dovecot   2824  0.0  0.5   3308  1508 ?S20:52   0:00 imap-login
dovecot   2848  0.4  0.5   3308  1508 ?S20:54   0:00 imap-login
mailuser  2849  1.0  0.4   2540  1280 ?S20:54   0:00
/usr/lib/dovecot/imap
root  2852  0.0  0.2   2880   752 pts/0R+   20:54   0:00 grep imap
pdc-server:~# gdb -p 2849
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i486-linux-gnu.
Attaching to process 2849
Reading symbols from /usr/lib/dovecot/imap...(no debugging symbols
found)...done.
Using host libthread_db library /lib/tls/i686/cmov/libthread_db.so.1.
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...(no debugging
symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libc.so.6...(no debugging
symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so...(no
debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
Reading symbols from
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
Reading symbols from /usr/lib/dovecot/modules/imap/autocreate_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/imap/autocreate_plugin.so
Failed to read a valid object file image from memory.
0xb7fba410 in ?? ()
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0809ea67 in mail_get_physical_size ()
(gdb) bt full
#0  0x0809ea67 in mail_get_physical_size ()
No symbol table info available.
#1  0xb7e795c5 in quota_mail_storage_created () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#2  0xb7e6d02d in antispam_save_finish (ctx=0x813b720) at
antispam-storage-1.1.c:178
asbox = (struct antispam_mailbox *) 0x8124320
ast = (struct antispam_internal_context *) 0x8134978
dest_mail = (struct mail *) 0x8137310
ret = 135092783
#3  0x0805a1c8 in _start ()
No symbol table info available.
(gdb)

Regards.

2008/6/3 Johannes Berg [EMAIL PROTECTED]:
 On Tue, 2008-06-03 at 00:51 +0200, Juan Asensio Sánchez wrote:
 Well

 Finally i found the error. It look like antispam is not compatible
 with quota plugin.

 mail_plugins = quota imap_quota autocreate antispam

 If i remove quota and imap_quota plugins from imap protocol,
 everything works fine and the message is saved in sent folder.

 mail_plugins = autocreate antispam

 Ok, that explains why I don't see that problem.

 If i enable again the plugins, the error happens again. Any solution?

  Now i have compiled dovecot-antispam plugin with the -g3 option in
  CFLAGS. What to do now?

 http://dovecot.org/bugreport.html

 The debugging hangs section is what I usually do: start mail client,
 gdb -p $(pidof imap), enter cont in gdb, do operation in mail client
 that crashes, get backtrace from gdb.

 johannes



Re: [Dovecot] v1.0.14 released

2008-06-03 Thread Kenneth Porter

--On Tuesday, June 03, 2008 8:58 PM +0300 Timo Sirainen [EMAIL PROTECTED] 
wrote:


Which clients/versions? Can we name names?


http://dovecot.org/list/dovecot/2008-April/030245.html


Ah, a mobile phone. Which means a firmware upgrade, and a niche market, 
which means a client fix is less likely.




Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Johannes Berg

 Program received signal SIGSEGV, Segmentation fault.
 0x0809ea67 in mail_get_physical_size ()
 (gdb) bt full
 #0  0x0809ea67 in mail_get_physical_size ()
 No symbol table info available.
 #1  0xb7e795c5 in quota_mail_storage_created () from
 /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
 No symbol table info available.
 #2  0xb7e6d02d in antispam_save_finish (ctx=0x813b720) at
 antispam-storage-1.1.c:178
   asbox = (struct antispam_mailbox *) 0x8124320
   ast = (struct antispam_internal_context *) 0x8134978
   dest_mail = (struct mail *) 0x8137310
   ret = 135092783
 #3  0x0805a1c8 in _start ()
 No symbol table info available.

Hmm. Can you compile dovecot and the quota plugin with debugging symbols
too? This doesn't look too useful.

johannes


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


Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Johannes Berg
On Tue, 2008-06-03 at 21:06 +0200, Juan Asensio Sánchez wrote:
 Wow. Thanks for your quick answer. I don't know much about compiling
 or debugging. Could anyone say me how to do that or give some tips?

well, add -g3 somewhere to the CFLAGS when building dovecot.

johannes


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


[Dovecot] FreeBSD port for 1.1, some bits more...

2008-06-03 Thread Geoffroy DESVERNAY
I did (re-)compile dovecot (1.1rc8) today, with managesieve (0.10.2) and
sieve-plugin (1.1.5).
I did modify the existing dovecot-devel port, adding managesieve patch
as an OPTION, and I added a 'dovecot-managesieve-devel' port, and a
'dovecot-sieve-devel' one to be complete...

Not sure everything is very complete, but at least it works for me=E2=84=A2=
, and
if it can help anybody to save some time... The tree ports are there:
http://dgeo.perso.ec-marseille.fr/dovecot

Not sure I used the very good way of building FreeBSD ports...

Cheers,

Geoffroy
--=20
 ___
/ Geoffroy DESVERNAY   |\
   /\`Service info`| Tel: (+33|0)4 91 05 45 24  /\
   \/ Ecole Centrale de Marseille  | Fax: (+33|0)4 91 05 45 98  \/
\ (ex-EGIM)| Mail: dgeo ec-marseille.fr /
 ---




signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Error using antispam plugin

2008-06-03 Thread Juan Asensio Sánchez
I compile Dovecot from the source packages of the Debian repository. I
don't know if it has been correctly compiled with that flag, i have
executed:

# CFLAGS=-g3 dpkg-buildpackage -rfakeroot -b

When running gdb again, i get diffrenet output but i think that this
information is not relevant:

(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x080b294d in mail_get_physical_size ()
(gdb) bt full
#0  0x080b294d in mail_get_physical_size ()
No symbol table info available.
#1  0xb7df0200 in quota_try_alloc () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#2  0xb7df4b01 in quota_plugin_deinit () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#3  0xb7df4edc in quota_plugin_deinit () from
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
No symbol table info available.
#4  0xb7de8036 in antispam_save_finish () from
/usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
No symbol table info available.
#5  0x080b5aa6 in mailbox_save_finish ()
No symbol table info available.
#6  0x0805ad8f in _start ()
No symbol table info available.
(gdb) cont
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)

2008/6/4 Juan Asensio Sánchez [EMAIL PROTECTED]:
 I compile Dovecot from the source packages of the Debian repository. I
 don't know if it has been correctly compiled with that flag, i have
 executed:

 # CFLAGS=-g3 dpkg-buildpackage -rfakeroot -b

 When running gdb again, i get diffrenet output but i think that this
 information is not relevant:

 (gdb) cont
 Continuing.

 Program received signal SIGSEGV, Segmentation fault.
 0x080b294d in mail_get_physical_size ()
 (gdb) bt full
 #0  0x080b294d in mail_get_physical_size ()
 No symbol table info available.
 #1  0xb7df0200 in quota_try_alloc () from
 /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
 No symbol table info available.
 #2  0xb7df4b01 in quota_plugin_deinit () from
 /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
 No symbol table info available.
 #3  0xb7df4edc in quota_plugin_deinit () from
 /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
 No symbol table info available.
 #4  0xb7de8036 in antispam_save_finish () from
 /usr/lib/dovecot/modules/imap/lib90_antispam_plugin.so
 No symbol table info available.
 #5  0x080b5aa6 in mailbox_save_finish ()
 No symbol table info available.
 #6  0x0805ad8f in _start ()
 No symbol table info available.
 (gdb) cont
 Continuing.

 Program terminated with signal SIGSEGV, Segmentation fault.
 The program no longer exists.
 (gdb)

 2008/6/3 Johannes Berg [EMAIL PROTECTED]:
 On Tue, 2008-06-03 at 22:16 +0300, Timo Sirainen wrote:
 On Tue, 2008-06-03 at 21:11 +0200, Johannes Berg wrote:
  On Tue, 2008-06-03 at 21:06 +0200, Juan Asensio Sánchez wrote:
   Wow. Thanks for your quick answer. I don't know much about compiling
   or debugging. Could anyone say me how to do that or give some tips?
 
  well, add -g3 somewhere to the CFLAGS when building dovecot.

 -g is added by default. Does -g3 add anything useful compared to it?

 I think it only adds debug information for macros.

 johannes




[Dovecot] Re maintenance of the dovecot-uidlist files

2008-06-03 Thread Dann Daggett
Greetings all,
 
I am new to dovecot, using ver 1.0.13 and IMAP with ~/Maildir delivery.
I have noticed that the entries in the dovecot-uidlist files don't seem
to get updated when an email is deleted or moved to .Trash. It appears
that this list list would just keep growing over time, being full of no
longer used filenames, and must tend to increase its processing
overhead.
 
I have also noticed that if I manually delete that file and the 3 other
dovecot* files, that it gets rebuilt with only what's present.
 
Is there provision in the dovecot code to automatically clean this up
periodically?
If so, are there any configuration params for it?
If not, what is the preferred method for maintenance in this regard?
 
Thank you,
Dan
 


Re: [Dovecot] Re maintenance of the dovecot-uidlist files

2008-06-03 Thread Timo Sirainen
On Tue, 2008-06-03 at 16:49 -0700, Dann Daggett wrote:
 Greetings all,
  
 I am new to dovecot, using ver 1.0.13 and IMAP with ~/Maildir delivery.
 I have noticed that the entries in the dovecot-uidlist files don't seem
 to get updated when an email is deleted or moved to .Trash. It appears
 that this list list would just keep growing over time, being full of no
 longer used filenames, and must tend to increase its processing
 overhead.

The deleted entries are removed when a new message arrives to the
mailbox. So it's just an optimization not to waste disk I/O on rewriting
the file when it's not necessary. If this isn't happening, there's
something wrong or you're misunderstanding something.

 I have also noticed that if I manually delete that file and the 3 other
 dovecot* files, that it gets rebuilt with only what's present.

Sure, but that also causes clients to see them as new messages and
redownload them. 



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