Re: [Dovecot] per-mailbox message limits

2012-05-29 Thread mail...@securitylabs.it

On 29/05/2012 15:18, Alan Brown wrote:


This is something Timo hacked up for me a few years ago and I realised 
should be on the list in case anyone else wants them.


The following patches will limit maildir folders to 4000 messages on 
Dovecot 2.0.* and 2.1.*


The Specfile patch is against the Cityfan Redhat EL5 SRPM but is 
likely to work on most build platforms


Changing the message limit requires a recompile. It's brutal and ugly 
but it prevents users overloading FSes that can't cope with huge 
numbers of files (EG: GFS2)




Hi, sorry for the dumb question, but isn't there already in Dovecot a 
way to limit the number of messages?


Something like:

quota_rule = *:messages=4000

http://wiki2.dovecot.org/Quota/Configuration

Or it's something different?


Re: [Dovecot] 2.1: Error: Maildir filename has wrong S value, renamed the file from

2012-03-02 Thread mail...@securitylabs.it

Il 02/03/2012 11:25, Ralf Hildebrandt ha scritto:

Hi!

Starting with 2.1.1 we suddely encounter quite a lot of these messages:

Mar  2 11:09:28 postamt dovecot: imap(username): Error: Maildir filename has wrong S 
value, renamed the file from /home/a/i/username/Maildir/.A*Teens.Eink&AOQ-ufe, 
Spenden etc/cur/1323207735.M64829P19819.postamt.charite.de,S=5137:2,S to 
/home/a/i/username/Maildir/.A*Teens.Eink&AOQ-ufe, Spenden 
etc/cur/1323207735.M64829P19819.postamt.charite.de,S=5137:2,S
Mar  2 11:09:28 postamt dovecot: imap(username): Error: Maildir filename has wrong S 
value, renamed the file from /home/a/i/username/Maildir/.A*Teens.Eink&AOQ-ufe, 
Spenden etc/cur/1323207735.M64829P19819.postamt.charite.de,S=5137:2,S to 
/home/a/i/username/Maildir/.A*Teens.Eink&AOQ-ufe, Spenden 
etc/cur/1323207735.M64829P19819.postamt.charite.de,S=5137:2,S
Mar  2 11:09:28 postamt dovecot: imap(username): Error: 
read(/home/a/i/username/Maildir/.A*Teens.Eink&AOQ-ufe, Spenden 
etc/cur/1323207735.M64829P19819.postamt.charite.de,S=5137:2,S) failed: Input/output 
error (uid=69)

While this has (assumedly) been working with 2.0.18. Another issue
with this: This fixes ONE file, and throws an error. Repeatedly
accessing this folder fixes more files, until at some point all files
were fixed.


Hello, same problem here after upgrading from 2.0.18 to 2.1.0, 
apparently it happens only on servers with qmail, not on servers with 
exim or dovecot as lda:


Mar  2 10:18:45 mercurio dovecot: pop3(user): Error: Cached message size 
smaller than expected (59998 < 60150)
Mar  2 10:18:45 mercurio dovecot: pop3(user): Error: Maildir filename 
has wrong S value, renamed the file from 
/home/vpopmail/domains/2/root/Maildir/cur/1330679783.8428.mercurio,S=59998:2, 
to 
/home/vpopmail/domains/2/root/Maildir/cur/1330679783.8428.mercurio,S=60150:2,
Mar  2 10:18:45 mercurio dovecot: pop3(user): Error: Corrupted index 
cache file /home/vpopmail/domains/2/root/Maildir/dovecot.index.cache: 
Broken physical size for mail UID 40669
Mar  2 10:18:45 mercurio dovecot: pop3(user): Error: 
read(/home/vpopmail/domains/2/root/Maildir/cur/1330679783.8428.mercurio,S=59998:2,) 
failed: Input/output error (uid=40669)




Re: [Dovecot] From Maildir back to smtp

2012-02-23 Thread mail...@securitylabs.it

Il 23/02/2012 21:41, Marc Perkel ha scritto:

Not sure how this can be done.

Right now I'm running a free backup MX record service. People point 
their high MX records to my servers and if they go down we store the 
email. When they come back up it's delivered.



Hi, store how? In a queue with smtp server?

What I want to do is have a premium service that would allow them to 
view through IMAP the stored email. In order to do that I would have 
to deliver the email locally to a dovecot server - to a single account 
perhaps - and they can view/forward/delete etc.


But - when their server comes back online I'd like to gather up all 
the delivered email stored in Maildir format and run it back into smtp 
for delivery.


If you store the messages in a queue you can configure your smtp (your 
MX) server to send a copy of all message it receive also to another 
mailbox,  see always_bcc in posfix.


Re: [Dovecot] IMAP delete logs

2011-09-14 Thread mail...@securitylabs.it

Il 14/09/2011 07:48, James isolder ha scritto:

Version - 1.2.17

Is there a way to include message or folder deletion logs in the dovecot log
files.




Yes, you can use the mail logger plugin:

http://wiki.dovecot.org/Plugins/MailLog


Re: [Dovecot] occasional dovecot crash, core captured but no symbol table info?

2011-08-26 Thread mail...@securitylabs.it

Il 26/08/2011 20:38, John Clements ha scritto:

Dovecot is crashing occasionally for me.  Today it crashed six times in quick 
succession, as I fired up a computer (Mac) I hadn't used in a while, and my 
mail application (Apple Mail) tried to synchronize many large mailboxes.

The log entries look like this:

Aug 26 10:26:15 computer dovecot: dovecot: child 23223 (imap) killed with 
signal 6 (core dumped)
Aug 26 10:26:30 computer dovecot: IMAP(granitemon): Panic: file 
istream-raw-mbox.c: line 583 (istream_raw_mbox_get_body_size): assertion failed: 
(rstream->body_offset != (uoff_t)-1)


Hello,

http://www.dovecot.org/list/dovecot/2010-March/047426.html

dunno if it has been fixed in 1.2.16 or 1.2.17, you may try to upgrade 
to 1.2.17 or apply the above patch.


Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-10 Thread mail...@securitylabs.it

On 10/05/2011 14:44, Petr Svacina wrote:

Here is the logs:

May  8 06:00:36 mailserver dovecot: deliver(saz...@vendys.net): 
msgid=<3DEF56667E754F24B163C9767422C9A9@dlllk.local>: save failed to INBOX: Not 
enough disk space
May  8 06:00:36 mailserver dovecot: deliver(saz...@vendys.net): 
msgid=<3DEF56667E754F24B163C9767422C9A9@dlllk.local>: rejected: Not enough disk 
space
May  8 06:00:36 mailserver postfix/pickup[27640]: D8B242F9E1: uid=150 from=<>
May  8 06:00:36 mailserver postfix/pipe[27978]: 4B3A72F8C0: 
to=, relay=dovecot, delay=11, delays=11/0.02/0/0.04, 
dsn=2.0.0, status=sent (delivered via dovecot service)
May  8 06:00:36 mailserver postfix/qmgr[18807]: 4B3A72F8C0: removed


