[Dovecot] Store mailbox usage in mysql not just the limit

2012-12-03 Thread tibby

Hello!

I have dovecot working using mysql for auth and mailbox quota.

in the mail database I have a user table with colums for:
email, password, quota_kb, quota_messages

I want to make a php script that would get the quota_kb and substract 
the usage to display the total free space left for mail usage.

How can I do this?
Is there a function in dovecot to store the current usage per mailbox ?

Thanks!


[Dovecot] Autocreate No namespace for Problem

2012-11-21 Thread tibby

Hi!

I see this in the log:
autocreate: No namespace found for Trash
autocreate: No namespace found for Spam
autocreate: No namespace found for Sent
autocreate: No namespace found for Trash
autocreate: No namespace found for Spam
autocreate: No namespace found for Sent

Why do I get this error ?
Do I need to create a separate namespace for every folder?

The config file looks like this:
namespace private {
separator = .
prefix = INBOX.
inbox = yes
subscriptions = yes
list = yes
}
...
plugin {
  autocreate = Trash
  autocreate2 = Spam
  autocreate3 = Sent
  autosubscribe = Trash
  autosubscribe2 = Spam
  autosubscribe3 = Sent
}

Thanks!



Re: [Dovecot] IPhone wont delete IMAP messages from dovecot mailbox

2012-11-14 Thread tibby

On 2012-11-14 14:59, Håkon Alstadheim wrote:

On 13. nov. 2012 15:44, ti...@tibby.hu wrote:

Hello!
I've got dovecot running with postfix. Have virtual users under 
vmail folder.

When I connect with outlook, I can read, delete messages.
When I sign on with webmail, also can delete messages,
Mutt is working as well on the mail server, can delete messages.

Once the message is deleted it moves  to the trash. Works as it 
supposed to.


But on Iphone, when I add a mail user, got the mailbox synced with 
IMAP I can see the INBOX, but when I delete a message, get this error:
Unable to Move Message The message could not be moved to the 
mailbox Trash.



http://www.netchimp.co.uk/webdesign/wp-content/uploads/2011/12/iphone_unable_to_move_message.png


What causing this problem?
Please Help.



I've seen this. Fixed it for my device by changing the settings on
the Ipad, and then changing them back. Seems the local trash folder 
is

not created automatically on iOS.


But I dont want to use the IOS trash folder. I want the phone to use 
the trash on the mail server.




Re: [Dovecot] IPhone wont delete IMAP messages from dovecot mailbox

2012-11-14 Thread tibby

On 2012-11-14 16:08, Robert Schetterer wrote:

Am 14.11.2012 15:55, schrieb ti...@tibby.hu:

On 2012-11-14 14:59, Håkon Alstadheim wrote:

On 13. nov. 2012 15:44, ti...@tibby.hu wrote:

Hello!
I've got dovecot running with postfix. Have virtual users under 
vmail

folder.
When I connect with outlook, I can read, delete messages.
When I sign on with webmail, also can delete messages,
Mutt is working as well on the mail server, can delete messages.

Once the message is deleted it moves  to the trash. Works as it
supposed to.

But on Iphone, when I add a mail user, got the mailbox synced with
IMAP I can see the INBOX, but when I delete a message, get this 
error:
Unable to Move Message The message could not be moved to the 
mailbox

Trash.



http://www.netchimp.co.uk/webdesign/wp-content/uploads/2011/12/iphone_unable_to_move_message.png



What causing this problem?
Please Help.



I've seen this. Fixed it for my device by changing the settings on
the Ipad, and then changing them back. Seems the local trash folder 
is

not created automatically on iOS.


But I dont want to use the IOS trash folder. I want the phone to use 
the

trash on the mail server.



looks like iphone is special ( why i dont wonder... )


http://support.ecenica.com/email/troubleshooting-draft-trash-folders-iphone/

some config may also conflict with archive settings on iphone,
as ever ,behave may also different in different versions,
at all ,nothing direct dovecot related  , i am not up2date with apple
stuff , isnt there a better imap mail client in there app store ?


Best Regards
MfG Robert Schetterer


With the iPhone there is this guide.
If I set imap prefix path to INBOX from / as it says, then works fine.
What do I need to configure to get this working with / by default? I 
Think this would solve the problem.

http://www.netchimp.co.uk/webdesign/iphone-ipad-macbook-mac/iphone-unable-to-move-message-to-trash-imap/




Re: [Dovecot] IPhone wont delete IMAP messages from dovecot mailbox

2012-11-13 Thread tibby

Hello!
I've got dovecot running with postfix. Have virtual users under vmail 
folder.

When I connect with outlook, I can read, delete messages.
When I sign on with webmail, also can delete messages,
Mutt is working as well on the mail server, can delete messages.

