[Dovecot] Correction of home and mail directory config

2012-04-21 Thread L. Grün

Hello,
after running dovecot for a while, I stumbled accross the warning, not 
to have mail and home directory settings point to one and same directory.

Here is the output of dovecot -n:

 dovecot -n
# 1.2.15: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-686 i686 Debian 6.0.4 ext3
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imaps imap
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/imap-login
mail_max_userip_connections: 100
mail_privileged_group: mail
mail_uid: 5000
mail_gid: 5000
mail_location: maildir:/var/vmail/%d/%n/Maildir
mail_full_filesystem_access: yes
mbox_write_locks: fcntl dotlock
namespace:
  type: private
  separator: .
  inbox: yes
  list: yes
  subscriptions: yes
lda:
  auth_socket_path: /var/run/dovecot/auth-master
  postmaster_address: x...@.org
  mail_plugins: sieve
  log_path:
auth default:
  mechanisms: plain login
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: static
args: uid=5000 gid=5000 home=/var/vmail/%d/%n/Maildir 
allow_all_users=yes

  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: postfix
master:
  path: /var/run/dovecot/auth-master
  mode: 384
  user: vmail

In args: uid=5000 gid=5000 home=/var/vmail/%d/%n/Maildir 
allow_all_users=yes I should delete  Maildir.


My question is:
What files do I have to copy from /Maildir to the home directory 
/var/vmail/%d/%n/ ?

Are there other side effects, I have to consider?

Thank you very much for your help!

Stefan




Re: [Dovecot] quota not being calculated

2012-04-21 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. 
 
 I'll try later, but try if it would work with dict quota file? 
 http://wiki2.dovecot.org/Quota/Dict
 

This almost works, but maybe there's a small bug. Config (2.1.4)

namespace spam {
  type = private
  separator = /
  inbox = no
  prefix = Spam/
  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
  subscriptions = no
  list = yes
  hidden = yes
}


plugin {
  quota = fs:User quota
  quota2 = dict:Spam Quota::ns=spam:file:%h/spam-quota
  quota2_rule = *:storage=20M
}

Now I see:

. getquotaroot Spam
* QUOTAROOT Spam User quota Spam Quota
* QUOTA User quota (STORAGE 10128 1228800)
* QUOTA Spam Quota (STORAGE 8727 20480)

The problem is that the storage calculated for the spam ns is wrong. It is less 
than 1MB. The 8727 seems to be the whole maildir including all folders. 

This seems to be caused by:

Apr 21 10:00:11 lmtp1 dovecot: imap(cor): Error: quota: Unknown namespace: spam

Regards,

Cor







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

2012-04-21 Thread Jan-Frode Myklebust
On Thu, Apr 19, 2012 at 07:31:13PM -0500, Stan Hoeppner wrote:
 
 This issue has come up twice on the Postfix list in less than a month.

Oh, thanks! I'll look into those list posts.. I had mostly given up
solving this by rate limits and decided to throw hardware at the problem 
when I saw the log entries for sender *.anpdm.com.. Seems to be a newsletter
sender, which I found as 203 different mailserver ip-addresses in our
incoming mailserver logs, from 53 different B-nets and 8 different A-nets.

Will give smtpd_client_connection_count_limit a try..


  -jf


Re: [Dovecot] migrate 15K users to new domain name

2012-04-21 Thread Jan-Frode Myklebust
On Thu, Apr 19, 2012 at 05:59:39PM +0300, Timo Sirainen wrote:
 
 With v2.1.4 you could do something like:
 
 doveadm -c dummy.conf user -m user@domain
 
 where dummy.conf contains the minimum configuration needed:
 
 mail_home = /srv/mailstore/%256LRHu/%Ld/%Ln
 ssl = no
 

Thanks! Works perfect.


  -jf


Re: [Dovecot] quota not being calculated

2012-04-21 Thread Timo Sirainen
On 21.4.2012, at 11.01, Cor Bosman wrote:

  prefix = Spam/
..
  quota2 = dict:Spam Quota::ns=spam:file:%h/spam-quota
..
 Apr 21 10:00:11 lmtp1 dovecot: imap(cor): Error: quota: Unknown namespace: 
 spam

Oh. It would make more sense to have ns=spam, but unfortunately I hadn't 
thought of namespace names before v2.1. You need to use ns=Spam/



Re: [Dovecot] quota not being calculated

2012-04-21 Thread Cor Bosman
On Apr 21, 2012, at 12:32 PM, Timo Sirainen wrote:

 On 21.4.2012, at 11.01, Cor Bosman wrote:
 
 prefix = Spam/
 .
 quota2 = dict:Spam Quota::ns=spam:file:%h/spam-quota
 .
 Apr 21 10:00:11 lmtp1 dovecot: imap(cor): Error: quota: Unknown namespace: 
 spam
 
 Oh. It would make more sense to have ns=spam, but unfortunately I hadn't 
 thought of namespace names before v2.1. You need to use ns=Spam/

Exact same issue with dict quota. It starts out at 0 (even though there are 116 
messages in the Spam folder. Then when 1 email gets saved to the Spam folder, 
the counter is increased by the size of that 1 email.

Cor




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

2012-04-21 Thread Nikolaos Milas

On 21/4/2012 12:54 πμ, Timo Sirainen wrote:


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


I'm afraid that's possible. The same configuration in 2.0.13 produces 
(doveadm quota get -u tester):


Quota name Type Value Limit %
User quota STORAGE 237803 4194304 5
User quota MESSAGE 531 - 0

and in 2.1.1:

Quota name Type Value Limit %
User quota STORAGE 0 - 0
User quota MESSAGE 0 - 0

(In the latter test server value should be 0 - because there are no 
messages there - but limit should be as above.

Things do not change after: doveadm quota recalc -u tester)

Regards,
Nick




Re: [Dovecot] dovecot LDA with sendmail

2012-04-21 Thread Hadi Salem


Hi,

 i installed new version 2.0.20. but its the same problem 

# 2.0.20: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.18-164.el5 x86_64 CentOS release 5.4 (Final)
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
debug_log_path = /var/log/dovecot.log
default_login_user = vmail
disable_plaintext_auth = no
hostname = host1.bigmama.com
info_log_path = /var/log/dovecot.log
log_path = /var/log/dovecot.log
mail_debug = yes
mail_location = maildir:~/Maildir
mail_privileged_group = vmail
passdb {
  args = scheme=PLAIN username_format=%u /etc/dovecot/users
  driver = passwd-file
}
postmaster_address = r...@host1.bigmama.com
service auth {
  unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
  }
}
ssl = no
userdb {
  args = username_format=%u /etc/dovecot/users
  driver = passwd-file
}

Apr 21 17:47:16 host1 sendmail[32561]: q3LElF79032559: to=ja...@example.com, 
ctladdr=r...@host1.bigmama.com (0/0), delay=00:00:00, xdelay=00:00:00, 
mailer=dovecot, pri=120292, relay=dovecot, dsn=4.0.0, stat=Deferred: dovecot 
mailer (/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL



 Date: Fri, 20 Apr 2012 07:07:57 -0400
 From: cmar...@media-brokers.com
 To: dovecot@dovecot.org
 Subject: Re: [Dovecot] dovecot LDA with sendmail
 
 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
  

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

2012-04-21 Thread Stan Hoeppner
On 4/21/2012 4:52 AM, Jan-Frode Myklebust wrote:
 On Thu, Apr 19, 2012 at 07:31:13PM -0500, Stan Hoeppner wrote:

 This issue has come up twice on the Postfix list in less than a month.
 
 Oh, thanks! I'll look into those list posts.. I had mostly given up
 solving this by rate limits and decided to throw hardware at the problem 
 when I saw the log entries for sender *.anpdm.com.. Seems to be a newsletter
 sender, which I found as 203 different mailserver ip-addresses in our
 incoming mailserver logs, from 53 different B-nets and 8 different A-nets.

Yeah, they're a newsletter service provider.

 Will give smtpd_client_connection_count_limit a try..

Setting this to 1 or 2 should severely slow their delivery rate.  You
can also do rate limiting at a much more fine grained level with a
Postfix policy daemon such as postfwd (Postfix firewall daemon), though
the setup is a bit more complicated.

-- 
Stan


[Dovecot] How to remove duplicate GUID messages from storage?

2012-04-21 Thread Daniel Parthey
Hi,

I tried to import messages like this:
doveadm import -u usern...@example.org 
mdbox:/mail/dovecot/example.org/username/mail mbox:/root/mail.txt all

This seemed to have imported the same messages in the mail storage,
as they were already there. And now I have got a lot of duplicates.

Then I deleted the mbox:/root/mail mail stuff from mailboxes folder
and the storage remained, with duplicate GUIDs.

The following command
doveadm -v force-resync -u usern...@example.org INBOX
outputs lots of messages like this one, with different GUID
doveadm(usern...@example.org): Error: mdbox 
/mail/dovecot/example.org/username/mail/storage: Duplicate GUID 
0b8a032d66a0924fb42cde5f8128 in m.55:45484041 and m.14:52173045

The messages at m.55:45484041 and m.14:52173045 have the same content,
since they were seemingly imported from the mail store itself,
they are in the storage twice now and require twice as much disk
space as before.

How can I manually remove these identical, duplicate messages
from the storage to save space? Dovecot does not do it
automatically.

Kind regards,
Daniel


Re: [Dovecot] dovecot LDA with sendmail

2012-04-21 Thread Joseph Tam



i installed new version 2.0.20. but its the same problem

 args = username_format=%u /etc/dovecot/users

...


Apr 21 17:47:16 host1 sendmail[32561]: q3LElF79032559: to=ja...@example.com, 
ctladdr=r...@host1.bigmama.com (0/0), delay=00:00:00, xdelay=00:00:00, 
mailer=dovecot, pri=120292, relay=dovecot, dsn=4.0.0, stat=Deferred: dovecot mailer 
(/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL


Any logs for dovecot?  Same sendmail configs as before or did you try the extra
flag I suggested?

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