Re: [Dovecot] Quota-Status issue

2014-02-24 Thread Charles Sprickman
On Feb 20, 2014, at 5:12 PM, Cyberonic Turbo wrote:

> Following this guide:
> http://sys4.de/en/blog/2013/04/08/postfix-dovecot-mailbox-quota/ I can't
> seem to get it to work, as soon as I add the smtpd_recipient_restrictions
> setting to postfix I can no longer send mail at all. I get the message SMTP
> Error (450): Failed to add recipient "postmas...@example.com" (4.7.1 :
> Recipient address rejected: Internal error occurred. Refer to server log
> for more information.). I googled around and found this command to test the
> quota-status service: printf "recipient=postmaster at
> example.com\nsize=1234\n\n"
> | nc 127.0.0.1 12340
> It seems to always return the quota_status_nouser message. I'm really
> stumped here. What logs do I need to check for errors and does anyone have
> any experience with this?

I'm not an expert, I just followed the same guide a few days ago
while preparing to front an old vpopmail system with postfix.  It
did work for me.

Before moving on to enabling the check in postfix, verify that the
dovecot side is working.

Your example test should work, I did the same here:

[root@util-b /usr/local/etc/postfix]# printf 
"recipient=c...@test.bway.net\nsize=12304\n\n" | nc mbox.i 25001
action=DUNNO

[root@util-b /usr/local/etc/postfix]# printf 
"recipient=c...@test.bway.net\nsize=1234\n\n" | nc mbox.i
25001 action=552 5.2.2 Mailbox is full

If that fails for you, examine the dovecot log.  In my case, I did
have to provide the full path to the "quota-status" binary and
dovecot complained about not being able to find it.  Make sure you
actually have quota-status installed.  Full dovecot snippet for this
below:

# report quota to postfix
# see http://sys4.de/en/blog/2013/04/08/postfix-dovecot-mailbox-quota/

plugin {
quota_status_success = DUNNO
quota_status_nouser = DUNNO
quota_status_overquota = "552 5.2.2 Mailbox is full"
}

service quota-status {
executable = /usr/local/libexec/dovecot/quota-status -p postfix
inet_listener {
address = 10.x.x.19  # In my case I want it listening on a particular IP
port = 25001
}
client_limit = 5
}

If the dovecot portion is working, then move on to your postfix logs…

Charles

> 
> I'm running Dovect 2.2.10 with Postfix 2.6.6
> 
> Here's my dovecot -n result:
> 
> # 2.2.10: /etc/dovecot/dovecot.conf
> # OS: Linux 2.6.32-431.5.1.el6.x86_64 x86_64 CentOS release 6.5 (Final)
> auth_master_user_separator = *
> auth_mechanisms = PLAIN LOGIN
> dict {
>  acl = mysql:/etc/dovecot/dovecot-share-folder.conf
>  quotadict = mysql:/etc/dovecot/dovecot-used-quota.conf
> }
> first_valid_uid = 2000
> last_valid_uid = 2000
> listen = *
> log_path = /var/log/dovecot.log
> mail_gid = 2000
> mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/
> mail_plugins = quota
> mail_uid = 2000
> managesieve_notify_capability = mailto
> managesieve_sieve_capability = fileinto reject envelope encoded-character
> vacation subaddress comparator-i;ascii-numeric relational regex imap4flags
> copy include variables body enotify environment mailbox date ihave
> namespace {
>  inbox = yes
>  location =
>  prefix =
>  separator = /
>  type = private
> }
> namespace {
>  list = children
>  location = maildir:/%%Lh/Maildir/:INDEX=/%%Lh/Maildir/Shared/%%u
>  prefix = Shared/%%u/
>  separator = /
>  subscriptions = yes
>  type = shared
> }
> passdb {
>  args = /etc/dovecot/dovecot-mysql.conf
>  driver = sql
> }
> passdb {
>  args = /etc/dovecot/dovecot-master-users-password
>  driver = passwd-file
>  master = yes
> }
> plugin {
>  acl = vfile
>  acl_shared_dict = proxy::acl
>  auth_socket_path = /var/run/dovecot/auth-master
>  autocreate = INBOX
>  autocreate2 = Sent
>  autocreate3 = Trash
>  autocreate4 = Drafts
>  autocreate5 = Junk
>  autosubscribe = INBOX
>  autosubscribe2 = Sent
>  autosubscribe3 = Trash
>  autosubscribe4 = Drafts
>  autosubscribe5 = Junk
>  quota = dict:user::proxy::quotadict
>  quota_grace = 10%%
>  quota_rule = *:storage=1G
>  quota_status_nouser = DUNNO
>  quota_status_overquota = 552 5.2.2 Mailbox is full
>  quota_status_success = DUNNO
>  quota_warning = storage=85%% quota-warning 85 %u
>  quota_warning2 = storage=90%% quota-warning 90 %u
>  quota_warning3 = storage=95%% quota-warning 95 %u
>  sieve = /%Lh/sieve/dovecot.sieve
>  sieve_dir = /%Lh/sieve
>  sieve_global_dir = /var/vmail/sieve
>  sieve_global_path = /var/vmail/sieve/dovecot.sieve
> }
> protocols = pop3 imap sieve
> service auth {
>  unix_listener /var/spool/postfix/dovecot-auth {
>group = postfix
>mode = 0666
>user = postfix
>  }
>  unix_listener auth-master {
>group = vmail
>mode = 0666
>user = vmail
>  }
>  unix_listener auth-userdb {
>group = vmail
>mode = 0660
>user = vmail
>  }
> }
> service dict {
>  unix_listener dict {
>group = vmail
>mode = 0660
>user = vmail
>  }
> }
> service imap-login {
>  process_limit = 500
>  service_count = 1
> }
> service pop3-login {
>  service_count = 1
> }
> service

Re: [Dovecot] Size detection/replair does not work with zlib

2013-12-12 Thread Charles Sprickman
Sorry for the top post, but this is a quick one.

While I wasn't using compressed mailboxes, I ran into a similar bug, and I 
can't help but wonder if there's some commonality here.  There was no 
resolution (can't find a bug tracker to add the issue to), but have a look:

http://thr3ads.net/dovecot/2013/10/2693193-cached-message-size-errors  (note: 
gmane seems down, hence the oddball archive service)

Charles

On Dec 12, 2013, at 6:47 AM, Roland Rosenfeld wrote:

> Hi!
> 
> Usually dovecot auto detects or repairs the size of a maildir
> message.  So I can place a message named "foo" in the cur directory
> and dovecot uses it.
> 
> Now I tried the same with a zlib compressed message but here dovecot
> doesn't recognize/repair the size of the message.
> 
> When I access this folder via IMAP the connection is diconnected and
> in dovecot logs I see the following error messages:
> 
> Error: Cached message size smaller than expected (805 < 2666)
> Error: Corrupted index cache file /somedir/dovecot.index.cache: Broken 
> physical size for mail UID 23
> Error: read() failed: Input/output error (FETCH for mailbox INBOX UID 23)
> Disconnected: Internal error occurred. Refer to server log for more 
> information. [2013-12-12 10:54:18] in=321 out=1977
> 
> As you can see in the first line, dovecot does know the compressed
> size of the file (805) as well as the uncompressed size (2666), but it
> isn't able to repair its index for this.
> 
> If I modify the setup a little with a standard file naming but with a
> wrong file size in S-flag (compressed size instead of uncompressed
> size), the log entries become stranger:
> 
> Error: Cached message size smaller than expected (805 < 2666)
> Error: Maildir filename has wrong S value, renamed the file from 
> /somedir/cur/1386772057.M152553P9709.host,S=805:2, to 
> /somedir/cur/1386772057.M152553P9709.host,S=805:2,
> 
> So here dovecot detects the wrong S value, but instead of fixing it by
> using the uncompressed size, it renames to the same file name as
> before...
> 
> All the above was tested with dovecot 2.1.17.
> We did a short cross test with 2.2.9 which gives somewhat different
> error messages, but also isn't able to detect/repair the
> (uncompressed) file size:
> 
> Error: Cached message size smaller than expected (805 < 2666)
> Error: Corrupted index cache file /somedir/dovecot.index.cache: Broken 
> physical size for mail UID 23
> Error: read(zlib(/somedir/cur/foo)) failed: Invalid argument
> 
> We also noticed that on both dovecot versions after trying to access
> the above file, dovecot.index.cache is always deleted and not
> rebuild...
> 
> Is all this intended behavior?  It sounds different to the standard
> behavior of dovecot, that repairs broken folders if possible...
> 
> Ciao
> Roland



