Re: [Dovecot] Warning: mysql: Query failed, retrying: Unknown column 'filter' in 'where clause'

2014-02-18 Thread Thomas Creutz
I would add some informations:

auth lookup works fine with doveadm:

$ doveadm auth lookup acco...@domain.tld
passdb: acco...@domain.tld
  user  : acco...@domain.tld

Any Ideas?

Thomas

Am 17.02.2014 16:31, schrieb Thomas Creutz:
> Hi List,
>
> I have a problem with dovecot 2.2.12 and sieve-filter call:
>
> su -c 'sieve-filter -D -v -W -C -u acco...@domain.tld
> /var/vmail/domain.tld/account/.sieve INBOX.Refilter' vmail
>
> gives me
>
> sieve-filter(vmail): Error: user acco...@domain.tld: Auth USER lookup failed
> sieve-filter(vmail): Fatal: Internal error occurred. Refer to server log
> for more information.
>
> on log file I see this:
>
> Feb 17 16:21:34 mail1 dovecot: auth-worker(8430): Warning: mysql: Query
> failed, retrying: Unknown column 'filter' in 'where clause'
> Feb 17 16:21:34 mail1 dovecot: auth-worker(8430): Error:
> sql(acco...@domain.tld): User query failed: Unknown column 'filter' in
> 'where clause'
>
> but I never used filter in dovecot:
>
> grep -iR filter /etc/dovecot/
>
> gives me no result (and yes the dir is right).
>
> Any Idea whats wrong? I know it tells me, that the column is missing in
> the Database - but why I need it? I also never see it documented somewhere:
>
> http://wiki2.dovecot.org/AuthDatabase/SQL
> http://wiki2.dovecot.org/PasswordDatabase/ExtraFields
>
> Thomas

-- 
MfG
Thomas Creutz

Topackt IT Solutions GmbH
Altspeyerer Weide 2
67346 Speyer
---
Mobil: 0151-11711132
Tel:   06232-31504-0
Fax:   06232-31504-240
---
Mail: t.cre...@topackt.com
WWW:  http://www.topackt.com
pgp:  https://ssl.topackt.com/pgp/
Xing: http://www.xing.com/go/invite/5799158.1aa7c1
---
Registergericht: Amtsgericht Ludwigshafen, HRB 53097
Geschäftsführer: Michael Nist


Re: [Dovecot] Warning: mysql: Query failed, retrying: Unknown column 'filter' in 'where clause'

2014-02-18 Thread Michael Cramer
you can try to turn on the debug logging so that you can see which  
query is executed


mail_debug=yes
auth_debug=yes


Zitat von Thomas Creutz :


I would add some informations:

auth lookup works fine with doveadm:

$ doveadm auth lookup acco...@domain.tld
passdb: acco...@domain.tld
  user  : acco...@domain.tld

Any Ideas?

Thomas

Am 17.02.2014 16:31, schrieb Thomas Creutz:

Hi List,

I have a problem with dovecot 2.2.12 and sieve-filter call:

su -c 'sieve-filter -D -v -W -C -u acco...@domain.tld
/var/vmail/domain.tld/account/.sieve INBOX.Refilter' vmail

gives me

sieve-filter(vmail): Error: user acco...@domain.tld: Auth USER lookup failed
sieve-filter(vmail): Fatal: Internal error occurred. Refer to server log
for more information.

on log file I see this:

Feb 17 16:21:34 mail1 dovecot: auth-worker(8430): Warning: mysql: Query
failed, retrying: Unknown column 'filter' in 'where clause'
Feb 17 16:21:34 mail1 dovecot: auth-worker(8430): Error:
sql(acco...@domain.tld): User query failed: Unknown column 'filter' in
'where clause'

but I never used filter in dovecot:

grep -iR filter /etc/dovecot/

gives me no result (and yes the dir is right).

Any Idea whats wrong? I know it tells me, that the column is missing in
the Database - but why I need it? I also never see it documented somewhere:

http://wiki2.dovecot.org/AuthDatabase/SQL
http://wiki2.dovecot.org/PasswordDatabase/ExtraFields

Thomas


--
MfG
Thomas Creutz