To me message ID :

D8B242F9E1

seems a bounce to the sender, if that's correct I don't see troubles 
with that.


Re: [Dovecot] Vpopmail and lastauth

2011-04-12 Thread mail...@securitylabs.it

On 12/04/2011 16:13, Timo Sirainen wrote:

On Tue, 2011-04-12 at 16:03 +0200, mail...@securitylabs.it wrote:

On 12/04/2011 15:51, Rick Romero wrote:

I had the same issue - Dovecot has it's own method of updating
lastauth and doesn't put the IP address in the field, but 'pop' or
'imap'.

That's would be fine, I don't need the IP and with 1.2.16 it works (no
IP, only pop3/imap logged). But with 2.0.11 the file is not updated at all.



Also instead of those two changes, you could apply this patch:
http://hg.dovecot.org/dovecot-2.0/rev/bbcef91eac7e



Thank you Timo, the patch works.



Re: [Dovecot] Vpopmail and lastauth

2011-04-12 Thread mail...@securitylabs.it

On 12/04/2011 15:51, Rick Romero wrote:
I had the same issue - Dovecot has it's own method of updating 
lastauth and doesn't put the IP address in the field, but 'pop' or 
'imap'.


That's would be fine, I don't need the IP and with 1.2.16 it works (no 
IP, only pop3/imap logged). But with 2.0.11 the file is not updated at all.


I can use a post login script as suggested by you but since I only need 
the file to be updated as in 1.2.x I'm figuring out if I need to update 
my conf in some way.





[Dovecot] Vpopmail and lastauth

2011-04-12 Thread mail...@securitylabs.it
Hello, I'm migrating many accounts to a new server with vpopmail 5.4.33 
and dovecot 2.0.11.


I've already vpopmail 5.4.32 and dovecot 1.2.16 on others servers 
running without problems.


With dovecot 2.0.11 my lastauth file is not updated. This file usually 
is update on any access (smtp, pop3, imap) with the client's IP, for 
every mailbox. Now it's updated only when a client authenticate itself 
via SMTP (smtp-auth with qmail + vpopmail), and not with imap/pop3 access.


My conf:

# 2.0.11: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.1
auth_cache_negative_ttl = 2 mins
auth_cache_size = 1000 M
auth_cache_ttl = 2 mins
auth_mechanisms = plain cram-md5 apop
auth_username_chars = 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@&

disable_plaintext_auth = no
first_valid_uid = 89
last_valid_uid = 95
lock_method = dotlock
log_timestamp = "%Y-%m-%d %H:%M:%S "
login_greeting = Server ready.
mail_fsync = never
mail_gid = vchkpw
mail_location = maildir:~/Maildir
mail_privileged_group = vchkpw
mail_uid = vpopmail
namespace {
  inbox = yes
  location =
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = webmail=127.0.0.1
  driver = vpopmail
}
plugin/mail_log_events = delete expunge
plugin/mail_log_group_events =
plugin/quota = maildir
plugin/quota_rule = ?:storage=0
pop3_uidl_format = %f
protocols = imap pop3
service auth {
  unix_listener auth-userdb {
group = vchkpw
mode = 0600
user = vpopmail
  }
}
service imap-login {
  client_limit = 256
  process_limit = 128
  process_min_avail = 3
  service_count = 1
}
service imap {
  drop_priv_before_exec = yes
  process_limit = 256
  vsz_limit = 256 M
}
service pop3-login {
  client_limit = 256
  process_limit = 128
  process_min_avail = 3
  service_count = 1
}
service pop3 {
  drop_priv_before_exec = yes
  process_limit = 256
  vsz_limit = 256 M
}
ssl_cert = 

Re: [Dovecot] Sieve: unknown tagged argument ':create' for the fileinto command

2011-04-01 Thread mail...@securitylabs.it

On 01/04/2011 10:08, mail...@securitylabs.it wrote:
Hello, I've upgraded from dovecot 1.2.x with sieve to dovecot 2.0.11 
with sieve. I've noticed that folders are no more created at delivery 
time now. I've read that I have to do two things:


lda_mailbox_autocreate = yes

in dovecot.conf

and fileinto :create in the sieve script. Now the error message I 
receive is:


error: unknown tagged argument ':create' for the fileinto command 
(reported only once at first occurence).




Ok it seems that it's not necessary to modify che sieve script with the 
":create"


[Dovecot] Sieve: unknown tagged argument ':create' for the fileinto command

2011-04-01 Thread mail...@securitylabs.it
Hello, I've upgraded from dovecot 1.2.x with sieve to dovecot 2.0.11 
with sieve. I've noticed that folders are no more created at delivery 
time now. I've read that I have to do two things:


lda_mailbox_autocreate = yes

in dovecot.conf

and fileinto :create in the sieve script. Now the error message I receive is:

error: unknown tagged argument ':create' for the fileinto command (reported 
only once at first occurence).

My sieve script:

require ["date", "variables", "fileinto"];
  if header :contains "subject" "Bacula:" {
if currentdate :matches "month" "*" { set "month" "${1}"; }
if currentdate :matches "year"  "*" { set "year"  "${1}"; }
fileinto :create "INBOX.Bacula.${month}-${year}";
  } else {
  # The rest goes into INBOX
  # default is "implicit keep", we do it explicitly here
  keep;
}

My dovecot conf:

papua:/usr/local/bin# dovecot -n
# 2.0.11: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.1
auth_cache_negative_ttl = 2 mins
auth_cache_size = 1000 M
auth_cache_ttl = 2 mins
auth_mechanisms = plain cram-md5 apop
auth_username_chars = 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@&
disable_plaintext_auth = no
first_valid_uid = 100
last_valid_uid = 105
lda_mailbox_autocreate = yes
lock_method = dotlock
log_timestamp = "%Y-%m-%d %H:%M:%S "
login_greeting = Server ready.
mail_fsync = never
mail_gid = Debian-exim
mail_location = maildir:~/Maildir
mail_privileged_group = Debian-exim
mail_uid = Debian-exim
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
namespace {
  inbox = yes
  location =
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = /usr/local/etc/dovecot-sql.conf
  driver = sql
}
plugin/mail_log_events = delete expunge
plugin/mail_log_group_events =
plugin/quota = maildir
plugin/quota_warning = storage=80%% /usr/local/bin/dovecot-quota-warning.sh 80
plugin/quota_warning2 = storage=90%% /usr/local/bin/dovecot-quota-warning.sh 90
plugin/sieve = ~/.dovecot.sieve
protocols = imap
service auth {
  unix_listener auth-userdb {
group = Debian-exim
mode = 0600
user = Debian-exim
  }
}
service imap-login {
  client_limit = 256
  process_limit = 128
  process_min_avail = 3
  service_count = 1
}
service imap {
  drop_priv_before_exec = yes
  process_limit = 256
  vsz_limit = 256 M
}
service pop3-login {
  client_limit = 256
  process_limit = 128
  process_min_avail = 3
  service_count = 1
}
service pop3 {
  drop_priv_before_exec = yes
  process_limit = 256
  vsz_limit = 256 M
}
ssl_cert =

