Re: XOAUTH2 submission - "500 5.5.2 Line too long"

2022-03-08 Thread Patrick Nagel
Hi,

On Tuesday, 8 March 2022 16:12:48 CET Rosario Esposito wrote:
> I setup a dovecot submission server, using xoauth2 authentication.
> My roundcube webmail points to dovecot submission.
> In roundcube smtp logs, I see:
> 
[...]
> [08-Mar-2022 15:47:16 +0100]:  Send: AUTH XOAUTH2 
> dXNlcj1yZXNwb3NpdAFhdXRoPWJlYXJlci<<<...*very long base64 string*>>>
> [08-Mar-2022 15:47:16 +0100]:  Recv: 500 5.5.2 Line too long
> 
> Apparently, the problem came out after upgrading from dovecot 2.3.17 to 
> 2.3.18

Interesting, the changelog 
(https://github.com/dovecot/core/releases/tag/2.3.18) says:

- submission-login: Authentication does not accept OAUTH2 token (or
  other very long credentials) because it considers the line to be too long.

But sorry, not much else I can contribute, I'm just a random passerby.

Patrick.




Pigeonhole page's RFC links broken (fix attached)

2022-02-22 Thread Patrick Nagel
Hi there,

I was just reading https://pigeonhole.dovecot.org/ and noticed that all the 
links to the RFCs are broken. I fixed them via regexp search & replace

curl https://pigeonhole.dovecot.org/ | sed -e 
's|https\?://tools.ietf.org/html/rfc\([0-9]\{4\}\)/\?|https://www.ietf.org/rfc/rfc\1.html|g'
 >Pigeonhole_fixed_rfc_links.html

and attached the resulting page.

Cheers,
Patrick.<>


Re: [Dovecot] remote hot site, IMAP replication or cluster over WAN

2010-11-01 Thread Patrick Nagel
Hi,

On 2010-11-02 10:30, Stan Hoeppner wrote:
> 1.  How many of you have a remote site hot backup Dovecot IMAP server?

Only local (same room, different box). Copying to a remote location in
irregular intervals.

> 2.  How are you replicating mailbox data to the hot backup system?
> A.  rsync
> B.  DRBD+GFS2
> C.  Other

C. - rdiff-backup (versioned).

Patrick.

-- 
Key ID: 0x86E346D4http://patrick-nagel.net/key.asc
Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] IMAP IDLE, Virtual mailboxes

2010-08-04 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Timo,

On 2010-08-04 23:54, Timo Sirainen wrote:
> Here: http://hg.dovecot.org/dovecot-2.0/rev/eb1f471a924d

Thanks, that's great! Now dovecot enables people who sort server-side
and want IDLE notifications for all those mailboxes, but do not want to
keep "many" IDLE connections open. They can now create a virtual mailbox
that contains all mail-receiving mailboxes' mail (lets call it vinbox),
and put their IDLE connection on that vinbox. Neat.

I'll update to 2.0 ASAP :)

Patrick.

- -- 
Key ID: 0x86E346D4http://patrick-nagel.net/key.asc
Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkxaMoYACgkQyYHmhobjRtT2XQCdH1IZsNl+cLGVvLJCNaZTbf3d
h5UAoIuOMMtsTAWGI76MkOU6X4yxQaS3
=xXls
-END PGP SIGNATURE-


Re: [Dovecot] Thunderbird problem

2010-06-26 Thread Patrick Nagel
Hi Stan,

On 2010-06-26 03:02 UTC Stan Hoeppner wrote:
> Steffen Kaiser put forth on 6/25/2010 7:01 AM:
> > 2) thunderbird opened too many simultaneous connections to the server. I
> > do not remember where they would blocked or terminated, but in some
> > cases thunderbird did not seem to detect this failure
> 
> This is a pet peeve of mine.  Recent TB revs default to opening 5 IMAP
> connections.  Some time ago I did more than cursory testing and found that
> TBird only uses 1 of the 5.  The other 4 just sit there idle, adding
> clutter to the process list and eating a small amount of RAM.  If it
> weren't for Linux' share memory management these processes would be eating
> a whole ton of RAM on busy Dovecot servers.

The connections are used for IMAP IDLE [1], AFAIK. So the first five folders 
(a.k.a mailboxes) you access(?) get "push mail" - the moment a new mail goes 
in or out, Thunderbird knows about it. Why they chose the number five, I don't 
know. IMO it would be better, if you could choose explicitly, which folders 
should be "push", and then TB would create as many connections as you have set 
folders to "push".
Or even better: IMAP NOTIFY [2] gets implemented in dovecot and in 
Thunderbird, and one TCP connection suffices for an arbitrary amount of "push" 
folders :)

Patrick.

[1] http://www.faqs.org/rfcs/rfc2177.html
[2] http://www.faqs.org/rfcs/rfc5465.html

-- 
Key ID: 0x86E346D4http://patrick-nagel.net/key.asc
Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4


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


[Dovecot] Thunderbird's (in)ability to mass-upload mails to IMAP (was: Re: importing outlook express messages to dovecot imap server)

2010-06-25 Thread Patrick Nagel
Hi Stan,

On 2010-06-25 07:19 UTC Stan Hoeppner wrote:
> Patrick Nagel put forth on 6/25/2010 1:02 AM:
> > On 2010-06-25 03:51 UTC Stan Hoeppner wrote:
[...]
> >> The first method is a single step process and is reliable.
> > 
> > I tried something similar (with Thunderbird) once, and it caused a lot of
> > trouble. We only had around 1.3 GB, IIRC, but thousands of folders. Here
> > is a blog article that I wrote after I got it done with a perl script:
> > 
> > https://patrick-nagel.net/blog/archives/77
> 
> It's interesting that you weren't able/willing to track down the source of
> the problem.

I spent some time on it, as I wrote in the blog article, but then there were 
just more important things to get done. The most annoying thing was, that 
there was no error message whatsoever. Error handling doesn't seem to be one 
of Thunderbird's strengths (also things like 
https://bugzilla.mozilla.org/show_bug.cgi?id=257735 come to mind).

> It's also interesting how you mention "single drag and
> drop".  In my experience, you can't drag/drop _folders_ in Thunderbird at
> all.  All the migrations I've done this way required creating new folders
> on the IMAP server (Dovecot), group selecting all of the mail in the
> respective source folder, and selecting "copy" or "move" to the
> destination folder.  I couldn't find a way to drag/drop a folder of group
> of folders.  Care to share your secret?

I don't know when you tried it, but with the version I used at the time 
(2.0.0.17? .18?), it was possible to copy one folder at a time from one 
account to another, by drag & drop. 99% of the folders were inside one top 
level folder, which I attempted to drag & drop, and which Thunderbird than 
began to upload - only to silently fail after a few sub-folders.

Patrick.

-- 
Key ID: 0x86E346D4http://patrick-nagel.net/key.asc
Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4


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


Re: [Dovecot] importing outlook express messages to dovecot imap server

2010-06-24 Thread Patrick Nagel
Hi,

On 2010-06-25 03:51 UTC Stan Hoeppner wrote:
> Angelo Chen put forth on 6/24/2010 10:25 PM:
> > I think that's one option, but it's around 10G data for the last few
> > years, and more than 100 folders under outlook express, do you think
> > that will be fast enough by using Outlook Express copying option to an
> > imap account?
> 
> Look at it this way:  One way or another, in one format or another, you
> will have to copy the data over the network from the PC to the Dovecot
> server.  If you use the method myself and others have recommended, once
> the data is copied to the IMAP folders, you are done.
> 
> Now, if you do it the other way, which is copying raw files over, you then
> have to convert them to maildir format.  It's a multi-step process.  And
> could be error prone.
> 
> The first method is a single step process and is reliable.

I tried something similar (with Thunderbird) once, and it caused a lot of 
trouble. We only had around 1.3 GB, IIRC, but thousands of folders. Here is a 
blog article that I wrote after I got it done with a perl script:

https://patrick-nagel.net/blog/archives/77

Patrick.

-- 
Key ID: 0x86E346D4http://patrick-nagel.net/key.asc
Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4


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


Re: [Dovecot] Sieve problem. Timo, is this mbox file size limitation hard coded? If so, why?

2010-05-11 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On 2010-05-12 11:31, Stan Hoeppner wrote:
>> From http://wiki.dovecot.org/LDA:
>>
>> "Note that Postfix's mailbox_size_limit setting applies to all files
>> that are written to. So if you have a limit of 50 MB, deliver can't
>> write to log files larger than 50 MB and you'll start getting temporary
>> failures."
> 
> No wonder I didn't find it.  It's buried in the "logging" section of the
> main LDA page instead of the Postfix section, where one would assume to find
> _Postfix specific_ LDA information.
> 
> Timo, any chance we could get this text moved into an appropriate place on
> the Postfix LDA page where it belongs?  I'm sure it would be very helpful to
> future Postfix/LDA/mbox users.  And also add the error message they'll see
> in the logs when they run into this problem, something like:
> 
> Jan 1 00:00:00 hostname dovecot: deliver(user): write() failed with mbox
> file /home/user/mail/foo: File too large

It's a Wiki, why don't you just change it? :)

Patrick.

- -- 
Key ID: 0x86E346D4http://patrick-nagel.net/key.asc
Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkvqJE0ACgkQyYHmhobjRtRKAQCfbO1/sHTsuO6yfbLz1XDRQZ7y
crIAoM7qH+ItVgFAUicDCkRYeVxmTYGT
=QbSU
-END PGP SIGNATURE-


Re: [Dovecot] best choice of user database file to work with postfix?

2010-04-21 Thread Patrick Nagel
I think /etc/passwd is as close as it gets to your requirements... why not just 
add the users as system users, and set their shell to /bin/false?

Patrick

"Phil Howard"  wrote:

>I'm setting up a Postfix and Dovecot combination.  What I want to do is have
>a user database that (1) is not running from some engine (so not LDAP or SQL
>or such) ... and (2) is completely disassociated from system users (e.g.
>most email users are not in /etc/passwd and most /etc/passwd users are not
>email users).  Ideal would be a one-file solution, which can be managed by
>text editing or simple command line tools.  But what I want is ONE file that
>both Postfix (for valid recipients) and Dovecot (for user login
>authentication) can use together.  An alternative is some way to get Postfix
>to go through Dovecot to query for users (at the time of mail arriving on
>SMTP so it doesn't queue anything that would later be rejected).  This is a
>smallish setup on one server, with probably a max of 50 to 100 users and 50
>or so role account mailboxes over the next year or two.  Any
>recommendations?

--
Sent from my Android phone with K-9. Please excuse my brevity.

Re: [Dovecot] IMAP IDLE, Virtual mailboxes

2010-04-13 Thread Patrick Nagel
Hi Timo,

great hearing from you again, hope the exams went well :)

On 2010-04-13 19:01 UTC Timo Sirainen wrote:
> On 9.4.2010, at 9.31, Patrick Nagel wrote:
> > 2) Enhancing dovecot's Virtual plugin, so virtual mailboxes do not
> > only get updated on select and expunge, but also when anything
> > changes that affects the set of messages shown in the virtual
> > mailbox. I guess that would have an impact on performance, and
> > thus should be optional.
> 
> Virtual plugin does already work like that. Although there's a bug
> where messages don't get removed from mailbox always:
> 
>  - virtual: removed messages don't get expunged unless EXPUNGE is
> issued in same session. otherwise they get forgotten and never
> removed.

Oh, I see. I'll give it another try then, I believe I tried this, but 
never got notified of new mails in the virtual mailbox through the IMAP 
IDLE connection.

> And NOTIFY isn't implemented yet mainly because it would be
> annoyingly expensive (as is virtual mailbox when it's created from
> many real mailboxes). I've been planning on implementing mailbox
> list indexes (or they already are implemented, but they're buggy)
> that would make this much cheaper. Basically NOTIFY could just keep
> watching for changes to dovecot.list.index.log file, and then read
> what mailbox had changed and how and notify client about it,
> possibly without even opening the mailbox itself.

That sounds like a good plan - basically having "logwatch" on all IMAP 
operations :) I'd be happy to test once you have anything to be tested 
(just need to find a MUA other than telnet+brain that has IMAP NOTIFY 
implemented first ;) ).

Patrick.

-- 
Key ID: 0x86E346D4http://patrick-nagel.net/key.asc
Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4


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


Re: [Dovecot] IMAP IDLE, Virtual mailboxes

2010-04-11 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Nikolay,

(I changed my dovecot mailing list subscription from my work mail
account to my private mail account - I'm the guy who started this thread)

On 2010-04-10 15:22, Nikolay Shopik wrote:
> On 10.04.2010 11:13, Patrick Nagel wrote:
>> "The client can also request notifications on other mailboxes by name
>>   or by a limited mailbox pattern match.  Message-related notifications
>>   returned for the currently selected mailbox will be those specified
>>   by the SELECTED/SELECTED-DELAYED mailbox specifier, even if the
>>   selected mailbox also appears by name (or matches a pattern) in the
>>   command."
>>
> I assume this only apply if all these mailboxes are on same server.

That's for sure - "mailbox" in IMAP always refers to the thing that most
people call "folder".

But I think it's unlikely that you need push mail for more than a couple
of IMAP accounts on different servers. And in any case, there would be
no way to accomplish this, with any protocol, without having a
connection to all the IMAP servers.

Patrick.

- -- 
Key ID: 0x86E346D4http://patrick-nagel.net/key.asc
Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkvCtKgACgkQyYHmhobjRtT5cACgmHmfYBd995OIkIBiAdfuM77t
GtEAoLZBx0bxj356+Zau5PWDQs0yQol6
=J4B+
-END PGP SIGNATURE-


Re: [Dovecot] IMAP IDLE, Virtual mailboxes

2010-04-10 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Nikolay,

On Fri, 09 Apr 2010 21:12:54 +0400, Nikolay Shopik wrote:
> On 09.04.2010 11:19, Patrick Nagel wrote:
>> That's great news, thanks for the pointer!:)
>>
>> Inhttp://dovecot.org/list/dovecot/2009-August/041950.html  Timo says
>> that IMAP NOTIFY is not yet supported by Dovecot - has this changed? If
>> not, is there a plan to implement IMAP NOTIFY?
>
> Keep in mind it still need at least one connection per mailbox if I
> correctly understood RFC.

I don't think so - in chapter 1 (Overview and Rationale) it states
"Also, IDLE only applies to the selected mailbox, thus requiring an
 additional TCP connection per mailbox"

... and later, in chapter 3.1:

"The client can also request notifications on other mailboxes by name
 or by a limited mailbox pattern match.  Message-related notifications
 returned for the currently selected mailbox will be those specified
 by the SELECTED/SELECTED-DELAYED mailbox specifier, even if the
 selected mailbox also appears by name (or matches a pattern) in the
 command."

I cannot find any indication that multiple IMAP connections are required.

> Also I don't know any client supporting IMAP
> NOTIFY yet.

Well, this is probably a chicken/egg problem ;) One of the core
developers of K-9 Mail says:
"I've been interested in implementing IMAP NOTIFY in K-9 Mail, but will
 only do it once dovecot supports it."
(http://code.google.com/p/k9mail/issues/detail?id=1255#c8)

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkvAJRQACgkQ7yMg/OiDoAUxdQCeIznGYFcEzbTQSU4OaifC8HG0
AH8AoK8VDkSrRhI7CZvUpaarxhDhiVWq
=4ABw
-END PGP SIGNATURE-


Re: [Dovecot] IMAP IDLE, Virtual mailboxes

2010-04-09 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Nikolay,

On 2010-04-09 14:51, Nikolay Shopik wrote:
> On 09.04.2010 10:31, Patrick Nagel wrote:
>> 1) A new extension of the IMAP protocol: IMAP MULTI-IDLE, which
>> somehow allows a client to get notified of changes to more than one
>> mailbox within one IMAP connection. This conflicts with the basic
>> IMAP design though, AFAIK, and is thus not likely to be feasible.
> 
> That's RFC5465 IMAP NOTIFY Extension you are talking about and
> already standards track.

That's great news, thanks for the pointer! :)

In http://dovecot.org/list/dovecot/2009-August/041950.html Timo says
that IMAP NOTIFY is not yet supported by Dovecot - has this changed? If
not, is there a plan to implement IMAP NOTIFY?

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAku+1QMACgkQ7yMg/OiDoAWK8wCfWsRiO0K+F+3F53fkxnPfLy9t
xSMAnj1JxIYkwm/7teLE+28KkHmyA9ok
=Jxdn
-END PGP SIGNATURE-


[Dovecot] IMAP IDLE, Virtual mailboxes

2010-04-08 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

K-9 Mail (on Android) has been mentioned on this list multiple times
recently, I think it's definitely an IMAP client "on the rise". :) It
supports IMAP IDLE, and so brings "push mail" to Android mobile phone
users. To bring this into the context of this mailing list: I guess a
lot of people on this list are making use of server-side filtering
(using sieve), so that mails from certain persons or mailing lists end
up in the right mailboxes, right on delivery. Now, this is all great,
but there are issues when server-side filtering and IMAP IDLE come
together: Only one mailbox can be "watched" with one IMAP IDLE
connection. So, people who have set up elaborate server-side filtering
with say, 50 different sieve "fileinto" calls, will constantly have a
*lot* of IMAP IDLE connections open, if they really want to get informed
of any mail arriving in any of their mailboxes.

Keeping those 50 IMAP connections open wouldn't cost much bandwidth, and
who cares about the Internet router's connection tables getting
unnecessarily big, anyway? But then there is the "problem" of a mobile
phone being carried around constantly, switching physical connections
(from WLAN access point 1 to WLAN access point 2 to 3G to 2G to no
connection at all and back), every time needing to terminate* those 50
IMAP connections, and then establish 50 new ones (with SSL handshake
overhead and all). So, all in all, not an optimal solution.

