Re: [Dovecot] Very High Load on Dovecot 2 and Errors in mail.err.

2012-06-19 Thread Jesper Dahl Nyerup
On Jun 11  23:37, Jesper Dahl Nyerup wrote:
> We're still chasing the root cause in the kernel or the VServer patch
> set. We'll of course make sure to post our findings here, and I'd very
> much appreciate to hear about other people's progress.

We still haven't found a solution, but here's what we've got thus far:

 - The issue is not VServer specific. We're able to reproduce it on
   recent vanilla kernels.

 - The issue has a strong correlation with the number of processor cores
   in the machine. The behavior is impossible to provoke on a dual core
   workstation, but is very widespread on 16 or 24 core machines.

One of my colleagues has written a snippet of code that reproduces and
exposes the problem, and we've sent this to the Inotify maintainers and
the kernel mailing list, hoping that someone more familiar with the code
will be quicker to figure out what is broken.

If anyone's interested - either in following the issue or the code
snippet that reproduces it - here's the post:
http://thread.gmane.org/gmane.linux.kernel/1315430

As this is clearly a kernel issue, we're going to try to keep the
discussion there, and I'll probably not follow up here, until the issue
has been resolved.

Jesper.


signature.asc
Description: Digital signature


Re: [Dovecot] director map and mysql

2012-06-19 Thread Костырев Александр Алексеевич
thanks!

but what mechanisms do I have if I want certain user to be always proxied to 
certain host, but if that host is down, to redirect him to another?

I planned to setup two dovecot storage servers where
all mailboxes are mirrored between these two servers with dsync replication 
like described in http://www.dovecot.org/list/dovecot/2012-March/064243.html
but I don't want this user to be redirected to two these servers in round-robin 
fashion.



-Original Message-
From: dovecot-boun...@dovecot.org [mailto:dovecot-boun...@dovecot.org] On 
Behalf Of Timo Sirainen
Sent: Wednesday, June 20, 2012 1:22 PM
To: Костырев Александр Алексеевич
Cc: dovecot@dovecot.org
Subject: Re: [Dovecot] director map and mysql

On 20.6.2012, at 5.03, Костырев Александр Алексеевич wrote:

> Is "doveadm director map" command suppose to work when I store "host" value 
> in mysql table?
> It gives me nothing in output with no errors in log.

If you return a host for a user, then Dovecot does regular proxying and 
director doesn't know anything about the user.




[Dovecot] troncated email

2012-06-19 Thread Claude Gélinas
Hi,

I'm on fc16 with dovecot and Claws Mail version 3.8.0

All email in INBOX are troncated as they arrive. I only get the title,
from and date but no more core message

could someone guide me so I find a solution for my problem. cannot lose
my email

Regards,

Claude


Re: [Dovecot] director map and mysql

2012-06-19 Thread Timo Sirainen
On 20.6.2012, at 5.03, Костырев Александр Алексеевич wrote:

> Is "doveadm director map" command suppose to work when I store "host" value 
> in mysql table?
> It gives me nothing in output with no errors in log.

If you return a host for a user, then Dovecot does regular proxying and 
director doesn't know anything about the user.



[Dovecot] director map and mysql

2012-06-19 Thread Костырев Александр Алексеевич
hello!

Is "doveadm director map" command suppose to work when I store "host" value in 
mysql table?
It gives me nothing in output with no errors in log.

I've successfully setup directors with static passdb, and decided to give a try 
setup with storing host value in mysql table.
The proxying is actually working, I'm just unhappy with no output from "doveadm 
director map".

on the other hand output from "doveadm director map" is not empty, when I 
configure my password_query not to return host from table.

director's settings in dovecot.sql is:

passdb {
  driver = sql
  args = /etc/dovecot/dovecot-sql.conf
}
userdb {
  driver = sql
  args = /etc/dovecot/dovecot-sql.conf
}
director_servers = 192.168.5.125
director_mail_servers = 192.168.5.110 192.168.5.111
service doveadm {
  inet_listener {
port = 24245
  }
}
protocol doveadm {
  auth_socket_path = director-userdb
}
doveadm_proxy_port = 24245

in /etc/dovecot/dovecot-sql.conf at director there's
password_query = SELECT \
NULL AS password,\
'Y' as nopassword, \
'Y' AS proxy, \
MBOX_NAME as user, \
host2 as host  \
from M_MAILBOX \
where MBOX_NAME = '%u'

user_query = SELECT \
MBOX_NAME AS username, \
MAIL_DIRECTORY as home \
from M_MAILBOX \
where MBOX_NAME = '%u';