[Dovecot] auth: Error: net_connect_unix(anvil-auth-penalty) failed: Permission denied

2010-11-09 Thread mail...@securitylabs.it
Hello, just upgraded one of my testing machine from dovecot 1.2.15 to 
2.0.7. After some trouble with permissions now all seems working, but 
when I stop dovecot I have these errors in log:


Nov  9 17:08:07 in dovecot: master: Warning: Killed with signal 15 (by 
pid=20362 uid=0 code=kill)

Nov  9 17:08:07 in dovecot: pop3-login: Error: read(anvil) failed: EOF
Nov  9 17:08:07 in dovecot: imap-login: Error: read(anvil) failed: EOF
Nov  9 17:08:07 in dovecot: imap(mail...@securitylabs.it): Server 
shutting down. bytes=410/59361
Nov  9 17:08:07 in dovecot: imap(mail...@securitylabs.it): Server 
shutting down. bytes=79/26605
Nov  9 17:08:07 in dovecot: imap(mail...@securitylabs.it): Server 
shutting down. bytes=802/55708
Nov  9 17:08:07 in dovecot: imap(mail...@securitylabs.it): Server 
shutting down. bytes=258/1242
Nov  9 17:08:07 in dovecot: auth: Error: read(anvil-auth-penalty) 
failed: EOF
Nov  9 17:08:07 in dovecot: auth: Error: 
net_connect_unix(anvil-auth-penalty) failed: Permission denied


dovecot -n:

# 2.0.7: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-xen-686 i686 Debian squeeze/sid
auth_cache_negative_ttl = 2 mins
auth_cache_size = 1000 M
auth_cache_ttl = 2 mins
auth_master_user_separator = *
auth_username_chars = 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@&

disable_plaintext_auth = no
dotlock_use_excl = yes
first_valid_uid = 100
last_valid_uid = 105
lock_method = dotlock
log_timestamp = "%Y-%m-%d %H:%M:%S "
login_greeting = Server ready.
mail_fsync = never
mail_gid = Debian-exim
mail_location = maildir:~/Maildir:INDEX=/var/indexes/%d/%n
mail_privileged_group = Debian-exim
mail_uid = Debian-exim
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

namespace {
  inbox = yes
  location =
  prefix =
  separator = /
  type = private
}
namespace {
  location = maildir:~/Maildir/expunged
  prefix = EXPUNGED/
  separator = /
  type = private
}
namespace {
  location = maildir:~/Maildir/deleted
  prefix = DELETED/
  separator = /
  type = private
}
namespace {
  location = maildir:~/Maildir/deleted/expunged
  prefix = DELETED/EXPUNGED/
  separator = /
  type = private
}
passdb {
  args = /usr/local/etc/dovecot-sql.conf
  driver = sql
}
passdb {
  args = /usr/local/etc/passwd.masterusers
  driver = passwd-file
  master = yes
  pass = yes
}
plugin {
  lazy_expunge = EXPUNGED/ DELETED/ DELETED/EXPUNGED/
  mail_log_events = delete expunge
  mail_log_group_events =
  quota = maildir
  quota_warning = storage=80%% /usr/local/bin/dovecot-quota-warning.sh 80
  quota_warning2 = storage=90%% /usr/local/bin/dovecot-quota-warning.sh 90
  sieve = ~/.dovecot.sieve
}
pop3_no_flag_updates = yes
protocols = imap pop3
service auth {
  unix_listener auth-userdb {
group = Debian-exim
mode = 0600
user = Debian-exim
  }
}
service imap-login {
  client_limit = 256
  process_limit = 128
  process_min_avail = 3
  service_count = 1
}
service imap {
  drop_priv_before_exec = yes
  process_limit = 256
  vsz_limit = 256 B
}
service pop3-login {
  client_limit = 256
  process_limit = 128
  process_min_avail = 3
  service_count = 1
}
service pop3 {
  drop_priv_before_exec = yes
  process_limit = 256
  vsz_limit = 256 B
}
ssl_cert = 0 lrwxrwxrwx 1 rootstaff 35 Nov  9 17:05 dovecot.conf -> 
/usr/local/etc/dovecot/dovecot.conf

4 drwxr-xr-x 2 rootroot4096 Nov  9 17:05 empty
4 drwxr-x--- 2 rootdovenull4096 Nov  9 17:05 login

My emails are delivered as user Debian-exim and users are virtual in a 
MySQL DB. This system is behind a proxy (so the master user)






Re: [Dovecot] Maildir filename extensions S= and W=

2010-10-25 Thread mail...@securitylabs.it

On 25/10/2010 10:00, Ralf Hildebrandt wrote:

I'd like to add S=  and W=  to the filenames in my Maildir
storage for newly delivered mails. But I cannot find where I can make
Dovecot's LDA add those. Anybody?

http://wiki2.dovecot.org/MailboxFormat/Maildir says:

A maildir filename with those fields would look something like: 
1035478339.27041_118.foo.org,S=1000,W=1030:2,S
which is exactly what I want, but it doesn't tell me how!


Hello, I think it's by default. My delivery command in exim is:

command = /usr/local/libexec/dovecot/deliver -d $local_p...@$domain -f 
$sender_address -a $original_local_p...@$original_domain


and size and vsize are present.


Re: [Dovecot] SASL auth and proxy

2010-10-01 Thread mail...@securitylabs.it

 Il 01/10/2010 18:55, Ed W ha scritto:

 On 01/10/2010 17:23, Timo Sirainen wrote:

I'm quite possibly missing the point, but you might restructure your 
application to have:


- one mysql db (replicated if necessary for robustness) with ALL 
customer data in it
- pool of postfix servers which auth to the remote db (they can be 
persuaded to cache auth results if you wish)




You are completely right, I simply don't like the idea to have one 
single big db with user data and all troubles that can happen 
(performance, replication configuration, data corruption...)




Could have completely missed the point, but this way you get a shared 
pool of frontend machines (so might as well spam/av block on them), 
which then use a transport map to get the mail internally to the 
correct mailbox server.  You can obviously also use a similar sql 
query to ask Dovecot frontend servers to proxy connections to the 
correct backend server...




I already have a pool of frontend server (MX) that do AV/Spam filtering 
and a transport map to the internal machine, but I don't do any query, I 
verify the existence of the recipient via recipient address verification 
before queue with Postfix.