*) (which does not always happen the way it should, see
http://code.google.com/p/k9mail/issues/detail?id=1255)

I see two ways to improve the situation (one of them quite dovecot-centric):
1) A new extension of the IMAP protocol: IMAP MULTI-IDLE, which somehow
allows a client to get notified of changes to more than one mailbox
within one IMAP connection. This conflicts with the basic IMAP design
though, AFAIK, and is thus not likely to be feasible.
2) Enhancing dovecot's Virtual plugin, so virtual mailboxes do not only
get updated on select and expunge, but also when anything changes that
affects the set of messages shown in the virtual mailbox. I guess that
would have an impact on performance, and thus should be optional.

Let me explain the second one: With the help of the Virtual plugin, it
is possible to pull all those 50 mailboxes that receive incoming mail
together again, just like the INBOX of the pre-server-side-filtering
times - the user could configure a virtual mailbox to show all unread
mails from those 50 mailboxes. Now the mobile IMAP IDLE users could just
watch that one virtual mailbox, needing only one IMAP IDLE connection.
After having read the mail (directly in the virtual mailbox), it would
disappear, but of course still be in the "real" mailbox, determined by
the sieve filter on delivery.

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAku+ydsACgkQ7yMg/OiDoAXV9ACdF+BEstnjfUeJlR/JQKFf6N7n
yxYAnAnuD2popWYLfZNCCtlpkAP4SQww
=L33A
-END PGP SIGNATURE-


Re: [Dovecot] Extra Imap processes

2010-03-14 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Dominique,

On 2010-03-15 12:43, Dominique St-Amand wrote:
> Hello fellow dovecot users!
> 
> I have a question for you guys. I have a server running dovecot/exim and I
> allow both pop/pops and imap/imaps. When I look at the running processes, I
> see a lot of imap processes that look like the following: imap
> [u...@domain.tld USER_IP]
> 
> Sometimes, there are duplicates imap [u...@domain.tld USER_IP] processes.
> 
> 
> I was wondering, how come those processes don't quit and stick around in the
> system? Should they quit after the user issued the disconnect command from
> its mail client?
> 
> Also, is there any way to actually make them to quit or should I make a
> shell script that runs at a certain period of time and actually kill those
> processes?

Just a guess: those processes could be the result IMAP clients making
use of the IMAP IDLE extension ("push mail").

Thunderbird, by default, opens up to five connections to the IMAP server
and keeps them open - thus you see five IMAP processes for each user.

Why would you want to kill those processes - do they cause any problems?

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkudx2EACgkQ7yMg/OiDoAXvNQCfdeHk8Ju9YRixllaWFYvpdt7j
/WkAnivxVRfuYxtXW9j5YTpZl3u6iG8k
=GZ4H
-END PGP SIGNATURE-


[Dovecot] OT: The big picture (was: Re: Saving Sent Messages to Sent Folder)

2010-03-07 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Ed,

On 2010-03-05 19:18, Ed W wrote:
> Go on... Why's that..?
> 
> Weight of history defines that we do things in certain ways and we
> sometimes get stuck in a bit of a rut, but if M$ has shown us one thing
> it's that we should (cautiously) look at how disparate systems can be
> integrated into a cohesive whole (granted they also showed how you can
> make an insecure system also, but I think that's an optional problem).
> 
> Not a dig at Dovecot, but: many software projects overlook the
> opportunity to integrate with other systems and become larger than the
> individual pieces.  An example in point would be that I'm sitting here
> battling with SNMP + Cacti + Nagios trying to get them all to talk to
> each other... There has to be a reason Groundworks charges so much for
> selling you a package where this is already done...
> 
> Spinning off at a tangent, but I fell in love with (the concept of)
> Lotus Notes some 18 years ago.  The way I saw it was a massive
> distributed multi-master data store + some presentation layers which
> could make any database look like whatever you wanted it to look like. 
> I used it for:
> - Email inbox
> - Calendar
> - Project documentation, discussion and design
> - Staff holiday tracking
> - Recruitment workflow (track all candidate details, results of
> interviews, contact correspondence, etc)
> - Loads of inhouse custom one off projects
> 
> I also used it as an SQL database (with a bit of magic) and built an
> application used to handle billions of £s of financing for a UK bank. 
> The IRA blew up one of the banks offices (which kind of stopped the
> server working so well), all the staff simply changed their Notes tel
> number to that of a different office and just carried on as though
> nothing had happened...  No data lost, work carried on
> 
> I had naively assumed that IMAP servers would head down the same road...
> To my eye it's all just unstructured data and I really don't see what's
> so special about a CalDev server or an SMTP server which makes it
> anything other than a plugin to "an unstructured data store".
> 
> If anyone starts to buy that idea then lift your vision and imagine that
> we start to see all these just distributed databases, specialist
> interfaces to query them efficiently and a bunch of protocols to
> distribute documents between the databases - personally I would then
> vote we start to shift to some kind of jabber style protocol to connect
> all these datastores together.  Once you head down that road you can
> imagine perhaps an MMS style storage model where the sender hosts all
> the mail storage and just sends a short "SMS" note to the recipient to
> let them know an email is waiting for them. (possibly even has some
> small positive anti-spam benefit...)

... kind of reminds me of Wave. I see a huge potential in Wave, once
they get the federation part and some other details right. :)

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkuUXWAACgkQ7yMg/OiDoAWTiwCfd1ew65Ts//JWcwku1neRzky7
5tkAoI4hxcOmebn/FtQ5U67HRKOb1Oya
=pqHA
-END PGP SIGNATURE-


Re: [Dovecot] Mailing list's prefix

2010-03-07 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Karsten / Guenther,

On 2010-03-06 01:18, Karsten Bräckelmann wrote:
> On Fri, 2010-03-05 at 14:01 +0800, Patrick Nagel wrote:
>> On 2010-03-05 07:49, Karsten Bräckelmann wrote:
> 
>>> I don't recall any, other than plain refusal to use a dedicated folder,
>>> rather than dumping it all into the Inbox...
>>
>> IMO, Michael M. Slusarz had a valid reason:
> 
> Frankly, I disagree. I do receive legit private messages, forked off of
> an on-list thread. From various mailing-lists. I would not want them to
> be filtered into a dedicated list folder. For that reason, Subject based
> filtering is wrong, and the proper mailing-list headers do a perfect job
> here.
> 
>> "[...] a common situation (at least for me) is someone who replies
>> directly to your message from a list instead of to the list address.
>> This will most likely cause that message to end up in your INBOX rather
>> than being filtered into the appropriate mailing list mailbox.  Having
> 
> It is an off-list reply. It doesn't belong in the list folder.

I think you misunderstood Michael: he doesn't see a problem in those
messages ending up in the Inbox. He (just as myself) likes to see them
stick out *visually* from other stuff in the Inbox, as being
[$list]-related, so that he won't delete them because he doesn't know
the sender.

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkuUWdUACgkQ7yMg/OiDoAWbdgCcCP8f2cawUrz9L5mTQDzADZ52
9sYAoJdE09Ee+K0uvm2PpsEMDO7yBLx3
=rJF8
-END PGP SIGNATURE-


Re: [Dovecot] Mailing list's prefix

2010-03-04 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2010-03-05 07:49, Karsten Bräckelmann wrote:
> On Fri, 2010-03-05 at 00:45 +0200, Timo Sirainen wrote:
>> On 4.3.2010, at 22.59, Timo Sirainen wrote:
>>
>>> Do you think I'd break a lot of people's filters if I removed the
>>> prefix? :) Anyone strongly for/against removing it? It seems kind of
>>> annoying to me whenever I happen to think about it.
>>
>> Well, it's beginning to sound like there are non-filtering reasons why
>> the prefix can be good. So I guess it's better to keep things the way
>> they are now :)
> 
> I don't recall any, other than plain refusal to use a dedicated folder,
> rather than dumping it all into the Inbox...

IMO, Michael M. Slusarz had a valid reason:

"[...] a common situation (at least for me) is someone who replies
directly to your message from a list instead of to the list address.
This will most likely cause that message to end up in your INBOX rather
than being filtered into the appropriate mailing list mailbox.  Having
the list name in the Subject can be useful to visually filter these
incoming messages in your INBOX, rather than potentially
deleting/marking as spam since often times you may not recognize the
sender."

I'm ok with both ways, but given that there is a considerable amount of
opposition, I think Timo's decision to keep it as it is will work best.

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkuQnlIACgkQ7yMg/OiDoAXXZwCffZWVAYq4sYp8LIaCsaOtL/Bc
/n8AniFyZx68KfWAgrdUGGST/97UGsW3
=pG8R
-END PGP SIGNATURE-


Re: [Dovecot] OT: best linux imap client for dovecot

2010-02-22 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Lev,

On 2010-02-22 16:04, Lev Serebryakov wrote:
>> This is not a my-email-client-is-better-than-your-email-client thread,
>> I just want to know which client(s) make proper use of imap features
>> for fast searches/copies/deletions etc.
>  IMHO, all existing clients suck, but not only due to IMAP4 [mis]using, but
> because  UI  is  terrible.

I like KMail's UI a lot, but its IMAP support is terrible. Hoping that
will change with KMail 2.

> For  example, I don't lnow any client with
> proper,  accurate  text-only  quoting  (with '> ' marks). Some clients
> forget  to  spilt  long  lines, some don't add '> ' when I split quote
> line  by  hands,  some  don't  remove '> ' automagically when lines in
> quote  are  merged  (by  deleting  CR/NL on previous line), and things
> become  even  mnore  horrible  whrn  here are many quotes of different
> level. I'm not mention clients, which have top-quoting-only setting or
> doesn't  have  templates for  editor  (no, a signature file IS NOT A
> TEMPLATE!)

I don't know so much about quoting, I think TB gets it right, doesn't
it? Also, on non-line-broken mails, you can press CTRL-R (Rewrap) and
the mail gets proper line breaks. KMail admittedly has some weirdnesses
there, at least in recent versions.

> Threading,  working  with  mailing  lists  (with  all these List-XXX
> headers  which  are  standard  now), using diffferent "From" names and
> e-mails   for  different  folders  (and,  yes,  different  templates),
> differnet templates for different replies, good filters (Thunderbird's
> filters  creation  UI is bad, IMHO), flexible but esy-to-setup-default
> purging  rules,  etc,  etc,  etc  -- all these features are missing or
> implemented  horribly wrong in most clients (I don't claim, that every
> client has every feature from this list implemented wrong, but most of
> clients has 1/2 or more of this list absent or unusable).

I think KMail gets all of them right, although I don't use the filter
UI, since I filter with sieve rules on the server.

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkuCQsEACgkQ7yMg/OiDoAUU3wCgimLYBXZnf/zOcfY/YNXUnqbo
gDgAn39AML0SA4vKQ+5UUUQkfeCFrnOW
=5jtD
-END PGP SIGNATURE-


Re: [Dovecot] OT: best linux imap client for dovecot

2010-02-21 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On 2010-02-18 23:50, Timo Sirainen wrote:
> On Thu, 2010-02-18 at 17:45 +0200, Axel Thimm wrote:
>> Which modern email client under Linux is working best with dovecot? I
>> just did a grep on User-Agent:/X-Mailer: on my dovecot archive (which
>> goes back to 2004) and found that the top ten are:
>>
>> 28% Thunderbird
>> 25% Evolution
>>  9% Apple Mail
> 
> I wouldn't be surprised if >90% of Evolution and Apple mail mails came
> from me. :)
> 
>> This is not a my-email-client-is-better-than-your-email-client thread,
>> I just want to know which client(s) make proper use of imap features
>> for fast searches/copies/deletions etc.
> 
> I think they all suck. If I ever have too much time on my hands, I might
> try to continue http://trojita.flaska.net/. Its design looks good, but
> unfortunately it's nowhere near being actually usable and its
> development seems dead.

That would be a great thing to do :) You could have total control over
the IMAP world by getting out a *good* IMAP client ;) And since it's Qt,
a lot of users (X11, OS X, Windows, soon Nokia smartphones?) could profit.

On the other hand, maybe all efforts should concentrate on Akonadi [1],
which will do IMAP for KDE in the (near?) future... says a KDE user :)

Patrick.

[1] http://pim.kde.org/akonadi/

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

PGP key E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkuCLIIACgkQ7yMg/OiDoAUFBACeJ6IbFvKCIxwqX3/Jq9J4V+U2
fIAAoJRi9QuYxHwjOy0XmYcnqf5SO5fh
=8HCp
-END PGP SIGNATURE-


Re: [Dovecot] v2.0 IMAP Capabilities announcement

2010-02-21 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On 2010-02-22 03:33, Timo Sirainen wrote:
> On 21.2.2010, at 21.16, Thomas Leuxner wrote:
> 
>> I have an Android Mail App which worked fine with IDLE pushes
>> before (K-9 Mail) under 1.2.10. With 2.0 beta 3 it seems to be
>> looking for an IDLE prompt from the server, otherwise it will
>> disable connection idling (whether this is valid or not).
>> 
>> Setting 'imap_capability = IMAP4rev1 LITERAL+ SASL-IR
>> LOGIN-REFERRALS ID IDLE ENABLE' does the trick, but is it possible
>> to add additional values to the default reply like this?
> 
> Hmm. That's too bad. I was hoping to avoid sending any unnecessary
> capabilities before login. Perhaps IDLE could be added there as an
> exception.
> 
> Although .. Looks like that's an open source client. Perhaps you
> could report this as a bug and get them to fix it? Dovecot pushes the
> updated capabilities after login, the client should pick them up.

I just wanted to create a bug report about this, and found it had been
taken care of already - posting the link here for reference:

http://code.google.com/p/k9mail/issues/detail?id=1252

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkuCHWMACgkQ7yMg/OiDoAWBjQCgg/CFWLcW5MMtXMyjWT9eLCWw
LMsAoK0yi90NlPhucoGXylby8jE81xFP
=M8vU
-END PGP SIGNATURE-


Re: [Dovecot] Sorting in IMAP list command?

2010-01-04 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Ronald,

On 2010-01-05 09:19, Ronald Johnson wrote:
> Hi All,
> 
> I'm running Dovecot 1.2.9 and have noticed the IMAP list command does
> not appear to send a sorted list of folders with list command.  For
> example on our Cyrus server I get a sorted list of folders (with INBOX
> listed first):
> 
> 2 list "" "*"
> * LIST (\Noinferiors) "/" "INBOX"
> * LIST (\HasNoChildren) "/" "CalProject"
> * LIST (\HasNoChildren) "/" "Deleted Messages"
> * LIST (\HasNoChildren) "/" "Drafts"
> ...
> 
> while on our Dovecot server I get seemingly random listing:
[...]

RFC 3501 section 6.3.8. doesn't say anything about sorting, and it says
"The LIST command SHOULD return its data quickly, without undue delay."
- - so I guess it's up to the client to do the sorting?

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAktCpfoACgkQ7yMg/OiDoAWKZwCgjoT6KTmjoDvTUigJALcwh86R
lJYAoICh7xbj83FLj2XqterdncJZadzm
=DkEZ
-END PGP SIGNATURE-


Re: [Dovecot] Spam filtering

2009-12-14 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Dmitri,

On 2009-12-15 04:54, Dmitri V. Ivanov wrote:
> On Mon, Dec 14, 2009 at 09:30:54PM +0100, Marcus Rueckert wrote:
>>> Is there a way do something like that with deliver?
>> 
>> why not do it on MTA level? those already have the hooks for it 
>> normally. no need to reinvent the wheel imho.
>> 
> 
> Sometimes it's virtual users using dovecot userdb or something like.
> MTA isn't aware of it (all it uses for virtual user is mailbox
> presence). But each virtual user have own wordlist for bogofilter.
> deliver would set some environment variables like $HOME to desirable
> values for such virtual user and then we have good place to call
> filter pointing it to virtual user home directory.