Once the message is deleted it moves  to the trash. Works as it 
supposed to.


But on Iphone, when I add a mail user, got the mailbox synced with IMAP 
I can see the INBOX, but when I delete a message, get this error:
Unable to Move Message The message could not be moved to the mailbox 
Trash.


http://www.netchimp.co.uk/webdesign/wp-content/uploads/2011/12/iphone_unable_to_move_message.png

What causing this problem?
Please Help.



Re: [Dovecot] IPhone wont delete IMAP messages from dovecot mailbox

2012-11-13 Thread tibby

On 2012-11-13 16:30, Tom Hendrikx wrote:

On 11/13/12 4:21 PM, Willie Gillespie wrote:

On 11/13/2012 07:44 AM, ti...@tibby.hu wrote:
But on Iphone, when I add a mail user, got the mailbox synced with 
IMAP

I can see the INBOX, but when I delete a message, get this error:
Unable to Move Message The message could not be moved to the 
mailbox

Trash.


Do you have a mailbox named Trash?  Do the other clients move the
message to Trash as well?


In stead of sending us the message from the iPhone, tell us what 
dovecot

puts in its logfile when you try this.

--
Tom


This is the output of ls inside of the maildir:

# ll
total 120K
4.0K drwx-- 10 vmail 4.0K Nov 13 17:06 .
4.0K drwx--  3 vmail 4.0K Nov 12 18:38 ..
4.0K drwx--  2 vmail 4.0K Nov 13 16:58 cur
4.0K drwx--  5 vmail 4.0K Nov 13 15:49 .Deleted Messages
4.0K -rw---  1 vmail  736 Nov 13 16:53 dovecot.index
 28K -rw---  1 vmail  27K Nov 13 16:58 dovecot.index.cache
 24K -rw---  1 vmail  17K Nov 13 16:59 dovecot.index.log
4.0K -rw---  1 vmail  180 Nov 13 16:53 dovecot.index.thread
4.0K -rw---  1 vmail   25 Nov 12 23:26 dovecot-keywords
4.0K -rw---  1 vmail   48 Nov 13 16:58 dovecot-quota
4.0K -rw---  1 vmail  468 Nov 13 16:37 dovecot-uidlist
4.0K -rw---  1 vmail8 Nov 13 15:47 dovecot-uidvalidity
   0 -rw---  1 vmail0 Nov 10 12:57 dovecot-uidvalidity.509e4145
4.0K drwx--  5 vmail 4.0K Nov 13 15:44 .Drafts
4.0K drwx--  2 vmail 4.0K Nov 13 16:53 new
4.0K drwx--  5 vmail 4.0K Nov 13 15:47 .Notes
4.0K drwx--  5 vmail 4.0K Nov 13 17:02 .Sent
4.0K -rw---  1 vmail   41 Nov 13 15:47 subscriptions
4.0K drwx--  2 vmail 4.0K Nov 13 16:37 tmp
4.0K drwx--  5 vmail 4.0K Nov 13 17:02 .Trash

The log Doesnt shows anything regarding the error on the phone.




Re: [Dovecot] IPhone wont delete IMAP messages from dovecot mailbox

2012-11-13 Thread tibby

On 2012-11-13 17:09, ti...@tibby.hu wrote:

On 2012-11-13 16:30, Tom Hendrikx wrote:

On 11/13/12 4:21 PM, Willie Gillespie wrote:

On 11/13/2012 07:44 AM, ti...@tibby.hu wrote:
But on Iphone, when I add a mail user, got the mailbox synced with 
IMAP

I can see the INBOX, but when I delete a message, get this error:
Unable to Move Message The message could not be moved to the 
mailbox

Trash.


Do you have a mailbox named Trash?  Do the other clients move the
message to Trash as well?


In stead of sending us the message from the iPhone, tell us what 
dovecot

puts in its logfile when you try this.

--
Tom


This is the output of ls inside of the maildir:

# ll
total 120K
4.0K drwx-- 10 vmail 4.0K Nov 13 17:06 .
4.0K drwx--  3 vmail 4.0K Nov 12 18:38 ..
4.0K drwx--  2 vmail 4.0K Nov 13 16:58 cur
4.0K drwx--  5 vmail 4.0K Nov 13 15:49 .Deleted Messages
4.0K -rw---  1 vmail  736 Nov 13 16:53 dovecot.index
 28K -rw---  1 vmail  27K Nov 13 16:58 dovecot.index.cache
 24K -rw---  1 vmail  17K Nov 13 16:59 dovecot.index.log
