Re: [Dovecot] 2.1.3 Corrupted squat uidlist

2012-04-20 Thread Henrik Larsson

This problem is still showing up every day in the logs.

I tried to delete the dovecot.index.search and 
dovecot.index.search.uids files for all users, but the errors are still 
there after a re-build of the search index with /usr/local/bin/doveadm 
search -A TEXT xyzabczzz.


If you need any further details, please let me know.


Best regards
Henrik Larsson


On 15-04-2012 10:42, Henrik Larsson wrote:

On 27-03-2012 08:57, Luca Palazzo wrote:

Hi Timo and All,
after upgrading to 2.1.2 i'm getting a lot of these messages:
Error: Corrupted squat uidlist file XX wrong indexid

After an upgrade to 2.1.3 i see this as well. Any thoughts?

Apr 15 03:43:43 imap(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid

Apr 15 06:30:27 imap(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid

Apr 15 07:43:55 pop3(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid

Apr 15 09:00:01 imap(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid


# doveconf -n
# 2.1.3: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 8.2-STABLE amd64
auth_mechanisms = plain login digest-md5 cram-md5
first_valid_uid = 125
listen = *
log_path = /var/log/dovecot
mail_plugins = fts fts_squat zlib
mail_privileged_group = postfix
mail_temp_dir = /var/db/dovecot
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 {
  hidden = yes
  inbox = no
  list = no
  location =
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  fts = squat
  fts_squat = partial=4 full=10
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp sieve
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener /home/mail/postfix/private/dovecot-auth {
group = postfix
mode = 0660
user = postfix
  }
}
service lmtp {
  executable = lmtp -L
  unix_listener /home/mail/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
  }
}
ssl_cert = /etc/ssl/mail-chained.crt
ssl_key = /etc/ssl/mail.key
userdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol lmtp {
  log_path = /var/log/dovecot-deliver
  mail_plugins = fts fts_squat zlib sieve
}
protocol lda {
  mail_plugins = fts fts_squat zlib sieve
}
protocol imap {
  mail_plugins = fts fts_squat zlib imap_zlib
}


Best regards
Henrik Larsson




[Dovecot] Fwd: IMAP SSL incoming test need help !

2012-04-20 Thread Dennis Chen


Sent from my iPhone

Begin forwarded message:

 From: Dennis Chen dchen...@yahoo.com
 Date: April 19, 2012 5:38:01 PM PDT
 To: dovecot@dovecot.org
 Subject: Fwd: [Dovecot] IMAP SSL incoming test need help !
 

 
 
 Sent from my iPhone
 
 Begin forwarded message:
 
 From: D Chen dchen...@yahoo.com
 Date: April 19, 2012 4:06:49 PM PDT
 To: lists-dovecot replies-lists-a1z2-dove...@listmail.innovate.net
 Subject: Re: [Dovecot] IMAP SSL incoming test need help !
 Reply-To: D Chen dchen...@yahoo.com
 
 
 Thanks for nice pointing out in my mail.log!
 
 I could not find where is the procmail log located under /var/log !
 
 As procmail is suspicious, I recalled that I selected either use procmail 
 or not use for local delivery while I re-configure the postfix.  I ran sudo 
 dpkg-reconfigure postfix again, and selected NOT use Procmail for local 
 delivery, restart postfix and ran the tested again, it worked now !  
 examined the mail.log, it said delivered to maildir instead of procmail.
 
 why works NOT using procmail ?  thx.
 
 From: lists-dovecot replies-lists-a1z2-dove...@listmail.innovate.net
 To: D Chen dchen...@yahoo.com 
 Sent: Thursday, April 19, 2012 5:22 AM
 Subject: Re: [Dovecot] IMAP SSL incoming test need help !
 
 
 
  Original Message 
  Date: Thursday, April 19, 2012 01:44:35 AM -0700
  From: D Chen dchen...@yahoo.com
  To: Dovecot Mailing List dovecot@dovecot.org
  Subject: [Dovecot] IMAP SSL incoming test need help !
 
  Ubuntu 11.10 server with postfix/dovecot/squirrelmail configured.
  
  Outgoing SMTP server seemed worked fine, however, the incoming
  IMAP with SSL on port 993 doesn't seem to receive any mail at all
  !?  Here is the mail.log during the test session from an external
  yahoo mail (dchen...@yahoo.com) to the internal server
  testmail.biokeyinc.com (dc...@testmail.biokeyinc.com) The log did
  NOT show any error !  The sender showed sent mail! but no mail
  reach to the destination! Any help would be appreciated.
  
  Apr 19 01:20:02 testmail postfix/smtpd[4103]: connect from
  nm20-vm4.bullet.mail.ne1.yahoo.com[98.138.91.180] Apr 19 01:20:03
  testmail postfix/smtpd[4103]: 091ED200973:
  client=nm20-vm4.bullet.mail.ne1.yahoo.com[98.138.91.180] Apr 19
  01:20:03 testmail postfix/cleanup[4108]: 091ED200973:
  message-id=32c9c558-95da-417d-8687-41abe1296...@yahoo.com Apr 19
  01:20:03 testmail postfix/qmgr[2007]: 091ED200973:
  from=dchen...@yahoo.com, size=2840, nrcpt=1 (queue active) Apr
  19 01:20:03 testmail postfix/smtpd[4103]: disconnect from
  nm20-vm4.bullet.mail.ne1.yahoo.com[98.138.91.180] Apr 19 01:20:12
  testmail postfix/smtpd[4113]: connect from localhost[127.0.0.1]
  Apr 19 01:20:12 testmail postfix/smtpd[4113]: 33AE9200AE9:
  client=localhost[127.0.0.1] Apr 19 01:20:12 testmail
  postfix/cleanup[4108]: 33AE9200AE9:
  message-id=32c9c558-95da-417d-8687-41abe1296...@yahoo.com Apr 19
  01:20:12 testmail postfix/qmgr[2007]: 33AE9200AE9:
  from=dchen...@yahoo.com, size=3536, nrcpt=1 (queue active) Apr
  19 01:20:12 testmail postfix/smtpd[4113]: disconnect from
  localhost[127.0.0.1] Apr 19 01:20:12 testmail amavis[2042]:
  (02042-06) Passed CLEAN, [98.138.91.180] [98.138.87.4]
  dchen...@yahoo.com - dc...@testmail.biokeyinc.com,
  Message-ID: 32c9c558-95da-417d-8687-41abe1296...@yahoo.com,
  mail_id: rqyVZiQDwSsG, Hits: -0.109, size: 2837, queued_as:
  33AE9200AE9, dkim_id=dchen...@yahoo.com,@yahoo.com, 8647 ms Apr 19
  01:20:12 testmail postfix/smtp[4109]: 091ED200973:
  to=dc...@testmail.biokeyinc.com,
  relay=127.0.0.1[127.0.0.1]:10024, delay=9.5,
  delays=0.87/0.01/0/8.6, dsn=2.0.0, status=sent (250 2.0.0 from
  MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 33AE9200AE9) Apr
  19 01:20:12 testmail postfix/qmgr[2007]: 091ED200973: removed Apr
  19 01:20:12 testmail postfix/local[4114]: 33AE9200AE9:
  to=dc...@testmail.biokeyinc.com, relay=local, delay=0.18,
  delays=0.1/0/0/0.07, dsn=2.0.0, status=sent (delivered to command:
  procmail -a $EXTENSION) Apr 19 01:20:12 testmail
  postfix/qmgr[2007]: 33AE9200AE9: removed Apr 19 01:21:30 testmail
  dovecot: imap-login: Login: user=dchen, method=PLAIN,
  rip=63.195.90.22, lip=192.168.20.100, mpid=4122, TLS Apr 19
  01:23:13 testmail dovecot: imap(dchen): Disconnected: Disconnected
  in IDLE bytes=99/708 Apr 19 01:23:23 testmail postfix/anvil[4105]:
  statistics: max connection rate 1/60s for (smtp:98.138.91.180) at
  Apr 19 01:20:02 Apr 19 01:23:23 testmail postfix/anvil[4105]:
  statistics: max connection count 1 for (smtp:98.138.91.180) at Apr
  19 01:20:02 Apr 19 01:23:23 testmail postfix/anvil[4105]:
  statistics: max cache size 1 at Apr 19 01:20:02
 
  End Original Message 
 
 
 I'm going to bet that procmail is eating the inbound message:
 
   Apr 19 01:20:12 testmail postfix/local[4114]: 33AE9200AE9:  
   to=dc...@testmail.biokeyinc.com, relay=local, delay=0.18, 
   delays=0.1/0/0/0.07, dsn=2.0.0, status=sent (delivered to command:
 
   procmail -a $EXTENSION)
 
 

Re: [Dovecot] mbox folders on-disc layout

2012-04-20 Thread John Robinson

On 18/04/2012 17:45, Timo Sirainen wrote:

On 18.4.2012, at 14.36, John Robinson wrote:


I'd like to change the on-disk layout for my mboxes from being
  ~/mail/foo/bar
to
  ~/mail/foo.bar
so that I can have folders containing both messages and subfolders, without 
having subfolders beginning with . and then having to do all the other fiddling 
with locations of index files etc. that goes along with LAYOUT=maildir++, and 
also leaving the filesystem layout looking sensible so my users see their 
mailboxes instead of the index and control files.

Is this possible or do I need to patch something?


Not possible without patching. There's also the other possibility of doing 
something like:

# Trick mbox configuration which allows a mail folder which contains both
# messages and sub-folders
mail_location = 
mbox:~/mail/mailboxes:DIRNAME=mBoX-MeSsAgEs:INDEX=~/mail/index:CONTROL=~/mail/control

from http://wiki2.dovecot.org/MboxChildFolders


Yes, I read all that, and thought all the options were pretty ugly - and 
the comment that it's a trick configuration would seem to suggest that 
the original author thought so to. And I think Maildir++ is pretty ugly 
too. If I wanted to try writing a new LAYOUT, where should I begin?


Cheers,

John.


Re: [Dovecot] dovecot LDA with sendmail

2012-04-20 Thread Charles Marcus

On 2012-04-19 9:45 PM, Joseph Tam jtam.h...@gmail.com wrote:

Hadi Salem almarzuki2...@hotmail.com writes:

Im configuring sendmail with dovecot for virtual users using
password file and file for user name. on centos.
dovecot-1.0.7-7.el5



Maybe I can beat Charles Marcus to the punch and recommend you upgrade
to the latest version, otherwise you'll run into bugs that have already
been fixed.


Lol... I stopped reading at '...sendmail with dovecot...', otherwise I'd 
have beat you to it... ;)


--

Best regards,

Charles


[Dovecot] default mail quota when using per user quota

2012-04-20 Thread Andreas Helmcke
Hello,

using dovecot 2.1 and per user mail quota via ldap is there a way to have a 
default quota which gets used, if the
quota field in ldap is not set?

I tried with:

plugin {
  quota = maildir:User quota
  quota_rule = *:storage=3G
}

userdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}

and in dovecot-ldap.conf:
user_attrs = dcMailQuota=quota_rule=*:storage=%$


but with this configuration the mail quota /allways/ gets loaded from ldap 
resulting in users without dcMailQuota
attribute having
no quota at all.


Greetings
   Andreas



Re: [Dovecot] default mail quota when using per user quota

2012-04-20 Thread Nikolaos Milas

On 20/4/2012 2:11 μμ, Andreas Helmcke wrote:


using dovecot 2.1 and per user mail quota via ldap is there a way to have a 
default quota which gets used, if the
quota field in ldap is not set?


You may see: http://www.mail-archive.com/dovecot@dovecot.org/msg44010.html

Regards,
Nick


[Dovecot] Error in logs indicating broken files

2012-04-20 Thread Steve Campbell

Still new to dovecot,

I'm seeing a couple of errors in my log file indicating corruption of 
index files.


Error: Corrupted index cache 
file/home/xx/mail/.imap/sent-mail/dovecot.index.cache: Broken virtual size 
for mail UID 67: 1 Time(s)

Error: FETCH [] for mailbox ~/mail/sent-mail UID 67 got too little data: 6203 
vs 7478: 1 Time(s)


This account is used by multiple users, but it is not a shared account 
(haven't set any of those up yet - still new to me), so I would expect 
corruption possibilities when multiple users modify the account folders 
in some manner.


Until I get some experience under my belt and make this a truly shared 
account, is there any way to resolve the corruption of the files 
mentioned above? Maybe just delete them?


thanks

steve campbell


Re: [Dovecot] 2.1.3 Corrupted squat uidlist

2012-04-20 Thread ml

Le 2012-04-20 09:40, Henrik Larsson a écrit :

This problem is still showing up every day in the logs.

I tried to delete the dovecot.index.search and
dovecot.index.search.uids files for all users, but the errors are
still there after a re-build of the search index with
/usr/local/bin/doveadm search -A TEXT xyzabczzz.

If you need any further details, please let me know.


Best regards
Henrik Larsson


On 15-04-2012 10:42, Henrik Larsson wrote:

On 27-03-2012 08:57, Luca Palazzo wrote:

Hi Timo and All,
after upgrading to 2.1.2 i'm getting a lot of these messages:
Error: Corrupted squat uidlist file XX wrong indexid

After an upgrade to 2.1.3 i see this as well. Any thoughts?

Apr 15 03:43:43 imap(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid

Apr 15 06:30:27 imap(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid

Apr 15 07:43:55 pop3(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid

Apr 15 09:00:01 imap(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid


# doveconf -n
# 2.1.3: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 8.2-STABLE amd64
auth_mechanisms = plain login digest-md5 cram-md5
first_valid_uid = 125
listen = *
log_path = /var/log/dovecot
mail_plugins = fts fts_squat zlib
mail_privileged_group = postfix
mail_temp_dir = /var/db/dovecot
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 {
  hidden = yes
  inbox = no
  list = no
  location =
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  fts = squat
  fts_squat = partial=4 full=10
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp sieve
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener /home/mail/postfix/private/dovecot-auth {
group = postfix
mode = 0660
user = postfix
  }
}
service lmtp {
  executable = lmtp -L
  unix_listener /home/mail/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
  }
}
ssl_cert = /etc/ssl/mail-chained.crt
ssl_key = /etc/ssl/mail.key
userdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol lmtp {
  log_path = /var/log/dovecot-deliver
  mail_plugins = fts fts_squat zlib sieve
}
protocol lda {
  mail_plugins = fts fts_squat zlib sieve
}
protocol imap {
  mail_plugins = fts fts_squat zlib imap_zlib
}


Best regards
Henrik Larsson



comparable error exists for corrupted Maildir with the wrong filename i 
don't no the exact name of error

i do not use zlib for this reason

i thinks a patch from timo fix this feature later

--
 http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xC2626742
 gpg --keyserver pgp.mit.edu --recv-key C2626742

 http://urlshort.eu fakessh @
 http://gplus.to/sshfake
 http://gplus.to/sshswilting
 http://gplus.to/john.swilting
 https://lists.fakessh.eu/mailman/
 This list is moderated by me, but all applications will be accepted
 provided they receive a note of presentation


Re: [Dovecot] default mail quota when using per user quota

2012-04-20 Thread Andreas Helmcke
Am 20.04.2012 14:26, schrieb Nikolaos Milas:
 
 You may see: http://www.mail-archive.com/dovecot@dovecot.org/msg44010.html

I do not see any relevant differences to my setup.
Do you /really/ have a default quota of 4G if roomNumber is empty or rather 
have unlimited quota then?

Greetings
   Andreas



[Dovecot] quota not being calculated

2012-04-20 Thread Cor Bosman
It looks like my quota isnt being calculated properly after I started setting 
quota to a specific folder. The quota in that folder is always starting out at 
0, and only new email is being added to the quota. If I remove the maildirsize 
file, and recalculate, it still starts at 0. Once email arrives in the folder, 
it gets added to maildirsize. This is with maildirquota, in perhaps a bit of an 
exotic config. The idea is to set a specific quota to Spam folder, using the 
trash plugin to keep it at a certain size. 

. getquotaroot Spam
* QUOTAROOT Spam User quota Spam quota
* QUOTA User quota (STORAGE 40848 1228800)
* QUOTA Spam quota (STORAGE 0 2)
. OK Getquotaroot completed.

Once 1 email gets added:

.Spam# cat maildirsize 
2048S
0 0
2017 1


namespace {
  hidden = no
  ignore_on_failure = no
  inbox = yes
  list = yes
  location = 
maildir:%h:INDEX=/var/spool/mail/dovecot-control/indexes/%1u/%2u/%u:CONTROL=/var/spool/mail/dovecot-control/%1u/%2u/%u/INBOX
  prefix = 
  separator = /
  subscriptions = yes
  type = private
}
namespace spam {
  hidden = yes
  ignore_on_failure = no
  inbox = no
  list = yes
  location = 
maildir:%h/.Spam:INDEX=/var/spool/mail/dovecot-control/indexes/%1u/%2u/%u/.Spam:CONTROL=/var/spool/mail/dovecot-control/%1u/%2u/%u/.Spam
  prefix = Spam/
  separator = /
  subscriptions = no
  type = private
}

plugin {
  quota = fs:User quota
  quota2 = maildir:Spam quota:ns=Spam/
  quota2_rule = *:storage=2K
  sieve = /var/spool/mail/dovecot-control/sieve/%1u/%2u/%u/dovecot.sieve
  sieve_before = /etc/sieve/before
  sieve_dir = /var/spool/mail/dovecot-control/sieve/%1u/%2u/%u/scripts
  trash = /etc/dovecot/conf.d/dovecot-trash.conf.ext
}

(full config:  http://pastebin.com/Mui4X7Zh)




[Dovecot] array code issue ?

2012-04-20 Thread Tim Ruehsen
Hi,

I just took a look into the dovecot 2.1 sources and just saw a possible issue 
in array.h.

This code snippet as an example:
#static inline void *
#array_get_modifiable_i(struct array *array, unsigned int *count_r)
#{
#   *count_r = array-buffer-used / array-element_size;
#   return buffer_get_modifiable_data(array-buffer, NULL);
#}

array-buffer-used and array-element_size are of type 'size_t' which is 
64bit on amd64 and others while 'count_r' is a 32bit value. At least, I see 
ugly warnings with -Wconversion (which I personally like to use).

I know, it is unlikely that 'array-buffer-used / array-element_size' 
exceeds 32bit range. But then, dovecot's source is so well written, that the 
above code seems to disturb dovecot's code aesthetics.

And who knows... in a few years (when we have THz and TBytes on our desktops) 
emails (and array sizes) might exceed everything that we think of today.

Tim


Re: [Dovecot] array code issue ?

2012-04-20 Thread Timo Sirainen
On 20.4.2012, at 17.27, Tim Ruehsen wrote:

 I just took a look into the dovecot 2.1 sources and just saw a possible issue 
 in array.h.
 
 This code snippet as an example:
 #static inline void *
 #array_get_modifiable_i(struct array *array, unsigned int *count_r)
 #{
 # *count_r = array-buffer-used / array-element_size;
 # return buffer_get_modifiable_data(array-buffer, NULL);
 #}
 
 array-buffer-used and array-element_size are of type 'size_t' which is 
 64bit on amd64 and others while 'count_r' is a 32bit value. At least, I see 
 ugly warnings with -Wconversion (which I personally like to use).

I've been planning on trying out some of clang's warning flags. Last time I 
used -Wconversion with gcc it was giving way too many warnings to be usable, 
but clang's -Wconversion looked better when I quickly looked at it.

 I know, it is unlikely that 'array-buffer-used / array-element_size' 
 exceeds 32bit range. But then, dovecot's source is so well written, that the 
 above code seems to disturb dovecot's code aesthetics.

:) Yeah, I intentionally decided to use unsigned int here. It's a bit of 
wasteful and ugly to use size_t everywhere.. I guess the code could be made 
something like:

size_t count = array-buffer-used / array-element_size;
I_assert(count  UINT_MAX);
*count_r = (unsigned int)count;

Or something like that. Although these array functions are sometimes in 
performance critical paths, so adding extra code isn't very good either. 
Perhaps a simple cast to make the warning go away.. Probably the element_size 
could also be changed to be unsigned int.

 And who knows... in a few years (when we have THz and TBytes on our desktops) 
 emails (and array sizes) might exceed everything that we think of today.

The email sizes yes, but probably not the number of emails in a mailbox.

Re: [Dovecot] default mail quota when using per user quota

2012-04-20 Thread Nikolaos Milas

On 20/4/2012 5:31 μμ, Andreas Helmcke wrote:


Do you/really/  have a default quota of 4G if roomNumber is empty or rather 
have unlimited quota then?


Yes, default quota is 4G for all mailboxes; if roomNumber is defined, 
then that value is used instead. In practice we are using non-default 
values for very few maiboxes.


We have a relatively small number of users/mailboxes (300), so we have 
the luxury of enjoying relatively large mailboxes (with some 
overbooking - because most users rarely use more than 1G).


Nick


Re: [Dovecot] Error in logs indicating broken files

2012-04-20 Thread Charles Marcus

On 2012-04-20 8:30 AM, Steve Campbell campb...@cnpapers.com wrote:

Still new to dovecot,

I'm seeing a couple of errors in my log file indicating corruption of
index files.


It is customary to provide at least some bare minimal system details, 
like, dovecot -n output (which includes the version), platform/OS, etc...


--

Best regards,

Charles


[Dovecot] dsync: convert only mbox in /var/mail to maildir?

2012-04-20 Thread Jeff Simmons
I'm migrating an old UW pop server to a new Dovecot server. The old server did 
not allow mail to be stored on the server, so only mbox files exist in 
/var/mail, with nothing in /home/$user. I'd like to copy the /var/mail 
directory over to the new server and then use dsync to convert the mbox files 
and put them in /home/$user/Maildir, but every permutation of the command line 
I've tried dies with a variation on can't find/write either /var/mail/mail or 
/home/$user/mail, seems it won't deal with mbox files without an associated 
mail directory. Can dsync be used for this kind of conversion, or should I 
look elsewhere for conversion utilities?

Thanks for helping a noob who can't traverse a wiki without leaving a trail of 
breadcrumbs.

-- 
Jeff Simmons   j...@j-simmons.net
Simmons Consulting - Network Engineering, Administration, Security


[Dovecot] sieve against ldap in Dovecot 1.2 vacation messeage

2012-04-20 Thread Victor Oñate
Hi.
I need configure sieve against ldap
this is my file configuration dovecot.conf

plugin {
  quota = dirsize:user
  sieve_dir = ~/sieve
}

protocol lda {
  mail_plugins = sieve
}

auth default {
  mechanisms = plain
  passdb pam {
  }
  userdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
  }
  user = nobody
}


I dont know what I have to put in dovecot-ldap.conf, ofcourse I have a
atribut in LDAP
by user with a  vacation messeage I'm out of office, please contact Mr. Black

this is dovecot-ldap.conf

hosts = server
auth_bind = yes

ldap_version = 3
base = dc=dominio,dc=uk
deref = never
scope = subtree


user_attrs =  
homeDirectory=home,uidNumber=uid,gidNumber=gid,mail=Maildir,mailQuotaSize=quota_rule=*:storage=%$
user_filter = ((objectClass=posixAccount)(uid=%u))


The principal idea is keep the control the message by user with LDAP
and Dovecot(IMAP).
without touching the postfix configuration file is that possible, or
am I dreaming.

Thanks..
Victor Oñate.


Re: [Dovecot] default mail quota when using per user quota

2012-04-20 Thread Timo Sirainen
On 20.4.2012, at 14.11, Andreas Helmcke wrote:

 using dovecot 2.1 and per user mail quota via ldap is there a way to have a 
 default quota which gets used, if the
 quota field in ldap is not set?

By not set you mean it doesn't exist at all, or it exists but is empty?

 I tried with:
 
 plugin {
  quota = maildir:User quota
  quota_rule = *:storage=3G
 }
 
 userdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
 }
 
 and in dovecot-ldap.conf:
 user_attrs = dcMailQuota=quota_rule=*:storage=%$

If dcMailQuota isn't returned, then the global quota_rule is used. If it is 
returned as empty, I guess it gets treated as unlimited quota. There's 
currently no easy way avoid this (a difficult way could be e.g. post-login 
scripting, but that works only for imap/pop3).


Re: [Dovecot] mbox folders on-disc layout

2012-04-20 Thread Timo Sirainen
On 20.4.2012, at 12.01, John Robinson wrote:

 Yes, I read all that, and thought all the options were pretty ugly - and the 
 comment that it's a trick configuration would seem to suggest that the 
 original author thought so to. And I think Maildir++ is pretty ugly too. If I 
 wanted to try writing a new LAYOUT, where should I begin?

src/lib-storage/mailbox-list-private.h has the API you need to implement
src/lib-storage/list/mailbox-list-fs* is the fs implementation
src/lib-storage/list/mailbox-list-maildir* is the maildir++ implementation

So decide which one looks more like the one you want, and either copypaste it 
or start extending it. For example imapdir is nearly the same implementation 
as maildir++ but almost all of the code is shared.



Re: [Dovecot] dsync: convert only mbox in /var/mail to maildir?

2012-04-20 Thread Timo Sirainen
On 20.4.2012, at 22.26, Jeff Simmons wrote:

 I'm migrating an old UW pop server to a new Dovecot server. The old server 
 did 
 not allow mail to be stored on the server, so only mbox files exist in 
 /var/mail, with nothing in /home/$user. I'd like to copy the /var/mail 
 directory over to the new server and then use dsync to convert the mbox files 
 and put them in /home/$user/Maildir, but every permutation of the command 
 line 
 I've tried dies with a variation on can't find/write either /var/mail/mail or 
 /home/$user/mail, seems it won't deal with mbox files without an associated 
 mail directory. Can dsync be used for this kind of conversion, or should I 
 look elsewhere for conversion utilities?

Assuming in destination server the mbox is in /var/mail/$user and you want the 
destination to ~/Maildir:

in dovecot.conf set:
mail_location = maildir.~/Maildir

rm -rf /tmp/emptydir
dsync mirror mbox:/tmp/emptydir:/var/mail/$user

be sure to delete the emptydir between users.



Re: [Dovecot] quota not being calculated

2012-04-20 Thread Timo Sirainen
On 20.4.2012, at 19.05, Cor Bosman wrote:

 It looks like my quota isnt being calculated properly after I started setting 
 quota to a specific folder. The quota in that folder is always starting out 
 at 0, and only new email is being added to the quota. If I remove the 
 maildirsize file, and recalculate, it still starts at 0. Once email arrives 
 in the folder, it gets added to maildirsize. This is with maildirquota, in 
 perhaps a bit of an exotic config. The idea is to set a specific quota to 
 Spam folder, using the trash plugin to keep it at a certain size. 

I'll try later, but try if it would work with dict quota file? 
http://wiki2.dovecot.org/Quota/Dict



Re: [Dovecot] default mail quota when using per user quota (news1204: message 6 of 20)

2012-04-20 Thread Andreas Helmcke
Am 20.04.2012 23:18, schrieb Timo Sirainen:
 By not set you mean it doesn't exist at all, or it exists but is empty?

I tried both (at least I do think I tried both).

 If dcMailQuota isn't returned, then the global quota_rule is used. If it is 
 returned as empty, I guess it gets treated as unlimited quota. There's 
 currently no easy way avoid this (a difficult way could be e.g. post-login 
 scripting, but that works only for imap/pop3).
 

Maybe openldap does not distingish between this cases. I will try again on
monday, when I am back at work.



Re: [Dovecot] default mail quota when using per user quota (news1204: message 6 of 20)

2012-04-20 Thread Timo Sirainen
On 21.4.2012, at 0.47, Andreas Helmcke wrote:

 If dcMailQuota isn't returned, then the global quota_rule is used. If it is 
 returned as empty, I guess it gets treated as unlimited quota. There's 
 currently no easy way avoid this (a difficult way could be e.g. post-login 
 scripting, but that works only for imap/pop3).
 
 
 Maybe openldap does not distingish between this cases. I will try again on
 monday, when I am back at work.

Hm. Or maybe I broke it in v2.1 when I changed this code. I'll also check 
later. :)



Re: [Dovecot] Configuration advices for a 50000 mailboxes server(s)

2012-04-20 Thread Stan Hoeppner
On 4/19/2012 4:40 AM, Stan Hoeppner wrote:
 On 4/17/2012 8:01 AM, Frank Bonnet wrote:
 
 have 4000/6000 imaps concurent connections during working hours .

 for approx 50K intensives users.

 The only mandatory thing will be I must use HP proliant servers

 The operating system will be FreeBSD or Linux

 I just made the wishlist public so it should be available tomorrow or
 Friday.  I'll provide the link when it's available.

And here it is:
http://secure.newegg.com/WishList/PublicWishDetail.aspx?WishListNumber=16797311

Since your requirement is for an HP solution, following is an HP server
and storage system solution of roughly identical performance and
redundancy to the SuperMicro based system I detailed.  The HP system
solution is $44,263, almost double the cost at $20,000 more.  Due to the
stupidity of Newegg requiring all wish lists to be reviewed before going
live, I'll simply provide the links to all the products.

Yes boys and girls, Newegg isn't just consumer products.  They carry
nearly the entire line of HP Proliant servers and storage, including the
4-way 48-core Opteron DL585 G7 w/64GB, the P2000 fiber channel array,
and much more.  In this case they sell every product needed to assemble
this complete mail server solution:

 1x http://www.newegg.com/Product/Product.aspx?Item=N82E16859105807
 8x http://www.newegg.com/Product/Product.aspx?Item=N82E16820326150
 3x http://www.newegg.com/Product/Product.aspx?Item=N82E16816401143
80x http://www.newegg.com/Product/Product.aspx?Item=N82E16822332061
 3x http://www.newegg.com/Product/Product.aspx?Item=N82E16816118109
 3x http://www.newegg.com/Product/Product.aspx?Item=N82E16816118163
 2x http://www.newegg.com/Product/Product.aspx?Item=N82E16816133048
 2x http://www.newegg.com/Product/Product.aspx?Item=N82E16833106050

The 9280-8e RAID controllers are identical to 9261-8i boards but have 2
external vs internal x4 6Gb SAS ports.  I spec them instead of the Smart
Array boards as they're far cheaper, easier to work with, and offer
equal or superior performance.  Thus everything written below is valid
for this system as well, with the exception that you would configure 1
global hot spare in each chassis since these units have 25 drive bays
instead of 24.  The D2700 units come with 20 8088 cables.  I an
additional spec'd two 3ft cables to make sure we reach all 3 disk
chassis from the server, thinking the sever would be on top with the 3
disk chassis below.

I hope this and my previous post are helpful in one aspect or another to
Frank and anyone else.  I spent more than a few minutes on these
designs. ;)  Days in fact on the SuperMicro design, only a couple of
hours on the HP.  It wouldn't have taken quite so long if all PCIe slots
were created equal (x8), which they're not, or if modern servers didn't
require 4 different types of DIMMs depending on how many slots you want
to fill and how much expansion capacity you need without having to throw
out all the previous memory, which many folks end up doing out of
ignorance.  Memory configuration is simply too darn complicated with
high cap servers containing 8 channels and 24 slots.

 The key to performance, and yielding a single file tree, is once again
 using XFS to take advantage of this large spindle count across 3 RAID
 controllers.  Unlike previous configurations where I recommended using a
 straight md concatenation of hardware RAID1 pairs, in this case we're
 going to use a concatenation of 6 hardware RAID10 arrays.  There are a
 couple of reasons for doing so in this case:
 
 1.  Using 36 device names in a single md command line is less than
 intuitive and possibly error prone.  Using 6 is more manageable.
 
 2.  We have 3 BBWC RAID controllers w/24 drives each.  This is a high
 performance server and will see a high IO load in production.  In many
 cases one would use an external filesystem journal, which we could
 easily do and get great performance with our mirrored SSDs.  However,
 the SSDs are not backed by BBWC, so a UPS failure or system crash could
 hose the log journal.  So we'll go with the default internal journal
 which will be backed by the BBWC.
 
 Going internal with the log in this mail scenario can cause a serious
 amount of extra IOPS on the filesystem data section, this being
 Allocation Group 0.  If we did the normal RAID1 concat, all the log IO
 would hit the first RAID1 pair.  On this system, the load may hit that
 spindle pretty hard, making access to mailboxes in AG0 slower than
 others.  With 6 RAID10 arrays in a concat, the internal log writes will
 be striped across 6 spindles in the first array.  With 512MB BBWC
 backing that array and optimizing writeout, and with delaylog, this will
 yield optimal log write performance without slowing down mailbox file
 access in AG0.  To create such a setup we'd do something like this,
 assuming the mobo LSI controller yields sd[ab], and the 6 array devices
 on the PCIe LSI cards yield sd[cdefgh]
 
 1.  Create two RAID10 arrays, each of 

Re: [Dovecot] Error in logs indicating broken files

2012-04-20 Thread Joseph Tam

Steve Campbell campb...@cnpapers.com writes:


I'm seeing a couple of errors in my log file indicating corruption of
index files.

Error: Corrupted index cache 
file/home/xx/mail/.imap/sent-mail/dovecot.index.cache: Broken virtual size 
for mail UID 67: 1 Time(s)
Error: FETCH [] for mailbox ~/mail/sent-mail UID 67 got too little data: 6203 
vs 7478: 1 Time(s)

This account is used by multiple users, but it is not a shared account
(haven't set any of those up yet - still new to me), so I would expect
corruption possibilities when multiple users modify the account folders
in some manner.


This is just one dovecot IMAP client process moaning after another user
client process pulled the rug out from under it by modifying the mailbox.
I get a few dozen log entries of this sort per week with ~200 IMAP users
without shared access.

Unless your users actually complain about a problem, I think it's safe
to ignore them.

Joseph Tam jtam.h...@gmail.com