Re: [Dovecot] OT: not dovecot related Re: trashed

2013-11-13 Thread Charles Sprickman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

One thing I enjoy about the Postfix lists is that when Wietse steps in
and tells people to STFU, they do.

Ignoring Timo's request to do the same is disrespecting him and his work.

Charles

On Nov 13, 2013, at 6:40 PM, Reindl Harald wrote:

> 
> Am 14.11.2013 00:08, schrieb Noel Butler:
>> As for listed in dnsbl, the same thing would happen if he was reported
>> to spamcop or sorbs, or any other list. Listings are to punish the
>> offenders to force them to mend their ways
> 
> no, they are for block mass mails and junk not for playing internet
> police because oyu disklike someone personally
> 
>> it was not just because he was abusing me in private, I filtered him out
> 
> which is your right
> 
>> and his threats of having multiple domains, it was decided his
>> IP range would be listed
> 
> in case of a @gmail-address you would be too cowardly to block all google 
> ranges
> 
>> when it was reported by Fedora list members (as not a subscriber to it my
>> colleague spent some time on their archives, and he is an even bitter
>> jerk over there)
> 
> that must be the reason for 
> https://www.google.com/search?q=please+discontinue+to+moderate+Haralds+posts
> 
>> because then his employer might force him to change his attitude
> 
> you must feel really good by misuse you pwoer as RBL admin
> 
>> The above is informational and not open for any discussion, on, or
>> off-list, I refuse to comment any further on it... or any of his threads
>> really :)
> 
> and you believe someone takes you really serious in case of this behavior
> "hey, i creep out of my hole to say sinething because a stripped quote and
> go back in ignore mode not looking left or right"?
> 
> in which world do you live that you really think you need to protect it?
> yes, i know, you do ignore my posts - and that is why you better should
> have been quite instead speak in my direction, if you have something
> to say accept answers or do not say anything at all
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQEcBAEBAgAGBQJShA7rAAoJEMfwH0dqLIp2IW4IAKOt/CHG+DHnvCJ+uqaoYe5d
iEvkqwvec0gx44I4VlrpmyDBgUC+VmFFghjFkWvN2fNKLegKvqsE+VelqyROnAc0
7XEBgeJLI6dRC1aS2c2mlPlaIaK/evqi5wxZfmWlVBCA0UGK1/n3qJlaNsCzTi7L
n36PNlOgGjMqkm6d5LcDBByQB6ma9vJo1On0cRVay6epDdHIZDUMDP7DvsM9zXch
oARgbWWD51chKJ3s+4BFkZi16ly314niMqJeWFltdjZtayLcrtT5WVHD36NOVdYM
jpWGqk4j3dK22atjRrHRmPYhbGavfCJL8txLrvJV9wrCvbc9q2HaoCCWx5AFpmo=
=fy79
-END PGP SIGNATURE-


Re: [Dovecot] Strange output from LIST command

2013-10-16 Thread Charles Sprickman

On Oct 16, 2013, at 5:45 PM, azurIt wrote:

>> Od: Charles Sprickman 
>> Komu: azurIt 
>> Dátum: 16.10.2013 23:20
>> Predmet: Re: [Dovecot] Strange output from LIST command
>> 
>> I just did a move from Courier to Dovecot 2.2, and also followed the 
>> namespace suggestions in the wiki.
>> 
>> I've not had any issues, but if you want to drop me a note showing the IMAP 
>> commands and results you get for LIST, I'll compare locally and let you know 
>> if I see anything different…
>> 
>> Charles
>> -- 
>> Charles Sprickman
>> NetEng/SysAdmin
>> Bway.net - New York's Best Internet www.bway.net
>> sp...@bway.net - 212.655.9344
>> 
> 
> 
> 
> Thank you. I tried to upgrade to 2.1.17 just to see if it helps - it didn't. 
> Looks like an unfixed bug in 2.1.. I will see tomorrow if i can rebuild 
> Debian experimental packages so i can try version 2.2.

If it helps, here's a simple session:

Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE 
STARTTLS AUTH=PLAIN] Dovecot ready - bway.net.
. login xx xx
. OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT 
SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND 
URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED 
I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH 
LIST-STATUS SPECIAL-USE BINARY MOVE NOTIFY QUOTA] Logged in
. namespace
* NAMESPACE (("INBOX." ".")) NIL NIL
. OK Namespace completed.
. list "" "INBOX.%"
* LIST (\HasNoChildren) "." INBOX.old
* LIST (\HasNoChildren \UnMarked) "." INBOX.test
* LIST (\HasNoChildren \UnMarked) "." INBOX.sent-mail
* LIST (\HasNoChildren) "." INBOX.sent-mail-aug-2007
* LIST (\HasNoChildren \UnMarked) "." INBOX.saved-messages
* LIST (\HasNoChildren \UnMarked) "." INBOX.Virus
* LIST (\HasNoChildren \UnMarked \Trash) "." INBOX.Trash
* LIST (\HasNoChildren \UnMarked \Junk) "." INBOX.Spam
* LIST (\HasNoChildren \Sent) "." INBOX.Sent
* LIST (\HasNoChildren \UnMarked \Drafts) "." INBOX.Drafts
* LIST (\HasNoChildren \UnMarked) "." "INBOX.Another odd one, 2"
* LIST (\HasNoChildren \UnMarked) "." "INBOX.A fuuny folder!"
. OK List completed.
. logout
* BYE Logging out
. OK Logout completed.
Connection closed by foreign host.

Namespace config:

namespace inbox {
# per http://wiki2.dovecot.org/Migration/Courier
  prefix = INBOX.
  separator = .
  type = private
  inbox = yes
  hidden = no
  list = yes
  subscriptions = yes
}

One issue I ran into with the courier-compatible namespaces is that in my quota 
plugin rules, I had to explicitly state the full path to the "special" 
mailboxes when applying quota rules to them:

(in 90-quota.conf)

plugin {
  quota_rule = Inbox.Trash:storage=+100M
  quota_rule2 = Inbox.Spam:storage=+100M
}

HTH,

Charles

> 
> azur



Re: [Dovecot] Plugin issue with update from 2.0.19 to 2.1.17

2013-10-15 Thread Charles Sprickman

On Oct 15, 2013, at 4:33 PM, Reinaldo Matukuma wrote:

> Hello. Probably only Timo can help-me with this.
> 
> I have a self-made plugin based on the zlib plugin that i use to cryptograph 
> the messages at inbox.
> 
> As a side-effect of the cryptography, my plugin changes the size of the 
> message, but until 2.0.19 this works well with dovecot index and the W/S 
> flags.
> 
> But now, i'm going to upgrade to 2.1.17 and now i have these messages on log 
> at my test ambiance:
> 
> Oct 15 20:19:25 test dovecot: imap(reina...@exemplo.com.br): Error: Cached 
> message size smaller than expected (367 < 529)
> Oct 15 20:19:25 test dovecot: imap(reina...@exemplo.com.br): Error: Maildir 
> filename has wrong S value, renamed the file from 
> /storage/test/messages/exemplo.com.br/reinaldo/Maildir/.Sent/cur/1381879158.M634385P5208.test,S=367,W=378:2,S
>  to 
> /storage/test/messages/exemplo.com.br/reinaldo/Maildir/.Sent/cur/1381879158.M634385P5208.test,S=529:2,S
> Oct 15 20:19:25 test dovecot: imap(reina...@exemplo.com.br): Error: Corrupted 
> index cache file 
> /storage/test/messages/exemplo.com.br/reinaldo/Maildir/.Sent/dovecot.index.cache:
>  Broken physical size for mail UID 6

I think there's something else up, this looks quite similar to what I reported 
the other day:

http://dovecot.org/list/dovecot/2013-October/092917.html