I think - for now - I will try authentication with multiple database 
with Dovecot, by now I only have 4 internal servers with MySQL, so 
performance I hope will not be a problem considering that Dovecot cache 
the results.


I can also implement a procedure that periodically extract only 
user/password from the internal DB and export them to the smtp auth db 
servers, but it's not in real time and may be I'll encounter some 
locking/performance problem during export/import.





[Dovecot] SASL auth and proxy

2010-09-29 Thread mail...@securitylabs.it
 Hello, I'm finding a way to have a pool of smtp-auth servers in front 
of my actuals servers to permit relay to our customers. Now users sends 
emails connecting to the right IP via mail.domain.tld, with 
authentication. Every server has it's own user database in mysql.


I'd like to have a pool of server (with round robin, ideally with 
postfix + sasl + dovecot) that authenticate the users with the actuals 
servers and then pointing mail.domain.tld to this pool and not to one 
server.


My trouble is how to authenticate users.

Can I use:

http://wiki.dovecot.org/Authentication/MultipleDatabases

to tell Dovecot to authenticate with every MySQL database on the servers 
"behind"?


If yes, is there a better way to do this considering I'm already using 
some proxy machines (dovecot) for pop3/imap and so I already have a db 
with domain.tld -> IP of the server? I also have some machine without a 
MySQL DB for users (vpopmail + cdb), so the option with 
MultipleDatabases will be good only for some machines.


Something similar to the proxy mechanism that I already use for 
pop3/imsp will be good: the proxy connect to the machine behind that do 
the authentication, I only need a table with domain -> server IP (that I 
already have).


Thanks for any advice.




Re: [Dovecot] Problem installing latest dovecot w vpopmail

2010-09-21 Thread mail...@securitylabs.it

 On 21/09/2010 11:38, Marcus Rueckert wrote:

On 2010-09-21 10:26:49 +0200, mail...@securitylabs.it wrote:

Dovecot 1.2.14 + Vpopmail 5.4.30 it's fine here.

and now try it with 5.5;)

It's not considered stable, on sourceforge 5.5.0 is under 
vpopmail-devel. The latest stable il 5.4.30, so I'm fine with that.


Re: [Dovecot] Problem installing latest dovecot w vpopmail

2010-09-21 Thread mail...@securitylabs.it

 On 20/09/2010 19:47, Joe @ 3ZZZ wrote:

Quoting "Joe @ 3ZZZ" :

I'm now installing dovecot 1.2.14 on my new server for use with 
vpopmail - is this inadvisable; should I seek an alternative to 
dovecot if I want to stay with vpopmail?



Dovecot 1.2.14 + Vpopmail 5.4.30 it's fine here.


Re: [Dovecot] dovecot evaluation on a 30 gb mailbox

2010-06-25 Thread mail...@securitylabs.it

 On 25/06/2010 13:46, Timo Sirainen wrote:
Most people seem to be saying imapproxy helps a lot, because they 
noticed it helped so much with Courier/UW-IMAP..


Agree.



Re: [Dovecot] dovecot evaluation on a 30 gb mailbox

2010-06-23 Thread mail...@securitylabs.it

Il 23/06/2010 07:12, Rajesh M ha scritto:

stan

my machine is dual core dual processor xeon 1.6 gig proc
4 gb ram
1 tb sata for centos linux
1 tb sata for vpopmail domains data, mysql db and log data
my hdd usage is at 60 percent now.
   


Hello, dunno what filesystem you are using. If it's ext3/4 I suggest you 
to mount it with noatime option.


Accessing a large Maildir folder with atime it's a pain. On an old 
server that in the peak time was at 12-15 load average I've lowered the 
load to < 5 only remounting with noatime option.


Re: [Dovecot] Dovecot deliver LDA problem

2010-05-04 Thread mail...@securitylabs.it

Il 04/05/2010 23:14, Alex ha scritto:

Hello folks,
I was trying to set up Dovecot deliver LDA instead of Postfix default
virtual LDA