Topackt IT Solutions GmbH
Altspeyerer Weide 2
67346 Speyer
---
Mobil: 0151-11711132
Tel:   06232-31504-0
Fax:   06232-31504-240
---
Mail: t.cre...@topackt.com
WWW:  http://www.topackt.com
pgp:  https://ssl.topackt.com/pgp/
Xing: http://www.xing.com/go/invite/5799158.1aa7c1
---
Registergericht: Amtsgericht Ludwigshafen, HRB 53097
Geschäftsführer: Michael Nist


Re: [Dovecot] Dsync crash (v2.2.10, sdbox+sis → mbox)

2014-02-18 Thread Gilles Chauvin
Hi Timo,

I've made some further research on this issue (Dovecot was upgraded to
the latest release in the meantime but, unsurprisingly, to no avail) and
here's what I've found so far.


On 09/02/2014 10:42, Gilles Chauvin wrote:
> dsync(user2): Error:
> read(/zfspool/clone_srv_attachments/ad/0c/ad0cef35cc6f0b2dae2197c4ff2b61a2bd58070d-9e8345192ccbf352c21044c1c7e7-6efa5f2e522db350ed3d94b229f9-15470[base64:18
> b/l]) failed: Stream is larger than expected (194476 > 194475, eof=1)
> dsync(user2): Error: copy: i_stream_read() failed: Invalid argument
> dsync(user2): Panic: file mail-index-transaction-update.c: line 19
> (mail_index_transaction_lookup): assertion failed: (seq >=
> t->first_new_seq && seq <= t->last_new_seq)


The original mail got an attachment which is base64 encoded on 72 cols.
The last 3 lines are:

MAAxADMAIAAyADAAOgAwADEAOgA1ADQADQAKAGwAJwB1AHQAaQBsAGkAcwBhAHQAZQB1AHIA
IABkAGUAIABsAG8AZwBpAG4AOgAgAGsAZQBsAGUAbQBhAHIAaQAgAGEAIADpAHQA6QAgAGMA
cgDpAOkAIABsAGUAIAAyADEALwAwADMALwAyADAAMQAzACAAMgAwADoAMAAyADoAMAA0AA0ACgA=


For no good reason, the last line lacks a CR before the final "CgA=" part.

I guess this is where Dovecot yells about the "stream larger than
expected" because when it reencodes the attachment, it does it correctly
by adding a proper CR before "CgA=" hence the one byte difference
(tested using the "base64" command line tool).

During my tests, each time dsync failed with this particular error, the
same pattern applied (malformed base64 last line).

Looks like a pretty hard problem to solve but, for now, it prevents us
from restoring a mailbox.


Regards,
Gilles


[Dovecot] Virtual folder for selected users only? (1.2.15)

2014-02-18 Thread Sebastian Schäfer
hi,

i want to set up virtual folders just for some users on our mailserver.
the server is set up with a virtual system-user for each of our clients
having multiple mailboxes/users (provided by dovecot-mysql).

mailboxes are located: /var/mails/SYSUSER/MAILBOX
f.e. my mailbox-folder is set to
/var/mails/bergschaf/sebastian[at]bergschaf.net
{homedir} = /var/mails
{maildir} = bergschaf/sebastian[at]bergschaf.net

user_query = SELECT homedir AS home, concat('maildir:', maildir) AS mail,
uid, gid, concat('maildir:storage=', (quota*1024)) as quota FROM mail_users
WHERE username = '%u'

now i want to add virtual folders to my mailbox without affecting any other
client/mailbox on the server.
i already tried to add a namespace "virtual" like mentioned in the wiki and
in some other hotwo-guides, but this points to the need to create a
"virtual"-folder for each mailbox what i would like to avoid.
(f.e. location = %h/%u/virtual => /var/mails/sebastian[at]bergschaf.net).
is it possible to enable a namespace just for some selected users on the
server?

if that's not possible - i'm not sure how to set the location-directive
correctly, because i can't find a variable pointing to the maildir:
%u => sebastian[at]bergschaf.net
%h => /var/mails
...but how should i point the location to {homedir}/{maildir}/virtual?

thanks!

sebastian


dovecot --version
1.2.15


[Dovecot] Use header from instead envelope sender - quota exceed