4.0K -rw---  1 vmail  180 Nov 13 16:53 dovecot.index.thread
4.0K -rw---  1 vmail   25 Nov 12 23:26 dovecot-keywords
4.0K -rw---  1 vmail   48 Nov 13 16:58 dovecot-quota
4.0K -rw---  1 vmail  468 Nov 13 16:37 dovecot-uidlist
4.0K -rw---  1 vmail8 Nov 13 15:47 dovecot-uidvalidity
   0 -rw---  1 vmail0 Nov 10 12:57 
dovecot-uidvalidity.509e4145

4.0K drwx--  5 vmail 4.0K Nov 13 15:44 .Drafts
4.0K drwx--  2 vmail 4.0K Nov 13 16:53 new
4.0K drwx--  5 vmail 4.0K Nov 13 15:47 .Notes
4.0K drwx--  5 vmail 4.0K Nov 13 17:02 .Sent
4.0K -rw---  1 vmail   41 Nov 13 15:47 subscriptions
4.0K drwx--  2 vmail 4.0K Nov 13 16:37 tmp
4.0K drwx--  5 vmail 4.0K Nov 13 17:02 .Trash

The log Doesnt shows anything regarding the error on the phone.


I have got dovecot logging in Debug mode.
The only problems I see:
autocreate: No namespace found for Trash
autocreate: No namespace found for Spam
autocreate: No namespace found for Sent
autocreate: No namespace found for Trash
autocreate: No namespace found for Spam
autocreate: No namespace found for Sent

in the config file I have:

plugin {
  autocreate = Trash
  autocreate2 = Spam
  autocreate3 = Sent
  autosubscribe = Trash
  autosubscribe2 = Spam
  autosubscribe3 = Sent
}

Something is wrong here...


[Dovecot] Help me with IMAP config

2012-11-12 Thread Tibby
Hello!
I have dovecot running. Imap works fine. When i connect with outlook an when i 
delete a message it gets crossed out but still stays in my mailbox. I want to 
disable this feature. I want it once its deleted then go to trash folder on the 
mail server and thats it. Is there an option for this? I'm running dovecot 
1.2.15

Thanks!

Re: [Dovecot] per-user quotas

2012-10-11 Thread Tibby
Hello!

What's the version of your dovecot? 1.2.X ? or 2.0 ?

Tibby

On Oct 11, 2012, at 10:40 PM, David Mehler wrote:

 Hello,
 
 I've got quotas set up on an all-user basis on my system, it's a
 Postfix, Dovecot, Mysql virtual users setup. Currently I have each
 user getting a 1GB quota with these settings in 90-quota.conf:
 
 plugin {
  quota_rule = *:storage=1G
  quota_rule2 = Trash:storage=+100M
 }
 plugin {
  quota = maildir:User quota
 }
 
 While this works it's not what I want for all users. Say I add a
 virtual user called user1 to the mysql database but he's a test user
 and I only want that user to have 25 megabytes of storage, reading the
 wiki on quotas per-user items such as for example in a database
 overrides the global items above, is this right?
 
 If so, I'm hoping I'm not going to have to redo my entire user
 database, some users will have per-user quotas while I'll let others
 have the global quota.
 
 Thanks.
 Dave.



Re: [Dovecot] Quota - usage counting.

2012-10-09 Thread Tibby
Do you actually have a Guide?
How did you set up quota form MySql?
I'm having an issu getting it working.
Can you share your dovecot.conf and dovecot-sql.conf?

What's the user_query in your dovecot-sql.conf ?

Thank you!

- Original Message -
From: w...@promax.media.pl
To: dovecot@dovecot.org
Subject: [Dovecot] Quota - usage counting.

Hello,

I use dovecot 1.2 version with postfix virtual users and mysql. All
information about quota for every user is in mysql table.
How dovecot compare if quota in database is over quota in
/var/vmail/exampleuser directory ?

It uses something like du command ?


regards,
Wamp





[Dovecot] another mysql quota problem

2012-10-08 Thread Tibby
Hello!
I am using dovecot 1.2.15 on Debian 6
I have Postfix configured with mysql, and also dovecot is auth-ing form mysql 
users table.
The users table has username password quota stored.
When I set qouta to whatever number, it doesnt even show in dovecot.

telnet localhost 143
a login usern...@domain.tld password
a getquotaroot inbox
* QUOTAROOT INBOX
a OK Getquotaroot completed.

Basicly it doesn't show any kind of quota.
in the /etc/dovecot/dovecot-sql.conf:
driver = mysql
connect = host=127.0.0.1 dbname=mail user=USERNAME password=PASSWORD
default_pass_scheme = CRYPT
password_query = SELECT email as user, password FROM users WHERE email='%u';
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';

Why it doesn't get the quota out from the mail DB's users table?