iterate_query = select MBOX_NAME AS username from M_MAILBOX;


backend's conf:
service doveadm {
  inet_listener {
port = 24245
  }
}



Re: [Dovecot] Trouble with Trash

2012-06-19 Thread Daniel Parthey


Dominic Pratt  schrieb:

>As already said... I don't think it's TB:
>http://www.imagebanana.com/view/ht4sofoj/thunderbird.jpg

Hi Dominic,

since you do not seem to have enabled the Trash plugin, Dovecot will not delete 
anything by itself.

Thunderbird might expire the mails in your Trash mailbox if they exceed a 
specified age or a specified message count. Please check your system date and 
the retention times of mails in your trash mailbox. Right click on the folder.

Regards
Daniel


[Dovecot] message parser: Fixed infinite loop when parsing a specific message.

2012-06-19 Thread Timo Sirainen
I committed this change to all hg branches:
http://hg.dovecot.org/dovecot-2.1/rev/4461b48fcc1f

After that I realized that it doesn't actually matter, because it fixes
only a situation where input buffer's size is less than 84 bytes. This
happened on a test program where I was using a 64 byte buffer, but the
real code in Dovecot always uses much larger buffers.

So, don't worry, there's no way to actually DOS Dovecot with this. No
need for distro people to create any security releases.




Re: [Dovecot] Trouble with Trash

2012-06-19 Thread Dominic Pratt
As already said... I don't think it's TB: 
http://www.imagebanana.com/view/ht4sofoj/thunderbird.jpg


Thanks anyway.

Am 19.06.2012 19:54, schrieb Oscar del Rio:

Thunderbird - Accounts - Server settings - Empty Trash on Exit


Re: [Dovecot] Trouble with Trash

2012-06-19 Thread Oscar del Rio

On 06/19/12 01:12 PM, Dominic Pratt wrote:


My problem is, that actually old mails in the Thrash-Folder are 
deleted. This is crap, because I want to look at some mails again. I'm 
not sure if my Thunderbird does it or Dovecot. I don't think, TB does 
it, there's actually no option, I think.




Thunderbird - Accounts - Server settings - Empty Trash on Exit



[Dovecot] Trouble with Trash

2012-06-19 Thread Dominic Pratt

Hi guys and girls,

Version: 2.0.19 - running on Ubuntu 12.04 LTS Server
dovecot -n:

# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 3.3.1 x86_64 Ubuntu 12.04 LTS
mail_location = maildir:~/Maildir
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

passdb {
driver = pam
}
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
protocols = imap pop3 sieve
service auth {
unix_listener /var/spool/postfix/private/dovecot-auth {
group = postfix
mode = 0660
user = postfix
}
}
ssl_cert = ssl_cipher_list = 
ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM

ssl_key =  was automatically rejected:%n%r
}

My problem is, that actually old mails in the Thrash-Folder are deleted. 
This is crap, because I want to look at some mails again. I'm not sure 
if my Thunderbird does it or Dovecot. I don't think, TB does it, there's 
actually no option, I think.


Any ideas?

P.S.: Sorry for the bad english.

--
"If you haven’t found it yet, keep looking. Don’t settle."

Dominic Pratt
Fachinformatiker Systemintegration

Handy: +49 173 8371427



Re: [Dovecot] doveadm fetch LARGE attachments and remove message [SOLVED]

2012-06-19 Thread Bradley Giesbrecht
On Jun 18, 2012, at 6:49 AM, Timo Sirainen wrote:

> On 17.6.2012, at 18.19, Bradley Giesbrecht wrote:
> 
>> Looking at the wiki and man pages I am unsure how to fetch email attachments 
>> from a unix shell.
>> 
>> I have an "doveadm search" that returns the messages that have the 
>> attachments I am after.
>> 
>> Would I loop through an "doveadm fetch" and use a commandline imap client to 
>> save the attachments and move the message to the Trash?
>> 
>> Or is there a doveadm command for this?
> 
> No, there's currently no easy way to do this. doveadm fetch doesn't support 
> that. You could possibly do this via IMAP, but it would be difficult to know 
> which MIME part to fetch. Actually it's not even obvious if a MIME part is an 
> attachment or not..


I used an imap client to create an imap folder named "unpack" , searched for 
the messages I needed and then moved them into the unpack folder. I then used 
munpack to unpack the messages from the unpack folder to a local disk directory.
http://ftp.andrew.cmu.edu/pub/mpack/


Regards,
Bradley Giesbrecht (pixilla)