2014-02-18 Thread pgala
Hi,

i want use dovecot and plugin quota to inform users about exceeded space. I
also configure postfix to rewrite envelope_sender so
envelope_sender<>header: from. Dovecot sent mail with information about
exceeded space to email in envelope_sender. It is possible to configure that
dovecot sent mail to header from address? I need use sender_canonical_maps
in postfix because i want also relay mail outgoing.

Thanks for helping me,
Piotr



--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/Use-header-from-instead-envelope-sender-quota-exceed-tp46819.html
Sent from the Dovecot mailing list archive at Nabble.com.


[Dovecot] Possible error in function mailbox_autocreate

2014-02-18 Thread Potapov Sergey
Hi!

in mailbox_autocreate:

if (mailbox_create(box, NULL, FALSE) < 0) {
errstr = mailbox_get_last_error(box, &error);
if (error != MAIL_ERROR_NOTFOUND) { <<< May be 
MAIL_ERROR_EXISTS should be here?
mail_storage_set_critical(box->storage,
"Failed to autocreate mailbox %s: %s",
box->vname, errstr);
return -1;
}

Some time I got this error when two connections tries to create INBOX at same 
time.
__
С уважением,
Сергей Потапов


Re: [Dovecot] Virtual folder for selected users only? (1.2.15)

2014-02-18 Thread Robert Schetterer
Am 18.02.2014 13:42, schrieb Sebastian Schäfer:
> dovecot --version
> 1.2.15

thats very outdated, you should upgrade 2.1.x / 2.2.x latest


Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


[Dovecot] PARTIAL results and UIDs

2014-02-18 Thread Anders Thøgersen
Hi,




I have had a look at dovecot 2.2.12 and think that I may have run into an issue

with PARTIAL results. I have a mailbox with 9 emails having UIDs from 1 - 9.

One of these emails contains the STRING "RFC" in the Subject header.




The following SORT command with this mailbox selected does not return any

emails:




A4 UID SORT RETURN (COUNT PARTIAL 1:3) (FROM) UTF-8 (SUBJECT "RFC")

* ESEARCH (TAG "A4") UID PARTIAL (1:3 NIL) COUNT 1

A4 OK Sort completed (0.000 secs).




Here COUNT is 1, but the result is NIL. Changing the partial range to 1:5

returns the expected result:




A4 UID SORT RETURN (COUNT PARTIAL 1:5) (FROM) UTF-8 (SUBJECT "RFC")

* ESEARCH (TAG "A4") UID PARTIAL (1:5 5) COUNT 1

A4 OK Sort completed (0.000 secs).




It may be that UIDs are used instead of sequence numbers.




Regards

Anders


[Dovecot] Bug report

2014-02-18 Thread Ramon
I'm using release 2.2.12, during a copy operation i get segfault on imap 
process. I have full bt of the issue:


(gdb) bt
#0  0x7fcc521029cd in mail_cache_header_fields_read 
(cache=0x15c7210) at mail-cache-fields.c:369
#1  0x7fcc52100664 in mail_cache_open_and_verify (cache=0x15c7210) 
at mail-cache.c:497
#2  0x7fcc5210244d in mail_cache_register_get_list (cache=0x15c7210, 
pool=0x1573608, count_r=0x7fff7b3b2418) at mail-cache-fields.c:194
#3  0x7fcc520ef845 in index_mail_parse_header_register_all_wanted 
(mail=0x15d4b60, headers=) at index-mail-headers.c:170
#4  index_mail_parse_header_init (mail=0x15d4b60, headers=optimized out>) at index-mail-headers.c:230
#5  0x7fcc520efdb8 in index_mail_cache_parse_init (_mail=0x15d4b60, 
input=0x15ddb38) at index-mail-headers.c:376
#6  0x7fcc520bb163 in maildir_save_add (_ctx=0x15d3b20, 
tmp_fname=0x15735e8 "1392731650.M182940P5176.pecpop5", src_mail=0x0) at 
maildir-save.c:225
#7  0x7fcc520bb4b8 in maildir_save_begin (_ctx=0x15d3b20, 
input=0x15debb8) at maildir-save.c:415
#8  0x7fcc511e7360 in quota_save_begin (ctx=0x15d3b20, 
input=0x15debb8) at quota-storage.c:274
#9  0x7fcc520cc182 in mailbox_save_begin (ctx=0x7fff7b3b25a8, 
input=0x15debb8) at mail-storage.c:2025
#10 0x7fcc520c6242 in mail_storage_try_copy (ctx=0x15d3b20, 
mail=) at mail-copy.c:76
#11 mail_storage_copy (ctx=0x15d3b20, mail=) at 
mail-copy.c:101
#12 0x7fcc520b6916 in maildir_copy (ctx=0x15d3b20, mail=0x15cf300) 
at maildir-copy.c:148
#13 0x7fcc50dd7461 in notify_copy (ctx=0x15d3b20, mail=0x15cf300) at 
notify-storage.c:107
#14 0x7fcc511e7183 in quota_copy (ctx=0x15d3b20, mail=0x15cf300) at 
quota-storage.c:220
#15 0x7fcc520cc01f in mailbox_copy (_ctx=, 
mail=0x15cf300) at mail-storage.c:2133
#16 0x0040c63b in fetch_and_copy (cmd=0x1593810, move=false) at 
cmd-copy.c:70