Do you get further messages after the "broken physical size" indicating that 
dovecot is then trying to open the file based on the original filename?

Regardless, setting this should turn off the file size/name corrections, 
perhaps that will help:

maildir_broken_filename_sizes=yes

Charles

> 
> I understood with these messages that the dovecot is arguing to get the real 
> size of the file now, overriding the return of size from my crypto plugin. 
> But i don't understood if this is a consequence from the changes to correct 
> the index issue (the dovecot.index.cache issue).
> 
> So... I want know if the correct way to fix this would be change my plugin to 
> return the real size of the file (that will be larger than the effective 
> message that the plugin returne after the de-cryptography) or if i need use 
> some new  function to the plugin replace the expected size based on the real 
> size of the message, not of the file.
> 
> Thanks
> 
> Reinaldo
> 



Re: [Dovecot] cached message size errors

2013-10-10 Thread Charles Sprickman
Following up to myself on this, I think I'm basically seeing a variation on 
this bug from 2.1.x:

http://www.dovecot.org/list/dovecot/2012-March/064211.html

To restate what happens:

* dovecot detects the size mismatch
* file is renamed to correct it
* the cache file is flagged as incorrect due to the size mismatch
* next read of the mailbox dovecot looks for the *old* filename

The workaround to set "maildir_broken_filename_sizes=yes" seems to work.

The cause of all this of course was Courier, as it was what generated all the 
mismatches in the first place, but it seems like this is in turn triggering a 
bug in Dovecot.  It kind of seems like the file gets renamed but the index is 
never updated to reflect this?

I've got plenty of samples, here's what one looks like, always just a few bytes 
off:

-rw---  1 vpopmail  vchkpw  23731 Oct  4 16:11 
cur/1380917460.26966.xena.bway.net,S=23666:2,S

Also, while that thread mentions gzipped, messages, these are not.

Charles

On Oct 10, 2013, at 2:25 PM, Charles Sprickman wrote:

> Hello,
> 
> We recently moved from courier to dovecot, and I'm seeing a handful
> of errors that prevent people from retrieving email.
> 
> Below is a snippet of the log sequence I see when this happens:
> 
> Oct 10 13:44:24 mbox dovecot: imap(x...@bway.net): Error: Cached message size 
> smaller than expected (1759 < 1830)
> Oct 10 13:44:24 mbox dovecot: imap(x...@bway.net): Error: Maildir filename 
> has wrong S value, renamed the file from 
> /home/vpopmail/domains/bway.net/1/xxx/Maildir/cur/1381381552.91972.xena.bway.net,S=1759:2,b
>  to 
> /home/vpopmail/domains/bway.net/1/xxx/Maildir/cur/1381381552.91972.xena.bway.net,S=1830:2,b
> Oct 10 13:44:24 mbox dovecot: imap(x...@bway.net): Error: Corrupted index 
> cache file /home/vpopmail/domains/bway.net/1/xxx/Maildir/dovecot.index.cache: 
> Broken physical size for mail UID 447401
> Oct 10 13:44:24 mbox dovecot: imap(x...@bway.net): Error: 
> read(/home/vpopmail/domains/bway.net/1/xxx/Maildir/cur/1381381552.91972.xena.bway.net,S=1759:2,b)
>  failed: Invalid argument
> Oct 10 13:44:24 mbox dovecot: imap(x...@bway.net): Disconnected: Internal 
> error occurred. Refer to server log for more information. [2013-10-10 
> 13:44:24] in=784 out=3017
> 
> Basically it looks like dovecot detects a mismatch in the file size
> vs.  the file size embedded in the maildir filename, tries to fix it
> and then has issues reading the fixed file.  Removing the file in
> question allows the user to retrieve email.  The "invalid argument"
> error seems especially strange, as I'm able to view the file by hand
> with no problems.
> 
> Blowing away the indexes and letting them get recreated seems to not
> help at all.
> 
> This was an old vpopmail setup with both maildrop and vdelivermail
> doing the final delivery both now and prior to the migration to
> dovecot.
> 
> For a quick fix, is there a way to have dovecot ignore the error and
> present the rest of the mailbox?
> 
> Longer term fix, I'm not even sure where to start I've used dovecot
> elsewhere for quite some time (with maildirs) and I've never had an
> issue like this.
> 
> 'doveconf -n' below...
> 
> Thanks,
> 
> Charles
> -- 
> Charles Sprickman
> NetEng/SysAdmin
> Bway.net - New York's Best Internet www.bway.net
> sp...@bway.net - 212.655.9344
> 
> 
> # 2.2.5: /usr/local/etc/dovecot/dovecot.conf
> # OS: FreeBSD 8.4-RELEASE-p1 amd64
> auth_default_realm = bway.net
> auth_socket_path = /var/run/dovecot/auth-userdb
> auth_verbose = yes
> base_dir = /var/run/dovecot/
> default_process_limit = 300
> disable_plaintext_auth = no
> first_valid_uid = 89
> instance_name = dovecot1
> last_valid_uid = 90
> listen = 127.0.0.1,216.220.96.26,216.220.96.25
> login_greeting = Dovecot ready - bway.net.
> mail_plugins = " quota"
> mailbox_list_index = yes
> namespace inbox {
>  hidden = no
>  inbox = yes
>  list = yes
>  location =
>  mailbox Drafts {
>special_use = \Drafts
>  }
>  mailbox Sent {
>special_use = \Sent
>  }
>  mailbox "Sent Messages" {
>special_use = \Sent
>  }
>  mailbox Spam {
>special_use = \Junk
>  }
>  mailbox Trash {
>special_use = \Trash
>  }
>  prefix = INBOX.
>  separator = .
>  subscriptions = yes
>  type = private
> }
> passdb {
>  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>  driver = sql
> }
> plugin {
>  quota = maildir:User quota
>  quota_rule = Inbox.Trash:storage=+100M
>  quota_rule2 = Inbox.Spam:storage=+100M
> }
> pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
> pop3_uidl_format = %v-%u
> protocols = imap pop3
> ssl_cert =  ssl_key =  userdb {
>  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>  driver = sql
> }
> protocol imap {
>  mail_max_userip_connections = 40
>  mail_plugins = " quota imap_quota"
> }
> protocol pop3 {
>  mail_max_userip_connections = 20
> }
> 
> 
> 



[Dovecot] cached message size errors

2013-10-10 Thread Charles Sprickman
Hello,

We recently moved from courier to dovecot, and I'm seeing a handful
of errors that prevent people from retrieving email.

Below is a snippet of the log sequence I see when this happens:

Oct 10 13:44:24 mbox dovecot: imap(x...@bway.net): Error: Cached message size 
smaller than expected (1759 < 1830)
Oct 10 13:44:24 mbox dovecot: imap(x...@bway.net): Error: Maildir filename has 
wrong S value, renamed the file from 
/home/vpopmail/domains/bway.net/1/xxx/Maildir/cur/1381381552.91972.xena.bway.net,S=1759:2,b
 to 
/home/vpopmail/domains/bway.net/1/xxx/Maildir/cur/1381381552.91972.xena.bway.net,S=1830:2,b
Oct 10 13:44:24 mbox dovecot: imap(x...@bway.net): Error: Corrupted index cache 
file /home/vpopmail/domains/bway.net/1/xxx/Maildir/dovecot.index.cache: Broken 
physical size for mail UID 447401
Oct 10 13:44:24 mbox dovecot: imap(x...@bway.net): Error: 
read(/home/vpopmail/domains/bway.net/1/xxx/Maildir/cur/1381381552.91972.xena.bway.net,S=1759:2,b)
 failed: Invalid argument
Oct 10 13:44:24 mbox dovecot: imap(x...@bway.net): Disconnected: Internal error 
occurred. Refer to server log for more information. [2013-10-10 13:44:24] 
in=784 out=3017

Basically it looks like dovecot detects a mismatch in the file size
vs.  the file size embedded in the maildir filename, tries to fix it
and then has issues reading the fixed file.  Removing the file in
question allows the user to retrieve email.  The "invalid argument"
error seems especially strange, as I'm able to view the file by hand
with no problems.

Blowing away the indexes and letting them get recreated seems to not
help at all.