May 04 10:43:10 deliver(some_addr...@some_domain.com): Error: userdb
lookup: connect(/var/run/dovecot//auth-master) failed: No such file or
directory
   


Hello, I think you are missing the master authentication socket in yout 
dovecot.conf


http://wiki.dovecot.org/LDA

Under Virtual users:

auth default {
..
  socket listen {
# Note that we're setting a master socket. SMTP AUTH for Postfix and Exim 
uses client sockets.
master {
  # Typically under base_dir/, if not the directory must be created.
  path = /var/run/dovecot/auth-master

  # Auth master socket can be used to look up userdb information for
  # given usernames. This probably isn't very sensitive information
  # for most systems, but still try to restrict the socket access if 
possible.
  mode = 0600
  user = vmail # User running deliver
  #group = mail # Or alternatively mode 0660 + deliver user in this group
}
  }
..
}




Re: [Dovecot] Released Pigeonhole Sieve v0.1.16 for Dovecot v1.2.11

2010-04-30 Thread mail...@securitylabs.it

On 30/04/2010 12:41, Timo Sirainen wrote:

On Fri, 2010-04-30 at 12:39 +0200, mail...@securitylabs.it wrote:
   

GCC 2.95, now replaced with 3.04, no more warning.

 

../../sieve-error.h:30: argument format specified for non-function
`sieve_error_func_t'

 

I guess this is the error. You could remove ATTR_FORMAT(3, 4) from the
code in there.


   

Thanks, removed and now it compiles.
 

Do you mean you had to remove the ATTR_FORMAT also with gcc 3.0.4?

   

Yes, otherwise it stops with the same error.



Re: [Dovecot] Released Pigeonhole Sieve v0.1.16 for Dovecot v1.2.11

2010-04-30 Thread mail...@securitylabs.it

On 30/04/2010 12:14, Timo Sirainen wrote:


"The attribute pure is not implemented in GCC versions earlier than
2.96."

How ancient gcc version do you have?

   


GCC 2.95, now replaced with 3.04, no more warning.


../../sieve-error.h:30: argument format specified for non-function
`sieve_error_func_t'
 

I guess this is the error. You could remove ATTR_FORMAT(3, 4) from the
code in there.

   


Thanks, removed and now it compiles.


Re: [Dovecot] Released Pigeonhole Sieve v0.1.16 for Dovecot v1.2.11

2010-04-30 Thread mail...@securitylabs.it

On 30/04/2010 09:44, Stephan Bosch wrote:


Refer to http://pigeonhole.dovecot.org for more information. Have fun
testing the new releases and don't hesitate to notify me when there are
problems.



Hi Stephan,

I'm trying to install Pigeonhole on a old Debian 3.0 but the make 
command fail with:


make  all-recursive
make[1]: Entering directory `/usr/local/src/dovecot-1.2-sieve-0.1.16'
Making all in src
make[2]: Entering directory `/usr/local/src/dovecot-1.2-sieve-0.1.16/src'
Making all in lib-sieve
make[3]: Entering directory 
`/usr/local/src/dovecot-1.2-sieve-0.1.16/src/lib-sieve'

Making all in plugins
make[4]: Entering directory 
`/usr/local/src/dovecot-1.2-sieve-0.1.16/src/lib-sieve/plugins'

Making all in vacation
make[5]: Entering directory 
`/usr/local/src/dovecot-1.2-sieve-0.1.16/src/lib-sieve/plugins/vacation'

source='cmd-vacation.c' object='cmd-vacation.lo' libtool=yes \
DEPDIR=.deps depmode=gcc /bin/sh ../../../../depcomp \
/bin/sh ../../../../libtool --tag=CC   --mode=compile gcc 
-DHAVE_CONFIG_H -I. -I../../../..  -I../../ 
-I/usr/local/src/dovecot-1.2.11 -I/usr/local/src/dovecot-1.2.11/src/lib 
-I/usr/local/src/dovecot-1.2.11/src/lib-mail 
-I/usr/local/src/dovecot-1.2.11/src/lib-storage-g -O2 -Wall -W 
-Wmissing-prototypes -Wmissing-declarations -Wpointer-arith 
-Wchar-subscripts -Wformat=2 -Wbad-function-cast  -c -o cmd-vacation.lo 
cmd-vacation.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../ 
-I/usr/local/src/dovecot-1.2.11 -I/usr/local/src/dovecot-1.2.11/src/lib 
-I/usr/local/src/dovecot-1.2.11/src/lib-mail 
-I/usr/local/src/dovecot-1.2.11/src/lib-storage -g -O2 -Wall -W 
-Wmissing-prototypes -Wmissing-declarations -Wpointer-arith 
-Wchar-subscripts -Wformat=2 -Wbad-function-cast -c cmd-vacation.c 
-Wp,-MD,.deps/cmd-vacation.TPlo  -fPIC -DPIC -o .libs/cmd-vacation.o

In file included from /usr/local/src/dovecot-1.2.11/src/lib/lib.h:28,
 from cmd-vacation.c:4:
/usr/local/src/dovecot-1.2.11/src/lib/data-stack.h:73: warning: `pure' 
attribute directive ignored

In file included from /usr/local/src/dovecot-1.2.11/src/lib/lib.h:39,
 from cmd-vacation.c:4:
/usr/local/src/dovecot-1.2.11/src/lib/strfuncs.h:44: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/strfuncs.h:54: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/strfuncs.h:55: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/strfuncs.h:56: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/strfuncs.h:57: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/strfuncs.h:58: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/strfuncs.h:59: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/strfuncs.h:77: warning: `pure' 
attribute directive ignored

In file included from cmd-vacation.c:5:
/usr/local/src/dovecot-1.2.11/src/lib/str.h:15: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/str.h:17: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/str.h:18: warning: `pure' 
attribute directive ignored

In file included from ../../sieve-code.h:8,
 from cmd-vacation.c:17:
/usr/local/src/dovecot-1.2.11/src/lib/buffer.h:36: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/buffer.h:88: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/buffer.h:106: warning: `pure' 
attribute directive ignored

In file included from ../../sieve-code.h:10,
 from cmd-vacation.c:17:
/usr/local/src/dovecot-1.2.11/src/lib/array.h:96: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/array.h:161: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/array.h:222: warning: `pure' 
attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/array.h:229: warning: `pure' 
attribute directive ignored

In file included from ../../sieve-ast.h:11,
 from ../../sieve-commands.h:10,
 from cmd-vacation.c:20:
../../sieve-error.h:30: argument format specified for non-function 
`sieve_error_func_t'
In file included from 
/usr/local/src/dovecot-1.2.11/src/lib-storage/mail-storage.h:6,

 from ../../sieve-actions.h:8,
 from cmd-vacation.c:21:
/usr/local/src/dovecot-1.2.11/src/lib/seq-range-array.h:36: warning: 
`pure' attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/seq-range-array.h:39: warning: 
`pure' attribute directive ignored
/usr/local/src/dovecot-1.2.11/src/lib/seq-range-array.h:41: warning: 
`pure' attribute directive ignored
In file included from 
/usr/local/src/dovecot-1.2.11/src/lib-storage/mail-storage.h:10,

 from ../../sieve-actions.h:8,
 from cmd-vacation.

Re: [Dovecot] IMAP proxy configuration

2010-03-11 Thread mail...@securitylabs.it

On 11/03/2010 17:14, Leonardo Rodrigues wrote:

Em 11/03/2010 09:53, mail...@securitylabs.it escreveu:


Just insert a column in the MySQL table with the host relative to the 
domain. This is my configuration on the proxy:



password_query = SELECT users.clear AS password, domains.host, 
'%u*proxy' AS destuser, 'proxy' AS pass, 'Y' AS proxy FROM 
users,domains WHERE users.username = '%u' AND users.enabled = '1' AND 
domains.domain = '%d'


In the table "domains" I have a column "domain" with the list of 
domains I want to proxy, and a column "host" with the IPof the 
pop/imap server.




and for local domains i could return 127.0.0.1 as host  is 
that what you're doing for local domains ?



No because I don't have local domains, I use proxy on public network to 
allow access to the real servers on the private LAN, but I think you 
have to use proxy_maybe and 127.0.0.1 for local domains:


http://wiki.dovecot.org/PasswordDatabase/ExtraFields/Proxy


Re: [Dovecot] IMAP proxy configuration

2010-03-11 Thread mail...@securitylabs.it

On 11/03/2010 13:27, Leonardo Rodrigues wrote:

[cut]


# Get the password
password_query = select endereco as user, password, 
'/var/spool/mail/%u' as userdb_home, 'maildir:/var/spool/mail/%u' as 
userdb_mail, 8 as userdb_uid, 12 as userdb_gid, concat('*:storage=', 
quota) as userdb_quota_rule, 'Trash:storage=100M' as 
userdb_quota_rule2 from emails where endereco = '%u' and ativa = '1'

[r...@correio dovecot]#


i've read several docs about configuring proxy on dovecot but all 
of them says about proxying specific users  i'm interested on 
proxying some domains. I couldnt find a way to configure that nor some 
howto similar to that.


could anyone point me some documentation on configuring dovecot as 
IMAP/POP3 proxy for a full domain and not specific users ?



Just insert a column in the MySQL table with the host relative to the 
domain. This is my configuration on the proxy:



password_query = SELECT users.clear AS password, domains.host, 
'%u*proxy' AS destuser, 'proxy' AS pass, 'Y' AS proxy FROM users,domains 
WHERE users.username = '%u' AND users.enabled = '1' AND domains.domain = 
'%d'


In the table "domains" I have a column "domain" with the list of domains 
I want to proxy, and a column "host" with the IPof the pop/imap server.


Re: [Dovecot] 1.2.9 imap crash with backtrace

2010-01-21 Thread mail...@securitylabs.it

On 21/01/2010 17:53, David Halik wrote:


Good news and bad news.

The good news is that I've been core dump free for about 24 hours. The 
duplicate message issue is still there, so if you wanted that fix then 
I guess the patch is not complete yet, otherwise it looks good.


The bad news is that I'm now convinced that another problem I've been 
experiencing is real and not related to any of this since it's still 
persists.


Randomly for a few releases now myself and my coworkers have been 
seeing a weird bug where old mail marked as "read" suddenly becomes 
marked as "new" again when going into a folder. Sometimes it's as bad 
as the entire folder deciding it is all unread when in fact is was all 
read, other times it's randomly a few pieces of mail that constantly 
revert to unread status. I've watched this on my personal server as 
well as heard complaints from our user population.


I don't believe this is an NFS issue because my personal account is a 
standalone server with both a local index and maildir running 1.2.9. 
Also, I'm only ever connected from one place at a time. Just this 
morning when I got to work I logged in with Thunderbird and my 
"dovecot" mailing list folder suddenly had 3,000 new messages in it, 
all of which had been previous read. I marked the folder as read, then 
a little while later I went into the older and they all reverted to 
new again. I've also seen it where if I try deleting one of these 
messages marked as new, it disappears for a second, then magically 
reappears in my folder as new.


Unfortunately, I'm not seeing a single log message related to this. As 
you can tell, I watch the logs like a hawk, yet nothing ever appears 
to throw an error or any message whatsoever. All my test cases have 
been with Thunderbird 3.0, I'm not sure if other clients a

re seeing this.


Hello, same problem here. I use Thunderbird 3.0.1. The strange thing is 
that with the same version of TB on my PC at home I don't have this 
issue. The same TB on my work PC has this issue and only on one account 
(that has Dovecot as imap server) but I have other account (some with 
dovecot, other with courier-imap) where this does not happen, so I think 
is TB related.


Also here no NFS, ext3.


Re: [Dovecot] Inotify instance limit for user exceeded

2010-01-18 Thread mail...@securitylabs.it

On 18/01/2010 14:49, Lampa wrote:

Hello,

i saw in my log followed messages:

dovecot: 2010-01-18 13:20:54 Warning: IMAP(us...@domain1.com): Inotify
instance limit for user exceeded, disabling.
dovecot: 2010-01-18 13:21:01 Warning: IMAP(us...@domain2.com): Inotify
instance limit for user exceeded, disabling.
dovecot: 2010-01-18 13:21:23 Warning: IMAP(us...@domain2.com: Inotify
instance limit for user exceeded, disabling.
   


Hello, I've solved a similar trouble with:

fs.inotify.max_user_instances = 256

in /etc/sysctl.conf

The default is 128.



Re: [Dovecot] Enable plugin per user

2010-01-08 Thread mail...@securitylabs.it

On 08/01/2010 09:15, Timo Sirainen wrote:

On 8.1.2010, at 9.58, mail...@securitylabs.it wrote:

   

is there a way to enable some plugin (in particular I'm thinking of 
lazy_expunge) on a per-user basis?

I use Dovecot 1.2.9 with Maildir and virtual users in a MySQL database.
 

Yes. Return mail_plugins setting from your user_query. For example:

user_query = select .., mail_plugins from users where ..
   


Thanks. One clarification. If I have:

protocol imap {
  mail_plugins = quota imap_quota mail_log


in my conf file, I have to add only lazy_expunge in the MySQL field and 
it "adds" to the plugins specified in the conf? Or I have to add every 
plugin I'd like to use in the MySQL field?


Igor


[Dovecot] Enable plugin per user

2010-01-07 Thread mail...@securitylabs.it

Hello,

is there a way to enable some plugin (in particular I'm thinking of 
lazy_expunge) on a per-user basis?


I use Dovecot 1.2.9 with Maildir and virtual users in a MySQL database.

Thanks for your support, Igor.


Re: [Dovecot] Lazyexpunge and Segmentation fault

2009-12-10 Thread mail...@securitylabs.it

Il 10/12/2009 19:28, Timo Sirainen ha scritto:

On Thu, 2009-12-10 at 11:55 +0100, mail...@securitylabs.it wrote:
   

#0  0xb7fb45c9 in lazy_expunge_mail_expunge (_mail=0x844df58) at
lazy-expunge-plugin.c:115
115 deststorage =
luser->lazy_ns[LAZY_NAMESPACE_EXPUNGE]->storage;
 

OK, this makes more sense. Looks like it was a bug in quota plugin:
http://hg.dovecot.org/dovecot-1.2/rev/5e2206e3c750

   


Hello Timo, thanks problem solved. Igor.


Re: [Dovecot] Lazyexpunge and Segmentation fault

2009-12-10 Thread mail...@securitylabs.it

On 09/12/2009 21:03, Timo Sirainen wrote:

You still happen to have the core file? I'd like to know a few more
things:

   

#0  lazy_expunge_mail_expunge (_mail=0x9907ae8) at lazy-expunge-plugin.c:116
116 lt->expunge_box =
 

p *lt
p *deststorage
p *_mail
p *_mail.box

Anyway there's something weird going on there. It shouldn't crash on
that line. So either gcc optimizations confused gdb and it's actually
crashing elsewhere (recompiling+reinstalling the plugin without -O2
parameter would help with this),
   

Hello, I've recompiled dovecot with -O0 and here a new backtrace:

GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 


This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/i686/nosegneg/libdl.so.2...done.
Loaded symbols for /lib/i686/nosegneg/libdl.so.2
Reading symbols from /lib/i686/nosegneg/librt.so.1...done.
Loaded symbols for /lib/i686/nosegneg/librt.so.1
Reading symbols from /lib/i686/nosegneg/libc.so.6...done.
Loaded symbols for /lib/i686/nosegneg/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/i686/nosegneg/libpthread.so.0...done.
Loaded symbols for /lib/i686/nosegneg/libpthread.so.0
Reading symbols from 
/usr/local/lib/dovecot/imap/lib02_lazy_expunge_plugin.so...done.

Loaded symbols for /usr/local/lib/dovecot/imap/lib02_lazy_expunge_plugin.so
Reading symbols from 
/usr/local/lib/dovecot/imap/lib10_quota_plugin.so...done.

Loaded symbols for /usr/local/lib/dovecot/imap/lib10_quota_plugin.so
Reading symbols from 
/usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so...done.

Loaded symbols for /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so
Reading symbols from 
/usr/local/lib/dovecot/imap/lib20_mail_log_plugin.so...done.

Loaded symbols for /usr/local/lib/dovecot/imap/lib20_mail_log_plugin.so
Core was generated by `imap'.
Program terminated with signal 11, Segmentation fault.
[New process 14769]
#0  0xb7fb45c9 in lazy_expunge_mail_expunge (_mail=0x844df58) at 
lazy-expunge-plugin.c:115
115 deststorage = 
luser->lazy_ns[LAZY_NAMESPACE_EXPUNGE]->storage;

(gdb) bt full
#0  0xb7fb45c9 in lazy_expunge_mail_expunge (_mail=0x844df58) at 
lazy-expunge-plugin.c:115

luser = (struct lazy_expunge_mail_user *) 0x841c060
lt = (struct lazy_expunge_transaction *) 0x844de28
deststorage = (struct mail_storage *) 0x844de40
#1  0x080c658f in mail_expunge (mail=0x844df58) at mail.c:207
p = (struct mail_private *) 0x844df58
#2  0x0806c294 in imap_expunge (box=0x8423538, next_search_arg=0x0) at 
imap-expunge.c:35

ctx = (struct mail_search_context *) 0x844de40
t = (struct mailbox_transaction_context *) 0x844ca58
mail = (struct mail *) 0x844df58
search_args = (struct mail_search_args *) 0x0
expunges = false
#3  0x0806267e in cmd_expunge_finish (cmd=0x841e4d0, search_args=0x0) at 
cmd-expunge.c:27

client = (struct client *) 0x841e250
#4  0x0806283f in cmd_expunge (cmd=0x841e4d0) at cmd-expunge.c:78
No locals.
#5  0x0806a3c7 in client_command_input (cmd=0x841e4d0) at client.c:612
client = (struct client *) 0x841e250
command = (struct command *) 0x2
__PRETTY_FUNCTION__ = "client_command_input"
#6  0x0806a5f3 in client_command_input (cmd=0x841e4d0) at client.c:661
client = (struct client *) 0x841e250
command = (struct command *) 0x841a6a0
__PRETTY_FUNCTION__ = "client_command_input"
#7  0x0806a6fe in client_handle_next_command (client=0x841e250, 
remove_io_r=0xbfb94035) at client.c:702