Re: [Dovecot] dovecot-sieve and LMT

2012-06-19 Thread Stephan Bosch

Op 6/19/2012 3:13 PM, Martin Weil schreef:

Am 19.06.2012 um 12:44 schrieb Stephan Bosch:


Op 6/19/2012 11:20 AM, Martin Weil schreef:

Indeed they did not. I incorrectly thought that a line in postfix's main.cf would change 
the delivery to deliver. That would have been true if I used local delivery. For virtual 
users postfix is using "virtual" by default. So I had to add deliver to 
postfix's master.cf and change the virtual_transport in main.cf.

After configuring logging for deliver I can now confirm that it is used. I was 
mistaken by thinking local delivery is the same as virtual delivery. I could 
have avoided this by reading the wiki more carefully. Sorry about that.

But I am afraid sieve is still not working. Mails are still delivered to INBOX.

Do the logs say anything about Sieve? You can enable mail_debug in your 
configuration to obtain more verbose log messages about what Sieve is doing.

Regards,

Stephan.


Thanks a lot for this tip.
It turned out I used the %u variable instead of %n in the path of the sieve 
script, so sieve was looking in a non existing directory. After correcting 
sieve complained about the :create statement. But after I removed it, it worked 
flawlessly.


The :create tag doesn't work unless the mailbox extension is active; you 
need to add the following to the top of your Sieve script to use it:


require "mailbox";

Regards,

Stephan.


[Dovecot] specifying home/sieve/sieve_dir relative to mail_location

2012-06-19 Thread Edgar Fuß
With 1.2, is it possible to specify home, sieve and sieve_dir relative to 
mail_location?

I have
mail_location = 
maildir:/import/mail/%n/:INDEX=/var/db/dovecot/indexes/%n
and, in the plugin section,
home = /import/mail/%n/home
sieve = /import/mail/%n/dovecot.sieve
sieve_dir = /import/mail/%n/sieve
I would like to partially move users to another location (different file 
server) by using an LDAP entry.
I know it's possible to specify everything relative to home, so I could 
probably use relative ~/../-type paths for  mail_locatin etc., but that looks a 
bit awkward.

The VirtualUsers/Home Wiki enty contains an example for relative paths
user_attrs = .., mailDirectory=home=/var/vmail/%$
which I do not understand.


Re: [Dovecot] dovecot-sieve and LMT

2012-06-19 Thread Martin Weil

Am 19.06.2012 um 12:44 schrieb Stephan Bosch:

> Op 6/19/2012 11:20 AM, Martin Weil schreef:
>> 
>> Indeed they did not. I incorrectly thought that a line in postfix's main.cf 
>> would change the delivery to deliver. That would have been true if I used 
>> local delivery. For virtual users postfix is using "virtual" by default. So 
>> I had to add deliver to postfix's master.cf and change the virtual_transport 
>> in main.cf.
>> 
>> After configuring logging for deliver I can now confirm that it is used. I 
>> was mistaken by thinking local delivery is the same as virtual delivery. I 
>> could have avoided this by reading the wiki more carefully. Sorry about that.
>> 
>> But I am afraid sieve is still not working. Mails are still delivered to 
>> INBOX.
> 
> Do the logs say anything about Sieve? You can enable mail_debug in your 
> configuration to obtain more verbose log messages about what Sieve is doing.
> 
> Regards,
> 
> Stephan.


Thanks a lot for this tip.
It turned out I used the %u variable instead of %n in the path of the sieve 
script, so sieve was looking in a non existing directory. After correcting 
sieve complained about the :create statement. But after I removed it, it worked 
flawlessly.

Thanks a lot again.
Martin

Re: [Dovecot] dovecot-sieve and LMT

2012-06-19 Thread Stephan Bosch

Op 6/19/2012 11:20 AM, Martin Weil schreef:


Indeed they did not. I incorrectly thought that a line in postfix's main.cf would change 
the delivery to deliver. That would have been true if I used local delivery. For virtual 
users postfix is using "virtual" by default. So I had to add deliver to 
postfix's master.cf and change the virtual_transport in main.cf.

After configuring logging for deliver I can now confirm that it is used. I was 
mistaken by thinking local delivery is the same as virtual delivery. I could 
have avoided this by reading the wiki more carefully. Sorry about that.

But I am afraid sieve is still not working. Mails are still delivered to INBOX.


Do the logs say anything about Sieve? You can enable mail_debug in your 
configuration to obtain more verbose log messages about what Sieve is doing.


Regards,

Stephan.


Re: [Dovecot] dovecot-sieve and LMT