Indeed, that would be more straight-forward than what's currently needed
(from an administrator's point of view, at least).

We have postfix configured to pipe to-be-delivered mails into a shell
script that takes ${recipient} (the recipient's e-mail address) as first
argument (here is the relevant part from master.cf):

spamcheck   unix-   n   n   -   -   pipe
flags=DRhu user=maildeliver:maildeliver
argv=/usr/local/libexec/spamcheck_and_deliver ${recipient}

The script then pipes the mail through `/usr/bin/spamc -u 'left part of
e-mail address'` (which lets spamassassin's spamd do the checking and
insertion of headers, and thanks to the -u parameter for each user a
separate bayes_journal, bayes_seen and bayes_toks file is being used).

That output then gets finally piped into `deliver -d 'e-mail address'`,
which files the mails into the inbox/spam/unsure mailbox, according to a
global sieve script that checks the headers previously inserted by spamd.

My private bogofilter setup is simpler, since it's just for me, but you
could do it similarly, by specifying the user's bogofilter wordlist
directory (-d ...) in the shell script (I think).

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAksnKqUACgkQ7yMg/OiDoAXP3QCfekl4XpYu3Za2Zxt/JVbgVOMl
ZcQAn0jtmQLBqhltpuJl+jcktPx+bO6O
=ejbL
-END PGP SIGNATURE-


Re: [Dovecot] Spam filtering

2009-12-10 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2009-12-11 13:14, Timo Sirainen wrote:
> On Dec 10, 2009, at 11:51 PM, Patrick Nagel wrote:
> 
>> Of course initial training is necessary. For ongoing training /
>> feedback I have set up a Spam/Learn-Spam and Spam/Learn-Ham mailbox
>> into which I move false negatives/positives.
> 
> Then again there are people like me who get mostly english mails, and
> a couple of legitimate finnish ones per month. And all of those
> finnish ones get 99% bayesian spamness from SpamAssassin so I can't
> rely on just that.. But anyway, SA works pretty nicely. Just today I
> looked through several months of my Spam mailbox and there was just
> one false positive (someone wanted urgent Dovecot support a month
> ago, seemed like a bad idea to reply to it).

I think if you trained a couple hundred (non-Spam) Finnish mails as ham,
the Bayesian filter would work fine for you. But yes, having that kind
of imbalance between two (or more) "classes" of mails certainly makes
Bayesian filtering less reliable.

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAksh39UACgkQ7yMg/OiDoAVSAwCgn01AXOzflATD3JMOW3lkh5H0
nskAn1In2byYL430qM9oHP7Cgyz0yj9g
=yB61
-END PGP SIGNATURE-


[Dovecot] Spam filtering (was: Re: Sieve mails with decoded subject)

2009-12-10 Thread Patrick Nagel
Hi,

On Thu, 10 Dec 2009 20:28:27 +0100, Johannes Bauer wrote:
> Eduardo M KALINOWSKI schrieb:
>> On Qui, 10 Dez 2009, Johannes Bauer wrote:
>>> I'm thinking about filtering all such encoded subjects (as there's no
>>> reason to encode them US-ASCII), but suppose it were UTF-8 or
something:
>>> how can I filter on the actual content, not the encoded subject?
Surely
>>> someone has solved that problem already?
>> 
>> Yes, such as the guys behind SpamAssassin, or dspam, or any of the many
>> spam filtering programs that exist. Actually, they make much more
>> complicated decisions instead of only looking for bad words in the
>> subject field. I'd suggest you try installing one of them.
> 
> I had SpamAssassin running once and was pretty disappointed. All those
> complicated rules and scoring and "smart" bayesian filtering did not
> work very well, although I taught it in around 50k mails right from
> wrong. I had both lots of false-positives and lots of false-negatives,
> which was kind of annoying.
> 
> However, analyzing 274 spam mails I deleted in the last 5 months I can
> conclude that by using that extremely simple filter list I'd catch 258
> of them (that's 94%). So I'd like to stick to KISS in this case.

That must have been a configuration issue - SpamAssassin works pretty
well, if configured correctly - but I admit, it's a monster (both in terms
of configuration and resource usage).

You could go for bogofilter (purely Bayesian). I'm using it for years on
my private mail server with very good results. I like to use the tri-state
filtering, where there is not only one threshold value, but two. A
certainty of a mail being spam ("bogosity") of 0.35 and below goes into my
inbox, mails with a bogosity value between 0.35 and 0.65 go into
Spam/Unsure, and everything above 0.65 goes directly into Spam. That way I
have something like 10-20 mails per week in Spam/Unsure that are usually
false negatives, rarely false positives (currently around 1000 mails per
week end up in Spam). To my knowledge there has never been a false positive
in Spam.

Of course initial training is necessary. For ongoing training / feedback I
have set up a Spam/Learn-Spam and Spam/Learn-Ham mailbox into which I move
false negatives/positives. A cron script then runs the mails found in those
(maildir) mailboxes through bogofilter again, with the command line option
for classifying the mail as Spam/Ham and moves them to the correct mailbox
(Spam/inbox) afterwards. This works well in all MUAs, because it only
requires IMAP functionality to train the filter.

The solution was inspired by a Gentoo Wiki article
(http://www.gentoo-wiki.info/Bogofilter).

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005


Re: [Dovecot] Virtual mailboxes not always up to date?

2009-12-09 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Timo,

On 2009-12-10 07:50, Timo Sirainen wrote:
> Finally fixed: http://hg.dovecot.org/dovecot-1.2/rev/9cccb8617820

Great news, thanks! :)

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

PGP key E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAksgZwQACgkQ7yMg/OiDoAUzcgCgjLpN3VnjPrMMC95XXjM2cnwU
ka4An2fmouXb9BOTr8aLGKPwWg4jWOx7
=22OC
-END PGP SIGNATURE-


Re: [Dovecot] is there a script to find a message from a gi ven username easily?

2009-11-27 Thread Patrick Nagel
Hi Gary,

On Thu, 26 Nov 2009 23:53:53 -0800, Gary Kline wrote:
>   I used primarily mutt and sendmail for many years.  (And elm
>   before mutt.)  All my mail was saved into ~/Mail.  Messages
>   from, say, sm...@foo.ber were stored in ~/Mail/smith; all mail
>   from smith was catenated into one file, and if I wanted to
>   find something that smith had written, I would just cd to
>   ~/Mail and grep or egrep on a likely word or phrase.
> 
>   Is there a script that can reach into my server into My
>   maildirectory and cp or symlink (say) ~/Maildir/smith's files:
> 
>  2 -rw---  1 kline  kline   780 Apr 18  2008
>  1208585354.91013_3.aristotle:2,S
>  2 -rw---  1 kline  kline   731 May 15  2008
>  1210901757.55602_4.aristotle:2,S
>  2 -rw---  1 kline  kline   566 May 18  2008
>  1211140486.77700_3.aristotle:2,S
>  2 -rw---  1 kline  kline   578 May 20  2008
>  1211326880.95596_4.aristotle:2,S
>  2 -rw---  1 kline  kline   578 May 21  2008
>  1211393732.2283_3.aristotle:2,S
>  2 -rw---  1 kline  kline   673 Apr 13  2009
>  1239636788.1457_3.aristotle:2,S
>  6 -rw---  1 kline  kline  4242 Apr 14  2009
>  1239748901.16354_4.aristotle:2,S
> 
>   into somthing named ~/Mail/smith, with all files catted
>   together?  

I don't see the connection to Dovecot here.
It sounds to me as if you could profit from Dovecot's Virtual mailbox
plugin [1] though. Create a 'smith' virtual mailbox with the search
condition you formerly used with grep. You can then access this virtual
mailbox via IMAP like any other mailbox.

Patrick.

[1]: http://wiki.dovecot.org/Plugins/Virtual

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

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


Re: [Dovecot] Vacation message with Sieve

2009-11-24 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Charles,

On 2009-11-24 19:27, Charles Marcus wrote:
> On 11/23/2009, Patrick Nagel (patrick.na...@star-group.net) wrote:
>> Yes, that was my first proposal, but that was also rejected harshly by
>> the other project managers. They wanted to have some "transit time" in
>> which the replacement guy would still access the leaving guy's mailbox.
>>
>> They felt that just deactivating the mailbox and rejecting mails would
>> be "rude".
> 
> I think you're way overcomplicating things...

I wish it was me... ;)

> What I would do is either:
> 
> 1. Add an alias to the x-managers account that forwards all incoming
> mail to his replacement, or
> 
> 2. Add the x-managers account to your replacements email client, so they
> can check it as well as theirs.

2. is what we did.

> In either case you could also enable the vacation message notification
> if you like, but once per day is plenty in this case since someone else
> is (or should be) reading the mail).

Well, as I said, they weren't satisfied with that.

Additionally most mail does not come in during our office hours
(different time zone), so when one of those contacts would have been
mailing away to the guy who left, because he didn't read the (single)
auto reply, it would have gone unnoticed for quite some time. Sure, the
mail could then still be forwarded to the replacement...

In any case, as I explained, it wasn't my preferred solution - but it's
what was asked for. It would be great if sieve 'vacation' allowed to
optionally disable the max. once per day auto reply thing.

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAksL3ToACgkQ7yMg/OiDoAXjigCZAbBq+kHQzlpN+qGdLFs/v95B
yo8AniPNM8HN+SF8FwNW6ZpS54xn+J4p
=FT4d
-END PGP SIGNATURE-


Re: [Dovecot] Vacation message with Sieve

2009-11-23 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On 2009-11-24 11:58, Timo Sirainen wrote:
> On Nov 23, 2009, at 10:54 PM, Patrick Nagel wrote:
> 
>>> Shouldn't that be more like:
>>> 
>>> reject "this guy is gone"; keep;
>> 
>> Yes, that was my first proposal, but that was also rejected harshly
>> by the other project managers. They wanted to have some "transit
>> time" in which the replacement guy would still access the leaving
>> guy's mailbox.
>> 
>> They felt that just deactivating the mailbox and rejecting mails
>> would be "rude".
> 
> Ah, but that's why I had the "keep" there! The reject message of
> course could have been nicer and said how the guy is gone but this
> address will be read for a bit longer but anyway stop sending mail
> here.

Oh... yeah. I never got past the "reject", I guess ;) That would
probably be a good solution. Does 'reject' also refrain from sending
mails to mailing lists, auto-generated messages, etc., like 'vacation' does?

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAksLXMQACgkQ7yMg/OiDoAWaZgCguKuzYmEzUBhxMC1C2XzB/WLy
gJEAniwNr1m195qxpsIkxl2jNN5HLMsO
=nS3d
-END PGP SIGNATURE-


Re: [Dovecot] Vacation message with Sieve

2009-11-23 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Timo,

On 2009-11-24 11:50, Timo Sirainen wrote:
> On Nov 23, 2009, at 10:44 PM, Patrick Nagel wrote:
> 
>> Someone will probably ask why an auto reply to the same person more than
>> once a day might be necessary. This is why I needed it:
>> A project manager was leaving the company, and the contacts writing him
>> had to be informed that they should write to another address, and that
>> the address they sent their mail to would soon cease to exist. When I
>> set 'days' to 1, there was an outcry by other project managers that the
>> contacts would probably not read the auto reply on the first time, or
>> forget about it immediately, and then send more mails during the day. I
>> had a lengthy discussion involving me questioning those contacts'
>> intellect, but in the end I had to give in to a strong opposition
>> against "only one auto reply per day".
> 
> Shouldn't that be more like:
> 
> reject "this guy is gone";
> keep;

Yes, that was my first proposal, but that was also rejected harshly by
the other project managers. They wanted to have some "transit time" in
which the replacement guy would still access the leaving guy's mailbox.

They felt that just deactivating the mailbox and rejecting mails would
be "rude".

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAksLWPYACgkQ7yMg/OiDoAXkfwCgrmgKFZRgrTp3lyeWWNjGQDHU
GSkAnitaSPEnupTXG2Oyckz7F2d2EjpJ
=smsY
-END PGP SIGNATURE-


Re: [Dovecot] Vacation message with Sieve

2009-11-23 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On 2009-11-24 00:38, Frank Cusack wrote:
> On November 23, 2009 1:19:00 PM +0100 Rene Bakkum
>  wrote:
>>Is there an option to for example
>> auto-reply on every mail that is sendto @domain.com?
>
> The part of this question that was overlooked is "on every mail".
> It would be nice if '0' days meant respond to every message.
>
> Alternatively, can I create an empty address database file that is
> non-writable (or maybe a link to /dev/zero)?

Yes, I'd also be interested in that. I tried a few things when I needed
to set up an auto reply that responds more than once a day, but couldn't
get it to work. I didn't know any other way than having an 'rm
/home/user/.dovecot.lda-dupes' as a cron job run every minute (if there
had come two mails within one minute it wouldn't have been a problem if
only the first had been answered).

Someone will probably ask why an auto reply to the same person more than
once a day might be necessary. This is why I needed it:
A project manager was leaving the company, and the contacts writing him
had to be informed that they should write to another address, and that
the address they sent their mail to would soon cease to exist. When I
set 'days' to 1, there was an outcry by other project managers that the
contacts would probably not read the auto reply on the first time, or
forget about it immediately, and then send more mails during the day. I
had a lengthy discussion involving me questioning those contacts'
intellect, but in the end I had to give in to a strong opposition
against "only one auto reply per day".

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 E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:   E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAksLVrMACgkQ7yMg/OiDoAXdAwCglwmrmlUt6QZHmKAy7tqhYbtU
B9MAnjEKatvh3PxNJySzcgTyYgtlb6DE
=5PJG
-END PGP SIGNATURE-


Re: [Dovecot] Virtual mailboxes not always up to date?

2009-11-09 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Timo,

On 2009-11-10 15:30, Timo Sirainen wrote:
> On Nov 10, 2009, at 2:21 AM, Patrick Nagel wrote:
> 
>> So it seems that neither EXPUNGE nor re-SELECT seems to have any
>> "refreshing"
>> effect.
> 
> I'll see tomorrow if I can reproduce it.

Thanks and good night :)

>> Nikita Koshikov told me to "Try to add :INDEX=MEMORY to location
>> setting".
>>
>> After my tests above I tried that, and suddenly everything works as
>> expected.
>> It seems logical to have the index of a virtual folder in memory only,
>> since it
>> is generated dynamically anyway, and is outdated before it's even
>> written to
>> disk (at least without some configurable "virtual search result max age"
>> parameter). So maybe the easiest solution is, to imply ':INDEX=MEMORY'
>> when a
>> namespace location is a virtual folder?
> 
> Well, that also makes the performance somewhat bad. And UIDVALIDITY
> changes every time, so client's local caching won't work. And if client
> uses multiple connections to the same mailbox, it might get confused
> since each connection gets a different UIDVALIDITY.

Ok, I wasn't aware of all those implications.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkr5GYsACgkQ7yMg/OiDoAXQUgCgrzG/aAH1oP/gju4cS4xedxRo
T7YAoLbCN/O3d7YiCmR798mrWBlNw5IF
=zvHa
-END PGP SIGNATURE-


Re: [Dovecot] Virtual mailboxes not always up to date?

2009-11-09 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Timo,

On 2009-11-10 01:56, Timo Sirainen wrote:
> On Mon, 2009-11-09 at 08:03 +0800, Patrick Nagel wrote:
>> This works for the first time after I edit the dovecot-virtual file and
>> then access the virtual mailbox (all mails I expect to be shown in the todo
>> mailbox are there) - but further accesses always show the same content,
>> even though I removed the keyword from one of the mails (and I can confirm
>> that the keyword has actually been removed by dovecot, since the filename
>> doesn't contain the letter corresponding to the keyword anymore).
> 
> What about if you get client to issue EXPUNGE command? New messages
> should show up in mailbox automatically, but existing ones aren't
> removed unless EXPUNGE is given or mailbox is re-selected.

Hmm... I did some more testing. Since the Thunderbird 3.0 beta 4 I'm using
right now seems to choose '$label4' as IMAP keyword for the 'To Do' tag, I
added it to the search command, which is now

  OR (OR KEYWORD $TODO KEYWORD todo) KEYWORD $label4

(Off topic: what a mess, why do they change the keywords all the time? I also
see KMAILTODO, maybe from another version of KMail?)

Anyway, I did the following:
- - Set the '$label4' keyword on two mails in my inbox via Thunderbird
- - Checked the virtual.todo mailbox in Thunderbird - both mails were shown
- - Unset the '$label4' keyword on one of the two mails in my inbox via
  Thunderbird
- - Closed Thunderbird and opened it again (this should definitely re-select the
  virtual.todo inbox, right?)
- - Checked the virtual.todo mailbox in Thunderbird - still both mails were 
shown

And then I had the following talk with my dovecot server:

$ /usr/sbin/dovecot --exec-mail imap
* PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT
THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE
UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES
WITHIN CONTEXT=SEARCH] Logged in as patrick
1 select virtual.todo
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $TODO KMAILFORWARDED
KMAILTODO KMAILWATCHED KMAILIGNORED $FORWARDED $WATCHED $IGNORED $label4)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $TODO
KMAILFORWARDED KMAILTODO KMAILWATCHED KMAILIGNORED $FORWARDED $WATCHED $IGNORED
$label4 \*)] Flags permitted.
* 2 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1257723001] UIDs valid
* OK [UIDNEXT 4] Predicted next UID
* OK [HIGHESTMODSEQ 4] Highest
1 OK [READ-WRITE] Select completed.
1 fetch 1:2 flags
* 1 FETCH (FLAGS (\Seen))
* 2 FETCH (FLAGS (\Seen $label4))
1 OK Fetch completed.
1 expunge
1 OK Expunge completed.
1 fetch 1:2 flags
* 1 FETCH (FLAGS (\Seen))
* 2 FETCH (FLAGS (\Seen $label4))
1 OK Fetch completed.
1 select virtual.todo
* OK [CLOSED] Previous mailbox closed.
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $TODO KMAILFORWARDED
KMAILTODO KMAILWATCHED KMAILIGNORED $FORWARDED $WATCHED $IGNORED $label4)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $TODO
KMAILFORWARDED KMAILTODO KMAILWATCHED KMAILIGNORED $FORWARDED $WATCHED $IGNORED
$label4 \*)] Flags permitted.
* 2 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1257723001] UIDs valid
* OK [UIDNEXT 4] Predicted next UID
* OK [HIGHESTMODSEQ 4] Highest
1 OK [READ-WRITE] Select completed.
1 fetch 1:2 flags
* 1 FETCH (FLAGS (\Seen))
* 2 FETCH (FLAGS (\Seen $label4))
1 OK Fetch completed.

So it seems that neither EXPUNGE nor re-SELECT seems to have any "refreshing"
effect.

Nikita Koshikov told me to "Try to add :INDEX=MEMORY to location setting".

After my tests above I tried that, and suddenly everything works as expected.
It seems logical to have the index of a virtual folder in memory only, since it
is generated dynamically anyway, and is outdated before it's even written to
disk (at least without some configurable "virtual search result max age"
parameter). So maybe the easiest solution is, to imply ':INDEX=MEMORY' when a
namespace location is a virtual folder?

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkr5FGQACgkQ7yMg/OiDoAXY/wCgqJEw6yy3YH3//JBGDDBB+6Pj
FCcAnREwazHZAEqqFyc7iGXIQiCz+mnP
=u6rT
-END PGP SIGNATURE-


[Dovecot] Virtual mailboxes not always up to date?

2009-11-08 Thread Patrick Nagel
Hi,

I have been experimenting with the Virtual mailboxes plugin [1] recently.

This is my setup: the following dovecot-virtual file exists in a virtual
mailbox called "todo":

-- dovecot-virtual --
*
-Trash
-Trash/*
-Spam
-Spam/*
  OR KEYWORD $TODO KEYWORD todo
-

so if any mail in any mailbox except Trash+Spam has the keyword "$TODO"
(that's what KMail sets when you mark a message as "action item") or "todo"
(that's what Thunderbird sets when you put the Todo tag on a message), it
should be shown in that 'todo' virtual mailbox.

This works for the first time after I edit the dovecot-virtual file and
then access the virtual mailbox (all mails I expect to be shown in the todo
mailbox are there) - but further accesses always show the same content,
even though I removed the keyword from one of the mails (and I can confirm
that the keyword has actually been removed by dovecot, since the filename
doesn't contain the letter corresponding to the keyword anymore).

It seems that changing the dovecot-virtual file triggers the execution of
the "search program" - but shouldn't simply accessing the virtual mailbox
also trigger it? Or is there a (undocumented?) timeout between search
program executions?

Patrick.

[1]: http://wiki.dovecot.org/Plugins/Virtual

# dovecot -n
# 1.2.6: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.22-vs2.2.0.7-gentoo x86_64 Gentoo Base System release
2.0.1
protocols: imaps managesieve
listen: x.x.x.x
ssl: required
ssl_ca_file: /etc/ssl/dovecot/sub.class1.server.ca.crt
ssl_cert_file: /etc/ssl/dovecot/ssl.crt
ssl_key_file: /etc/ssl/dovecot/ssl.key
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(managesieve): /usr/libexec/dovecot/managesieve-login
mail_max_userip_connections(default): 20
mail_max_userip_connections(imap): 20
mail_max_userip_connections(managesieve): 10
mail_location: maildir:~/.maildir
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(managesieve): /usr/libexec/dovecot/managesieve
mail_process_size: 2048
mail_plugins(default): virtual fts fts_squat
mail_plugins(imap): virtual fts fts_squat
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/lib64/dovecot/imap
mail_plugin_dir(imap): /usr/lib64/dovecot/imap
mail_plugin_dir(managesieve): /usr/lib64/dovecot/managesieve
imap_client_workarounds(default): tb-extra-mailbox-sep
imap_client_workarounds(imap): tb-extra-mailbox-sep
imap_client_workarounds(managesieve):
namespace:
  type: private
  separator: .
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: private
  separator: .
  prefix: virtual.
  location: virtual:~/.maildir/virtual
  list: yes
  subscriptions: yes
lda:
  postmaster_address: postmas...@x
  mail_plugins: sieve virtual
auth default:
  passdb:
driver: pam
args: *
  userdb:
driver: passwd
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: postfix
plugin:
  fts: squat
  fts_squat: partial=4 full=10

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

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


Re: [Dovecot] status & use-case of fts_solr?

2009-10-09 Thread Patrick Nagel
Hi,

On Thu, 8 Oct 2009 21:41:36 -0700, PGNet Dev wrote:
> hi,
> 
> On Thu, Oct 8, 2009 at 7:56 PM, Timo Sirainen  wrote:
>> It's just not possible, because it doesn't support substring searches.
>> But
>> then again, perhaps no one cares. It's not like gmail's search is IMAP
>> compliant either.
>>
>>> if the goal is fast, indexed FTS of dovecot IMAP stores from within a
>>> MUA, is fts_solr even helpful? or is it targeted for web interfaces to
>>> search ... ?
>>
>> You can add the break-imap-search option and it'll be helpful with
those
>> MUAs that use IMAP SEARCH command (Thunderbird I think, but not Apple
>> Mail
>> or Outlook).
> 
> Ok, clear.  So, from a MUA perspective ... *IS* fts_solr
> faster/better/cheaper/whatever than fts_squat?
> 
> It _seems_ that squat is fast, _does_ substring searches, and _is_
> under your control in dovecot. Life seems simpler, but just as
> functional, with "just squat".
> 
> I'm clearly missing or misunderstanding the "solr advantage" ...

Cross-referencing
http://www.dovecot.org/list/dovecot/2009-September/042904.html

So when you have a huge amount of folders (like we do... there are users
with >1 folders), Solr could have a big advantage through the single
index.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005


Re: [Dovecot] windows imap clients

2009-09-21 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2009-09-21 14:21, Timo Sirainen wrote:
> On Sep 21, 2009, at 7:07 AM, Charles Sprickman wrote:
> 
>> -searches across 2GB+ of mail are painfully slow, since it's all
>> server-side
> 
> You could improve this with http://wiki.dovecot.org/Plugins/FTS

... but note that FTS creates one index per mailbox (=folder), so with a huge
amount of folders (which seems to be the case in your setup), it won't help you
much.

Timo, wasn't there a way to get around this limitation via virtual folders?

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkq3KIAACgkQ7yMg/OiDoAVgIACfS0BCmyBwDRdtdwxNpZ7Ii+Ir
MPgAni8quZlnwYlRgBB0sKiJC7x0rJne
=B0Xg
-END PGP SIGNATURE-


Re: [Dovecot] Enabling security on POP3 and IMAP

2009-09-03 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Richard,

On 2009-09-03 16:38, Richard Hobbs wrote:
> Currently, on our new test server, I am offering IMAP on 143 and POP3 on
> 110.
> 
> We would like to enable security on both of these protocols to attempt
> to eliminate the risk from an internal
> password-grabbing/content-grabbing attack.
> 
> I presume this would mean enabling SSL, and a more securure
> authentication, right? Or are plain text passwords just sent over the
> SSL, and therefore perfectly secure?

Yes, plain text passwords are fine with SSL/TLS, since the connection gets
secured before the password is sent.

> Also, what are the steps to enable security for these protocols on an
> already-configured server?
> 
> Is it possible to offer encrypted and non-encrypted services
> simultaneously, so people have a choice of whether they want security or
> not? I know that's a bit weird, but for testing it would be useful.

No problem. Basically you just need to specify the certificate (ssl_cert_file)
and the key (ssl_key_file) in the config, and add 'imaps' and 'pop3s' to
'protocols'.

> Finally, is there a way to monitor which users are connecting over the
> secure ports and which users are connecting over the non-secure ports?

You can see it in the log.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkqfhoIACgkQ7yMg/OiDoAWzuQCfSpkZn7AXpsSbh3dVLPtsYQBr
PL0An22lbqUY/MCGca8Q+RXOhojvfcf9
=wKmX
-END PGP SIGNATURE-


Re: [Dovecot] Attachment extraction, de-duplication

2009-08-14 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On 2009-08-14 17:36, Steffen Kaiser wrote:
>> able to see all attachments of all other mail receivers. So this only 
>> works in a cooperative environment.
> 
> One can extend that scheme a bit.
> 
>> In short, a script (implemented as filter, getting called by postfix) 
>> extracts all attachments on arrival, using ripmime [1]. The attachments
> 
> We use MIMEDefang on the recieving MTA.
> 
> There I remove certain MIME parts and put them on a Webspace, the filename
> (aka URL) is the seeded SHA1 of the content. So it is not easy to guess an
> URL without already knowing the seed and the content or the mail itself.
> 
> However, the reactions to this action is quite wide spread. Some are glad,
> because they can download attachments on demand, others hate this extra
> step. Some user think the mail is altered and the copyright of the sender is
> infringed. In a few cases, I ripped some pictures from a HTML mail, which
> caused uproar. Also, the S/Mime and PGP signing won't work, if transmitted
> in a separate MIME part.

Yes, with the security comes the hassle (as usual) - what I forgot to mention
was, that the script also inserts a file:/// link to the directory that
contains the attachment(s) (for each mail with attachment a new directory is
created on the share). So the users can just click that link and their
filebrowser opens. They can then see all attachments of a mail, and they can
really "work" with them, not just download them (one by one).

The rest sounds familiar ;) I inserted some conditions on which the script
stops processing the message, and just passes it along, as if it didn't have an
attachment - for example when it finds any signs of PGP signing or encryption...

Another thing that I didn't mention: We do the same for sent mails - a cronjob
periodically checks the users' Sent folders for mails that don't already
contain the "has been checked for attachments" header (we use maildir; it only
checks mails of the last 24 hours for obvious performance reasons). If it finds
one, it gets processed by the script - and in any case (attachments or not) it
gets the "has been checked for attachments" header set. Afterwards it gets
passed to deliver, which files it back into the Sent folder.
I wonder if there is a better solution for this... something with inotify would
probably help a lot. And sieve being able to call the script would also help a
lot ;)

The biggest catch for our users seems to be, that they have to re-attach the
file(s) if they want to forward an e-mail. But I think they got used to it, and
maybe it helps in promoting protocols that are actually made for transferring
files ;)

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkqFOC0ACgkQ7yMg/OiDoAXRkgCfctN/cZtAeB6Dglp8LKO1EY0E
XPsAoKdHxBsyk3JprgbELqfH8/QvE8pt
=dWMn
-END PGP SIGNATURE-


[Dovecot] Attachment extraction, de-duplication (was: Re: Scalability plans: Abstract out filesystem and make it someone else's problem)

2009-08-13 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On 2009-08-13 20:46, Charles Marcus wrote:
[...]
> Again - for shops that must deal with large binary attachments, this
> would be a god-send.
> 
> Our max allowed message size is 50MB, and we typically get anywhere from
> 2-10 messages a day containing 20, 30, or even 40MB attachments sent to
> our distribution lists - so these would go to 50+ people, who then
> forward them to others, etc, etc ad nauseum.
> 
> Currently, I have mailman set to hold these, then I go in and strip off
> the attachment, put it in a shared location, then let the message (minus
> the attachment) through. But we still have a *lot* of messages like this
> that don't go through our lists, but are sent to 2, 3, or 10 of our reps
> individually.
[...]

I implemented a solution that works well for us, for a couple of months
already. It has one serious limitation though, which will make it unsuitable
for many environments: All mail receivers who are part of the process will be
able to see all attachments of all other mail receivers. So this only works in
a cooperative environment.

In short, a script (implemented as filter, getting called by postfix) extracts
all attachments on arrival, using ripmime [1]. The attachments are then being
moved to a Samba share which all receivers can access. Furthermore, the
original mail gets altered by altermime [2], which inserts a file:/// link to
the attachment(s) at the bottom of the mail and removes the attachment(s) from
the mail. Finally, during the weekend, a file deduplication script (hardlink.py
- - [3]) on the aforementioned Samba server checksums all files in the
attachments directory and hardlinks identical files. So this way we save the
base64-overhead, duplicate attachments sent to multiple persons. Also file
handling on a Samba share is much easier than having to extract attachments via
the MUA first.

Patrick.

[1]: http://www.pldaniels.com/ripmime/
[2]: http://www.pldaniels.com/altermime/
[3]: http://code.google.com/p/hardlinkpy/

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

PGP key:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkqE8E4ACgkQ7yMg/OiDoAVBPQCff0fk89IiIxL6hmeedbZC3jes
mNQAniJhbNx0hwNxNYdgXKGr7bXu2zRN
=siTe
-END PGP SIGNATURE-


Re: [Dovecot] v2.0 configuration parsing

2009-08-10 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I completely agree with Michael's opinion.

Patrick.

On 2009-08-11 02:22, Michael Orlitzky wrote:
> Timo Sirainen wrote:
>> I'm trying to figure out how exactly v2.0 should be parsing
>> configuration files. The most annoying part is if it should always just
>> "use whatever comes first in config" or try some kind of a "use most
>> specific rule". The "most specific" kind of makes more sense initially,
>> but then you start wondering how to handle e.g.:
[...]
> 
> I think the easiest scheme to keep in my brain would be to evaluate the
> blocks, in order, as if they were branches in code. Fooling around with
> an arbitrary order of evaluation/specificity would be a recipe for
> disaster (see, for example, any CSS engine).
> 
> So, something like,
> 
>   protocol imap {
> remote_ip 192.168.0.0/16 {
>   foo = foo
> }
>   }
> 
> would translate to,
> 
>   if (protocol == imap) {
> if (remote_ip matches 192.168.0.0/16) {
>   foo = foo
> }
>   }
> 
> and then later,
> 
>   remote_ip 192.168.0.0/24 {
> foo = bar
>   }
> 
> would set the value of 'foo' to 'bar', since it would evaluate in a
> similar fashion, and comes later in the config file.
> 
> It's easy to explain, easy to implement, and easy to debug. Ultimately,
> the users are going to have to understand how it works in order to
> configure Dovecot properly. "Put the most general rules first, and then
> override them" is a practice with which most of us are already familiar.


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

PGP key:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkqA5IEACgkQ7yMg/OiDoAWaiQCgk1S6lu6JQTcg5VXzwzJxrjCG
AXcAoLD2xvbfFoMUrSW+3JrC+PA7c8Fz
=jChR
-END PGP SIGNATURE-


Re: [Dovecot] Can Dovecot Proxy GMail?

2009-07-15 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I think the best solution would be, to set up a real mail system on site -
"outsourcing" and having a bad connection just doesn't work.
SMTP is much more suitable for server-to-server delivery than POP and IMAP, in
my experience. It has all the error reporting, automatic retry etc. features
for a reason :)

Patrick.

On 2009-07-15 17:02, Tom Hendrikx wrote:
> Paul Carter-Brown schreef:
>> We are using gmail (google apps) across our company with most users
>> using outlook (windoze) or evolution (linux) and imap/pop based on user
>> preference. We are having issues in that our internet links are fairly
>> slow and when users download mails they get frustrated with the time it
>> takes and often get timeouts and issues where outlook fails to fetch a
>> mail yet gmail thinks it was retrieved - users then complain of
>> "missing" emails.
>>
>> Is there a way that we could use dovecot (or similar?) to act as an imap
>> "proxy" and users connect to dovecot while dovecot connects to gmail?
> 
> When you setup a (realtime) proxy that connects to gmail when the user
> actually connects to dovecot, retrieving mail is still slow.
> 
> You could look into using fetchmail or something like that to pull
> everything from gmail and store it local. That way, when your users
> connect to dovecot, the mail is already on a local machine and access is
> fast. This implies of course that you need to setup fetchmail with the
> users' credentials.

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

PGP key:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkpekPIACgkQ7yMg/OiDoAW9CgCdHPT2jQ6o4i/Mo5Zg/kDoX/4K
VBEAnjbR2D7Sq97FHe6mwcWz/tt1wGaf
=oRKn
-END PGP SIGNATURE-


Re: [Dovecot] Sieve vacation not working

2009-07-07 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Phill,

I know this won't help much, but I can tell you that we have vacation with
cmusieve (CentOS package dovecot-sieve-1.1.6-9.el5) working with dovecot
(1.1.7-0_84.el5) without any problems.

An example how we use it:

- ---
require ["vacation"];
vacation :days 1
 :subject "Auto-reply: Out of office"
 :addresses ["patrick.na...@example.com"]
"I'm out of office until 2009-07-08"
- ---

Good luck!

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkpTF48ACgkQ7yMg/OiDoAWDbACfdXTZ/UteCE/XcoMXPtr//es4
2tgAn3DBoFDmdYiYGcVci7LZnQeujDgA
=h6h+
-END PGP SIGNATURE-


Re: [Dovecot] [bug] dovecot 1.1.15: segfault after message move

2009-05-26 Thread Patrick Nagel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2009-05-26 15:31, Timo Sirainen wrote:
|> - mailx: hangs always
|
| Ubuntu mailx doesn't seem to support IMAP. This is some BSD mailx?

He probably refers to http://packages.ubuntu.com/jaunty/heirloom-mailx

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkobm/IACgkQ7yMg/OiDoAVjNgCfSnVDUOvwwvHOSBp+Kw8fz5A5
JXkAnjTZCk0EhZ76BKR/C+q9PBv2TW+L
=itqW
-END PGP SIGNATURE-


Re: [Dovecot] National symbols imap search

2009-05-19 Thread Patrick Nagel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On 2009-05-19 23:32, Timo Sirainen wrote:
|> How does imap server should handle search requests with non latin
|> symbols?
|
| It should work correctly.
|
|> Rightnow thunderbird 2.0.0.21 and dovecot1.2rc3 are unable to
|> find any message if I try to search for cyrillic symbols.
|
| Check the IMAP traffic and make sure it specifies CHARSET in the SEARCH
| command.
|
|> fts, and squat plugins are enabled
|
| You could also try disabling these temporarily to see if they're causing
| the problem. They should handle UTF8 fine too though.

Indeed, searching for Chinese characters in the message body with Thunderbird
and dovecot+fts+squat works just fine here.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkoTcf0ACgkQ7yMg/OiDoAUgoQCggpdxfvW/SKZxLMbFA8e+U4x1
3vAAoKobyxNFM/DHNmejOHznoHNxQuiv
=hBSG
-END PGP SIGNATURE-


Re: [Dovecot] Released Sieve v0.1.4

2009-03-22 Thread Patrick Nagel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Stephan,

On 2009-03-21 23:33, Stephan Bosch wrote:
|   * Started work on the sieve-filter tool. With this command line tool
| it will be possible to (re-)apply Sieve filters on a mail folder. It
| is currently undocumented and far from functional.

I'm very much looking forward to that tool :)
Keep up the good work!

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAknHLCgACgkQ7yMg/OiDoAWxYACfTpbUEafR/JTb4PgqWmFqxqAI
84UAn0HOEY6tCxgZHZpoJ/VGCGq19E0Q
=xDGh
-END PGP SIGNATURE-


Re: [Dovecot] set \Seen flag on mail

2009-03-04 Thread Patrick Nagel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On 2009-03-04 10:53, J.P. Trosclair wrote:
| Is there a better way to set the \Seen flag other than the global sieve
| script since it can be overridden by the user?

One idea: You could use the Sieve include extension to include the global
script in the user's default sieve script.
You can then check periodically (with a cron script that contains a few 'grep'
calls) that all users' sieve scripts still include the include statement and if
not, inform them why they better should leave the include statement in their
sieve script.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkmuX1wACgkQ7yMg/OiDoAWDEACfe33hmBXDN2UxPiqH8Kkogd9H
v0cAnjHUwDG6CioG5a3EtUEsjUjkhiwf
=Gqdt
-END PGP SIGNATURE-


Re: [Dovecot] CentOS 5 ... again

2009-02-08 Thread Patrick Nagel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Roderick,

On 2009-02-07 05:48, Roderick A. Anderson wrote:
| At this point I don't think I can do anymore damage to my mail server
| but I'd like to know if anyone else is using the pre-built RPM files
| from ATrpms before I install them?
|
| http://dl.atrpms.net/all/dovecot-1.1.11-0_90.el5.i386.rpm
| http://dl.atrpms.net/all/dovecot-sieve-1.1.6-9.el5.i386.rpm

We're using those RPMs (currently version 1.1.7). They always worked very well
for us.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkmPkV0ACgkQ7yMg/OiDoAXrBwCfSXO+0qGC2Pq9I0Nj1zyQ98vV
6NMAoLLxqojYfUy1OmS9HnyIM2GS+qrr
=EDSr
-END PGP SIGNATURE-


Re: [Dovecot] custom imap flags in maildir don't saved after upgrade to 1.1.10

2009-02-02 Thread Patrick Nagel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Anton,

On 2009-02-02 19:59, Anton Yuzhaninov wrote:
| Custom imap flags (like $label1, $label2 in mozilla TB) don't saved in maildir
| after upgrade to 1.1.10.
|
| In logs no errors obout this.
|
| With mailbox custom flags works OK.

I found the same problem today. Timo told me on IRC that [1] will fix it.

Patrick.

[1]: http://hg.dovecot.org/dovecot-1.1/rev/741b32441131

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

PGP key:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkmHH5cACgkQ7yMg/OiDoAXOFQCguIAzgdw8R9vhWU1OumKNhgsT
djcAnRSacD3FPui+ADB3wbz82Og4PMsb
=bbpp
-END PGP SIGNATURE-


Re: [Dovecot] PDF corruption issue

2009-01-08 Thread Patrick Nagel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On 2009-01-08 18:29, Charles Marcus wrote:
| On 1/8/2009, Ed W (li...@wildgooses.com) wrote:
|> I personally suspect Thunderbird, but it's possible that it is related
|> to Dovecot
|
| I have also seen TBird have a corrupt local cache of the file... it
| seems to usually happen to people who I know are the 'impatient' type,
| and will click on a message with a large attachment, then when it
| doesn't respond *immediately*, start clicking on other messages/folders...
|
| I know it is a local cache problem because if I delete the local copy of
| the folder in question and force TBird to re-download the message from
| the IMAP server, the PDF (or whatever) is fine... so yes, TBird has a
| problem in this area...

Have a look at https://bugzilla.mozilla.org/show_bug.cgi?id=253711 - may be
related.

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

PGP key:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAklmxLYACgkQ7yMg/OiDoAVXVACfez6XxMKh/bGM6k39wnnvTYbe
nxwAni+bqI+rYDC26TbDywnW3spn2jb4
=YCO2
-END PGP SIGNATURE-


Re: [Dovecot] Dovecot and Bogofilter

2008-11-10 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Matthias

Matthias Andree wrote:
> On Mon, 10 Nov 2008, Patrick Nagel wrote:
>> The problem with modifying the mail after reclassification persists, hope 
>> this
>> can be solved. Then I could also finally move from
>> postfix-procmail-bogofilter-cron-dovecot to
>> postfix-deliver-antispam-bogofilter-dovecot. :)
> 
> Hi,
> 
> it's not quite clear to me how this would work with bogofilter as a
> mailbox_transport - bogofilter isn't designed to do final delivery.
> 
> It's also not quite clear to me why people would use procmail. Although
> defended by its maintainers, it's an unusable and unconfigurable piece
> of software from ancient past -- getting error handling right in
> procmail is next to impossible, requires forfeiting :e rules and
> bloating procmailrc with explicit error handling recipes.

You're right, and that's why I don't want to continue using it. It had a lot of
security issues, and the syntax of procmailrc looked like a bad joke to me when
I encountered it for the first time.

Not being able to pipe mail through an arbitrary program surely makes sieve
more secure, but it also makes things much more complicated sometimes. Also I
think beginners tend to use procmail, just because in many guides / tutorials /
howtos it's the LDA of choice. (I, for example, started out with this howto:
http://www.gentoo-wiki.info/HOWTO_Email_System_for_the_Home_Network )

> If you want something and Dovecot's deliver doesn't fit your needs,
> consider maildrop, <http://www.courier-mta.org/maildrop/>

I didn't even know about it until very recently. ;)

> Bogofilter has an "integrating-with-postfix" document in the doc/
> directory that shows how to use Postfix's content_filter and does not
> need procmail. Unfortunately, it does not show how to integrate updates;
> there are several approaches to achieve that. One way is to use separate
> mailboxes where users can send mail to and where they are picked up by
> cron - best when using Dovecot is probably to make users move spam into
> particular folders via IMAP.

That's how I'm doing it, but surely the Antispam plugin is a nicer (and more
user-friendly) approach - the classification direction (Spam->Ham or Ham->Spam)
is determined by the source and target mailbox.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFJF/pB7yMg/OiDoAURAmNyAJ9rFGEPU/mylzF9ec+I07sfMo2q6QCgnGbQ
j4SQHfYXV3zt7FNVXDMA+YE=
=qeP/
-END PGP SIGNATURE-


Re: [Dovecot] Dovecot and Bogofilter

2008-11-10 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matthias-Christian Ott wrote:
> Patrick Nagel wrote:
>> With postfix, just add bogofilter as transport to master.cf and make it the
>> 'mailbox_transport'.
> 
> Does Postfix understand the pipe syntax? If so everything would be fine.

Umm, well, it "pipes" the mail through the command specified as
'mail_transport' - don't know if that works with shell script style pipes (|)
directly - but in any case you could easily create a wrapper shell script.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFJF/TX7yMg/OiDoAURArRMAJ98wma7/pjbcS7bcUCV1DqMBszUSQCgl4ay
GxESbmr50vW8/OMyZGXqjqY=
=g2O6
-END PGP SIGNATURE-


Re: [Dovecot] Dovecot and Bogofilter

2008-11-09 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thorsten Vollmer wrote:
> On Sun, 2008-11-09 at 22:39 +0100, Matthias-Christian Ott wrote:
>> An other problem is that each mail needs to be initially classified and
>> due to the fact that sieve is not able to execute external programmes,
>> deliver has to do this task. I'm currently thinking of possibilities to
>> implement this, so far I came up with the following:
>>
>>   1. Write a generic pipe plugin which can execute an arbitrary number of
>>  programmes. The problem with this is that I'm not sure how to
>>  integrate this is in Dovecot's configuration file. I thought of
>>  something like this: pipe = prg1 | prg2
> 
> You do not need a plugin if you do the classification before the
> delivery: MTA | classification | LDA

With postfix, just add bogofilter as transport to master.cf and make it the
'mailbox_transport'.

The problem with modifying the mail after reclassification persists, hope this
can be solved. Then I could also finally move from
postfix-procmail-bogofilter-cron-dovecot to
postfix-deliver-antispam-bogofilter-dovecot. :)

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFJF5Rh7yMg/OiDoAURAkE4AJ4zYh/J4WKCsN/xwGGKA66N3sKNQwCeNDrh
prjS37amcH+vDH1kwyqyDxY=
=f9Rm
-END PGP SIGNATURE-


Re: [Dovecot] Search results as virtual folders

2008-10-14 Thread Patrick Nagel
Hi Daniel,

On Tue, 14 Oct 2008 17:21:53 -0700, "Daniel L. Miller" <[EMAIL PROTECTED]>
wrote:
> Does Dovecot have any provision for generating such 
> virtual folders?  Possibly as the result of a sieve script?

Timo is planning to implement (or is implementing already?) "virtual
mailboxes", see
http://www.dovecot.org/list/dovecot/2007-May/022828.html

Currently there is no way except delivering the mail to different mailboxes
on arrival (for which you can use sieve of course), which is of course not
"virtual".

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005


Re: [Dovecot] Outlook 2003 and Thunderbird IMAP + getting newheaders

2008-09-10 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jan van den Berg wrote:
> I've done some debugging and attached are (parts) of 2 strace files.
> 
> correct.txt. This is when I click on a folder in Outlook and everything is
> OK (no headers are retrieved etc.)
> 
> wrong.txt. This is when I click on a folder in Outlook and it starts
> retrieving all the headers again.
> 
> Im not sure what to look for in these files.
> 
> Cheers,
> 
> Jan

Hm ok, maybe somebody can read something out of the strace output, I can't. The
dovecot log output would have been more helpful / readable.

Maybe the dovecot.index and/or dovecot-uidlist file in those mailbox folders
got corrupted/deleted? But I really know too little about all that... I think
dovecot's log output (see http://wiki.dovecot.org/Logging) would really be a
great help in figuring out what's going on.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIx56F7yMg/OiDoAURAo3VAJwMjqzL0QVR8CVoTkIEVaiK6cB6igCfY5+Q
s/UqI42myf3Zto+LtWwFgqQ=
=PNFJ
-END PGP SIGNATURE-


Re: [Dovecot] Outlook 2003 and Thunderbird IMAP + getting new headers

2008-09-10 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Jan,

Jan van den Berg wrote:
> We run 1.1.3 and I use Outlook to connect to my IMAP box and a couple of
> times per day (randomly) when I click certain folders IMAP will start
> retrieving ALL headers for that folder again ('retrieving new headers')!
> 
> I don't understand this. What triggers IMAP to do so, why not just retrieve
> only the NEW headers?
> 
>  
> 
> Is it Dovecot or Outlook (probably) and what can be done about this? I
> already use the Dovecot Outlook workarounds.
> 
>  
> 
> I have also gotten word that this behavior happens with Thunderbird.
> 
>  
> 
> This is really a problem causing a lot of load on our storage (I am not the
> only user).

Please give us some more information. Output of `dovecot -n` would be a good
start. Also check the logs for dovecot reporting problems (and/or switch on
debug logging).

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIx4zX7yMg/OiDoAURAtWVAKCiFcHQGzyGoF3NtRzqlH78JGVPIgCeKeOV
v9ixInWS+RWG0gcMFtg5Lk8=
=1uNp
-END PGP SIGNATURE-


Re: [Dovecot] Data loss from removing dovecot.index* files?

2008-09-09 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Timo Sirainen wrote:
>>> It's safe, but if any IMAP clients had seen the mailbox the first time 
>>> they may become confused if the message UIDs change (which is also the 
>>> reason Dovecot starts complaining).
>>> 
>> Aren't flags only stored in dovecot.index files when there are more than
>> 26 of them (and thus can't be stored in the filename)?
> 
> Well, yes, but I'm assuming no-one has more than 26 :) Some day I'll 
> probably make Dovecot force that limit to maildir users.

Heh, it just depends on how you use your mailbox. More and more people seem to
adopt the "Google way" - not sorting mails into folders, but tagging
them (one tag = one IMAP flag), and leaving them all in one mailbox. Those
people quickly use much more than 26 flags...

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

PGP key:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIx1a/7yMg/OiDoAURAk7aAJ9udxscVlfdmTZ9pua+Qrtz8NxTBwCfb6Ax
3YW4pyYj2fhzgHVcxHdSey0=
=l7n8
-END PGP SIGNATURE-


Re: [Dovecot] Data loss from removing dovecot.index* files?

2008-09-09 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Timo Sirainen wrote:
> On Tue, 2008-09-09 at 10:36 -0500, John Lightsey wrote:
>> Hi there,
>>
>> I've been rewriting the courier-dovecot-migrate script to handle  
>> dovecot->courier conversions in addition to courier->dovecot.  One  
>> issue I've found is that when the courier->dovecot conversion is  
>> performed a second time (using --overwrite) and the dovecot-uidlist  
>> file is written again, Dovecot starts generating errors when accessing  
>> the maildir.  The simple fix is to remove all of the dovecot.index*  
>> files so they are rebuilt when the maildir is scanned again.  Is it  
>> safe to do this or is information stored in the index files that can't  
>> be rebuilt by Dovecot the next time it scans the maildir?
> 
> It's safe, but if any IMAP clients had seen the mailbox the first time
> they may become confused if the message UIDs change (which is also the
> reason Dovecot starts complaining).
> 

Aren't flags only stored in dovecot.index files when there are more than 26 of
them (and thus can't be stored in the filename)?

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

PGP key:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIxy7H7yMg/OiDoAURArS5AJ9rjPOhJsed3bQDUNE88cC8wKed0QCfZNen
auRthn0bl6HC8XFbeckmFSA=
=h5Bv
-END PGP SIGNATURE-


Re: [Dovecot] Sieve problem with 1.1.2

2008-09-04 Thread Patrick Nagel
On Thu, 04 Sep 2008 16:07:35 +0300, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Any suggestions on how to disable this ? I'd like to be able to filter
> all spam by default with sieve, and still allow users to have their own
> rules.

We autocreate a 'mailfilter.sieve' in each new user's homedir, in which a
global 'spam.sieve' is being included. The user can then add rules as
desired after that inclusion.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005



Re: [Dovecot] authorizing users

2008-09-02 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Wade Smart wrote:
> Im trying to clarify if I understand correctly about authorizing users.
> 
> "The simplest login method is sending the user login info in plain
> text and allowing access only to users that already have UNIX access
> (ie. in /etc/passwd) to the machine dovecot is running on."
> 
> Im using fetchmail postfix dovecot on my own personal computer to get
> my mail from two servers. What Im wanting to understand is, is this
> saying that since I am already a user on my own system, that by using
> /etc/passwd that I would use my username and password in say
> thunderbird to login to dovecot to get my mail?

Yes. AFAIK that's dovecot's default configuration, so you don't have to change
anything and it should just work.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIve347yMg/OiDoAURAguLAKCCDaC/4551Xfp9o095azry/+Ug7wCeKy+V
1nG328B4F8jgNooH7JTk0sc=
=dWHs
-END PGP SIGNATURE-


Re: [Dovecot] Stateful Webmail

2008-08-14 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 14 Aug 2008 13:51:20 -0700, "Michael Carter"
<[EMAIL PROTECTED]> wrote:
> I'm a developer on the Orbited project (http://www.orbited.org), which
> provides a TCPSocket interface in javascript (emulated over HTTP using
> ajax
> and comet.) This TCPSocket allows true bi-directional communication
> between
> a web browser and an arbitrary tcp server.

Interesting... TCP over HTTP over TCP ;)

> Coincidentally, we have just began work on a JavaScript IMAP client. With
> it, building a webmail app should be *entirely* a UI concern. The good
> news
> is that our Socket interface is very stable and is being used in
> production
> for protocols like IRC for webchat. The bad news is that none of the the
> Orbited developers have experience with the IMAP protocol.
> 
> We are putting all of our protocol implementations in the soon-to-launch
> js.io project (www.js.io). As soon as we have any kind of IMAP client
> prototype, I'll let you know. In the meantime, would anyone be
interesting
> in helping us develop the imap client? Its 100% pure JavaScript, and will
> greatly ease the development of feature-rich webmail, as a webmail
> deployment will become a matter of simply running Dovecot, the js.io.imap
> client, and an HTML gui.

Maybe you can have a look at http://decimail.org/index.html - I never tried
it though. Somebody posted a link to it on the Roundcube Webmail mailing
list (http://lists.roundcube.net/mail-archive/dev/2008-07/023.html),
that's how it got my attention.

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:  E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: http://getfiregpg.org

iEYEARECAAYFAkik1v4ACgkQ7yMg/OiDoAUnrACdExgaUxOVXBaHQ8ZXGKg0pSi3
Mg4AnijrxRfaY5PEMI6lR5e7stgdpqyr
=JHZl
-END PGP SIGNATURE-




Re: [Dovecot] Search for (any of) multiple terms slow

2008-08-13 Thread Patrick Nagel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 13 Aug 2008 17:18:37 -0400, Timo Sirainen <[EMAIL PROTECTED]> wrote:
> On Aug 13, 2008, at 3:25 AM, Patrick Nagel wrote:
> 
>> When searching for multiple terms at once ("any of") with  
>> Thunderbird/Dovecot
>> (using FTS Squat indexes), it takes much longer (not double the  
>> time, or a bit
>> more than that, but really much, much longer) than when I search for  
>> only one term.
> 
> Yea, OR isn't supported by FTS plugin yet.. I had hoped no-one would  
> notice it ;) I guess I should do something about it. 

Heh, I see ;)

As it is, the FTS plugin is quite useless to us though :( most of the time
people are doing a (real world) search, they don't remember the exact word
they're looking for. For example they only remember that the mail they're
looking for contained "English" and "automobile" - or was it "Englisch" and
"Automobil", because the mail was in German? So to get a list of all
possible mails, they want to make use of the OR connection of search
terms...

> Requires a lot  
> more complexity to the code though..

Couldn't Dovecot just search the index with each single word (as it does
now without OR), and then merge the results, filtering out double UIDs?
This is probably not the most efficient way to solve this, but it would be
definitely *much* faster than not using the indexes at all - and doesn't
sound too complex to me.

Are there any other not-yet-implemented SEARCH features that don't work
with the FTS plugin?

Thanks,
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
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: http://getfiregpg.org

iEYEARECAAYFAkijga4ACgkQ7yMg/OiDoAUnFwCfXDUDHR+UdlMKkqwn2/nkB61I
X3MAn1nK8KVW8RbtzQ6qQGipGb3uMXRa
=I8Eh
-END PGP SIGNATURE-




[Dovecot] Search for (any of) multiple terms slow

2008-08-13 Thread Patrick Nagel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

this may be an obvious logical problem I'm not aware of, which cannot be solved
any more efficiently... but maybe it's just a bug or there is potential for
optimisation in Dovecot (or Thunderbird?).

When searching for multiple terms at once ("any of") with Thunderbird/Dovecot
(using FTS Squat indexes), it takes much longer (not double the time, or a bit
more than that, but really much, much longer) than when I search for only one 
term.

Here are some figures (the IMAP commands are shown as issued by Thunderbird and
recorded by Dovecot rawlog).

While searching, I can see the 'imap' process using 100% CPU time.

Searching for "xyz" in Archive and subfolders
4 secs

32 select "Archive"
33 uid SEARCH UNDELETED BODY "xyz"
34 select "Archive.2004"
35 UID fetch 1:* (FLAGS)
36 uid SEARCH UNDELETED BODY "xyz"
37 select "Archive.2004.2005"
38 UID fetch 1:* (FLAGS)
39 uid SEARCH UNDELETED BODY "xyz"
40 select "Archive.2004.2005.2006"
41 UID fetch 1:* (FLAGS)
42 uid SEARCH UNDELETED BODY "xyz"
43 select "Archive.2004.2005.2006.2007"
44 UID fetch 1:* (FLAGS)
45 uid SEARCH UNDELETED BODY "xyz"
46 select "Archive.2004.2005.2006.2007.2008"
47 UID fetch 1:* (FLAGS)
48 uid SEARCH UNDELETED BODY "xyz"
49 IDLE

Searching for "xyz" and "abc" (any of) in Archive and subfolders
123 secs

50 select "Archive"
51 uid SEARCH UNDELETED (OR BODY "xyz" BODY "abc")
52 select "Archive.2004"
53 UID fetch 1:* (FLAGS)
54 uid SEARCH UNDELETED (OR BODY "xyz" BODY "abc")
55 select "Archive.2004.2005"
56 UID fetch 1:* (FLAGS)
57 uid SEARCH UNDELETED (OR BODY "xyz" BODY "abc")
58 select "Archive.2004.2005.2006"
59 UID fetch 1:* (FLAGS)
60 uid SEARCH UNDELETED (OR BODY "xyz" BODY "abc")
61 select "Archive.2004.2005.2006.2007"
62 UID fetch 1:* (FLAGS)
63 uid SEARCH UNDELETED (OR BODY "xyz" BODY "abc")
64 select "Archive.2004.2005.2006.2007.2008"
65 UID fetch 1:* (FLAGS)
66 uid SEARCH UNDELETED (OR BODY "xyz" BODY "abc")
67 IDLE

Searching for "xyz", "abc" and "def" in Archive and subfolders
173 secs

68 select "Archive"
69 uid SEARCH UNDELETED (OR (OR BODY "xyz" BODY "abc") BODY "def")
70 select "Archive.2004"
71 UID fetch 1:* (FLAGS)
72 uid SEARCH UNDELETED (OR (OR BODY "xyz" BODY "abc") BODY "def")
73 select "Archive.2004.2005"
74 UID fetch 1:* (FLAGS)
75 uid SEARCH UNDELETED (OR (OR BODY "xyz" BODY "abc") BODY "def")
76 select "Archive.2004.2005.2006"
77 UID fetch 1:* (FLAGS)
78 uid SEARCH UNDELETED (OR (OR BODY "xyz" BODY "abc") BODY "def")
79 select "INBOX"
80 UID fetch 1:* (FLAGS)
81 check
82 select "Archive.2004.2005.2006.2007"
83 UID fetch 1:* (FLAGS)
84 uid SEARCH UNDELETED (OR (OR BODY "xyz" BODY "abc") BODY "def")
85 select "Archive.2004.2005.2006.2007.2008"
86 UID fetch 1:* (FLAGS)
87 uid SEARCH UNDELETED (OR (OR BODY "xyz" BODY "abc") BODY "def")
88 IDLE

Searching for "xyz", "abc", "def" and "ghi" in Archive and subfolders
217 secs

89 select "Archive"
90 uid SEARCH UNDELETED (OR (OR (OR BODY "xyz" BODY "abc") BODY "def") BODY 
"ghi")
91 select "Archive.2004"
92 UID fetch 1:* (FLAGS)
93 uid SEARCH UNDELETED (OR (OR (OR BODY "xyz" BODY "abc") BODY "def") BODY 
"ghi")
94 select "Archive.2004.2005"
95 UID fetch 1:* (FLAGS)
96 uid SEARCH UNDELETED (OR (OR (OR BODY "xyz" BODY "abc") BODY "def") BODY 
"ghi")
97 select "Archive.2004.2005.2006"
98 UID fetch 1:* (FLAGS)
99 uid SEARCH UNDELETED (OR (OR (OR BODY "xyz" BODY "abc") BODY "def") BODY 
"ghi")
100 select "Archive.2004.2005.2006.2007"
101 UID fetch 1:* (FLAGS)
102 uid SEARCH UNDELETED (OR (OR (OR BODY "xyz" BODY "abc") BODY "def") BODY 
"ghi")
103 select "Archive.2004.2005.2006.2007.2008"
104 UID fetch 1:* (FLAGS)
105 uid SEARCH UNDELETED (OR (OR (OR BODY "xyz" BODY "abc") BODY "def") BODY 
"ghi")
106 IDLE

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
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIooxq7yMg/OiDoAURAhb9AJ4jOaK+eHXcSwJTAER8xEKIlJJt0gCgtZan
wJm05V0F03gj+6YxbNOtCew=
=jID/
-END PGP SIGNATURE-


Re: [Dovecot] Server update strategies (was: Experience moving mailboxes from Dovecot 0.99.14 to Dovecot 1.0 7 => Improvement possible)

2008-08-06 Thread Patrick Nagel
Hi,

it's always interesting to observe and discuss the different update
strategies (although not entirely on-topic)...

On Wed, 06 Aug 2008 11:25:59 -0500, Eric Rostetter
<[EMAIL PROTECTED]> wrote:
> Quoting Charles Marcus <[EMAIL PROTECTED]>:
>> On 8/6/2008, Eric Rostetter ([EMAIL PROTECTED]) wrote:
>>> Anyone know about Dovecot 1.1.x rpms for Centos/RHEL 3.x?
>>
>> I'd be more interested in upgrading the server to a reasonably  
>> recent version of the distro...
> 
> Unfortunately, it isn't a redundant setup, so an upgrade is downtime.
>
> I've thought about doing an on-line (e.g., yum) upgrade from 3 to 4,
> but I'm not sure 4 would qualify as "reasonably recent" and it would
> still require a reboot, but this is an option and would get me the
> new dovecot rpms at least...
> 
> Since there is no good way to do an on-line upgrade from CentOS/RHEL 3
> to CentOS/RHEL 5, that isn't really an option at this time (too much
> downtime).

How can such an important system be a non-redundant setup? Hardware
breakage (or a cracker, see below) would cause minutes or probably even
hours of downtime...

> I've also had machines that were hardware frozen at older OS versions...
> Though that is not the case in this instance (was for my print server
> I had to recently deal with).
> 
>> This is one huge reason why I like gentoo so much.
> 
> It has nothing to do with gentoo, IMHO.

It has in that way, that there are no releases, no big jumps with lots of
breakage and config file syntax changes... But I definitely wouldn't say
Gentoo is a good distribution for systems that need to be highly available.
(I'm using Gentoo myself on desktops and servers, but none of them do run
really critical stuff).

>> As long as I update it regularly, I never have to worry about a  
>> massive update that breaks everything.
> 
> Same can be said for most distros, but I can't afford the downtime of
> the constant upgrades which mean constant reboots...  That is why
> people pick a "enterprise" solution like RHEL/CentOS, so they can have
> better uptime (with support) than a non-enterprise systems...

"Enterprise system" - surely sounds professional and all ;) But not
rebooting (during scheduled maintenance on a time of week/day where the
least clients will be affected) for a new kernel that fixes a critical
security issue definitely does not. IMHO.

> I regularly have machines with 2 or 3 years of uptime before I need
> to reboot them for an upgrade (they are behind firewalls, in case
> you wonder how I get along on such old kernels).

Maybe you should upgrade your security knowledge along with your kernels ;)
Many (if not most) attacks come from the inside (e.g. via
trojans/viruses/rootkits on client (laptop) computers). Thus, the concept
of something being "secure because behind firewalls" is at least partly
obsolete.

> Obviously, RHEL/CentOS 3.x will end of life, and I'll need to upgrade
> eventually because of that, but the more I can put it off, then better...
> But sometimes you just need to bite the bullet, and that day may be close
> at hand for this server...

Build it with redundancy this time. At least software-wise (for example
using virtualisation), so that you have a test system on which you can
"simulate" a pending update before you roll it out on the production
system.

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] FTS/squat search indexes built when?

2008-08-04 Thread Patrick Nagel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Timo Sirainen wrote:
| On Aug 1, 2008, at 1:39 AM, Patrick Nagel wrote:
|
|> | mailboxes=`printf "1 list "" *\n" | dovecot --exec-mail imap | perl
|> magic`
|>
|> Ok, looks easy. But I can't find information anywhere on how to
|> specify the
|> user. I tried with 'USER=username' in front of the dovecot call, and
|> dovecot
|> then said 'Logged in as username' instead of 'Logged in as root', but
|> a list
|> command doesn't show the mailboxes, so I think it's not accessing the
|> maildir
|> of that user.
|> I guess it's because the users are not system users, and dovecot needs to
|> retrieve info from the LDAP directory first. But how do I tell it to
|> do that?
|
| You can't do that with --exec-mail. It expects to be running using the
| correct UID, GID, $USER and $HOME.
|
|> Logging in via netcat / telnet works, but then I don't know how to
|> proceed...
|
| With v1.2 code you could use the same printf .. | nc localhost 143, but
| unfortunately this doesn't work with older versions since the input
| buffer is reset after login.
|

I see. So now we're back to "I don't know how to react to dovecot's responses" 
;)

To sum up:
It's currently (with version 1.1) not possible to script IMAP operations with
shell script when using virtual users. With perl or some other scripting
language, using an IMAP module, it should be no problem though.

Version 1.2 will make it easier for scripts to interface via IMAP, because you
can pipe a batch of commands into dovecot, and it won't just ignore everything
after the login command.

Thanks for the clarification!

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
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIl8Er7yMg/OiDoAURAt4aAKCmYomljxapIJ1H/jS/YoOt0ygDiQCeK+kE
4r3nLKZ/cELZZX0eIg1xbEc=
=g2dM
-END PGP SIGNATURE-


Re: [Dovecot] related, but off-topic: how to allow users to change password?

2008-08-03 Thread Patrick Nagel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Sahil,

Sahil Tandon wrote:
| Thanks for the tip Patrick.  Unfortunately this will not work for me
| because I need to change passwords for virtual users -- the users are not
| system users found in /etc/passwd, but rather virtual users that are
| listed in a passwd style file in /usr/local/etc/dovecot/passwd.

Oh, read your mail too quickly... sorry.

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
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIlmGy7yMg/OiDoAURAum5AJ9TYilxInO91328OCkZbo76d59wqACgm1/N
nUm3rIZe9cvUnKepy3pIpG0=
=/Qcx
-END PGP SIGNATURE-


Re: [Dovecot] related, but off-topic: how to allow user s to change password?

2008-08-02 Thread Patrick Nagel
Hi Sahil,

On Sat, 2 Aug 2008 02:36:56 -0400, Sahil Tandon <[EMAIL PROTECTED]> wrote:
> My dovecot is currently configured to authenticate vs. a userdb/passdb 
> passwd-file that contains, for each user:
> 
> username:passhash:5000:5000::/path/to/home::userdb_mail=/path/to/maildir
>
> Is it possible to let users authenticate and change their passwords? 
> There 
> are some webmail client add-ons that allow such things if users are
system
> 
> accounts or in a MySQL/LDAP db.  Does anyone else use passdb/userdb 
> passwd-files like above and have a method for allowing users to change
> their 
> passwords from the web?
> 
> Sorry for the slightly off-topic question, but hoping another Dovecot
> admin 
> has solved this problem.  Preference is to not to be tied to any
> particular 
> webmail client just for this change password feature.

Maybe you can use Usermin for that (see
http://www.webmin.com/usermin.html). It has a module to change system
passwords.

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] FTS/squat search indexes built when?

2008-07-31 Thread Patrick Nagel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

Timo Sirainen wrote:
| printf "1 select $mailbox\n2 search  text x93hgdgd\n3 logout\n" |
| dovecot --exec-mail imap
|
| For getting the list of mailboxes:
|
| mailboxes=`printf "1 list "" *\n" | dovecot --exec-mail imap | perl magic`

Ok, looks easy. But I can't find information anywhere on how to specify the
user. I tried with 'USER=username' in front of the dovecot call, and dovecot
then said 'Logged in as username' instead of 'Logged in as root', but a list
command doesn't show the mailboxes, so I think it's not accessing the maildir
of that user.
I guess it's because the users are not system users, and dovecot needs to
retrieve info from the LDAP directory first. But how do I tell it to do that?

Logging in via netcat / telnet works, but then I don't know how to proceed...

Thanks for your help!
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
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIkqF+7yMg/OiDoAURAii6AKCOpl9mSq8eWdwFEj4/LUOf4I3yEwCfcydS
IOBDO6Q05JIARK9Cg/bbSlo=
=kk4r
-END PGP SIGNATURE-


Re: [Dovecot] Server-side sieve for client-side copies

2008-07-28 Thread Patrick Nagel
Hi,

On Mon, 28 Jul 2008 09:38:19 -0700, "Daniel L. Miller" <[EMAIL PROTECTED]>
wrote:
> My understanding is that sending a message from a client (use 
> Thunderbird for simplicity of this conversation) is performed via SMTP.  
> Saving a copy into a sent folder is performed via IMAP (hence the 
> multiple transfers to the server).  Now that I've laid a background - 
> let's make it Dovecot specific.  I don't know how "behind-the-scenes" 
> Dovecot performs the act of saving mail messages that it receives from 
> IMAP, instead of SMTP.  Specifically, if I'm using sieve filters via 
> deliver - can I setup a filter that will place mail copies to specific 
> recipients into specific subfolders?

It seems to me, that you are assuming that Dovecot also speaks SMTP and is
able to actually handle sending of mails to other hosts. To clarify:
Dovecot is an IMAP/POP3 mail server (with integrated Mail Delivery Agent
(MDA) or Local Delivery Agent (LDA) (synonyms)). SMTP is being handled by a
Mail Transfer Agent (MTA) such as Postfix.

So as you can see, the Mail User Agent (MUA) (for example Thunderbird)
interacts with two different server programs, one for sending mail (via
SMTP), one for accessing stored mail (via IMAP/POP3).

The only way I can see to make the double uploading go away, would be, to
change the MTA's configuration so that it automatically sends a blind
carbon copy of the outgoing message to the sender. Then set up a sieve rule
in Dovecot to file this mail into the Sent folder. Of course don't forget
to switch off the 'copy sent mails to Sent folder' feature in every mail
client which is using this setup.

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] FTS/squat search indexes built when?

2008-07-25 Thread Patrick Nagel
Hi

On Fri, 25 Jul 2008 12:00:05 +0100, Ed W <[EMAIL PROTECTED]> wrote:
>> I would be interested in that script, too - are you working on it?
> 
> It appears that you can run IMAP commands by piping them into the imap 
> process - look at some of Timo's previous posts for examples.

I'm aware of 'dovecot --exec-mail imap'.

> I should 
> think it's a one line to type in the IMAP search command and have it 
> execute?

But I don't know how to wait for / react to answers from the IMAP server
(after listing mailboxes, selecting the mailbox, etc.) in shell (bash)
script, which would be my preferred choice as scripting language. Is it
possible? How?

> (implementation left as an exercise for the reader...)

Obviously I wrote this mail because I wanted to save some time and effort -
something wrong with that? ;)

Did really nobody do this "exercise" before?

> To do it remotely, perl/ruby and most common scripting languages have an 
> IMAP module which should work well (need to embed a password obviously)

Yes, I'm sure it would be easy with those - after reading all the module's
documentation, understanding all the caveats, implementing all the error
handling and so on.

So, again, if somebody came up with a solution already, please share, I'd
appreciate it.

Patrick.

P.S.: RoundCube Webmail is not a good (as in easy to use) client to read
and reply to mailing lists (yet).

-- 
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] FTS/squat search indexes built when?

2008-07-25 Thread Patrick Nagel
Hi Jay,

On Monday 14 July 2008, Jay Levitt wrote:
> - If I wrote a script to log in and search for something, and ran it every
> night through cron, would that achieve daily indexing?

I would be interested in that script, too - are you working on it?

Thanks,
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


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


Re: [Dovecot] Mails "invisible" (index corrupted?)

2008-07-20 Thread Patrick Nagel
Hi Timo,

thanks for getting back to me :)

On Sunday 20 July 2008, Timo Sirainen wrote:
> On Wed, 2008-07-16 at 16:43 +0800, Patrick Nagel wrote:
> > Hi,
> >
> > I got a complaint from a user today, that a few mails "disappeared" from
> > her Inbox, both when accessing via IMAP with Thunderbird and in the IMAP
> > Webmail client (RoundCube Webmail, caching deactivated).
> >
> > Searching (in Subject or From header) within the Inbox turned up the
> > missing messages though.
>
> If they're found when searching via Dovecot, then Dovecot sees them..

Yes, searching via dovecot - FTS (Squat) is activated though, if that makes 
any difference.

> > After checking all relevant client settings (filter rules etc.),
> > restarting Thunderbird multiple times, etc., I tried deleting her
> > dovecot.index.cache file, restarting Thunderbird again, but that didn't
> > change anything. Only after deleting dovecot.index.*, everything went
> > back to normal. I can't find anything useful in the log.
>
> "dovecot.index.*"? Does that mean dovecot.index.log* or also
> dovecot.index? You did leave dovecot-uidlist alone anyway?

Excerpts from my bash history file:

tar czf dovecot_metadata.tar.gz dovecot*
mv dovecot_metadata.tar.gz ..
rm dovecot.index.cache

[then we did some testing, problem still persisted]

tar czf dovecot_metadata2.tar.gz dovecot*
mv dovecot_metadata2.tar.gz ..
rm dovecot.index*
rm dovecot-uidlist

[all mails were visible again]

(so probably deleting dovecot-uidlist solved it?)

> > Any hints on what could have caused this? Where to look?
>
> Looking at the actual IMAP traffic would/should have shown what the
> problem was. For example using rawlog:
> http://wiki.dovecot.org/Debugging/Rawlog

I switched on rawlog for that user now.

> > I backed up
> > dovecot.index, dovecot.index.cache and dovecot.index.log before I deleted
> > them, but they probably contain sensitive information, so I won't post
> > them to the list.
>
> Only dovecot.index.cache contains sensitive information. I could take a
> look at dovecot.index and dovecot.index.log, but I doubt they show
> anything useful.

I have attached dovecot_metadata.tar.gz minus dovecot.index.cache.

Thanks a lot!
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


dovecot_metadata.tar.gz
Description: application/tgz


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


[Dovecot] Mails "invisible" (index corrupted?)

2008-07-16 Thread Patrick Nagel
Hi,

I got a complaint from a user today, that a few mails "disappeared" from her 
Inbox, both when accessing via IMAP with Thunderbird and in the IMAP Webmail 
client (RoundCube Webmail, caching deactivated).

Searching (in Subject or From header) within the Inbox turned up the missing 
messages though.

After checking all relevant client settings (filter rules etc.), restarting 
Thunderbird multiple times, etc., I tried deleting her dovecot.index.cache 
file, restarting Thunderbird again, but that didn't change anything.
Only after deleting dovecot.index.*, everything went back to normal. I can't 
find anything useful in the log.

Setup: x86, CentOS Linux, dovecot 1.1.1 (current stable binary from ATrpms), 
maildir storage, mail_debug is turned on

Any hints on what could have caused this? Where to look? I backed up 
dovecot.index, dovecot.index.cache and dovecot.index.log before I deleted 
them, but they probably contain sensitive information, so I won't post them 
to the list.

Thanks,
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


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


Re: [Dovecot] Dovecot Crash

2008-07-13 Thread Patrick Nagel
On Monday 14 July 2008, Horn Wijaya wrote:
> Jul 13 08:19:15 hera dovecot: fstat 75 : Value too large for defined data
> type
> Jul 13 08:19:18 hera dovecot: fstat 75 : Value too large for defined data
> type
> Jul 13 08:19:20 hera dovecot: fstat 75 : Value too large for defined data
> type
> Jul 13 08:19:27 hera dovecot: fstat 75 : Value too large for defined data
> type
> Jul 13 08:19:27 hera dovecot: fstat 75 : Value too large for defined data
> type
> Jul 13 08:19:30 hera dovecot: fstat 75 : Value too large for defined data
> type
> Jul 13 08:19:31 hera dovecot: fstat 75 : Value too large for defined data
> type
> Jul 13 08:19:34 hera dovecot: fstat 75 : Value too large for defined data
> type
> Jul 13 08:19:34 hera dovecot: fstat 75 : Value too large for defined data
> type
> Jul 13 08:19:35 hera dovecot: fstat 75 : Value too large for defined data
> type
> Jul 13 08:19:36 hera dovecot: fstat 75 : Value too large for defined data
> type
> Jul 13 08:19:44 hera dovecot: fstat 75 : Value too large for defined data
> type
>
> Hi All,
>
> I hope someone could help me with this.
> 1.1.RC4 is the version.

I think the output of 'dovecot -n' and some more context from the logs would 
be useful.

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


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


Re: [Dovecot] Virtual machines / time jumps backwards (was: Re: Vacation?)

2008-07-08 Thread Patrick Nagel
On Tuesday 08 July 2008, Anders wrote:
> Charles Marcus wrote:
> > Time is critical on servers... you need to fix this. Are you running
> > ntp client (NOT ntpdate)? Is this running in a virtual machine.
>
> If running in a virtual machine, say KVM, what do you propose to do
> about the time issue?
>
>
> Anders.

On a side note: There are not such problems when using OS virtualisation (as 
in Linux-VServer[1], for example) - run an ntpd on the 'host' and have the 
same time in all guests. It also has very little overhead. So if it's an 
option to use OS virtualisation instead of "real virtualisation", maybe you 
can save yourself the hassle with time jumping backwards.

[1]: http://linux-vserver.org/Welcome_to_Linux-VServer.org

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


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


Re: [Dovecot] Dovecot Sieve Broken with 1.1 RPMs?

2008-07-07 Thread Patrick Nagel
Hi Gavin,

On Tuesday 08 July 2008, Mailing List wrote:
> Previously (in v1.0) we did not need the plugin section:
> sieve = mailfilter.sieve
>
> Is this now required even when just wanting to use a global sieve
> script? We have ~100 users so manually adding a mailfilter.sieve file to
> each users directory will be very time consuming.

Of course we created those mailfilter.sieve files automatically with a few 
lines of shell script, so it's not that much of a hassle. It also gives the 
benefit of being able to easily add user-specific rules.

But I don't think it is required - having only one global script should work, 
according to the documentation.

> Are we able to input 
> the full path name to our global script instead,
> i.e. /etc/dovecot-sieve/global?

I think we did something like that before, but that may have been with 1.0...

> I tried using sieve_global_path = /etc/dovecot-sieve/global in the 'lda
> protocol' section but, as stated, the script seems to be ignored. The
> local delivery agent is working but everything gets delivered to the
> users inbox instead of being filtered.

According to the Wiki (http://wiki.dovecot.org/LDA/Sieve) this should indeed 
work. Did you check deliver's log - nothing interesting in there? Are you 
sure the sieve script works? Maybe some syntax changed, and the version 1.1 
interpreter fails? You can check with sievec if the script (still) compiles 
correctly.

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


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


Re: [Dovecot] Dovecot Sieve Broken with 1.1 RPMs?

2008-07-07 Thread Patrick Nagel
Hi Gavin,

On Tuesday 08 July 2008, you wrote:
> We have been using dovecot v1:1.0.15-1_72 and dovecot-sieve v1.0.3-7
> very successfully for many months but I've been unable to get
> dovecot-sieve to work with the latest 1.1 release. The new release seems
> to completely ignore our global sieve script no matter what we do.
>
> Is anyone else using the atrpms-stable rpms packages and able to get
> dovecot-sieve to work correctly?
>
> Any help would be greatly appreciated.
>
> Gavin

yes, we're using the following

dovecot
Version: 1.1.1
Release: 2_76.el5

and

dovecot-sieve
Version: 1.1.5
Release: 8.el5

from atrpms, and sieve works as it did before.

Sieve relevant configuration looks as follows:

* in section 'protocol lda':
mail_plugins = cmusieve
sieve_global_dir = /storage/sieve

* in section 'plugin':
sieve = mailfilter.sieve

In each user's home directory who should have sieve filtering activated, we 
place a mailfilter.sieve and in there we include one or more global and/or 
personal sieve scripts.

For example:
* /home/john.doe/mailfilter.sieve:
require "include";
include :personal "vacation.sieve";
include :global "spam.sieve";

spam.sieve resides in the /storage/sieve directory.

Hope this helps.
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


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


Re: [Dovecot] Sorting Mail

2008-07-07 Thread Patrick Nagel
On Tuesday 08 July 2008, Carlos Williams wrote:
> On Mon, Jul 7, 2008 at 4:49 PM, Eduardo M KALINOWSKI
>
> <[EMAIL PROTECTED]> wrote:
> > The Dovecot LDA has Sieve filtering support. It can save spam in a
> > different folder based on a header added by SpamAssassin.
>
> Is there any docs or information on how I can do something like this?
> Any kind of guide for Dovecot?

http://wiki.dovecot.org/LDA/Sieve

-- 
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


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


Re: [Dovecot] Using tags instead of folders?

2008-07-02 Thread Patrick Nagel
Hi,

On Wednesday 02 July 2008, Timo Sirainen wrote:
> On Wed, 2008-07-02 at 15:56 +0800, Patrick Nagel wrote:
> > Then I looked at how Thunderbird implements those tags when using IMAP.
> > It stores them as IMAP keywords. Dovecot stores the first 26 flags in the
> > filename, because it will only use one letter. Mapping between client's
> > tag name and the letter is being done in dovecot-keywords files (one for
> > each mailbox). If there are more IMAP keywords than 26, they will be
> > stored in the dovecot.index file.
> > (http://wiki.dovecot.org/MailboxFormat/Maildir)
> >
> > Now imagine we want to have 1000s (maybe 1s) of different tags (=IMAP
> > keywords) - instead of folders. Can this be recommended?
>
> Dovecot is currently optimized to handle a rather small number of
> keywords. They're stored as a bitmask, so using 1000 different keywords
> would use 125 bytes per each mail. If the keyword usage gets this high
> it would be a good idea to change the implementation to store them
> differently.
>
> You're also concentrating on only maildir format. Yes, there the limit
> is 26 keywords and I don't have plans to improve it. But for example
> with dbox format there is no such limit.

I see. I kind of like maildir (and thought it was "recommended").

> > What happens if the
> > index file gets corrupted for some reason? (I had to delete dovecot.index
> > files before...).
>
> v1.1 tries very hard to fix corrupted dovecot.index files and it also
> ignores errors in dovecot.index.log file. Also there have been rarely
> problems with those files. dovecot.index.cache file has been nearly
> always the problem and it can always be safely deleted.

Ok. I don't remember the details - maybe deleting dovecot.index.cache would 
have been enough.

> > What happens if the Thunderbird profile breaks? What
> > happens if we want to move on to another client?
>
> AFAIK Thunderbird currently supports only 5 keywords and it names them
> $Lablel1 .. $Label5. Not very portable.
>

No, those $label1...5 are the default five tags. You can add more (although I 
didn't check if there is actually a (low) limit. May well be. One of our 
users already has something like 20 IMAP keywords in various 
folders/mailboxes, and she uses Thunderbird and its tags. Tags that are 
created by the user get a name that somehow resembles the tag's name in 
Thunderbird. Example: a tag named "Content Check" in Thunderbird will end up 
as "content_check" in dovecot-keywords.

> > Are there other ways to implement 'tagging' instead of a hierarchy?
>
> With v1.2 it'll be possible to create virtual mailboxes. Each keyword
> could have its corresponding virtual mailbox. Pretty much like in gmail.

Yeah, this is the second time those virtual mailboxes would come in handy for 
me ;) Do you have a roadmap for 1.2? :D

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


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


[Dovecot] Using tags instead of folders?

2008-07-02 Thread Patrick Nagel
Hi,

currently most people store their messages in some sort of folder hierarchy, 
so that they can find them later easily. Here, for example, mails that are 
connected to a project are being stored in /CompanyName/ProjectNumber 
folders.

Now I was wondering if there is any reason against using tags instead of a 
folder hierarchy, because tags are better when it comes to mails that belong 
to multiple projects (maybe even belonging to multiple companies) at once. 
All mails could then be stored in one folder/mailbox, fulltext search 
indexing would work well. You could search for a tag that consists of the 
ProjectNumber and would get all mails that belong to that project, just as if 
you would have opened that folder in the old hierarchy. You could save this 
search as a 'Search Folder' (talking in Thunderbird terms).

Then I looked at how Thunderbird implements those tags when using IMAP. It 
stores them as IMAP keywords. Dovecot stores the first 26 flags in the 
filename, because it will only use one letter. Mapping between client's tag 
name and the letter is being done in dovecot-keywords files (one for each 
mailbox). If there are more IMAP keywords than 26, they will be stored in the 
dovecot.index file. (http://wiki.dovecot.org/MailboxFormat/Maildir)

Now imagine we want to have 1000s (maybe 1s) of different tags (=IMAP 
keywords) - instead of folders. Can this be recommended? What happens if the 
index file gets corrupted for some reason? (I had to delete dovecot.index 
files before...). What happens if the Thunderbird profile breaks? What 
happens if we want to move on to another client?

Are there other ways to implement 'tagging' instead of a hierarchy?

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


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


Re: [Dovecot] Vacation?

2008-06-30 Thread Patrick Nagel
Hi Kirti,

On Tuesday 01 July 2008, kbajwa wrote:
> I tried installing Dovecot Sieve Plugin. When I enter the command:
>
> % ./configure --with-dovecot=../dovecot-1.0.7
>
> I get the error:
>
> Error: C processor "lib/cpp" fails sanity check.
>
> I think the problem may be that I am installing wrong version of
> Dovecot-Sieve-Plugin. Here is my system, just in case I am right:
>
> CentOS 5.1
> postfix-2.3.3 (Note)
> dovecot-1.0.7 (Note)
> dovecot-sieve-1.1.5
>
> Note: Both postfix & dovecot are installed from CentOS 5.1 distro. I am
> sure that there are also updates.
>
> Can somebody help with this problem? I am pretty GREEN, therefore, if you
> can provide with 4-5 installation lines, I will really appreciate it.
>
> Thanks.
>
> Kirti

I recommend that you use the CentOS RPMs from atrpms.net (1.1 branch) - they 
work very well for me and other people here on the list. You don't need to 
build anything from source then.

Once you have them running, follow the Wiki article that Charles provided a 
link to - it describes how to work with dovecot's sieve interpreter. One of 
the possibilities that come with sieve is the 'vacation' extension.

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


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


Re: [Dovecot] Search over big folder hierarchy (was: Gl obal FTS index? )

2008-06-24 Thread Patrick Nagel
On Tuesday 24 June 2008, Timo Sirainen wrote:
> Yes, they have to be selected. There isn't any way currently in IMAP to
> search from multiple mailboxes using a single command, so even if
> Dovecot implemented a Squat index that indexed mails from all mailboxes,
> you'd still have to implement a non-standard extension to use that.

I see. That's what I thought. :(

> Hmm. Or v1.2 has virtual mailboxes - you could create a single virtual
> mailbox from all your other mailboxes and then search it. I think if
> Squat is enabled it'll create a single index from all the mails. I'm not
> sure if I want to leave it like that though..

How about making it configurable? I'm sure there are scenarios where it's not 
desirable to have an index for each virtual mailbox (which sounds like a very 
cool concept, by the way) - but like in my case, it would be a great 
workaround :)

> I have also been thinking about making Squat indexes global for all
> mailboxes. If done well it should reduce disk space as well as enable
> fast multi-mailbox searches, but I'm a bit worried about memory usage
> and other slowness when updating the index. The Squat building/updating
> could use more work, but I haven't yet figured out a great solution for
> it.

I'm not sure if it would reduce disk space usage... I'm thinking of the 
following:

Now (fictitious, don't know how dovecot.index.search really looks like):

mailbox1.in.a.subfolder.of.a.subfolder.of.a.subfolder/dovecot.index.search:
INDEX   UID
word12345
ord 12345
rd  12345
d   12345
...

Then (of course also fictitious):

dovecot.global.index.search:
INDEX   MAILBOX UID
wordmailbox1.in.a.subfolder.of.a.subfolder.of.a.subfolder   12345
ord mailbox1.in.a.subfolder.of.a.subfolder.of.a.subfolder   12345
rd  mailbox1.in.a.subfolder.of.a.subfolder.of.a.subfolder   12345
d   mailbox1.in.a.subfolder.of.a.subfolder.of.a.subfolder   12345
...

Of course this would be very compressible, but in an uncompressed form it 
would probably be much bigger than now all dovecot.index.search files 
together. This would cause the need for mailbox UIDs, so that the path names 
only need to be stored in a map once... or something along those lines.

Anyway, I think improved (= faster) search capabilities are a huge plus for an 
IMAP server, because the possibility to search in old mails is what makes 
people keep their mails (available, on the server) in the first place...

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


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


Re: [Dovecot] Search over big folder hierarchy (was: Global FTS index?)

2008-06-24 Thread Patrick Nagel
On Tuesday 24 June 2008, Patrick Nagel wrote:
> Hi,
>
> I tried the FTS (and FTS Squat) plugin today, and it works as advertised.
>
> But: On my 13000 folders with 16 mails maildir I use for testing, the
> speed increase is not as big as one would wish (it still takes several
> minutes to complete a search).
>
> Is my assumption correct, that there is no way to do a search over a big
> IMAP folder hierarchy in a reasonable amount of time, because each folder
> has to be 'selected', and only one folder can be selected at once?
>
> Patrick.

I think this subject is more suitable for the mail's content. At first I 
focussed on the FTS index, and changed the mail later on, after which I 
forgot to change the subject...

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


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


[Dovecot] Global FTS index?

2008-06-24 Thread Patrick Nagel
Hi,

I tried the FTS (and FTS Squat) plugin today, and it works as advertised.

But: On my 13000 folders with 16 mails maildir I use for testing, the 
speed increase is not as big as one would wish (it still takes several 
minutes to complete a search).

Is my assumption correct, that there is no way to do a search over a big IMAP 
folder hierarchy in a reasonable amount of time, because each folder has to 
be 'selected', and only one folder can be selected at once? 

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


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


Re: [Dovecot] While searching: Assertion failed (offset > = ctx- >input->v_offset)

2008-06-20 Thread Patrick Nagel
On Friday 20 June 2008, Timo Sirainen wrote:
> > > Now I get this with 1.1.rc10:
> > >
> > >  Jun 20 11:53:53 stshamail1 dovecot: Panic: IMAP(username): file
> > >  message-parser.c: line 770 (message_parser_parse_next_block):
> > > assertion failed: (ctx->input->eof || ctx->input->closed ||
> > > ctx->input->stream_errno != 0) [..]
> > >
> > >  Patrick.
> >
> > Timo,
> > here is an anonymized mbox file that causes it at every body search
> > (tested with rc12).
>
> Did you test it without index files? I couldn't reproduce the crash. Do
> you use 32bit or 64bit Dovecot?

For me it's the 32bit version (atrpms.net RPM package).

Do you mean I should try again after deleting the index files?

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


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


Re: [Dovecot] While searching: Assertion failed (offset > = ctx- >input->v_offset)

2008-06-19 Thread Patrick Nagel
Hi,

On Thursday 19 June 2008, Patrick Nagel wrote:
> On Thursday 19 June 2008, Timo Sirainen wrote:
> > On Thu, 2008-06-19 at 14:46 +0800, Patrick Nagel wrote:
> > > Jun 19 14:35:45 stshamail1 dovecot: Panic: IMAP(username): file
> > > message-parser.c: line 620 (preparsed_parse_body_init): assertion
> > > failed: (offset >= ctx->input->v_offset)
> >
> > What Dovecot version? (Didn't I fix this a few weeks ago?)
>
> sorry, forgot that vital information :(
>
> Version 1.1.rc5 (RPM package from atrpms.net)
> I'll upgrade to 1.1.rc10 this evening and check again.
>
> Patrick.

Now I get this with 1.1.rc10:

Jun 20 11:53:53 stshamail1 dovecot: Panic: IMAP(username): file 
message-parser.c: line 770 (message_parser_parse_next_block): assertion 
failed: (ctx->input->eof || ctx->input->closed || ctx->input->stream_errno != 
0)
Jun 20 11:53:53 stshamail1 dovecot: IMAP(username): Raw backtrace: imap 
[0x80cfbb0] -> imap [0x80cfc0a] -> imap [0x80cf4ac] -> imap [0x80c8d1a] -> 
imap(message_search_msg+0x5f) [0x80ca61f] -> imap [0x8098a8b] -> imap 
[0x809f3ab] -> imap(mail_search_args_foreach+0x40) [0x809f4c0] -> 
imap(index_storage_search_next_nonblock+0x256) [0x8098666] -> imap 
[0x805dfe6] -> imap [0x805e426] -> imap(io_loop_handle_timeouts+0x80) 
[0x80d6880] -> imap(io_loop_handler_run+0x82) [0x80d7492] -> 
imap(io_loop_run+0x28) [0x80d6688] -> imap(main+0x4ac) 
[0x806847c] -> /lib/libc.so.6(__libc_start_main+0xdc) [0x4003adec] -> imap 
[0x805a271]
Jun 20 11:53:53 stshamail1 dovecot: child 32672 (imap) killed with signal 6

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


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


Re: [Dovecot] While searching: Assertion failed (offset > = ctx- >input->v_offset)

2008-06-18 Thread Patrick Nagel
Hi Timo,

On Thursday 19 June 2008, Timo Sirainen wrote:
> On Thu, 2008-06-19 at 14:46 +0800, Patrick Nagel wrote:
> > Jun 19 14:35:45 stshamail1 dovecot: Panic: IMAP(username): file
> > message-parser.c: line 620 (preparsed_parse_body_init): assertion failed:
> > (offset >= ctx->input->v_offset)
>
> What Dovecot version? (Didn't I fix this a few weeks ago?)

sorry, forgot that vital information :(

Version 1.1.rc5 (RPM package from atrpms.net)
I'll upgrade to 1.1.rc10 this evening and check again.

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


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


[Dovecot] While searching: Assertion failed (offset >= ctx->input->v_offset)

2008-06-18 Thread Patrick Nagel
Hi,

while a user is searching through his (1.2 GB, >15) mails, I get a lot of 
these messages in the log, and the search (with Thunderbird) doesn't finish:

Jun 19 14:35:45 stshamail1 dovecot: Panic: IMAP(username): file 
message-parser.c: line 620 (preparsed_parse_body_init): assertion failed: 
(offset >= ctx->input->v_offset)

Jun 19 14:35:45 stshamail1 dovecot: IMAP(username): Raw backtrace: imap 
[0x80ce9f4] -> imap [0x80ce60c] -> imap [0x80c83f4] -> 
imap(message_parser_parse_next_block+0x1d) [0x80c802d] -> 
imap(message_search_msg+0x5f) [0x80c9a7f] -> imap [0x8098e0b] -> imap 
[0x809e42b] -> imap(mail_search_args_foreach+0x40) [0x809e540] -> 
imap(index_storage_search_next_nonblock+0x256) [0x80989f6] -> imap 
[0x805dc96] -> imap [0x805e0d6] -> imap(io_loop_handle_timeouts+0x80) 
[0x80d59c0] -> imap(io_loop_handler_run+0x82) [0x80d6522] -> 
imap(io_loop_run+0x28) [0x80d5828] -> imap(main+0x4ac) 
[0x806809c] -> /lib/libc.so.6(__libc_start_main+0xdc) [0x4003adec] -> imap 
[0x805a021]

Jun 19 14:35:45 stshamail1 dovecot: child 30070 (imap) killed with signal 6

What's wrong here? How to proceed with debugging?

Thanks,
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


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: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 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 
> 3 uid search header Disposition-Notification-To ""
> 4 uid store  +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



[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



[Dovecot] Sieve plugin changes 'To' header on redirect

2008-05-26 Thread Patrick Nagel
Hi,

I'm a bit confused by the fact that the 'To' header is being modified by sieve 
when a message is being redirected.

RFC3028 states in chapter 4.3:
>   The "redirect" action is used to send the message to another user at
>   a supplied address, as a mail forwarding feature does.  The
>   "redirect" action makes no changes to the message body or existing
>   headers, but it may add new headers.  The "redirect" modifies the
>   envelope recipient.
(see http://www.ietf.org/rfc/rfc3028.txt)

The situation here is as follows:

I'm sending a mail to "[EMAIL PROTECTED]" (To: ...), which is being delivered 
to "[EMAIL PROTECTED]" (Delivered-To: ...).

User city has the following sieve script:
  redirect "[EMAIL PROTECTED]";
  keep;

One would expect, that the 'To:' header is identical in both mails, but 
instead I get something like this:

Mail in 'city' mailbox:
> Delivered-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: test mail

(Redirected) Mail in 'other' mailbox:
> Delivered-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: test mail

It seems as if sieve uses the 'Delivered-To' header as the 'To' header in the 
redirected mail - which is not what I need.

Am I misunderstanding something here, or does dovecot's sieve plugin not act 
according to the RFC?

Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 5427 7799 x 826 Fax:   +86 (21) 6485 0071

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


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


Re: [Dovecot] Bug: subscriptions file does not take on th e same perms as dovecot-shared

2008-05-26 Thread Patrick Nagel
On Monday 26 May 2008, Timo Sirainen wrote:
> To me this sounds like it would be better handled by configuring
> Thunderbird to not use subscriptions at all. Then all mailboxes are
> always listed.

... which can be done by unchecking 'Show only subscribed folders' in Account 
Settings / Server Settings / Advanced... (or 
setting 'mail.server.server.using_subscription' to false).

Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 5427 7799 x 826 Fax:   +86 (21) 6485 0071

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


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


Re: [Dovecot] Multiple files for sieve

2008-05-26 Thread Patrick Nagel
Hi,

On Sunday 25 May 2008, Charles Marcus wrote:
> On 5/24/2008 Adrián Ribao Martínez wrote:
> > I want this filter for all the users of the system, but I also want
> > to tell dovecot to look in the /home/user/mail/.sieve file for custom
> > per-user filters.
> > Can I do this?
>
> 'Include' support is only in v1.1, but I don't use it (yet) so can't
> vouch for how well it works...

It works as advertised :) I'm using it here already.

With

 sieve_global_path = /var/sieve-global/main.sieve

in the protocol lda {} section and

 sieve = mailfilter.sieve

in the plugin {} section, I can put user-specific rules into 
~/mailfilter.sieve. If I don't, /var/sieve-global/main.sieve will be 
processed. If I want both to be processed, I put

 require ["include"]
 include :global "main.sieve";

into the ~/mailfilter.sieve.

Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 5427 7799 x 826 Fax:   +86 (21) 6485 0071

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


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


Re: [Dovecot] Looking for suggestions: How to strip attachments from mails

2008-05-19 Thread Patrick Nagel
Hi Jason,

On Friday 16 May 2008, Jason Fesler wrote:
> > I'm looking for a way to strip attachments from incoming mails on the
> > server.
>
>   http://detach.optimism.cc/
>
> works in line with procmail or similiar.  It is not a standalone server;
> but instead acts as a filter.  I use it in front of my mailing lists, so
> that attachements are not sent out.

Thank you very much for your suggestion. I gave 'detach' a try, and saw that 
you contributed to it :)

It does exactly what I need. I set it up as a transport for postfix. The 
script that gets called by postfix also takes care about delivery (pipe 
through dovecot's 'deliver' after the detaching is finished, or, in case of 
an error during the detachment process, pipe the original message (including 
attachments) through 'deliver'. I didn't want to install procmail, because I 
need dovecot's sieve plugin for all other filtering needs...

I've got one problem though (which I reported to Ryan Hamilton): detach 
doesn't handle attachments with filenames that contain non-ASCII characters 
well. I don't know anything about perl, so I didn't dig deeper yet... Would 
you perhaps be interested in looking into the issue?

> I couple this with "demime" to further reduce the remaining text to plain
> text ( http://scifi.squawk.com/demime.html - uh oh, host not responding..
> and I don't see an alternate location for it).

For me it's just about getting those attachments to some SAMBA share - the 
rest of the mail should stay as it was.

Thanks again for that hint,
Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 5427 7799 x 826 Fax:   +86 (21) 6485 0071

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


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


[Dovecot] Looking for suggestions: How to strip attachments from mails

2008-05-16 Thread Patrick Nagel
Hi,

I know this is not 100% on-topic, but I'll try anyway...

I'm looking for a way to strip attachments from incoming mails on the server. 
The attachments should be stored on a file server (where users have access 
via SAMBA) and only a link to the file (UNC path) should remain in the mail 
body. This is to prevent the mail storage from filling up with a large amount 
of big mails where at the same time the 'payload' (attached file) is not 
conveniently accessible by the users.

The current setup is postfix / dovecot deliver / dovecot (with sieve plugin). 
I'm considering piping the mails through something like mimeStrip.pl 
(http://freshmeat.net/projects/mimestrip.pl/), but therefore I'd probably 
need to bring procmail/maildrop into the game, right?

Or are there other (better) ways to accomplish this?

Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 5427 7799 x 826 Fax:   +86 (21) 6485 0071

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


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


Re: [Dovecot] deliver exits with status 89 on some but not all mails of a batch

2008-05-15 Thread Patrick Nagel
Hi,

On Tuesday 13 May 2008, Charles Marcus wrote:
> Lots of nifty stuff (much improved performance for one thing) in the
> impending 1.1 (currently at rc5)...
>
> If this is a new installation, it might be worth going ahead and
> upgrading to it...

I upgraded again, to 1.1rc5, mostly because of the improved sieve support (I 
need "include"), and so far it's working quite well.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 5427 7799 x 826 Fax:   +86 (21) 6485 0071

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


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


Re: [Dovecot] deliver exits with status 89 on some but not all mails of a batch [SOLVED]

2008-05-13 Thread Patrick Nagel
Hi,

On Wednesday 14 May 2008, Patrick Nagel wrote:
> I'm quite confident this problem will be solved once I put /tmp on the
> harddisk (with plenty of space).

That was indeed it. Now 'deliver' works reliably, from what I can tell after 
this short period of time.

Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 5427 7799 x 826 Fax:   +86 (21) 6485 0071

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


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


Re: [Dovecot] deliver exits with status 89 on some but not all mails of a batch

2008-05-13 Thread Patrick Nagel
Hi,

On Tuesday 13 May 2008, Charles Marcus wrote:
> On 5/13/2008, Patrick Nagel ([EMAIL PROTECTED]) wrote:
> > Thanks for that hint. I just upgraded to 1.0.13. I'll watch it carefully
> > and report back here in a few days.
>
> Lots of nifty stuff (much improved performance for one thing) in the
> impending 1.1 (currently at rc5)...
>
> If this is a new installation, it might be worth going ahead and
> upgrading to it...

I prefer staying with a somewhat more tested version for now.

Back to my problem: I overlooked some pretty important information in the 
logs:

write_full(/tmp/dovecot.deliver) failed: No space left on device

As it seems, deliver needs to temporarily store the mail in /tmp (for whatever 
reason), which is currently limited to 16 MB (tmpfs, this is the default 
setup for Linux-VServer guests) on my system. When I tested sending a large 
mail (>16 MB) to myself, it also got bounced with the same message as in my 
original post.

I'm quite confident this problem will be solved once I put /tmp on the 
harddisk (with plenty of space).

Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 5427 7799 x 826 Fax:   +86 (21) 6485 0071

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


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


Re: [Dovecot] deliver exits with status 89 on some but not all mails of a batch

2008-05-13 Thread Patrick Nagel
Hi Charles,

On Tuesday 13 May 2008, Charles Marcus wrote:
> On 5/13/2008, Patrick Nagel ([EMAIL PROTECTED]) wrote:
> > I'm trying to get dovecot's LDA 'deliver' to deliver mails that come
> > in through a postfix daemon on the same box. I'm talking about
> > dovecot version 1.0.rc15 (on CentOS 5 as Linux-VServer guest on a
> > CentOS 5 host)
>
> Upgrade...
>
> It may or may not fix this particular problem, but rc15 is very old and
> buggy...
>
> atrpms has rpms for Centos5...

Thanks for that hint. I just upgraded to 1.0.13. I'll watch it carefully and 
report back here in a few days.

Patrick.

-- 
STAR Software (Shanghai) Co., Ltd.http://www.star-group.net/
Phone:+86 (21) 5427 7799 x 826 Fax:   +86 (21) 6485 0071

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


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


[Dovecot] deliver exits with status 89 on some but not all mails of a batch

2008-05-13 Thread Patrick Nagel
Hi,

I'm trying to get dovecot's LDA 'deliver' to deliver mails that come in through 
a postfix daemon on the same box. I'm talking 
about dovecot version 1.0.rc15 (on CentOS 5 as Linux-VServer guest on a CentOS 
5 host).

Configuration
-

# /etc/dovecot.conf
ssl_cert_file: /etc/pki/selfmade/server.crt
ssl_key_file: /etc/pki/selfmade/server.key
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
verbose_proctitle: yes
mail_extra_groups: mail
mail_location: maildir:~/Maildir
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
auth default:
  verbose: yes
  passdb:
driver: ldap
args: /etc/dovecot-ldap.conf
  userdb:
driver: ldap
args: /etc/dovecot-ldap.conf
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: postfix
master:
  path: /var/run/dovecot/auth-master
  mode: 384
  user: dovecot
  group: dovecot


dovecot-ldap.conf looks like this:

uris = ldap://dbserver
dn = cn=dovecot,ou=services,dc=company,dc=net
dnpass = secret
ldap_version = 3
base = ou=people,dc=company,dc=net
scope = onelevel
user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid
user_filter = (&(objectClass=posixAccount)(uid=%n))
pass_attrs = uid=user,userPassword=password
pass_filter = (&(objectClass=posixAccount)(uid=%u))
default_pass_scheme = LDAP-MD5


postfix has mailbox_transport set to dovecot, and master.cf contains the 
following:

dovecot   unix  -   n   n   -   -   pipe
flags=DRhu user=fry:fry argv=/usr/libexec/dovecot/lda/deliver -d 
${recipient}


Problem
---

When a lot of mails come in 'at the same time', for example because an employee 
mailed all other (local) employees, the 
following happens: Some mails are being delivered as advertised, but on some 
mails, deliver exits with status 89 and the message 
bounces. Here is a (postfix) log that illustrates the problem. I replaced all 
receivers with 'xy', but they are in fact all 
different.

May 13 17:58:32 mail1 postfix/smtpd[28164]: connect from unknown[192.168.0.103]
May 13 17:58:32 mail1 postfix/smtpd[28164]: 1D6508FD93FF: 
client=unknown[192.168.0.103]
May 13 17:58:33 mail1 postfix/cleanup[28165]: 1D6508FD93FF: message-id=<[EMAIL 
PROTECTED]>
May 13 17:58:33 mail1 postfix/qmgr[27255]: 1D6508FD93FF: from=<[EMAIL 
PROTECTED]>, size=1613090, nrcpt=31 (queue active)
May 13 17:58:33 mail1 postfix/smtpd[28164]: disconnect from 
unknown[192.168.0.103]
May 13 17:58:33 mail1 postfix/pipe[28169]: 1D6508FD93FF: to=<[EMAIL 
PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=dovecot, 
delay=1.9, delays=1.5/0/0/0.35, dsn=2.0.0, status=sent (delivered via dovecot 
service)
May 13 17:58:33 mail1 postfix/pipe[28299]: 1D6508FD93FF: to=<[EMAIL 
PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=dovecot, 
delay=1.9, delays=1.5/0.02/0/0.34, dsn=2.0.0, status=sent (delivered via 
dovecot service)
May 13 17:58:33 mail1 postfix/pipe[28168]: 1D6508FD93FF: to=<[EMAIL 
PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=dovecot, 
delay=1.9, delays=1.5/0/0/0.35, dsn=2.0.0, status=sent (delivered via dovecot 
service)
May 13 17:58:33 mail1 postfix/pipe[28298]: 1D6508FD93FF: to=<[EMAIL 
PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=dovecot, 
delay=1.9, delays=1.5/0.01/0/0.34, dsn=2.0.0, status=sent (delivered via 
dovecot service)
May 13 17:58:34 mail1 postfix/pipe[28362]: 1D6508FD93FF: to=<[EMAIL 
PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=dovecot, 
delay=2.7, delays=1.5/0.21/0/0.95, dsn=5.3.0, status=bounced (Command died with 
status 89: "/usr/libexec/dovecot/lda/deliver")
May 13 17:58:34 mail1 postfix/pipe[28304]: 1D6508FD93FF: to=<[EMAIL 
PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=dovecot, 
delay=2.7, delays=1.5/0.1/0/1.1, dsn=2.0.0, status=sent (delivered via dovecot 
service)
May 13 17:58:34 mail1 postfix/pipe[28320]: 1D6508FD93FF: to=<[EMAIL 
PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=dovecot, 
delay=2.7, delays=1.5/0.13/0/1, dsn=2.0.0, status=sent (delivered via dovecot 
service)
May 13 17:58:34 mail1 postfix/pipe[28311]: 1D6508FD93FF: to=<[EMAIL 
PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=dovecot, 
delay=2.7, delays=1.5/0.12/0/1, dsn=2.0.0, status=sent (delivered via dovecot 
service)
May 13 17:58:34 mail1 postfix/pipe[28313]: 1D6508FD93FF: to=<[EMAIL 
PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=dovecot, 
delay=2.7, delays=1.5/0.12/0/1, dsn=2.0.0, status=sent (delivered via dovecot 
service)
May 13 17:58:34 mail1 postfix/pipe[28306]: 1D6508FD93FF: to=<[EMAIL 
PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=dovecot, 
delay=2.7, delays=1

  1   2   >