This was an old vpopmail setup with both maildrop and vdelivermail
doing the final delivery both now and prior to the migration to
dovecot.

For a quick fix, is there a way to have dovecot ignore the error and
present the rest of the mailbox?

Longer term fix, I'm not even sure where to start I've used dovecot
elsewhere for quite some time (with maildirs) and I've never had an
issue like this.

'doveconf -n' below...

Thanks,

Charles
-- 
Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet www.bway.net
sp...@bway.net - 212.655.9344


# 2.2.5: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 8.4-RELEASE-p1 amd64
auth_default_realm = bway.net
auth_socket_path = /var/run/dovecot/auth-userdb
auth_verbose = yes
base_dir = /var/run/dovecot/
default_process_limit = 300
disable_plaintext_auth = no
first_valid_uid = 89
instance_name = dovecot1
last_valid_uid = 90
listen = 127.0.0.1,216.220.96.26,216.220.96.25
login_greeting = Dovecot ready - bway.net.
mail_plugins = " quota"
mailbox_list_index = yes
namespace inbox {
  hidden = no
  inbox = yes
  list = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Spam {
special_use = \Junk
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = INBOX.
  separator = .
  subscriptions = yes
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  quota = maildir:User quota
  quota_rule = Inbox.Trash:storage=+100M
  quota_rule2 = Inbox.Spam:storage=+100M
}
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
pop3_uidl_format = %v-%u
protocols = imap pop3
ssl_cert = 

Re: [Dovecot] Courier migration and vpopmail with dovecot-lda

2013-09-26 Thread Charles Sprickman
On Sep 19, 2013, at 4:59 AM, Anton Lundin wrote:

> On 18 September, 2013 - Charles Sprickman wrote:
> 
>> I've been using Dovecot in some fresh installs lately and have found
>> it fairly easy to configure.  However I'm starting on a migration
>> that involves moving from some very old software (ancient vpopmail,
>> qmail and Courier).
>> 
>> On the Courier front, I've reviewed the migration page in the wiki,
>> and it looks like the main concerns are just matching the namespace
>> and then using the migration script to create new subscription and
>> uidlist files.  Given that my Courier IMAP setup is so old (4.0.6),
>> is there anything to be aware of that's not covered in the wiki due
>> to the age of Courier here?
>> 
>> Are there any other general issues to be aware of as far as
>> interactions with MUAs are concerned?  For example, if Courier has
>> been presenting the user's MUA with a given set of IMAP capabilities
>> and then the MUA sees a bunch of extra capabilities on a subsequent
>> login, will that trigger any strange behavior?
>> 
>> And lastly on this subject, I will obviously be doing some testing
>> before cutting over to the other server.  Is it valid in something
>> like Thunderbird to have it pointed to "imap.domain.com" and then
>> change the imap server to point to something like
>> "testimap.domain.com" for testing whether subscriptions and the
>> uidlists are working as expected or should I fully replicate the
>> move as an end user would see it by making the change in my local
>> hosts file?
>> 
>> Now, assuming that portion of the move goes alright, I'm incredibly
>> confused about getting Dovecot and Vpopmail working together.  I
>> assume that initially I can stick with the Maildir++ mailbox format
>> and let vpopmail's vdelivermail continue working as my LDA -
>> vdelivermail understands how to find the user's Maildir, it can
>> check quotas, and it can update the maildirsize file (which I'm
>> assuming dovecot can also read and then report quota/usage to an
>> IMAP client).  However it does look like the Dovecot-only mailbox
>> format(s) will offer much better performance than Maildir as the two
>> dbox formats are the only supported mailbox formats with separate
>> index files, correct?  Is there any guidance on how to use dovecot's
>> LDA with a virtual mail system such as vpopmail?  From what I've
>> read so far, I probably don't want to use the vpopmail extension
>> supplied with dovecot, but query the mysql vpopmail db directly.
>> I'm finding a ton of info while searching for this, but most deals
>> with older versions of dovecot, and there are also many "this works
>> but I don't know why" tutorials on combining dovecot and vpopmail
>> and dovecot's own LDA.  I'm not even able to guess how one handles
>> the per-user .qmail files in vpopmail if not using vdelivermail
>> (this is where we enable/disable spam filtering by piping the
>> message through spamc).
>> 
>> Any input on the overall migration process is appreciated.  It's a
>> bit overwhelming as I have to deal with a big jump in the vpopmail
>> version, rebuilding qmail with a ridiculous number of patches, and
>> then on top of that a migration to new imap/pop server software.
>> eek.
> 
> Hi Charles!
> 
> I can share some of my war-stories about qmail/vpopmail.
> 
> Along time ago i ran quite a few qmail/vpopmail/courier/ezmlm/qmailadmin
> clusters and back then i thought it was the only rely good way of
> running it. Then the years passed and when i needed to add patches to
> qmail consisting of more code than qmail started out with it got quite
> frustrated.
> Due to speed and scalability we didn't run with a db-backend for
> vpopmail, we used vpasswd/cdb(?) hash-files and that ran quite well.
> 
> So when it was time to migrate i came up with the following solution:
> 
> I ran postfix as smtp-server, querying vpopmail via a tcp:-maps to a daemon
> written in perl, that ran diffrent vpopmail-commands.
> That old daemon is now available at:
> https://github.com/glance-/postfixvpopmail/

Thanks for that, I'm doing this in steps, and initially qmail will
remain exposed to the interwebs.  Down the line it's going to be
hidden behind Postfix.  That little daemon might be helpful.  I
wasn't sure how hard it would be to query the vpopmail db directly
for users and aliases (I don't think we have any ezmlm, which is I
think the one thing not tracked in the db).

> For some reason that i can

[Dovecot] Courier migration and vpopmail with dovecot-lda

2013-09-18 Thread Charles Sprickman
I've been using Dovecot in some fresh installs lately and have found
it fairly easy to configure.  However I'm starting on a migration
that involves moving from some very old software (ancient vpopmail,
qmail and Courier).

On the Courier front, I've reviewed the migration page in the wiki,
and it looks like the main concerns are just matching the namespace
and then using the migration script to create new subscription and
uidlist files.  Given that my Courier IMAP setup is so old (4.0.6),
is there anything to be aware of that's not covered in the wiki due
to the age of Courier here?

Are there any other general issues to be aware of as far as
interactions with MUAs are concerned?  For example, if Courier has
been presenting the user's MUA with a given set of IMAP capabilities
and then the MUA sees a bunch of extra capabilities on a subsequent
login, will that trigger any strange behavior?

And lastly on this subject, I will obviously be doing some testing
before cutting over to the other server.  Is it valid in something
like Thunderbird to have it pointed to "imap.domain.com" and then
change the imap server to point to something like
"testimap.domain.com" for testing whether subscriptions and the
uidlists are working as expected or should I fully replicate the
move as an end user would see it by making the change in my local
hosts file?

Now, assuming that portion of the move goes alright, I'm incredibly
confused about getting Dovecot and Vpopmail working together.  I
assume that initially I can stick with the Maildir++ mailbox format
and let vpopmail's vdelivermail continue working as my LDA -
vdelivermail understands how to find the user's Maildir, it can
check quotas, and it can update the maildirsize file (which I'm
assuming dovecot can also read and then report quota/usage to an
IMAP client).  However it does look like the Dovecot-only mailbox
format(s) will offer much better performance than Maildir as the two
dbox formats are the only supported mailbox formats with separate
index files, correct?  Is there any guidance on how to use dovecot's
LDA with a virtual mail system such as vpopmail?  From what I've
read so far, I probably don't want to use the vpopmail extension
supplied with dovecot, but query the mysql vpopmail db directly.
I'm finding a ton of info while searching for this, but most deals
with older versions of dovecot, and there are also many "this works
but I don't know why" tutorials on combining dovecot and vpopmail
and dovecot's own LDA.  I'm not even able to guess how one handles
the per-user .qmail files in vpopmail if not using vdelivermail
(this is where we enable/disable spam filtering by piping the
message through spamc).

Any input on the overall migration process is appreciated.  It's a
bit overwhelming as I have to deal with a big jump in the vpopmail
version, rebuilding qmail with a ridiculous number of patches, and
then on top of that a migration to new imap/pop server software.
eek.

Thanks,

Charles
-- 
Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet www.bway.net
sp...@bway.net - 212.982.9800




Re: [Dovecot] Fwd: NFS question

2010-09-29 Thread Charles Sprickman

On Wed, 29 Sep 2010, Charles Marcus wrote:


On 2010-09-29 1:27 AM, Nick Edwards wrote:

I do not wish responses from those who are not developers of dovecot,


Silly...


Then you should have spent the few seconds required to browse the PUBLIC
list archives for Timo's current email address - then I wouldn't have
even seen this message and you wouldn't be getting this response.


Additionally, I don't think this is something the developer needs to 
address privately.


There's also a whole thread about this, and this reply totally cleared up 
the issue for me:


http://www.mail-archive.com/dovecot@dovecot.org/msg31713.html

Charles


many I have since had discussions with on another list and spam
binned (abusive souls like charlie marcus)


If you consider simply correcting your misunderstanding of how dovecot
works as 'abusive', then, yeah, I guess I'm guilty as charged.


but I likely was mailing a old address he doesn't read


Like I said - took me all of 10 seconds to determine his current email
address from his most recent posting to this list (he posts daily).

--

Best regards,

Charles



Re: [Dovecot] nfs director

2010-08-28 Thread Charles Sprickman

On Sat, 28 Aug 2010, Cor Bosman wrote:


We might be a slightly larger install than you (60k users, mail on FAS 3170
Metrocluster), but we have noticed corruption issues and the director is
definitely going to see use in our shop. We still use Sendmail+procmail for
delivery, so no issue there... but we've got hordes of IMAP users that will
leave a client running at home, at their desk, on their phone, and then will
use Webmail on their laptop.

Without the director, all of these sessions end up on different backend
mailservers, and it's basically a crapshoot which Dovecot instance notices a
new message first. NFS locking being what it is, odds are an index will get
corrupted sooner or later, and when this happens the user's mail
'disappears' until Dovecot can reindex it. The users inevitably freak out
and call the helpdesk, who tells them to close and reopen their mail client.
Maybe you're small enough to not run into problems, or maybe your users just
have lower expectations or a higher pain threshold than ours. Either way,
it's unpleasant for everyone involved, and quite easy to solve with the
director proxy.


We are in the exact same position as Brad. We also use sendmail's LDA, we
also use a metrocluster, and we also have hordes of imap and webmail users.

We see the exact same thing Brad sees. And I see it myself about once a week
as well. The index gets corrupted due to access by 2 different clients, and
to the user it then looks like their mail disappears. The user totally freaks
out, because they'll invariably have really really important mail that has
to be recovered right now. Usually a law firm as well. They call the helpdesk,
keeping a support person busy with something thats really just a known bug.

It probably isnt much of an issue if you use POP. But in large scale IMAP
setups, where people are getting used to having access to all their email
server-side (and thus mailboxes growing, needing larger indexes, increasing the
chances of problems) from a myriad of clients this WILL happen if you're
using NFS.

Ive even considered moving away from NFS again for indexes due to this
problem. But it really is noticable if you have a lot of email that your
index isnt up to date as you move across our dozens and dozens of imap
servers.


Any idea how Rackspace has implemented the director?  They have to be 
using some kind of shared storage, it wouldn't make sense to make storage 
local to each host in such a large environment.


Charles


Cor



Re: [Dovecot] system v. virtual mailboxes, was Re: Thunderbird problem

2010-07-01 Thread Charles Sprickman

On Thu, 1 Jul 2010, Noel Butler wrote:


(I wrote a script to convert from vpopmail structure to a better
structure when we moved from that mess to postfix/dovecot/mysql a few
years back, that conversion, including moving mail took all of 45
minutes, most of that was copying mail, in the early days I did not like
nor trust postfix, but are with it today and wouldnt use anything else
again, in case I change jobs I've always kept my converting script hehe)


Sounds like something to publish on the Dovecot wiki. :)

(says the guy who's supposed to do a vpopmail conversion)

C


Hrmm., boy, so far OT now I'll finish...

So, my recommendation, is to plan for what might be some day, rather
than wait until that "someday" arrives.





Re: [Dovecot] OT - Re: Dovecot 1.1.x and 1.2.x differencies

2010-06-16 Thread Charles Sprickman


On Wed, 16 Jun 2010, Charles Marcus wrote:


On 2010-06-16 11:39 AM, Stan Hoeppner wrote:

Yes, but Gentoo isn't supplying binaries. The amount of project
time/effort to get all those Debian binaries compiled and out the
door is gargantuan compared to the Gentoo source model.


Ah, forgot about that... its amazing how you get used to the freedom of
a source based system.


Yeah, I've been enjoying that with FreeBSD for a very long time.  They 
have "packages" as well, but I never really used them - what are the 
chances that the maintainer and I both want the exact same compile-time 
options?



The biggest argument against source based installs is they take too
long. On reasonably modern hardware it isn't much of an issue, and even
on older hardware - I mean, really how often do you have to do the
installation? Mine last for many years...


I do binary installs of the OS, source installs of the additional 
software, source based upgrades of the OS.  I also get something that I 
haven't yet seen in the mainstream linux distros, which is a clear 
delineation between what's the "OS" and what's "added-on".  If it's under 
/usr/local somewhere, it came from elsewhere.  Otherwise, it's part of the 
OS.  Makes upgrades simple, even if I'm moving /usr/local wholesale from 
one box to another - since I have a nice stable ABI and backwards 
compatibility, I can take a bunch of stuff built for say, FreeBSD 4.8 and 
run it on a new 8.0 box, then upgrade at my leisure.



My point was that building binaries is one of the reasons it takes
Debian so long to get a new release out. AFAIK, Gentoo isn't shackled
with this issue.


Correct, it isn't, and with USE flags, it makes custom compiling (and
recompiling if needs change) with support for *precisely* what you need
extremely easy even for people like me... ;)