2012-06-19 Thread Martin Weil

Am 19.06.2012 um 10:29 schrieb Stephan Bosch:

> Op 6/19/2012 10:17 AM, Martin Weil schreef:
>> Hi.
>> 
>> Thanks for your hints, I altered the file but sadly, there is no change in 
>> behavior. It's like sieve is not doing anything at all.
>> 
>> if header :contains ["subject"] ["Test"] {
>>   fileinto :create "Folder1";
>> } else {
>>   fileinto :create "Folder2";
>> }
>> 
>> The lda_mailbox_autocreate option seems to be a version 2.0 feature. I am 
>> using 1.2.9.
> 
> Do your logs mention anything about LDA and Sieve being invoked? This wiki 
> page shows a few hints on what this should look like and steps to be taken 
> when LDA and Sieve are not being invoked:
> 
> http://wiki2.dovecot.org/Pigeonhole/Sieve/Troubleshooting
> 
> Regards,
> 
> Stephan.

Indeed they did not. I incorrectly thought that a line in postfix's main.cf 
would change the delivery to deliver. That would have been true if I used local 
delivery. For virtual users postfix is using "virtual" by default. So I had to 
add deliver to postfix's master.cf and change the virtual_transport in main.cf.

After configuring logging for deliver I can now confirm that it is used. I was 
mistaken by thinking local delivery is the same as virtual delivery. I could 
have avoided this by reading the wiki more carefully. Sorry about that.

But I am afraid sieve is still not working. Mails are still delivered to INBOX.

Martin

Re: [Dovecot] dovecot-sieve and LMT

2012-06-19 Thread Stephan Bosch

Op 6/19/2012 10:17 AM, Martin Weil schreef:

Hi.

Thanks for your hints, I altered the file but sadly, there is no change in 
behavior. It's like sieve is not doing anything at all.

if header :contains ["subject"] ["Test"] {
   fileinto :create "Folder1";
} else {
   fileinto :create "Folder2";
}

The lda_mailbox_autocreate option seems to be a version 2.0 feature. I am using 
1.2.9.


Do your logs mention anything about LDA and Sieve being invoked? This 
wiki page shows a few hints on what this should look like and steps to 
be taken when LDA and Sieve are not being invoked:


http://wiki2.dovecot.org/Pigeonhole/Sieve/Troubleshooting

Regards,

Stephan.


Re: [Dovecot] dovecot-sieve and LMT

2012-06-19 Thread Martin Weil
Hi.

Thanks for your hints, I altered the file but sadly, there is no change in 
behavior. It's like sieve is not doing anything at all.

if header :contains ["subject"] ["Test"] {
  fileinto :create "Folder1";
} else {
  fileinto :create "Folder2";
}

The lda_mailbox_autocreate option seems to be a version 2.0 feature. I am using 
1.2.9.

Thanks
Martin


Am 19.06.2012 um 09:51 schrieb A.L.E.C:

> On 06/18/2012 07:44 PM, Martin Weil wrote:
>> require "fileinto";
>> if header :contains ["subject"] ["Test"] {
>>  fileinto ".Folder1";
>> } else {
>>  fileinto ".Folder2";
>> }
>> 
>> Of course Folder1 and Folder2 do exist. 
>> (/var/mail/vmail/domain.com/user/mail/.Folder1 and Folder2)
> 
> Don't add a dot on the beggining of the folder name in sieve scripts.
> Use fileinto :create "folder" or lda_mailbox_autocreate option to create
> non-existing folders.
> 
> -- 
> Aleksander 'A.L.E.C' Machniak
> LAN Management System Developer [http://lms.org.pl]
> Roundcube Webmail Developer  [http://roundcube.net]
> ---
> PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl



Re: [Dovecot] dovecot-sieve and LMT

2012-06-19 Thread A.L.E.C
On 06/18/2012 07:44 PM, Martin Weil wrote:
> require "fileinto";
> if header :contains ["subject"] ["Test"] {
>   fileinto ".Folder1";
> } else {
>   fileinto ".Folder2";
> }
> 
> Of course Folder1 and Folder2 do exist. 
> (/var/mail/vmail/domain.com/user/mail/.Folder1 and Folder2)

Don't add a dot on the beggining of the folder name in sieve scripts.
Use fileinto :create "folder" or lda_mailbox_autocreate option to create
non-existing folders.

-- 
Aleksander 'A.L.E.C' Machniak
LAN Management System Developer [http://lms.org.pl]
Roundcube Webmail Developer  [http://roundcube.net]
---
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl