Re: [Dovecot] Creating "special" folders?

2007-11-22 Thread Bazy

Timo Sirainen wrote:

On Tue, 2007-11-20 at 21:23 +0100, Bjørn T Johansen wrote:

Is there anyway to make dovecot create Sent, Draft, etc folder automatically? 
Or is this the job for a MUA?


It is MUA's job, but since so many people have asked for this, I created
also a plugin for it. http://dovecot.org/patches/1.0/autocreate-plugin.c


Great plugin Timo! I just installed it, it works fine.

The Expire plugin is also very useful, but I'm using 1.0.x :)


Re: [Dovecot] backup dovecot

2007-11-23 Thread Bazy
On Thu, 22 Nov 2007 20:40:24 +0300
Nikolay Shopik <[EMAIL PROTECTED]> wrote:

> What is correct way to backup dovecot store? Is am I right what is just 
> enough to copy all maildir and my configuration. So in case failure I 
> can just prepare new machine copy config, maildirs and I'm good to go 
> with this.

I think that you should use a cheap machine with a disk drive as big as the 
mail server's (or use squashfs) and imapsync every night... that way people 
will be able to access their mail the next second that the big server fails. 
Look at http://freshmeat.net/projects/imapsync

It's just an idea... not the best way to do it I guess...


[Dovecot] dovecot sieve confusion

2007-12-02 Thread Bazy
Hi...

I use dovecot with postfix.

For dovecot's sieve plugin to work, do I need to put in my
/etc/postfix/master.cf:

dovecot   unix  -   n   n   -   -   pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d
${recipient}

and

postconf -e virtual_transport=dovecot
postconf -e dovecot_destination_recipient_limit=1

?


Re: [Dovecot] dovecot sieve confusion

2007-12-02 Thread Bazy
Nikolay Shopik wrote:
> On 02.12.2007 16:57, Bazy wrote:
>> Hi...
>>
>> I use dovecot with postfix.
>>
>> For dovecot's sieve plugin to work, do I need to put in my
>> /etc/postfix/master.cf:
>>
>> dovecot   unix  -   n   n   -   -   pipe
>> flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d
>> ${recipient}
>>
>> and
>>
>> postconf -e virtual_transport=dovecot
>> postconf -e dovecot_destination_recipient_limit=1
>>
>> ?
>>   
> Yes, otherwise how your postfix will deliver messages to your virtual
> domains, that's necessary otherwise deliver will not work and sieve too ;).

It was a retarded question though :-)

Doesn't `which deliver` slows a little bit mail delivery after all?


Re: [Dovecot] Problem downloading mail with "large" attachment using Thunderbird....

2007-12-12 Thread Bazy
Bjørn T Johansen wrote:
> We have a user that is using Thunderbird on Windows to read mail over IMAP 
> and it works ok, except for downloading mail with
> "large" attachment.. When opening a mail with a attachment with a size of 
> 14-15MB, TB downloads the attachment seemingly ok, but
> TB stops when reaching 99%. After TB has stopped, if the user tries to select 
> another mail, TB just hangs and it has to be closed
> and started again to work again...
> I have checked the dovecot log, but I can't find anything there... We have 
> also tried to create a log in TB but everything looks
> ok there also... 
> 
> Is there a known problem with TB and "large" attachment or does anyone know 
> how to fix this, if possible?
> 
> 
> Regards,
> 
> BTJ
> 

It happens to me too sometimes. The progress bar just runs to 99%
instantly, you just have to wait longer. Try downloading that attachment
with Outlook and see how much it takes.

And yes... it is a TB issue...


Re: [Dovecot] Problem downloading mail with "large" attachment using Thunderbird....

2008-01-22 Thread Bazy
On Sun, 20 Jan 2008 14:41:08 +0200
Timo Sirainen <[EMAIL PROTECTED]> wrote:

> On Mon, 2007-12-31 at 14:04 +0100, Bjørn T Johansen wrote:
> > On Fri, 21 Dec 2007 17:59:04 +0200
> > Timo Sirainen <[EMAIL PROTECTED]> wrote:
> > 
> > > On Wed, 2007-12-12 at 13:15 +0100, Bjørn T Johansen wrote:
> > > > We have a user that is using Thunderbird on Windows to read mail over 
> > > > IMAP and it works ok, except for
> > > > downloading mail with "large" attachment.. When opening a mail with a 
> > > > attachment with a size of 14-15MB, TB
> > > > downloads the attachment seemingly ok, but TB stops when reaching 99%. 
> > > > After TB has stopped, if the user tries
> > > > to select another mail, TB just hangs and it has to be closed and 
> > > > started again to work again...
> > > > I have checked the dovecot log, but I can't find anything there... We 
> > > > have also tried to create a log in TB
> > > > but everything looks ok there also... 
> > > > 
> > > > Is there a known problem with TB and "large" attachment or does anyone 
> > > > know how to fix this, if possible?
> > > 
> > > v1.0.8 fixed this for maildir, v1.0.9 for mbox.
> > > 
> > 
> > We are still having this problem. (running v1.0.9)
> 
> Did v1.0.10 fix it?
> 
> 

It's not a dovecot issue, TB does that, try downloading atachaments with 
Sylpheed or with a webmail client.


[Dovecot] quota imap_quota

2007-08-28 Thread Bazy
Hello,
I've been frying my brain with quota and mysql... Here is what I do:

protocol imap {
  mail_plugins = quota imap_quota
  imap_client_workarounds = outlook-idle delay-newmail
}

plugin {
# 10 MB + 1000 messages quota limit
# quota = maildir:storage=10240:messages=1000

driver = mysql
connect = host=/var/lib/mysql/mysql.sock user=mail_admin
password= dbname=mail
user_query = SELECT CONCAT(('/home/vmail/'),
SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'),
CONCAT('5000'), CONCAT('5000'), CONCAT('maildir:storage=', quota) FROM
users AS quota WHERE email = '%u';
}

The querry output looks like this:

+--+++---+
| CONCAT(('/home/vmail/'),
SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') |
CONCAT('5000') | CONCAT('5000') | CONCAT('maildir:storage=', quota) |
+------+++---+
| /home/vmail/goofy.celuloza.ro/bazy/
   | 5000   | 5000   |
maildir:storage=10240 |
+--+++---+


I made the query with
http://wiki.dovecot.org/Quota?highlight=%28imap_quota%29 as an example.

The result is:

. OK Logged in.
. capability
* CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND
UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS QUOTA
. OK Capability completed.
. getquotaroot Inbox
. OK No quota.
. getquotaroot inbox
. OK No quota.
. getquotaroot Trash
. OK No quota.




How can I get quota to work?... I'm out of ideas... and I'm an dovecot
NUB... postfix sasl with dovecot with mysql with ENCRYPTED password
works great, pop3 imap and imaps work great also. I just can't get quota
to work... :(

Any advice is welcome.

Thank you!


Re: [Dovecot] Err. msg. while copy.: "Invalid internal data."

2007-08-28 Thread Bazy
Dominik Springer wrote:
> Hi All,
> 
> While copying 9360 messages from a local folder to a folder on the imap
> server
> at message 5792 the client shows the following message from server:
> "Invalid internal data."
> 
> The error is reproducible.
> Any suggestions?
> 
> Configuration:
> Versio: 1.0.rc15 (Debian Package)
> OS: Debian etch (in XEN VM)
> Kernel: 2.6.18-4-xen-686 (Debian Package)
> FS: ext3
> Mail-Client: Thunderbird 2.0.0.6 on Mac OS X 10.4.10
> 
> 
> 
> Br, thx
> Dominik Springer

Hi Dominik,

Do you use maildir or mbox? I had this problem when mail was stored in a
single mbox file. Try changing to maildir.


Paste from wiki:

Typically with Maildir it would be set to:

mail_location = maildir:~/Maildir

or with mbox:

mail_location = mbox:~/mail:INBOX=/var/mail/%u


Re: [Dovecot] quota imap_quota

2007-08-29 Thread Bazy
Nils Vogels wrote:
> Bazy wrote on 28-8-2007 23:05:
>> plugin {
>> # 10 MB + 1000 messages quota limit
>> # quota = maildir:storage=10240:messages=1000
>>
>> driver = mysql
>> connect = host=/var/lib/mysql/mysql.sock user=mail_admin
>> password= dbname=mail
>> user_query = SELECT CONCAT(('/home/vmail/'),
>> SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'),
>> CONCAT('5000'), CONCAT('5000'), CONCAT('maildir:storage=', quota) FROM
>> users AS quota WHERE email = '%u';
>> }
>>
>> The querry output looks like this:
>>
>> +--+++---+
>> | CONCAT(('/home/vmail/'),
>> SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') |
>> CONCAT('5000') | CONCAT('5000') | CONCAT('maildir:storage=', quota) |
>> +--+++---+
>> | /home/vmail/goofy.celuloza.ro/bazy/
>>| 5000   | 5000   |
>> maildir:storage=10240 |
>> +--+++---+
>>   
> 
> I'm not the expert on the matter, but I think your columns are named
> wrong. Try changing the latter part of the user_query to
> 'CONCAT('maildir:storage=', quote) AS quota FROM users WHERE email = '%u';
> 
> As an example, I've posted my userdb query:
> 
> user_query = SELECT concat('/mail/', maildir) as home,
> concat('maildir:/mail/', maildir) as mail, 108 AS uid, 116 AS gid,
> concat('maildir:storage=', quota) AS quota FROM mailbox WHERE username =
> '%u' AND active = '1'
> 
> 
> Hope this helps!
> 
> Nils.
> 

Thank you Nils,

It's working now. I had some configuration options wrong in my mind, I
didn't understand them...

It looks like this now:

auth default {
mechanisms = plain login cram-md5 digest-md5

passdb sql {
args = /etc/dovecot-sql.conf
}

#   userdb static {
#   args = uid=5000 gid=5000 home=/home/vmail/%d/%n
#   }

userdb sql {
args = /etc/dovecot-userdb-sql.conf
}

As you can see, i had a userdb static, now I'm querying mysql for it :)
and with your help I fixed my query.

It looks like this now:

SELECT CONCAT(('/home/vmail/'),
SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') as
home, 5000 as uid, 5000 as gid, CONCAT('maildir:storage=',
floor(quota/1024)) as quota FROM users WHERE email = '%u';

Thank you!


Re: [Dovecot] Disable imap proxy access

2007-10-03 Thread Bazy
Ed W wrote:
> 
>> How to disable pop3 and imap access during the data migration process
>> (duration 5 minutes to 10 minutes). Can i send a custom error message to
>> our users ?
>>   
> 
> 
> I don't recall the exact details, but I think both options are possible
> if you check the dovecot wiki.  There is a good study regarding the
> proxy stuff, and some notes on sending custom errors back (along with a
> note that it's not supported on many clients)
> 
> If you use SQL then you could simply change the query temporarily
> 
> Also when I do my migration I change the permissions on the home folders
> first (root:root say) - this way if I muck something up they don't get
> logged into the old mailbox.  Then I reset the permissions back on the
> new server and update the proxy settings.  This also gives a random
> error back to the client in the meantime if they try and log in.
> 
> I should think that the above could even be scripted and run per mailbox
> for a very subtle downtime period... I use rsync once while the mailbox
> is online, then change perms so that the user can't login, then do a
> final rsync to get any changes across.  I didn't check whether there is
> a problem with an existing connection still accessing the data after the
> perms were changed though...
> 
> Good luck
> 
> Ed W

I'm not an perl expert, but... you could create a script that listens on
port 143, and one for 110, that acts as a server. So right after ".login
 " the perl script will print an error, telling the
client that the server is down for maintenance or something like that.

Like when you get the 550 error in smtp and it says "die spammer" :).

I think you can use IO::Socket::Telnet.
Take a look over these scripts:
http://www-user.tu-chemnitz.de/~uro/perlgoodies/server/

It's just an idea...


Re: [Dovecot] Secure authentication?

2007-11-11 Thread Bazy
Jürgen Herz wrote:
> On 2007-11-11 01:13, Bjørn T Johansen wrote:
>> I have enabled SSL support for my dovecot installation but if I enable 
>> secure authentication in my MUA, I get an
>> error from dovecot telling me that this is not supported..
>>
>> Is this because dovecot does not support this or am I missing some config?
> 
> Might be. But note that with "secure authentication" it might mean
> CRAM-MD5, DIGEST-MD5, Kerberos a.s.o. that are no simple plain text or
> just Base64 coding mechanisms. SSL on the other hand is a way to make a
> secure *connection*.
> So make sure some of the above mechanisms are enabled in your dovecot
> installation as well.
> 
> Jürgen
> 
> ---AV & Spam Filtering by M+Guardian - Risk Free Email (TM)---
> 

So, if we are talking about authentication, I always get the error:


Nov 11 14:10:05 goofy postfix/smtpd[8089]: warning:
unknown[192.168.0.3]: SASL CRAM-MD5 authentication failed:
PDcyNTc4NDY4NjgyMTIxMDEuMTE5NDc4MzAwM0Bnb29meS5jZWx1bG96YS5ybz4=

Nov 11 14:10:05 goofy postfix/smtpd[8089]: A1338855EA1:
client=unknown[192.168.0.3], sasl_method=PLAIN,
[EMAIL PROTECTED]


Do i need to store the password in mysql with md5? I don't fully
understand it... Why do i get that error?

Now my "default_pass_scheme = CRYPT", and in mysql I'm using ENCRYPT
when i store a password.


I am using thunderbird 2, and my authentication mechanism:

auth default {
mechanisms = plain login cram-md5

passdb sql {
args = /etc/dovecot-sql.conf
}

userdb sql {
args = /etc/dovecot-userdb-sql.conf
}

socket listen {
client {
user = postfix
group = postfix
path = /var/spool/postfix/private/auth
mode = 0660
}
}
}


Re: [Dovecot] Secure authentication?

2007-11-12 Thread Bazy
Uldis Pakuls wrote:
> Bazy wrote:
>> Jürgen Herz wrote:
>>   
>>> On 2007-11-11 01:13, Bjørn T Johansen wrote:
>>> 
>>>> I have enabled SSL support for my dovecot installation but if I enable 
>>>> secure authentication in my MUA, I get an
>>>> error from dovecot telling me that this is not supported..
>>>>
>>>> Is this because dovecot does not support this or am I missing some config?
>>>>   
>>> Might be. But note that with "secure authentication" it might mean
>>> CRAM-MD5, DIGEST-MD5, Kerberos a.s.o. that are no simple plain text or
>>> just Base64 coding mechanisms. SSL on the other hand is a way to make a
>>> secure *connection*.
>>> So make sure some of the above mechanisms are enabled in your dovecot
>>> installation as well.
>>>
>>> Jürgen
>>>
>>> ---AV & Spam Filtering by M+Guardian - Risk Free Email (TM)---
>>>
>>> 
>> So, if we are talking about authentication, I always get the error:
>>
>>
>> Nov 11 14:10:05 goofy postfix/smtpd[8089]: warning:
>> unknown[192.168.0.3]: SASL CRAM-MD5 authentication failed:
>> PDcyNTc4NDY4NjgyMTIxMDEuMTE5NDc4MzAwM0Bnb29meS5jZWx1bG96YS5ybz4=
>>
>> Nov 11 14:10:05 goofy postfix/smtpd[8089]: A1338855EA1:
>> client=unknown[192.168.0.3], sasl_method=PLAIN,
>> [EMAIL PROTECTED]
>>
>>
>> Do i need to store the password in mysql with md5? I don't fully
>> understand it... Why do i get that error?
>>
>> Now my "default_pass_scheme = CRYPT", and in mysql I'm using ENCRYPT
>> when i store a password.
>>
>>   
> No, you need store passwords encrypted with CRAM-MD5 to use CRAM-MD5
> if your password is encrypted using CRYPT - only CRYPT is available.
> 
> Generally you need to store unencrypted passwords to allow client chose
> which encryption to use.
> Then hash is generated internally by dovecot form unencrypted password.
> If password is already encrypted only this encryption method is
> available - e.g. you can't generate MD5 hash from Crypt hash.
> 
> 
> Uldis
> 

I know I can't generate md5 from mysql encrypt :) but I understand now,
thank you for explaining it to me.


[Dovecot] mailbox size limit

2007-11-17 Thread Bazy
Hi guys,

I was wondering... my Inbox is 1.3GB large, my mailbox size limit is 6GB
(6442450941). Other users have 500+ MB in their Inbox.

I have about 27GB of mail. I'm running dovecot 1.0.7 now under Fedora 7
with postfix. I have no trouble at all, everything is working perfect.

I use ext3 as my file system, and I store mail in maildir format.

Will I have any inode, file system, issues?
Is anyone storing more then 27GB in maildir format on only one ext3
partition?



Here is my dovecot -n output:

# 1.0.7: /etc/dovecot.conf
log_path: /var/log/dovecot.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3
ssl_cert_file: /etc/postfix/smtpd.cert
ssl_key_file: /etc/postfix/smtpd.key
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_max_processes_count: 512
mail_location: maildir:/home/vmail/%d/%n/
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
imap_client_workarounds(default): outlook-idle delay-newmail
imap_client_workarounds(imap): outlook-idle delay-newmail
imap_client_workarounds(pop3): outlook-idle
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
  mechanisms: plain login
  passdb:
driver: sql
args: /etc/dovecot-sql.conf
  userdb:
driver: sql
args: /etc/dovecot-userdb-sql.conf
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: postfix
plugin:
  quota: maildir:storage=102400


[root:pts/0][~]# cat /etc/dovecot-sql.conf
driver = mysql
connect = host=/var/lib/mysql/mysql.sock user=mail_admin
password= dbname=mail
default_pass_scheme = CRYPT
password_query = SELECT password FROM users WHERE
CONCAT(SUBSTRING_INDEX(email,'@',1)) = '%n' AND
CONCAT(SUBSTRING_INDEX(email,'@',-1)) = '%d';


[root:pts/0][~]# cat /etc/dovecot-userdb-sql.conf
driver = mysql
connect = host=/var/lib/mysql/mysql.sock user=mail_admin
password= dbname=mail
user_query = SELECT CONCAT(('/home/vmail/'),
SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') as
home, 5000 as uid, 5000 as gid, CONCAT('maildir:storage=',
floor(quota/1024)) as quota FROM users WHERE email = '%u';


Re: [Dovecot] mailbox size limit

2007-11-17 Thread Bazy
Nikolay Shopik wrote:
> On 17.11.2007 16:54, Bazy wrote:
>> Hi guys,
>>
>> I was wondering... my Inbox is 1.3GB large, my mailbox size limit is 6GB
>> (6442450941). Other users have 500+ MB in their Inbox.
>>
>> I have about 27GB of mail. I'm running dovecot 1.0.7 now under Fedora 7
>> with postfix. I have no trouble at all, everything is working perfect.
>>
>> I use ext3 as my file system, and I store mail in maildir format.
>>
>> Will I have any inode, file system, issues?
>> Is anyone storing more then 27GB in maildir format on only one ext3
>> partition?
>>
>>
>>
>> Here is my dovecot -n output:
>>
>> # 1.0.7: /etc/dovecot.conf
>> log_path: /var/log/dovecot.log
>> log_timestamp: %Y-%m-%d %H:%M:%S
>> protocols: imap imaps pop3
>> ssl_cert_file: /etc/postfix/smtpd.cert
>> ssl_key_file: /etc/postfix/smtpd.key
>> login_dir: /var/run/dovecot/login
>> login_executable(default): /usr/libexec/dovecot/imap-login
>> login_executable(imap): /usr/libexec/dovecot/imap-login
>> login_executable(pop3): /usr/libexec/dovecot/pop3-login
>> login_max_processes_count: 512
>> mail_location: maildir:/home/vmail/%d/%n/
>> mail_executable(default): /usr/libexec/dovecot/imap
>> mail_executable(imap): /usr/libexec/dovecot/imap
>> mail_executable(pop3): /usr/libexec/dovecot/pop3
>> mail_plugins(default): quota imap_quota
>> mail_plugins(imap): quota imap_quota
>> mail_plugins(pop3): quota
>> mail_plugin_dir(default): /usr/lib/dovecot/imap
>> mail_plugin_dir(imap): /usr/lib/dovecot/imap
>> mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
>> imap_client_workarounds(default): outlook-idle delay-newmail
>> imap_client_workarounds(imap): outlook-idle delay-newmail
>> imap_client_workarounds(pop3): outlook-idle
>> pop3_client_workarounds(default):
>> pop3_client_workarounds(imap):
>> pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
>> auth default:
>>   mechanisms: plain login
>>   passdb:
>> driver: sql
>> args: /etc/dovecot-sql.conf
>>   userdb:
>> driver: sql
>> args: /etc/dovecot-userdb-sql.conf
>>   socket:
>> type: listen
>> client:
>>   path: /var/spool/postfix/private/auth
>>   mode: 432
>>   user: postfix
>>   group: postfix
>> plugin:
>>   quota: maildir:storage=102400
>>
>>
>> [root:pts/0][~]# cat /etc/dovecot-sql.conf
>> driver = mysql
>> connect = host=/var/lib/mysql/mysql.sock user=mail_admin
>> password= dbname=mail
>> default_pass_scheme = CRYPT
>> password_query = SELECT password FROM users WHERE
>> CONCAT(SUBSTRING_INDEX(email,'@',1)) = '%n' AND
>> CONCAT(SUBSTRING_INDEX(email,'@',-1)) = '%d';
>>
>>
>> [root:pts/0][~]# cat /etc/dovecot-userdb-sql.conf
>> driver = mysql
>> connect = host=/var/lib/mysql/mysql.sock user=mail_admin
>> password= dbname=mail
>> user_query = SELECT CONCAT(('/home/vmail/'),
>> SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') as
>> home, 5000 as uid, 5000 as gid, CONCAT('maildir:storage=',
>> floor(quota/1024)) as quota FROM users WHERE email = '%u';
>>   
> Hi,
> 
> What kind issues you thinking about? I'm storing currently about 40Gb of
> mails. You mean, run out of number inodes on your partition?

Yes, that's what I meant. Run out of inodes on that partition.


Re: [Dovecot] mailbox size limit

2007-11-17 Thread Bazy
Nikolay Shopik wrote:
> On 17.11.2007 18:11, Nikolay Shopik wrote:
>> On 17.11.2007 17:56, Bazy wrote:
>>> Nikolay Shopik wrote:
>>>  
>>>> On 17.11.2007 16:54, Bazy wrote:
>>>>   
>>>>> Hi guys,
>>>>>
>>>>> I was wondering... my Inbox is 1.3GB large, my mailbox size limit
>>>>> is 6GB
>>>>> (6442450941). Other users have 500+ MB in their Inbox.
>>>>>
>>>>> I have about 27GB of mail. I'm running dovecot 1.0.7 now under
>>>>> Fedora 7
>>>>> with postfix. I have no trouble at all, everything is working perfect.
>>>>>
>>>>> I use ext3 as my file system, and I store mail in maildir format.
>>>>>
>>>>> Will I have any inode, file system, issues?
>>>>> Is anyone storing more then 27GB in maildir format on only one ext3
>>>>> partition?
>>>>>
>>>>>
>>>>>
>>>>> Here is my dovecot -n output:
>>>>>
>>>>> # 1.0.7: /etc/dovecot.conf
>>>>> log_path: /var/log/dovecot.log
>>>>> log_timestamp: %Y-%m-%d %H:%M:%S
>>>>> protocols: imap imaps pop3
>>>>> ssl_cert_file: /etc/postfix/smtpd.cert
>>>>> ssl_key_file: /etc/postfix/smtpd.key
>>>>> login_dir: /var/run/dovecot/login
>>>>> login_executable(default): /usr/libexec/dovecot/imap-login
>>>>> login_executable(imap): /usr/libexec/dovecot/imap-login
>>>>> login_executable(pop3): /usr/libexec/dovecot/pop3-login
>>>>> login_max_processes_count: 512
>>>>> mail_location: maildir:/home/vmail/%d/%n/
>>>>> mail_executable(default): /usr/libexec/dovecot/imap
>>>>> mail_executable(imap): /usr/libexec/dovecot/imap
>>>>> mail_executable(pop3): /usr/libexec/dovecot/pop3
>>>>> mail_plugins(default): quota imap_quota
>>>>> mail_plugins(imap): quota imap_quota
>>>>> mail_plugins(pop3): quota
>>>>> mail_plugin_dir(default): /usr/lib/dovecot/imap
>>>>> mail_plugin_dir(imap): /usr/lib/dovecot/imap
>>>>> mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
>>>>> imap_client_workarounds(default): outlook-idle delay-newmail
>>>>> imap_client_workarounds(imap): outlook-idle delay-newmail
>>>>> imap_client_workarounds(pop3): outlook-idle
>>>>> pop3_client_workarounds(default):
>>>>> pop3_client_workarounds(imap):
>>>>> pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
>>>>> auth default:
>>>>>   mechanisms: plain login
>>>>>   passdb:
>>>>> driver: sql
>>>>> args: /etc/dovecot-sql.conf
>>>>>   userdb:
>>>>> driver: sql
>>>>> args: /etc/dovecot-userdb-sql.conf
>>>>>   socket:
>>>>> type: listen
>>>>> client:
>>>>>   path: /var/spool/postfix/private/auth
>>>>>   mode: 432
>>>>>   user: postfix
>>>>>   group: postfix
>>>>> plugin:
>>>>>   quota: maildir:storage=102400
>>>>>
>>>>>
>>>>> [root:pts/0][~]# cat /etc/dovecot-sql.conf
>>>>> driver = mysql
>>>>> connect = host=/var/lib/mysql/mysql.sock user=mail_admin
>>>>> password= dbname=mail
>>>>> default_pass_scheme = CRYPT
>>>>> password_query = SELECT password FROM users WHERE
>>>>> CONCAT(SUBSTRING_INDEX(email,'@',1)) = '%n' AND
>>>>> CONCAT(SUBSTRING_INDEX(email,'@',-1)) = '%d';
>>>>>
>>>>>
>>>>> [root:pts/0][~]# cat /etc/dovecot-userdb-sql.conf
>>>>> driver = mysql
>>>>> connect = host=/var/lib/mysql/mysql.sock user=mail_admin
>>>>> password= dbname=mail
>>>>> user_query = SELECT CONCAT(('/home/vmail/'),
>>>>> SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') as
>>>>> home, 5000 as uid, 5000 as gid, CONCAT('maildir:storage=',
>>>>> floor(quota/1024)) as quota FROM users WHERE email = '%u';
>>>>> 
>>>> Hi,
>>>>
>>>> What kind issues you thinking about? I'm storing currently about
>>>> 40Gb of
>>>> mails. You mean, run out of number inodes on your partition?
>>>> 
>>>
>>> Yes, that's what I meant. Run out of inodes on that partition.
>>>   
>> I don't think so.
>> If /V/ is the volume size in bytes, then the default number of inodes
>> is given by /V//2^13
>> That's more than enough.
>>
> should look like this -  V/2^13

Got it :) thank you!


Re: [Dovecot] mailbox size limit

2007-11-17 Thread Bazy
Bill Cole wrote:
> At 6:23 PM +0300 11/17/07, Nikolay Shopik wrote:
>> On 17.11.2007 18:11, Nikolay Shopik wrote:
>>> On 17.11.2007 17:56, Bazy wrote:
> 
> [...]
> 
>>>> Yes, that's what I meant. Run out of inodes on that partition.
>>>>
>>> I don't think so.
>>> If /V/ is the volume size in bytes, then the default number of inodes
>>> is given by /V//2^13
>>> That's more than enough.
>>>
>> should look like this -  V/2^13
> 
> Another way to express that: if your average file size is less than 8KB,
> you will run out of inodes before you run out of disk space. This would
> present a real risk for file-per-message mailstores, since most email
> messages are significantly smaller that 8KB.
> 
> The bytes per inode value is something that can be selected when
> creating a filesystem, and different OS's and filesystems have different
> defaults. Whether a particular filesystem is headed for inode exhaustion
> really depends on how it was created and all of its contents.
> 
> 
> 

I understand... I should read mode about this.

I had dovecot with mbox and mbox is not very fast... my hard drive would
seeek before it could load a mail. I only use imap. Not to mention
when i search all my mail for something in the body of the message. I
use mozilla's thunderbird.

Yes, maybe 95% of the mail is less then 8KB, but as df -i said, I have a
lot of free inodes. :)

[root:pts/0][~]# df -i
FilesystemInodes   IUsed   IFree IUse% Mounted on
/dev/sda119281504  140795 191407091% /


Thank you for all your answers!


Re: [Dovecot] dovecot mysql support

2007-11-19 Thread Bazy

jan gestre wrote:

Hi Guys,

I'm using CentOS 4.5, is the dovecot default rpm comes with mysql
support? Do I need to rebuild it?


TIA.

jan


Hi Jan,

You need to rebuild it, without any patches or so... Just enable mysql 
and LDA support in the .spec and don't forget to edit yum.conf and 
exclude=postfix*.