FreeBSD supports much fewer architectures, but I know they still have 
dealt with issues trying to crank out packages for a few archs plus a few 
supported versions of the OS.  I think Yahoo recently gave them a bunch of 
boxes to help with this, but yeah, when you start thinking about building 
not just what *you* might install, but every X11 app available, every 
window manager, etc. that's a pretty hefty chunk of cpu time, regardless 
of how modern your build cluster is.


And yeah, having either a config file or make flags to repeatedly build 
the software with the same options kicks ass. :)


Charles


--

Best regards,

Charles



Re: [Dovecot] I need IMAP stress testing tool with SEARCH command

2010-03-13 Thread Charles Sprickman

On Fri, 12 Mar 2010, Ernesto Revilla wrote:


Hi.

Does anyone know of a good imap stress testing tool? And one which
supports SEARCH commands? I have to compare Courier and Dovecot. I
already did some tests using a modified postal/rabid package.

I would be thankfully for any hints.


"mstone" is old, but it was the only thing I found to do some testing on a 
new server that exercised smtp/pop/imap at the same time.  It scales 
pretty well too...


Look down at section 8 here:

http://mstone.sourceforge.net/doc/mstone.html

It currently does not support searching, but I'd bet you could hack that 
into the source.  In fact, it looks like someone may have and not updated 
the docs:


/* compute the search intervals  */
me->searchSchedule = 0;
me->currentSearch = me->numSearches = 0;
if (pish->imapSearchRate) {
me->numSearches = imapComputeSearchSchedule(ptcx, cmd,
&me->searchSchedule);
me->timeUntilSearch = me->searchSchedule[me->currentSearch];
}

D_PRINTF(debugfile,"computed search schedule\n");

return me;

(Not a C guy, but that sure hints at something)

Charles


Best regards.
Erny
Yaco Sistemas
Spain




Re: [Dovecot] Mailing list's prefix

2010-03-04 Thread Charles Sprickman

On Thu, 4 Mar 2010, Rick Romero wrote:


Quoting "Harlan Stenn" :


I would have preferred this be a private reply but I like to honor the
sender's request re Reply-To:.

I have a slight preference for keeping the [Dovecot] prefix in the
Subject: header, as it makes it really obvious to me where a message in
my inbox comes from.  I have never liked to pre-sort incoming messages
into separate folders.  The fact that the prefix is relativelyh short
also helps.