#17 cmd_copy_full (cmd=0x1593810, move=false) at cmd-copy.c:123
#18 0x00416fbd in command_exec (cmd=0x1593810) at 
imap-commands.c:158
#19 0x004160e0 in client_command_input (cmd=0x1593810) at 
imap-client.c:780
#20 0x004161cd in client_command_input (cmd=0x1593810) at 
imap-client.c:841
#21 0x0041644d in client_handle_next_command (client=0x1592fb0) 
at imap-client.c:879

#22 client_handle_input (client=0x1592fb0) at imap-client.c:891
#23 0x004167bf in client_input (client=0x1592fb0) at 
imap-client.c:933

#24 0x7fcc51e1f336 in io_loop_call_io (io=0x158c1d0) at ioloop.c:388
#25 0x7fcc51e203a7 in io_loop_handler_run (ioloop=out>) at ioloop-epoll.c:220

#26 0x7fcc51e1f2a8 in io_loop_run (ioloop=0x157b720) at ioloop.c:412
#27 0x7fcc51dcdf73 in master_service_run (service=0x157b5b0, 
callback=) at master-service.c:566

#28 0x0041fd07 in main (argc=1, argv=0x157b390) at main.c:400

Here's config:

auth_debug = yes
auth_master_user_separator = *
auth_username_format =
default_vsz_limit = 512 M
disable_plaintext_auth = no
dotlock_use_excl = no
first_valid_gid = 101
first_valid_uid = 102
imap_id_send =
import_environment = TZ
info_log_path = /var/log/dovecot.log
log_path = /var/log/dovecot.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_fsync = always
mail_gid = 101
mail_location = maildir:%h/Maildir
mail_max_userip_connections = 50
mail_nfs_index = yes
mail_nfs_storage = yes
mail_plugins = quota expire fts fts_lucene mail_log notify
mail_uid = 102
maildir_broken_filename_sizes = yes
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
mbox_write_locks = fcntl
mmap_disable = yes
namespace inbox {
   inbox = yes
   location =
   mailbox Drafts {
 special_use = \Drafts
   }
   mailbox Junk {
 special_use = \Junk
   }
   mailbox Sent {
 special_use = \Sent
   }
   mailbox "Sent Messages" {
 special_use = \Sent
   }
   mailbox Trash {
 special_use = \Trash
   }
   prefix = INBOX.
   separator = .
   subscriptions = yes
   type = private
}
passdb {
   args = /opt/dovecot-2.2.10/etc/dovecot/passwd.masterusers
   driver = passwd-file
   master = yes
}
passdb {
   args = /opt/dovecot-2.2.10/etc/dovecot/dovecot-ldap.conf
   driver = ldap
}
passdb {
   args = /opt/dovecot-2.2.10/etc/dovecot/dovecot-ldap-multiuser.conf
   driver = ldap
   master = yes
}
plugin {
   fts = lucene
   fts_lucene =
   mail_log_events = delete undelete expunge copy mailbox_delete
mailbox_rename
   mail_log_fields = uid box msgid size
   quota = maildir
   quota_rule2 = INBOX.Trash:storage=+100M
}
protocols = imap pop3
service anvil {
   client_limit = 3000
}
service auth {
   client_limit = 4096
   unix_listener auth-userdb {
 mode = 0600
   }
}
service imap-login {
   inet_listener imap {
 address = 10.11.47.49
 port = 143
   }
   inet_listener imaps {
 address = 10.11.47.49
 port = 993
 ssl = yes
   }

Re: [Dovecot] Virtual folder for selected users only? (1.2.15)

2014-02-18 Thread Sebastian Schäfer
> thats very outdated, you should upgrade 2.1.x / 2.2.x latest

I would like to avoid this, because the 1.2.15 is running extremely stable
for a long time. (also it's the most recent version on this old
squeeze-machine if not using backports)

As far as I see, the virtual folders are fully supported since 1.2.x - am I
wrong?
What are the advantages of upgrading to 2.x? Are there security issues?

Thanks!


best,
sebastian


Re: [Dovecot] SMTP configuration for director mail cluster

2014-02-18 Thread Daniel Parthey


On 18. Februar 2014 01:57:26 MEZ, Murray Trainer  
wrote:
>HI All,

>I have setup my Dovecot director proxies and Dovecot backend mail
>stores.  I intend setting up several incoming and outgoing Exim
>MTA's.  I am a bit confused about what I need to run on the backend
>Dovecot MTA's to get the incoming mail delivered to them. 

Backend needs to run dovecot lmtp service listening on a TCP port.

> Do I need
> to install Exim on them or use LMTP to receive mail from the MTA's?

There is no need for exim on the backends Delivery can be done by lmtp.

>Also, can I directly deliver mail to the mailstores or do I have to go
>through the director proxies using lmtp? 

You will need to go through director lmtp proxy service in order to connect to 
the correct backbend. Local delivery should not be used in the director setup. 
If you deliver locally to the wrong NFS client, you will likely corrupt your 
mailbox indexes on NFS.

> Note that I am using
>Director with the mailboxes on NFS backed storage.

Regards
Daniel


Re: [Dovecot] Problems with dovecot 2.1.7, spamassassin 3.3.2 and antispam plugin

2014-02-18 Thread Bane Ivosev
i had the same problem.

solution:
increase default_vsz_limit in /etc/dovecot/conf.d/10-master.conf.

for me 384M did the job.


On 11/21/2013 10:01 AM, Jost Krieger wrote:
> On Thu Nov 21 08:56:39 2013, Robert Schetterer wrote:
> 
>> may off topic , but you may manage spam learn  ham/spam for users
>> another way too, they only need simply forward mail, i use it like
>> that way ,since years, it also works with sieve rules.
> 
> The problem: Users don't (at least ours). If they need a mail, they pull
> it out of the spam folder, and they use the "Junk" button in their
> client, but they can't be bothered to do more. And the antispam plugin
> is the only halfway effective way to automate this for all clients.
> 
> Hint: We make the plugin send a mail and process it later.
>  
> Yours
> Jost Krieger
> 



signature.asc
Description: OpenPGP digital signature


[Dovecot] dovecot antispam plugin not found

2014-02-18 Thread Alan Schmitt
Hello,

I'm trying to setup dovecot-antispam, and even though the configuration
and the installation seem to have gone well, dovecot is telling me it's
not finding it.

Here is the symptom:

schmitta@top-wifi ~> /usr/local/Cellar/dovecot/2.2.10/libexec/dovecot/imap -c 
~/.dovecotzimbra.rc
Fatal: Plugin 'antispam' not found from directory 
/usr/local/Cellar/dovecot/2.2.10/lib/dovecot

However there seems to be a plugin there:

schmitta@top-wifi ~> ls -al /usr/local/Cellar/dovecot/2.2.10/lib/dovecot/ | 
grep antispam
-rwxr-xr-x   1 schmitta  admin38460 18 fév 22:40 
lib90_antispam_plugin.bundle

I note that it is the only plugin with the ".bundle" extension, if it's
important.

My configuration file is as follows (I'm not finished with the antispam
configuration yet):

--8<---cut here---start->8---
protocols = imap
mail_location = maildir:~/.Maildir/zimbra:INBOX=~/.Maildir/zimbra/.INBOX

default_login_user = _dovenull
default_internal_user = _dovecot

protocol imap {
#  mail_plugins = $mail_plugins antispam
}

protocol lda {
  log_path = ~/.logs/dovecot-lda-errors.log
  info_log_path = ~/.logs/dovecot-lda.log
  mail_plugins = $mail_plugins sieve
}

plugin {
  sieve = ~/.dovecot.sieve
  sieve_plugins = sieve_extprograms
  sieve_extensions = +vnd.dovecot.filter
  sieve_filter_bin_dir = /usr/local/lib/dovecot/sieve-filter

  antispam_backend = DSPAM
  antispam_signature = X-DSPAM-Signature
}
--8<---cut here---end--->8---

Should I do something special to be able to load the antispam plugin?

Thanks,

Alan


Re: [Dovecot] Filtering spam in an offlineimap + dovecot setup

2014-02-18 Thread Damon K. Haley
> Alan Schmitt  writes:

> Hello Damon,
> "Damon Haley"  writes:

>> Alan, you can use sieve with dovecot in an offline imap setup.
>> 
>> All you have to do is compile sieve into dovecot:
>> 
>> wget
>> http://pigeonhole.dovecot.org/releases/2.2/dovecot-2.2-pigeonhole-0.4.2.tar.gz>
>> untar it
>> 
>> cd /usr/local/src/dovecot-2.2-pigeonhole-0.4.2/
>> 
>> ./configure --prefix=/usr/local/Cellar/pigeonhole/0.4.0
>> --with-dovecot=/usr/local/opt/dovecot/lib/dovecot make && make install
>> 
>> I did this on a Macbook with dovecot installed from hombrew.
>> 
>> Whenever imap process is launched by my mail client it automatically sorts
>> my INBOX based on sieve rules.

> I gave this a try, following the documentation from
> http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration

> Unfortunately I have an error:

> ,
> | Establishing connection to 
> tunnel:/usr/local/Cellar/dovecot/2.2.10/libexec/dovecot/imap -c 
> ~/.dovecotzimbra.rc
> | Error: Can't load plugin sieve_plugin: Plugin is intended to be used only 
> by binaries: lda lmtp (we're imap)
> | Fatal: Couldn't load required plugins
> `

> This is the configuration file I tried:
> protocols = imap
> mail_location = maildir:~/.Maildir/zimbra:INBOX=~/.Maildir/zimbra/.INBOX
> mail_plugins = $mail_plugins sieve

> plugin {
>   sieve = ~/.dovecot.sieve
>   sieve_dir = ~/.sieve
> }
> The documentation says that one can only use the plugin with lda or
> lmtp. How do you use it with imap?

Anna, 

I use lda.

Here are my relevant config files:

https://github.com/dhaley/feedyourbaby/blob/master/conf.d/15-lda.conf
https://github.com/dhaley/feedyourbaby/blob/master/conf.d/90-sieve.conf

Hopefully that helps, although I'm guessing you've already figured it out.

Damon


[Dovecot] Index corruption with 2.2.12 when moving a message

2014-02-18 Thread Bojan Smojver
Just bumped into this today, when I upgraded to a testing package in
Fedora:

https://admin.fedoraproject.org/updates/FEDORA-2014-2672/dovecot-2.2.12-1.fc20

For details, see this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1066709

Haven't seen this kind of thing before. Sure, it worked the second time
I tried to move the message to another folder (I'm guessing index got
rebuilt or something), but still, looks suspicious.

Anyway, I'm using mbox format mailboxes, if it matters. Client was Gnome
Evolution 3.10.4.

-- 
Bojan


Re: [Dovecot] Virtual folder for selected users only? (1.2.15)

2014-02-18 Thread Benny Pedersen

On 2014-02-18 14:28, Robert Schetterer wrote:

Am 18.02.2014 13:42, schrieb Sebastian Schäfer:

dovecot --version
1.2.15



thats very outdated, you should upgrade 2.1.x / 2.2.x latest


outdated ?, well its still very stable here on gentoo, and upgradeing is 
not just emerge dovecot, this is why i keep 1.2.17 self here


[Dovecot] Dovecot, mysql, and quota

2014-02-18 Thread David Mehler
Hello,

I'm running dovecot 2.2 and wanting to get quotas going. I've got the
plugins loaded appropriately and am wanting to configure a dictionary
backend to talk to my mysql database.

I've got a single database called mail which has all the mail-related
items in it. One table is for virtual users which postfix uses. It
looks like this:

CREATE TABLE `virtual_users` (
  `id` int(11) NOT NULL auto_increment,
  `domain_id` int(11) NOT NULL,
  `password` varchar(128) NOT NULL,
  `email` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`),
  FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
and a user looks like:
INSERT INTO `mail`.`virtual_users` (
  `id` ,
  `domain_id` ,
  `password` ,
  `email`
)
VALUES (
  '1', '1', SHA2( 'PasswordGoesHere', 512) , 'usern...@domain.com'
);

plugin {
  # SQL backend:
  quota = dict:User quota::proxy::sqlquota
}
dict {
  sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}

Now when creating the quota table i'd like to have the username field
linked to my virtual_users table username field, so I don't have to
set up two tables both with the same username information in it. Can
someone check me on this design so that if I delete a virtual user out
of the virtual_users table the coresponding row in the quota table is
also eliminated?

My second question has to do with global and per user quotas. If I
have something like this:

CREATE TABLE quota (
  username varchar(100) not null,
  bytes bigint not null default 262144,
  messages integer not null default 0,
  primary key (username)
);

256MB for all users by default, but then if I give a user a 100MB
value in the bytes field of their quota entry would that be a per-user
quota?

Thanks.
Dave.


Re: [Dovecot] Dovecot, mysql, and quota

2014-02-18 Thread Gedalya

On 02/18/2014 10:29 PM, David Mehler wrote:


Can someone check me on this design so that if I delete a virtual user out
of the virtual_users table the coresponding row in the quota table is
also eliminated?

That's a purely MySQL question.

Try something like
CREATE TABLE quota (
  username varchar(100) not null,
  bytes bigint not null default 262144,
  messages integer not null default 0,
  primary key (username)
  CONSTRAINT `username_virtual_users` FOREIGN KEY (`username`) 
REFERENCES `virtual_users` (`email`) ON DELETE CASCADE

);

(Check that, don't just copy and paste..)



My second question has to do with global and per user quotas. If I
have something like this:

CREATE TABLE quota (
   username varchar(100) not null,
   bytes bigint not null default 262144,
   messages integer not null default 0,
   primary key (username)
);

256MB for all users by default, but then if I give a user a 100MB
value in the bytes field of their quota entry would that be a per-user
quota?
dovecot stores the bytes currently used in the bytes column. Do not set 
a default value, or just make it zero!!! This table does not hold the 
allocated quota size, only the used storage space.


Update your passdb / userdb queries to return a quota size, presumably 
from your virtual_users table.



password_query = SELECT password, \
  concat('*:storage=', quota_bytes) as userdb_quota_rule, \
  FROM 

user_query = SELECT concat('*:storage=', quota_bytes) as quota_rule, \
  FROM 

Personally I prefer to store the value in megabytes, and use 
concat('*:storage=', quota_mb, 'M') as quota_rule


Re: [Dovecot] Virtual folder for selected users only? (1.2.15)

2014-02-18 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 18 Feb 2014, Sebastian Schäfer wrote:

About your original question:

IMHO, userdb extra fields are the only way to do something for "selected 
users only", see http://wiki2.dovecot.org/UserDatabase/ExtraFields . That 
way you need no mail-path variable, because you configure the settings on 
a per-user basis.


Search the list for how to specify one particular namespace and how to 
enable that namespace from Extra Fields. Ah, I did remembered there was a 
thread, search for:


Sept/07/2011 Marcin Mirosław [Dovecot] Problem with configuring dovecot to take namespaces from 
database


There will be other questions answered by Timo about his topic.

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUwRZNnD1/YhP6VMHAQLVSwf/R7x3PX9bsNPZnBt9+BuNcOROwVAFyygd
88Kz/o6qQ1+0bWKj7MtUqhbgdC83TFR7FlycjfgHqSzFHWNAkDzF4QY3qEG9yqO2
Y0bjRDn2/aBv2Yx8Dn5TuiEl/I+tQ+bzr0VjTDG1wWwHYf0WtiFbWWtuiWKtH5Bc
7Pxrqa6letT7F9chwYge/WTQiTYnQ53xAt5+5753bbnfEubG9/C+qeDasnBi8J83
0jlsDiTsHbsWx/M3R+EqYqHaUNxWQSa0Ud97jDxsxIbox7nmQPwyXSgHmF8cZ0Or
yXfy6yiRveW1Noq0hexjQkihoX+cMs4d7t0XC7XuOE9WsaBA0RNmWQ==
=6Hn7
-END PGP SIGNATURE-


Re: [Dovecot] dovecot antispam plugin not found

2014-02-18 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 18 Feb 2014, Alan Schmitt wrote:


I'm trying to setup dovecot-antispam, and even though the configuration
and the installation seem to have gone well, dovecot is telling me it's
not finding it.

schmitta@top-wifi ~> /usr/local/Cellar/dovecot/2.2.10/libexec/dovecot/imap -c 
~/.dovecotzimbra.rc
Fatal: Plugin 'antispam' not found from directory 
/usr/local/Cellar/dovecot/2.2.10/lib/dovecot


You are not running a full Dovecot install, so doveconf -n is not working?


schmitta@top-wifi ~> ls -al /usr/local/Cellar/dovecot/2.2.10/lib/dovecot/ | 
grep antispam
-rwxr-xr-x   1 schmitta  admin38460 18 fév 22:40 
lib90_antispam_plugin.bundle

I note that it is the only plugin with the ".bundle" extension, if it's
important.


what OS is this?

Did you've seen some like this:

make install
Entering directory src.
Leaving directory src.
Entering directory doc.
Leaving directory doc.
Entering directory src.
Successfully installed lib90_antispam_plugin.so.
Leaving directory src.
Entering directory doc.
Successfully installed dovecot-antispam.7.
Leaving directory doc.

Does build.mk contain "LIB_SUFFIX=.bundle" ?
What happens if you rename lib90_antispam_plugin.bundle to whatever the 
other plugins are named?


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUwRdDXD1/YhP6VMHAQLSkQgA5/PbRq61vkfmZ7MYgn1ObAQxjj421px4
wvEMcMw2dt2tO9pPKiqUJj5Xkj/QnUA1hU13vgdp++0lOQFPTjo2H/t7WsO9tYhX
gi6sE7DoUnOGVQDIWP25IT+u3o8Z7zhDZ0hqMc8CW6gftN7AqRW04x6Jj59exVQQ
Vtm00UXwJo9jQwb5HLZ2q4OY0eFVaujJFSHXsDYzv0Bh+38rNuSnAGMECwEBRwUa
mgK7igeRcA5t8ejfL4TBv3fcrp2KfMISC6X5s7CEH3Aw39SDRP1F95K0MDeLG/7d
OobE82iNMzNfI4PL5G4plXwMNcBzZJZOZ+JYrjAzbSy3VS/GxQP29Q==
=d3fo
-END PGP SIGNATURE-


Re: [Dovecot] failed: Message has been copied too many times

2014-02-18 Thread Angel L. Mateo

El 05/11/13 14:59, Joseba Torre escribió:

El 05/11/13 09:10, Angel L. Mateo escribió:

El 31/10/13 16:17, Joseba Torre escribió:


Are you sure it's dovecot who is duplicating emails? I have seen this


 No, I'm not sure.


before (not so many copies, but the same effect) and I've always thought
it was a thunderbird thing (in every case I've seen the client was
thunderbird, and I think your users also use it).


 It could be the reason. My users are using thunderbird and this
problem always happened with users with lot of automatic mails in a
mailbox, so the could be trying to delete them (although I told to some
of them and they told me that they didn't, but you know...)



In my personal case, it happens every now and then without any external
activity, and definetly without any manual deleting (may be it's related
to automatic filtering?)

	After a few more cases I'm almost surely that the problem is with 
thunderbird filters (when a filter has to move a lot of messages from 
inbox folder to another one).


--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868887590
Fax: 86337