size = 11
#8  0x0806a783 in client_handle_input (client=0x841e250) at client.c:714
_data_stack_cur_id = 3
ret = 65
remove_io = false
handled_commands = false
__PRETTY_FUNCTION__ = "client_handle_input"
#9  0x0806a8e1 in client_input (client=0x841e250) at client.c:753
cmd = (struct client_command_context *) 0xb7f2af78
output = (struct ostream *) 0x841e404
bytes = 11
__PRETTY_FUNCTION__ = "client_input"
#10 0x08124721 in io_loop_handler_run (ioloop=0x84199b0) at 
ioloop-epoll.c:208

ctx = (struct ioloop_handler_context *) 0x8419ab8
events = (struct epoll_event *) 0x8419af8
event = (const struct epoll_event *) 0x8419af8
list = (struct io_list *) 0x841c228
io = (struct io_file *) 0x841e460
tv = {tv_sec = 1799, tv_usec = 999144}
events_count = 3
t_id = 2
msecs = 180
ret = 1
i = 0
j = 0
call = true
#11 0x081239d8 in io_loop_run (ioloop=0x84199b0) at ioloop.

Re: [Dovecot] Lazyexpunge and Segmentation fault

2009-11-30 Thread mail...@securitylabs.it

Timo Sirainen ha scritto:

On Nov 30, 2009, at 9:25 AM, mail...@securitylabs.it wrote:

  

Now every time I try to expunge a mailbox dovecot crash. Here the strace:



strace is almost useless for figuring out why program crashes. Could you get 
gdb backtrace? See http://dovecot.org/bugreport.html
  

Hello, Timo here gdb backtrace:

GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/i686/nosegneg/libdl.so.2...done.
Loaded symbols for /lib/i686/nosegneg/libdl.so.2
Reading symbols from /lib/i686/nosegneg/librt.so.1...done.
Loaded symbols for /lib/i686/nosegneg/librt.so.1
Reading symbols from /lib/i686/nosegneg/libc.so.6...done.
Loaded symbols for /lib/i686/nosegneg/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/i686/nosegneg/libpthread.so.0...done.
Loaded symbols for /lib/i686/nosegneg/libpthread.so.0
Reading symbols from 
/usr/local/lib/dovecot/imap/lib02_lazy_expunge_plugin.so...done.

Loaded symbols for /usr/local/lib/dovecot/imap/lib02_lazy_expunge_plugin.so
Reading symbols from 
/usr/local/lib/dovecot/imap/lib10_quota_plugin.so...done.

Loaded symbols for /usr/local/lib/dovecot/imap/lib10_quota_plugin.so
Reading symbols from 
/usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so...done.

Loaded symbols for /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so
Reading symbols from 
/usr/local/lib/dovecot/imap/lib20_mail_log_plugin.so...done.

Loaded symbols for /usr/local/lib/dovecot/imap/lib20_mail_log_plugin.so
Core was generated by `imap'.
Program terminated with signal 11, Segmentation fault.
[New process 32041]
#0  lazy_expunge_mail_expunge (_mail=0x9907ae8) at lazy-expunge-plugin.c:116
116 lt->expunge_box = 
mailbox_open_or_create(deststorage,

(gdb) bt full
#0  lazy_expunge_mail_expunge (_mail=0x9907ae8) at lazy-expunge-plugin.c:116
   lt = (struct lazy_expunge_transaction *) 0x99079b8
#1  0x08069960 in imap_expunge (box=0x98db538, next_search_arg=0x0) at 
imap-expunge.c:35

   ctx = (struct mail_search_context *) 0x99079d0
   t = (struct mailbox_transaction_context *) 0x98fea28
   mail = (struct mail *) 0x9907ae8
   search_args = (struct mail_search_args *) 0x0
   expunges = true
#2  0x08061dc8 in cmd_expunge_finish (cmd=0x98d64d0, search_args=0x0) at 
cmd-expunge.c:27

   client = (struct client *) 0x98d6250
#3  0x08067b4c in client_command_input (cmd=0x98d64d0) at client.c:612
   client = (struct client *) 0x98d6250
   command = 
   __PRETTY_FUNCTION__ = "client_command_input"
#4  0x08067be9 in client_command_input (cmd=0x98d64d0) at client.c:661
   client = (struct client *) 0x98d6250
   command = 
   __PRETTY_FUNCTION__ = "client_command_input"
#5  0x08067d5d in client_handle_input (client=0x98d6250) at client.c:702
   _data_stack_cur_id = 3
   ret = false
   remove_io = 
   handled_commands = false
   __PRETTY_FUNCTION__ = "client_handle_input"
#6  0x080686bf in client_input (client=0x98d6250) at client.c:753
   cmd = 
   output = (struct ostream *) 0x98d6404
   bytes = 
   __PRETTY_FUNCTION__ = "client_input"
#7  0x080fb8c0 in io_loop_handler_run (ioloop=0x98d19b0) at 
ioloop-epoll.c:208

   ctx = (struct ioloop_handler_context *) 0x98d1ab8
   event = (const struct epoll_event *) 0x98d1af8
   list = (struct io_list *) 0x98d4228
   io = (struct io_file *) 0x98d6460
   tv = {tv_sec = 1799, tv_usec = 999278}
   t_id = 2
   msecs = 
   ret = 1
   i = 0
   j = 0
   call = 
#8  0x080fad30 in io_loop_run (ioloop=0x98d19b0) at ioloop.c:335
No locals.
#9  0x0807119a in main (argc=Cannot access memory at address 0xc
) at main.c:327
No locals.




Did you migrate to Dovecot from another server? Sounds anyway like TB is configured to 
have "INBOX." namespace prefix or something like that. Or possibly it's caching 
wrong hierarchy separator and you need to recreate the account in TB.
  

With a different version of TB on another computer this does not happen, 
tomorrow I will try to recreate the account on the problematic TB.

Thanks, Igor




[Dovecot] Lazyexpunge and Segmentation fault

2009-11-30 Thread mail...@securitylabs.it
Hello, I'm experimenting with the Lazyexpunge plugin on a test machine 
with Dovecot 1.2.8 on Debian 5.0.


This is my conf

# 1.2.8: /usr/local/etc/dovecot.conf
# OS: Linux 2.6.26-2-xen-686 i686 Debian 5.0.3
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap pop3 imaps pop3s
ssl_cert_file: /usr/local/etc/dovecot.crt
ssl_key_file: /usr/local/etc/dovecot.key
disable_plaintext_auth: no
login_dir: /usr/local/var/run/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
login_greeting: Server ready.
max_mail_processes: 256
mail_max_userip_connections(default): 10
mail_max_userip_connections(imap): 10
mail_max_userip_connections(pop3): 3
first_valid_uid: 100
last_valid_uid: 105
mail_privileged_group: Debian-exim
mail_uid: Debian-exim
mail_gid: Debian-exim
mail_location: maildir:~/Maildir:INDEX=/var/indexes/%d/%n
mail_debug: yes
fsync_disable: yes
mail_nfs_storage: no
lock_method: dotlock
mail_drop_priv_before_exec: yes
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota mail_log lazy_expunge
mail_plugins(imap): quota imap_quota mail_log lazy_expunge
mail_plugins(pop3): quota mail_log
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
pop3_no_flag_updates: yes
namespace:
  type: private
  separator: /
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: private
  separator: /
  prefix: EXPUNGED/
  location: maildir:~/Maildir/expunged
  list: yes
  subscriptions: yes
namespace:
  type: private
  separator: /
  prefix: DELETED/
  location: maildir:~/Maildir/deleted
  list: yes
  subscriptions: yes
namespace:
  type: private
  separator: /
  prefix: DELETED/EXPUNGED/
  location: maildir:~/Maildir/deleted/expunged
  list: yes
  subscriptions: yes
lda:
  mail_plugins: quota sieve
  postmaster_address: postmas...@securitylabs.it
auth default:
  cache_size: 1000
  cache_ttl: 120
  cache_negative_ttl: 120
  user: Debian-exim
  username_chars: 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@&

  master_user_separator: *
  passdb:
driver: sql
args: /usr/local/etc/dovecot-sql.conf
  passdb:
driver: passwd-file
args: /usr/local/etc/passwd.masterusers
pass: yes
master: yes
  userdb:
driver: sql
args: /usr/local/etc/dovecot-sql.conf
  socket:
type: listen
master:
  path: /usr/local/var/run/dovecot/auth-master
  mode: 384
  user: 102
  group: 104
plugin:
  quota: maildir
  quota_warning: storage=80%% /usr/local/bin/dovecot-quota-warning.sh 80
  quota_warning2: storage=90%% /usr/local/bin/dovecot-quota-warning.sh 90
  mail_log_events: delete expunge
  mail_log_group_events:
  sieve: ~/.dovecot.sieve
  lazy_expunge: EXPUNGED/ DELETED/ DELETED/EXPUNGED/


I've added the namespace and enabled the plugin for the test as reported 
here:


http://wiki.dovecot.org/Plugins/Lazyexpunge.

Now every time I try to expunge a mailbox dovecot crash. Here the strace:

15:09:21.054191 gettimeofday({1259590161, 54371}, {0, 0}) = 0
15:09:21.054418 gettimeofday({1259590161, 54438}, NULL) = 0
15:09:21.054530 epoll_wait(5, {}, 4, 3159) = 0
15:09:24.213497 gettimeofday({1259590164, 213531}, {0, 0}) = 0
15:09:24.213574 gettimeofday({1259590164, 213591}, NULL) = 0
15:09:24.213623 epoll_wait(5, {{EPOLLIN, {u32=146866728, 
u64=146866728}}}, 4, 3207) = 1

15:09:25.769640 gettimeofday({1259590165, 769672}, {0, 0}) = 0
15:09:25.769709 gettimeofday({1259590165, 769726}, NULL) = 0
15:09:25.769760 read(0, "DONE\r\n"..., 4015) = 6
15:09:25.769836 epoll_ctl(5, EPOLL_CTL_DEL, 0, {0, {u32=146866728, 
u64=146866728}}) = 0

15:09:25.769895 inotify_rm_watch(10, 2) = 0
15:09:25.770188 inotify_rm_watch(10, 1) = 0
15:09:25.770236 epoll_ctl(5, EPOLL_CTL_DEL, 10, {0, {u32=147113264, 
u64=147113264}}) = 0

15:09:25.770295 setsockopt(1, SOL_TCP, TCP_CORK, [1], 4) = 0
15:09:25.770353 write(1, "5 OK Idle completed.\r\n"..., 22) = 22
15:09:25.770416 setsockopt(1, SOL_TCP, TCP_CORK, [0], 4) = 0
15:09:25.770477 gettimeofday({1259590165, 770504}, NULL) = 0
15:09:25.770542 epoll_ctl(5, EPOLL_CTL_ADD, 0, 
{EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=146866728, u64=146866728}}) = 0

15:09:25.770601 gettimeofday({1259590165, 770649}, NULL) = 0
15:09:25.770681 epoll_wait(5, {{EPOLLIN, {u32=146866728, 
u64=146866728}}}, 4, 3443) = 1

15:09:25.804121 gettimeofday({1259590165, 804143}, {0, 0}) = 0
15:09:25.804177 gettimeofday({1259590165, 804193}, NULL) = 0
15:09:25.804224 read(0, "6 uid store 10162:10163,10165:101"..., 4009) = 61
15:09:25.804324 gettimeofday({1259590165, 804343}, NULL) = 0
15:09:25.804405 
stat64("/var/indexes/securitylabs.it/mailing/.Debian/dovecot.index.log", 
{st_mode=S_IFREG|0600, s