H


I think those of us who don't filter are benefited the most by having the 
prefix.  I'm on a couple lists that aren't filtered, though not as high 
traffic.


I don't read ALL email, and would prefer to delete non-relevant emails 
without opening the message.  Without a prefix, I sometimes have a hard time 
telling if a problem is directed to me (personal/biz support) or a list when 
I delete in bulk via thin clients (iPhone, Horde).


+1

I let lower traffic lists land in my inbox.  I eat my own dogfood as well 
as far as mail is concerned, and we don't let users configure procmail (at 
some point they'll get basic sieve support).  I also find myself checking 
email quite often on my phone, and seeing the listname in the subject is 
very helpful.


Charles


Rick







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

2010-01-28 Thread Charles Sprickman


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

On January 22, 2010 9:03:42 PM -0500 Charles Sprickman  
 wrote:

Sorry for the tangent,


You should probably start a new thread when changing the subject.   
Then

you don't have to be sorry. :)


I figured I was already drifting OT for this list, so...  :)




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


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


No, I just meant a large number of users using Maildir (rather than  
mbox, dbox,
whatever else) on a single ZFS filesystem.  Although filesystem per  
user is
an interesting idea.  When my personal box gets upgraded to FBSD 8.0,  
I may

try that for fun.



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

you would consider "lots".


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


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


I think this is the message that got stuck in my head:

http://www.mail-archive.com/dovecot@dovecot.org/msg25478.html

I *think* that when I was doing my massive week-long google binge on zfs
I read a few comments about zfs being "non-optimal" for email.  It's  
"teh

internets" though, and it could have been someone just talking out their
behind or it could be talking about a much earlier release of ZFS.

I have a small backups box that's got just 4 WD RE3 drives on it.  The
benchmarks for this thing pretty much blew me away.  We're not talking
top of the line hardware here and it was performing at least as well  
as a

good Areca or 3Ware hardware RAID setup.

Anyhow, if I find more places to run ZFS in production and it seems  
stable
enough, I'd like to try getting it running on my big mailserver at  
some point.
Backing up from UFS to ZFS using rsync is fine, but ZFS send/recv  
looks like

a far more interesting backup solution.

Charles



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

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

-frank



Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet - www.bway.net
sp...@bway.net - 212.655.9344



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

2010-01-22 Thread Charles Sprickman

On Fri, 22 Jan 2010, Frank Cusack wrote:


On January 22, 2010 11:05:22 PM +0200 Timo Sirainen  wrote:

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


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


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


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


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


Thanks,

Charles


-frank



Re: [Dovecot] kudos

2009-11-21 Thread Charles Sprickman

On Sat, 21 Nov 2009, Frank Cusack wrote:


I'm sure this isn't said enough, so kudos to Timo for what has to be the
best IMAP server anywhere, hands-down no qualifications!  And to think,
it's a one man operation ... although perhaps that is one of the reasons
it is so good.


Not just that, but Timo does a wonderful job of working this mailing list, 
which is a huge plus.


I am in the process of moving away from another IMAP/POP package where 
there was also a single author, and frankly he was a douchebag who loved 
to berate everyone on the mailing list.


It's a small nit to pick, but I commend Timo for treating folks so well 
here.  It's a great way to make your software more popular. :)


Charles


Re: [Dovecot] [OT] preferred clients

2009-11-20 Thread Charles Sprickman

On Fri, 20 Nov 2009, Charles Marcus wrote:


On 11/20/2009, Charles Sprickman (sp...@bway.net) wrote:

It is very good compared to TB2.  However, the exact problem the OP
described still exists in 3.0b4.  I've had the folks I setup with TB3
bugging the hell out of me about the "all of a sudden a bunch of
messages are marked new" issue.


This has to be some weird dovecot config problem... we just haven't ever
seen anything even close to that here.


I doubt it...  As the OP said, this seems unique to TB.  Webmail 
(roundcube) does not have any issues.



Do you use mbox or maildir (we've always used maildir)?


Maildir.

We're talking about a mailbox with two or more users always in it and 
around 40K messages across a few hundred folders.  The scale of it all 
seems to be part of the issue I think.


C



Re: [Dovecot] [OT] preferred clients

2009-11-20 Thread Charles Sprickman

On Fri, 20 Nov 2009, John Gateley wrote:


Jonathan wrote:
So what IMAP clients do people prefer these days?  Preferably windows or 
cross platform and it needs to have decent key bindings...


Have you tried the new Thunderbird 3 beta? There was a thread
on this list recently about it. It has a lot of IMAP improvements.


It is very good compared to TB2.  However, the exact problem the OP 
described still exists in 3.0b4.  I've had the folks I setup with TB3 
bugging the hell out of me about the "all of a sudden a bunch of messages 
are marked new" issue.


Charles


Sylpheed has a new beta out as well with improved IMAP support.
(Sylpheed runs on Windows and Linux, I wish it ran on Macs).

j



Re: [Dovecot] HA Dovecot Config?

2009-10-22 Thread Charles Sprickman
This is veering a bit OT, hence the top-post, but it looks like another HA 
option may be available in a few months:


http://lists.freebsd.org/pipermail/freebsd-announce/2009-October/001279.html

In short, you can stack any geom-aware FS on top of this.  Combined with 
CARP, you've got a decent/simple/cheap option.


Pawel does really good work, I look forward to playing around with this.

Charles

___
Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet - www.bway.net
sp...@bway.net - 212.655.9344


On Thu, 22 Oct 2009, Steve wrote:



 Original-Nachricht 

Datum: Thu, 22 Oct 2009 12:57:56 +0100
Von: Ed W 
An: Dovecot Mailing List 
Betreff: Re: [Dovecot] HA Dovecot Config?



Steve wrote:


Hallo Ed,



I have never used FileReplicationPro but looking at what it offers it

reminds me of GlusterFS. I use GlusterFS for all www data of the domains I
host. I don't use jet GlusterFS for IMAP/POP storage for all domains I host.
Only a small subset of the domains I host have GlusterFS for IMAP/POP but
so far it works without issues and I will soon or later migrate the other
domains to be on GlusterFS as well.


The setup of GlusterFS is ultra easy (compared to other clustering FS

solution I have seen) and it offers some very nice functions.


In the past I have burned my fingers with older GlusterFS releases when

I have tried to use it as storage for IMAP/POP but the later 2.0.x releases
of GlusterFS are more stable.





The thread moved on and no one seemed to bite, but I also have watched
glusterfs for a long while now and been very attracted by the basic
principle. I would be very interested to hear more about how it's worked
out for you?


I use GlusterFS since long time. For mail hosting I waited for release 2 and 
then when it was out I switched all mail domains to use GlusterFS 2.0.1. It was 
a ultra big failure for me. The process took so much CPU that I could barely 
run anything else on the system and stability was very, very bad. That forced 
me to switch back to NFS for all the domains. Then later around 2.0.4 I looked 
again at it and things where more stable. I started then with a bunch of 
domains to run on top of GlusterFS 2.0.4 and moved then to GlusterFS GIT and 
somewhere around 2.0.7 the GIT version broke horribly in my setup that I 
switched to 2.0.7. That has been some weeks ago and since then I run around 1/3 
of my domains on top of GlusterFS 2.0.7 with two active nodes using server side 
replicate, io-threads, write-behind and io-cache. On the client side I have no 
performance translators or anything such. Just bare client. I used server side 
replication because I wanted the shared storage to behav

e

like a SAN and not use the server part as dumb bricks where the client is 
responsible for the replication. So far both nodes have 2 x 1TB disks in RAID 1 
mode and those disks are then exported as a GlusterFS brick doing replicate. 
Setup in Dovecot is +/- like you would do if you would use NFS.



Got any benchmarks, perhaps comparing against local
storage and vs NFS?


I have benchmarked but have nothing made to show to others. In general I can 
say that using GlusterFS on gigabit network is +/- 1/3 to 1/2 of the raw disk 
speed. If you add performance translators then the speed is somewhere between 
1/2 to 1/1 of raw disk speed (depending what block size I use and depending if 
I use Booster or not). With the performance translators you can easy saturate a 
gigabit connection. Have not tried to use anything faster then gigabit.
Off course local storage is faster since I don't have that theoretical 125MB/s 
limit I have when using gigabit. The newer releases of GlusterFS are comparable 
to NFS in terms of speed. In terms of CPU usage GlusterFS is way behind NFS and 
local storage. In terms of flexibility GlusterFS is better then anything else.



It seems intuitively very appealing to use something heavily distributed
in the style of gluster/mogile for the file data, and something fast
(like local storage) for the indexes.  Perhaps even dovecot proxying
could be used to help force users onto a persistent server to avoid
re-creating index data...


Have never tried MoglieFS. What I don't like about it is that it uses HTTP for 
transport and operations.



For smaller setups it would be appealing to find something simpler than
DRBD for a two server active/active setup (eg both servers acting as
both storage & imap and failover for each other)


That is easy done with GlusterFS. Very easy.



Cheers

Ed W


// Steve
--
GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01



Re: [Dovecot] Apple mail troubles

2009-10-05 Thread Charles Sprickman

On Mon, 5 Oct 2009, Romer Ventura wrote:

No problems here using Apple Mail. Used in 2 iMacs, 1 Power Book G4, 6 
iPhones and Dovecot IMAP works with no problems at all.


Same here.  Two macs running mail.app, one iPhone.  Both have 6 or 7 
accounts, the two biggest accounts talk to a Dovecot server (box w/about 
40K msgs) and a Courier server (about 20K msgs).  No bizarre issues yet.


C


Thank

On Oct 1, 2009, at 6:57 AM, Frank Bonnet wrote:


Hello

I have an Apple computer  user who has great problems
using IMAP and Dovecot.

Some same messages seems to stay in two or more folders
and are impossible to erase from the Apple mail client

Anyone has that kind of troubles ?

Thanks




Re: [Dovecot] windows imap clients

2009-09-23 Thread Charles Sprickman

On Wed, 23 Sep 2009, Charles Marcus wrote:


On 9/23/2009, Charles Sprickman (sp...@bway.net) wrote:

Charles (and Nikolay), thanks very much for pointing me at the TB3 beta.


And of course, they just released b4...


Literally the day after I upgraded to b3.  :)


I didnt check the changelog to see if any of your issues were addressed,
but I certainly hope - since you are apparently going to continue using
it - that you will help them fix these problems by updating to b4, and
reporting any issues that still exist to bugzilla:


Well, b3 took care of the offline access and the basic "search locally 
rather than server-side" issues quite well.  b4 is like someone read my 
mind - the search field in the toolbar now can search everything, and the 
results are presented in a new tab.  Nice layout - filters in the left 
pane to narrow the search, list of results in the right pane.


3.0 is really looking to be a nice release...

Charles


https://bugzilla.mozilla.org/


I'll report anything I can find/reproduce.


--

Best regards,

Charles



Re: [Dovecot] windows imap clients

2009-09-22 Thread Charles Sprickman

On Mon, 21 Sep 2009, Charles Marcus wrote:


On 9/21/2009, Charles Sprickman (sp...@bway.net) wrote:

They've been using Thunderbird for some time and I'm finding the following 
issues there:


I highly recommend you try the new Thunderbird 3 builds (current is b3 I
believe)...

It has mucho, much IMAP improvements, too many to go into...


Charles (and Nikolay), thanks very much for pointing me at the TB3 beta.

I installed this on my machine and did some testing and then rolled it out 
for the billing folks.  For the most part it works pretty well.  It does 
now default to storing everything offline.  Full-text searching across all 
boxes is more than fast enough (not as fast as mail.app + spotlight, but 
good enough).


The only gotchas I found were:

-still no good indicator of the status when it's syncing things up - you 
can pull up an "activity monitor" under the "tools" menu, but the bottom 
status line seems to sometimes show the activity, sometimes not.  I could 
find no rhyme or reason to this.  The hard drive activity light was the 
best indicator of an indexing or syncing operation.


-they go and take up a good deal of the toolbar for a nice little search 
box, but offer no option to look anywhere but the selected mailbox within 
this UI element.  Bizarre.  To do searches across multiple boxes you have 
to right-click the account name in the left pane and a new window pops up 
for search criteria AND results.


-A few times I had to manually help the syncing process on the main inbox 
by manually reindexing, quitting and restarting TB.  It would hang at 
20-30 messages in for no apparent reason.


Overall, a huge step up from TB2.  They seem happy with it so far.

Also all this syncing was a nice workout for Dovecot.  It performed 
admirably when I had two machines with 3 different XP users all syncing 
the same account.  Bottleneck seemed to be the client, which is good (for 
Timo).


Thanks,

Charles


--

Best regards,

Charles



[Dovecot] windows imap clients

2009-09-20 Thread Charles Sprickman

All,

This is slightly OT, but I figure a bunch of folks running IMAP servers 
should have some strong opinions on the topic.


While working on a migration to Dovecot, I had the opportunity to move one 
account to a server running same.  This is an in-house billing department 
box that 3-4 people share.  In theory, this should work well - all the 
billing folks see the same email, save sent mail to the same place, have 
the same set of folders available, and concurrent access is no problem.


In practice, I'm finding most clients kind of suck.

They started with Outlook, and that did not work well.  The list of 
problems is long.


They've been using Thunderbird for some time and I'm finding the following 
issues there:


-searches across 2GB+ of mail are painfully slow, since it's all 
server-side
-while the inbox is checked regularly and automatically, other folders are 
not unless the user manually checks them.  getting tbird to do this 
involves a fairly non-intuitive process, and there's also the issue of 
making sure everyone actually adds the folders they need to watch
-the client does not deal well with large amounts of mail in general - 
some operations give no feedback, like expanding large sub-folders or 
doing large copy/move operations.  this leads to the user quitting the app 
and starting the whole process again.  dovecot deals with this more 
gracefully than the old server (Courier), but it's still an issue
-offline operation would be handy sometimes, but tbird has no "hybrid" 
mode, and again, one must select every folder for offline access


As much as people like to bash it, OS-X mail.app is basically what I'm 
looking for.  It addresses all the shortcomings in Tbird.  If I tell it to 
make messages available offline, it does that for all boxes.  It always 
checks all my boxes, and when a search is performed it searches on the 
local copy rather than the server (which is quite polite, IMHO).  It works 
quite well with no internet connection as well.  I have about 50,000 
messages in it now across 5 accounts and it only rarely gets laggy on me. 
I want this client on Windows, basically. :)


I'm installing Mulberry now, but the manual seems to indicate it also will 
rely on the server-side search unless it's in offline mode (which has to 
be toggled - not a good solution).


I must say, Dovecot has impressed the hell out of me.  I had a chance to 
deal with the same mailbox in courier and dovecot, and everything is much 
faster, especially in mail.app and roundcube.  Insanely fast...


What else is out there for windows clients?

Thanks,

Charles

___
Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet - www.bway.net
sp...@bway.net - 212.655.9344



[Dovecot] IMAP activity after disconnect

2009-08-28 Thread Charles Sprickman

Howdy,

I'm running Dovecot 1.1.16 on a staging server to do some testing before 
building a new server and moving a bunch of qmail/vpopmail/courier 
accounts over.


I wanted to test the migration of courier accounts to dovecot with a few 
clients, so I copied over a few large accounts.  All went well with a 
small account (100+ messages) when accessing the account via POP - no 
re-downloads after adjusting the uidl format.  IMAP looks good as well 
after running the conversion script and setting the namespace properly.


However, one thing I copied over without paying much attention was a 
non-quota'd spam box that has literally not been checked in at least a 
year:


[r...@nac /var/vmail/xxx.com/spork/Maildir/.Spam]# ls new/| wc 
-l

   70501

Mail.app valiantly tried to sync this, but when I realized just how huge 
this was, I took the account offline and quit the app.  However it seems 
like Dovecot is still busy doing something in that mailbox:


lsof: no pwd entry for UID 5000
imap27515 50007uW   VREG   0,95 3372  2968764 
/jails/nac.xxx.com/var/vmail/xxx.com/spork/Maildir/.Spam/dovecot.index.log

lsof: no pwd entry for UID 5000
imap27515 50008uVREG   0,95  488  3007349 
/jails/nac.xxx.com/var/vmail/xxx.com/spork/Maildir/.Spam/dovecot.index

lsof: no pwd entry for UID 5000
imap27515 50009uVREG   0,9525195 27064933 
/jails/nac.xxx.com/var/vmail/xxx.com/spork/Maildir/.Spam/dovecot-uidlist

lsof: no pwd entry for UID 5000
imap27515 5000   10rVDIR   0,95 15171072  2968758 
/jails/nac.xxx.com/var/vmail/xxx.com/spork/Maildir/.Spam/new


My guess is it's trying to build an index.  This process is chewing up 
100% of whatever cpu it lands on.  Is this expected behavior (not the huge 
cpu usage, but the imap server continuing to work on the box after the 
client has logged out)?


Are there any config settings I've missed to sort of put a cap on how much 
cpu/time dovecot will spend on a task like this?  So far this has been 
running for about 20 minutes.  I'm going to kill it and manually delete 
the spam since I'm not familiar enough with gdb to dig in and see just 
what it's doing (although my guess is indexing).


On the upside, I have some serious spam magnet addresses in this test 
domain, so now I've got a great platform to test my amavis/postfix/policy 
skills. :)


Thanks,

Charles

___
Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet - www.bway.net
sp...@bway.net - 212.655.9344



Re: [Dovecot] sieve/managesieve and spam filtering

2009-08-11 Thread Charles Sprickman

On Tue, 11 Aug 2009, Steffen Kaiser wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 10 Aug 2009, Charles Sprickman wrote:

a bit stumped.  I see there's a global sieverc that can be included, but I 
need something along the lines of a per-user include that brings in the 
spam filtering rule that will "stick" until the user explicitly deletes it.


I install a sieve script per user, which contains the SPAM filter rules.


That is certainly possible.  I have not settled on whether we want to 
offer end-user access to sieve or not.  On one hand, it's a very cool 
feature.  On the other, most users can barely drive a webmail client as it 
is...  For the less clueful, I want them to be able to just click a 
"filter spam" button.  If they also choose to try and filter other email, 
I don't want a disconnect between the "filter spam" setup and their own 
rules.


One thing I did find is that it looks like I can override the 
"sieve_global_path" setting in my user database.  For people that want 
spam, they get a do-nothing filter.  For those that want filtering, they 
get a filter that drops SA-tagged spam into "Spam".


For example:

SELECT [bunch of other stuff] sieve_global_path FROM mailbox WHERE

In my query seems to work.  I put the full path to a sieve rule in 
"sieve_global_path".


Not quite what I want, but close.  From what I gather, any user rules will 
override that filter though.  I guess I'm looking for something like a 
global include that the user can't override...


Thanks,

Charles


So every user can delete it with own hand.

Squirrelmail is to have the avelsieve plugin to talk to a manage sieve demon. 
So maybe you need to configure "extra" stuff in squirrelmail.


I'm using Horde, which does not manipulate Sieve scripts, but creates a fresh 
one from its own internal rules. So I configured Horde to have SPAM-filter 
rules by default and a Sieve script doing the same. If the user changes the 
Horde rules, my default Sieve script gets overwritten.


Bye,

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

iQEVAwUBSoFw2XWSIuGy1ktrAQLlwggAm17PXUks6ZEip8IX6nKEoYwWz/a6rIDz
5aK/pID+6Kqi+UdYKtSjeD+NG2ZsHw1q9Y9eBCvBolgczjdzdwT69kNQJ+z4Vk7O
fOeytgFwZpnh0LCZrAiwZIC5h6Nj6Xr2CA0cEms/gHTObvmvedWJ3fhG18Fc7Di4
4teHiB3oK2NOqs3AvE+PKqOOiquvdw3uld4Fdcp6bUZCCDCqEV3tgLF7f1Brqhp0
F5bzPz/6iO+wklQ4eCwz6OK1nGp8yixLzvQBUgxazuLnFsukbHuNujdwDW7J6x33
ECIK7olkYpxbnfdwpVjj+u45NFg74CasrhXowYpP4c9ZJMmxxbv+kQ==
=z0Kj
-END PGP SIGNATURE-



[Dovecot] sieve/managesieve and spam filtering

2009-08-10 Thread Charles Sprickman

Hello all,

I've got a test environment setup in preparation for a move from 
qmail/vpopmail/courier to postfix/padmin/dovecot.  I have a number of 
questions that seem to span multiple pieces of software, and this is one 
of them...


Our policy with spam filtering is that a user should be able to turn it 
off (ie: not put tagged spam into a spam folder, but deliver to their 
inbox) if they want to.  Currently qmailadmin and a custom squirrelmail 
plugin give people the option to do this by dumping a .qmail file in their 
directory that calls a common maildrop script that will deliver spam to 
the spam folder.


It looks like I can emulate this with sieve and something that can speak 
to Dovecot's managesieve server.  Where I'm stuck is that if I want users 
to be able to do other custom filtering using sieve, how do I go about 
making sure that my common spam delivery rule does not get clobbered? 
This really has me a bit stumped.  I see there's a global sieverc that can 
be included, but I need something along the lines of a per-user include 
that brings in the spam filtering rule that will "stick" until the user 
explicitly deletes it.


Any ideas?

Thanks,

Charles

___
Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet - www.bway.net
sp...@bway.net - 212.655.9344



Re: [Dovecot] Creating a "default" domain

2009-08-08 Thread Charles Sprickman

On Mon, 3 Aug 2009, Timo Sirainen wrote:


On Mon, 2009-08-03 at 19:55 -0400, Charles Sprickman wrote:

Vpopmail allows for the concept of a "default" domain for authentication.
So if I have a bunch of domains, and one is "example.com", users in that
domain can login with only the username part of their id (ie: "john")
rather than supplying the domain (ie: "j...@example.com").  I need to
continue to offer this unless I want to walk a few hundred users through
reconfiguring their mail clients. :)


auth_default_realm setting.


Sorry for the late reply, but thanks very much.  That does exactly what I 
need.


I'm really enjoying figuring out Dovecot more than I ever did fiddling 
around with Courier.  Very nice and helpful group of people on this list.


Charles


Re: [Dovecot] convert config from 1.1.2_1 to 1.1.16

2009-08-08 Thread Charles Sprickman

On Sat, 8 Aug 2009, Charles Marcus wrote:


On 8/8/2009, Charles Marcus (cmar...@media-brokers.com) wrote:

Start with one of the HowTo's/Examples/Tutorials on the official site
that most closely fits your desired install,


Sorry, meant to include a link:

http://wiki.dovecot.org/#HOWTOs.2C_examples_and_tutorials


I'll second that - I just had a look through a number of those yesterday 
and there is some excellent information there.  The whole wiki is actually 
very well maintained.  I also found some really horrible distro-specific 
guides elsewhere - short on theory, long on cut-n-paste config.


I think one of the biggest stumbling blocks for someone new to any sort of 
"virtual user" setup is seeing the big picture and figuring out that the 
imap server is actually the base for everything else since it handles the 
authentication and delivery chores.  Your MTA ends up querying dovecot for 
auth, and both pieces share a db table for determining which domains to 
accept mail for and where home directories live.  It's simple once you 
have it down, but the initial task of putting it all together can be 
daunting.


Charles


--

Best regards,

Charles



[Dovecot] Creating a "default" domain

2009-08-03 Thread Charles Sprickman

Hello,

I'm setting up a test server to work through the issues involved in 
bringing a bunch of vpopmail/qmail/courier users into a postfix/dovecot 
server.  So far I'm seeing lots of info to aid in the transition.


One thing I'm lost on is that since Dovecot is providing all the auth 
mechanisms rather than vpopmail, I'm not sure how to emulate a particular 
vpopmail behavior we rely on.


Vpopmail allows for the concept of a "default" domain for authentication. 
So if I have a bunch of domains, and one is "example.com", users in that 
domain can login with only the username part of their id (ie: "john") 
rather than supplying the domain (ie: "j...@example.com").  I need to 
continue to offer this unless I want to walk a few hundred users through 
reconfiguring their mail clients. :)


Any pointers?

Thanks,

Charles

___
Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet - www.bway.net
sp...@bway.net - 212.655.9344