Re: [Dovecot] Load Balancing and HA

2013-06-05 Thread Edwardo Garcia
We tried one time software solution, not very reliable under load, we move
to coyotepoint equalizer hardware load balancer, very good cost and
excellent reliable


On Wed, May 29, 2013 at 7:23 AM, Romer Ventura  wrote:

> Hello,
>
>
>
> I've been thinking about the best way to achieve load balancing and making
> my mail servers highly available. So far I believe I have 2 scenarios:
>
> Scenario1: This should allow any to lose any of the servers and clients
> still have access to their emails (although I am not sure how the indexes
> would react to this and sudden disconnection)
>
> -  2 Dovecot Proxy servers, using a virtual IP to where the clients
> will connect to from the WAN and LAN
>
> -  2 Dovecot+Postfix servers with local cache
>
> -  2 NFS servers and synced with dsync (mirror, 1 server writes to
> its own NFS and changes synced to the other via dsync)
>
>
>
> Scenario2: Pretty much as above on the back end. However, with this there
> is
> no way to load balance users.
>
> -  2 Dovecot+Postfix server with local cache
>
> -  2 NFS servers synced with dsync
>
> -  Make use of DNS MX record priority to provide access to
> secondary
> email server
>
>
>
>
>
> Anyone care to comment?
>
>
>
> Thanks.
>
>
> 
> 
> This document and attachments may contain technical data
> controlled under the U.S. International Traffic in Arms Regulations (ITAR)
> or the Export Administration Regulations (EAR) and may not be exported to a
> Foreign Person, either in the U.S. or abroad, without the proper
> authorization by the U.S. Department of State or Department of Commerce,
> whichever is applicable.
> CONFIDENTIALITY NOTE: This electronic transmission, including all
> attachments, is directed in confidence solely to the person(s) to whom it
> is addressed, or an authorized recipient, and may not otherwise be
> distributed, copied or disclosed. The contents of the transmission may also
> be subject to intellectual property rights and such rights are expressly
> claimed and are not waived. If you have received this transmission in
> error, please notify the sender immediately by return electronic
> transmission and then immediately delete this transmission, including all
> attachments, without copying, distributing or disclosing same.  The
> recipient should check this e-mail and any attachments for the presence of
> viruses. Houston Sigma Technologies L.P. accepts no liability for any
> damage caused by any virus transmitted by this e-mail.
>
>


Re: [Dovecot] Dovecot mysql replication

2013-06-05 Thread Edwardo Garcia
It not be because Timo not agree with thiz for switching, if one software
not do what you need, you go look for one that does as other says, my
manager would command that, I expect you manager also command you same.

I have mail from list member who advize me of  broken 1.2 version where
thiz work in fallover mode, I successful using thiz version now on two
server.

I know version old and unsupported, but working very nice for how we need,
no more timeout message or delays for user logins all week, I am very happy
now.



On Thu, May 30, 2013 at 9:01 PM, Charles Marcus
wrote:

> On 2013-05-30 2:59 AM, Nick Edwards  wrote:
>
>> nobody makes us dovecot true, but dovecot works fine and in perfect
>> harmony with postfix, except this one option. I remember the earlier thread
>> and have been waiting for this option, but now I see Timo has decided to
>> drop the idea after earlier saying it would be beneficial, and seems some
>> people have been waiting for long time for no reason, so maybe time to
>> consider all other options, including server software.
>>
>
> Oh, grow up.
>
> I can see if this was something that was super critical to a functioning -
> and I agree that it should be fixed to either work as expected (best), or
> no longer support the ability to add multiple hosts - but it isn't up to me
> or you.
>
> Just because 'some' people have been waiting for this feature, doesn't
> mean that it is important to everyone.
>
> Now, if you can provide evidence that a large percentage of people desire
> this feature and it is important enough to them that they might actually
> consider switching from dovecot to something else (but what choices do you
> have, really? I know I have no desire to switch back to courier-imap), then
> I think Timo may reconsider. In fact, he may already be doing so.
>
> But the bottom line is, there are other ways to achieve this feature, and
> I think it is plain silly and juvenile to threaten to switch from dovecot
> just because Timo doesn't agree with you.
>
> Oh - and of course, the very last point...
>
> This *is* open source software. I'd wager an entire months pay that if you
> coded up a solution and provided a working, properly coded patch (that
> isn't full of security holes and bad coding practices), Timo would
> accept/merge it.
>
> --
>
> Best regards,
>
> Charles
>
>
>


[Dovecot] Permissions for mail_temp_dir directory

2013-06-05 Thread Henrik Larsson
I recently upgraded from 2.1.16 to 2.2.2 and started to receive the 
following errors:
imap(hen...@example.com): Error: 
stat(/var/db/dovecot/dovecot.imap.mail.example.com.16128.3209d13f842955c2) 
failed: Permission denied
imap(hen...@example.com): Error: Temp file creation to 
/var/db/dovecot/dovecot.imap.mail.example.com.16128. failed: Permission 
denied
imap(hen...@example.com): Error: 
stat(/var/db/dovecot/dovecot.imap.mail.example.com.16501.0ddff1dc93cdbe6a) 
failed: Permission denied
imap(hen...@example.com): Error: Temp file creation to 
/var/db/dovecot/dovecot.imap.mail.example.com.16501. failed: Permission 
denied


I didn't have these before the upgrade. The current permissions for the 
/var/db/dovecot directory is root:wheel 755.


What would be the correct permissions for the mail_temp_dir directory?

doveconf -n output
--cut--
# 2.2.2: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 8.3-RELEASE-p3 amd64
auth_mechanisms = plain login digest-md5 cram-md5
first_valid_uid = 125
hostname = mail.example.com
listen = *
log_path = /var/log/dovecot
mail_plugins = zlib
mail_privileged_group = postfix
mail_temp_dir = /var/db/dovecot
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

namespace {
  inbox = yes
  location =
  prefix =
  separator = .
  type = private
}
namespace {
  hidden = yes
  inbox = no
  list = no
  location =
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  fts = squat
  fts_squat = partial=4 full=10
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
postmaster_address = postmas...@example.com
protocols = imap pop3 lmtp sieve
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener /home/mail/postfix/private/dovecot-auth {
group = postfix
mode = 0660
user = postfix
  }
}
service lmtp {
  executable = lmtp -L
  unix_listener /home/mail/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
  }
}
ssl_cert = 

Re: [Dovecot] Error: Threading lost Message ID

2013-06-05 Thread Oscar A. Jara

Thanks Luca. I will try with the current CentOS release.

El 05/06/2013 14:56, Luca Fornasari escribió:


On Wed, Jun 5, 2013 at 6:36 PM, Oscar A. Jara
wrote:


Sorry, the dovecot version is 1.2.16 release 1_114.el5. Thks. --- El
05/06/2013 01:22, Oscar A. Jara escribió: courier in a setup of 700
accounts aprox. Dovecot release running is


1.2.16 in a Linux CentOS 5.8.that CentOS wouldn't have release a
patched version of the package. Am I missing something here? Thanks
in advance!


Hi Oscar,

CentOS 5.8 it's quite outdated; they are at 6.4
I have to admit I'm not aware of what Dovecot version is shipped with
CentOS 6.4 but sure there is a more up to date Dovecot version.

Regards,
Luca

__ Information from ESET Mail Security, version of virus
signature database 8415 (20130605) __

The message was checked by ESET Mail Security.
http://www.eset.com [1]



Links:
--
[1] http://www.eset.com


__ Information from ESET Mail Security, version of virus signature 
database 8416 (20130605) __

The message was checked by ESET Mail Security.
http://www.eset.com




Re: [Dovecot] Crash dovecot 1.2.15

2013-06-05 Thread Benny Pedersen

ib skrev den 2013-06-05 10:38:

Jun 05 06:26:01 dovecot: Warning: SIGHUP received - reloading 
configuration

Jun 05 06:26:02 dovecot: Error: Raw backtrace: /usr/sbin/dovecot()
[0x41348a] -> /usr/sbin/dovecot() [0x413584] -> /usr/sbin/dovecot()
[0x40b290] -> /usr/sbin/dovecot() [0x412bf6] -> /usr/sbin/dovecot()
[0x405c9a] -> /usr/sbin/dovecot() [0x416f3d] -> /usr/sbin/dovecot()
[0x4163b8] -> /usr/sbin/dovecot() [0x40bb39] ->
/lib/libc.so.6(__libc_start_main+0xfd) [0x7f2bad861c8d] ->
/usr/sbin/dovecot() [0x403859]
Jun 05 07:58:09 dovecot: Info: Dovecot v1.2.15 starting up (core 
dumps disabled)


recompile dovecot, or update to later stable ?, 1.2.15 is not the 
latest in 1.x, and its more or less a flame war on dovecot maillist to 
keep 1.x running :(


as i read it you have upgraded gcc/glibc, if its gentoo/funtoo, 
revdep-rebuild will fix it


i have 1.2.16

--
senders that put my email into body content will deliver it to my own 
trashcan, so if you like to get reply, dont do it


Re: [Dovecot] Error: Threading lost Message ID

2013-06-05 Thread Luca Fornasari
On Wed, Jun 5, 2013 at 6:36 PM, Oscar A. Jara wrote:

> Sorry, the dovecot version is 1.2.16 release 1_114.el5. Thks.
>
> ---
>
> El 05/06/2013 01:22, Oscar A. Jara escribió:
>
> courier in a setup of 700 accounts aprox. Dovecot release running is
>> 1.2.16 in a Linux CentOS 5.8.that CentOS wouldn't have release a patched
>> version of the package.
>>
>> Am I missing something here? Thanks in advance!
>>
>
Hi Oscar,

CentOS 5.8 it's quite outdated; they are at 6.4
I have to admit I'm not aware of what Dovecot version is shipped with
CentOS 6.4 but sure there is a more up to date Dovecot version.

Regards,
Luca


Re: [Dovecot] dovecot and time

2013-06-05 Thread Rick Romero

 Quoting Rick Romero :


I found something interesting via strace.  lda is writing a timestamp
with utime before doign the fsync, but I'm really not a C guy, so I have
no idea why that's going on via procmail and not via commandline.  I
assume it's related to the choice of pread64 vs read.


Got it.
Working:
connect(6, {sa_family=AF_FILE, path="/var/run/dovecot/config"}, 110) = 0
NonWorking:
connect(6, {sa_family=AF_FILE, path="/var/run/dovecot/config"}, 110) = -1
EACCES (Permission denied)

/var/run/dovecot/config was owned by root.   I changed it to vpopmail
(which procmail runs under), and my timestamps are now correct.

Rick


Re: [Dovecot] dovecot and time

2013-06-05 Thread Rick Romero
I found something interesting via strace.  lda is writing a timestamp  
with utime before doign the fsync, but I'm really not a C guy, so I  
have no idea why that's going on via procmail and not via commandline.  
 I assume it's related to the choice of pread64 vs read.


when called from commandline (working):

read(0, "July 14-20, 2013\n10 courses. Bon"..., 4096) = 4096
read(0, "s bigger\nthan most realistic cyb"..., 4096) = 4096
read(0, "olina company in\nnumerous small,"..., 4096) = 4096
read(0, "on't have any way to tell you\". "..., 4096) = 4096
read(0, "rer. This version of Chrome addr"..., 4096) = 4096
read(0, "edu.\n\nDr. Johannes Ullrich is Ch"..., 4096) = 3164
read(0, "", 932)= 0
umask(0177) = 077
open("/usr/home/vpopmail/domains/havokmon.com/rick/Maildir/tmp/1370448645.M589211P14191.smtp101", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0777) =  
11

umask(077)  = 0177
open("/usr/home/vpopmail/domains/havokmon.com/rick/Maildir/dovecot.index.cache", O_RDWR|O_LARGEFILE) =  
12

fstat64(12, {st_mode=S_IFREG|0600, st_size=1568768, ...}) = 0
mmap2(NULL, 1568768, PROT_READ, MAP_SHARED, 12, 0) = 0xb7064000
fstat64(11, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
write(11, "Return-Path: open("/usr/home/vpopmail/domains/havokmon.com/rick/Maildir/tmp/1370449940.M313792P17436.smtp101", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0777) =  
11

umask(077)  = 0177
open("/usr/home/vpopmail/domains/havokmon.com/rick/Maildir/dovecot.index.cache", O_RDWR|O_LARGEFILE) =  
12

fstat64(12, {st_mode=S_IFREG|0600, st_size=1575936, ...}) = 0
mmap2(NULL, 1575936, PROT_READ, MAP_SHARED, 12, 0) = 0xb70b
fstat64(11, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
read(0, "", 1127)   = 0
write(11, "Return-Path: utime("/usr/home/vpopmail/domains/havokmon.com/rick/Maildir/tmp/1370449940.M313792P17436.smtp101", [2013/06/05-16:32:20, 2013/06/05-21:32:18]) =  
fsync(11)   = 0

_llseek(11, 0, [2911], SEEK_END)= 0
close(11)   = 0
time(NULL)  = 1370449940
umask(0177) = 077

Should I attach full traces?  They're 32k and 64k respectively.  Sorry  
about the lack of threading, I had my subscription off and didn't get  
a copy to reply to :/


Rick





Re: [Dovecot] Error: Threading lost Message ID

2013-06-05 Thread Oscar A. Jara

Sorry, the dovecot version is 1.2.16 release 1_114.el5. Thks.

---

El 05/06/2013 01:22, Oscar A. Jara escribió:


Hello everyone,

I have just put in production dovecot imap and pop3 in replacement of
courier in a setup of 700 accounts aprox. Dovecot release running is
1.2.16 in a Linux CentOS 5.8.

Seems like some accounts are having problems dealing with message
threading, as I read lines like this one in my logs:

IMAP(some_user): Error: Threading lost Message ID

...and some of those accounts cannot even list the emails. I
temporarily got rid of this problem deactivating threading on those
accounts but I would like to solve it.

I found a patch that seams to deal with this problem at
http://hg.dovecot.org/dovecot-1.2/rev/76023d59c3b2 [1] but it would be
weird
that CentOS wouldn't have release a patched version of the package.

Am I missing something here? Thanks in advance!

__ Information from ESET Mail Security, version of virus
signature database 8412 (20130604) __

The message was checked by ESET Mail Security.
http://www.eset.com [2]

__ Information from ESET Mail Security, version of virus
signature database 8412 (20130604) __

The message was checked by ESET Mail Security.
http://www.eset.com [2]



Links:
--
[1] http://hg.dovecot.org/dovecot-1.2/rev/76023d59c3b2
[2] http://www.eset.com


__ Information from ESET Mail Security, version of virus signature 
database 8415 (20130605) __

The message was checked by ESET Mail Security.
http://www.eset.com




Re: [Dovecot] 400 Bad Request response from pigeonhole.dovecot.org

2013-06-05 Thread ben

On Wed, 05 Jun 2013 16:21:42 +0200, Stephan Bosch 
wrote:
> On 6/5/2013 3:43 PM, b...@indietorrent.org wrote:
>> I'm attempting to access the Pigeonhole documentation but am receiving
a
>> 400 Bad Request response from http://pigeonhole.dovecot.org/ . Is this
>> expected? If so, has the documentation moved?
>>
>> Thanks for any help!
> 
> Thanks for the notification. The admin is looking into it.
> 
> Regards,
> 
> Stephan.

The domain is back online. Thanks for the prompt action!

-Ben



Re: [Dovecot] partionning users among backends

2013-06-05 Thread Urban Loesch

Hi,



Partitionning users on multiple backends would address my load problem.
I would have 50% of users on mail1.example.net and 50% on mail2.example.net,
but I need to correctly redirect users requests, as their mail user agents
only know about mail.example.net.

Is dovecot able to send request to the local machine or to proxy them
to another one, depending on information it would have on user mailboxes
location? If it does, do we have documentation on this?

>

Yes it does. You can store user backend location in mysql as we do that
since 2 years now without any problems.

You can start here:
http://wiki2.dovecot.org/PasswordDatabase/ExtraFields/Proxy

I prefer method nr. 1 "Forward the password to the remote server".

Regards
Urban









[Dovecot] partionning users among backends

2013-06-05 Thread Emmanuel Dreyfus
Hi

I face growing load on a mailserver, and I would like to spread the load
on multiple machines. I made a first attempt with dsync but got burnt with
issues with mbox, therefore now I am looking for another safer approach.

Partitionning users on multiple backends would address my load problem. 
I would have 50% of users on mail1.example.net and 50% on mail2.example.net,
but I need to correctly redirect users requests, as their mail user agents
only know about mail.example.net.

Is dovecot able to send request to the local machine or to proxy them 
to another one, depending on information it would have on user mailboxes
location? If it does, do we have documentation on this?

-- 
Emmanuel Dreyfus
m...@netbsd.org


Re: [Dovecot] Bad exit status from dsync

2013-06-05 Thread Timo Sirainen
On Mon, 2013-06-03 at 10:11 +0200, Jan-Frode Myklebust wrote:
> I just tried to migrate one of my users from maildir to mdbox using
> dsync. My conversion script is checking the dsync exit code to know if
> the conversion goes fine or not, and surprisingly dsync returned "0" at
> the same time as it gave the error:
> 
>   Error: Failed to sync mailbox .ta\ vare\ på ... 
>   (sorry, lost the rest of the error message)
> 
> Changing the folder name to mUTF7 manually made it work, but I didn't
> like that dsync returned success when it got this error. That breaks the
> failsafe logic in my conversion script.

It was a bit tricky to fix this. I added a kludge to v2.1 and a better
fix to v2.2:

http://hg.dovecot.org/dovecot-2.1/rev/a88aca17a92c
http://hg.dovecot.org/dovecot-2.2/rev/12a0c383703e




Re: [Dovecot] Load Balancing and HA

2013-06-05 Thread Romer Ventura
> On 31-05-2013 12:57, Patrick Westenberg wrote:
> > Romer Ventura schrieb:
> >
> >> Scenario1: This should allow any to lose any of the servers and
> >> clients still have access to their emails (although I am not sure how
> >> the indexes would react to this and sudden disconnection)
> >>
> >> -  2 Dovecot Proxy servers, using a virtual IP to where the
> >> clients
> >> will connect to from the WAN and LAN
> >>
> >> -  2 Dovecot+Postfix servers with local cache
> >
> > Your proxy won't reconnect a user to backend B if the backend A fails.
> 
> 
> But doesn't that depend on how the vitual IP is managed ie what kind of
> system is behind it?
> For example a simple heartbeat setup would correct this at the cost of one
> machine sitting idle.
> Other setups using load balancers can correct this.
> 
> There is a better solution using the Director service of Dovecot where users
> are assigned to one of several bacend machines and disconnected when idle.
> Even, there is a script that monitors the health of the Director backends and
> adjusts accordingly (which I haven't personally tried yet). See
> http://wiki2.dovecot.org/Director
> http://www.dovecot.org/list/dovecot/2010-August/051946.html

Well, I am successfully using Ucarp with apache and Mysql to handle the IP 
handover if a host is down. I also seem to remember reading that using dovecot 
proxy and deliver, it can send the user to a different backend if any of them 
are unreachable. If this is not possible, using keepalive/ucarp (since they are 
simpler than heartbeat) would solve this.

I try to stay away from clustering specially since XenServer cant do direct LUN 
to VM like VMWare can and to minimize the painful split-brain issues we would 
have to add a 3rd server for quorum... 

We don’t have a large user base, but being able to shutdown do maintenance on a 
server during business hours is a plus. We do have a lot of traffic for oure 
user base, we see around 200K emails per week.






This document and attachments may contain technical data 
controlled under the U.S. International Traffic in Arms Regulations (ITAR) or 
the Export Administration Regulations (EAR) and may not be exported to a 
Foreign Person, either in the U.S. or abroad, without the proper authorization 
by the U.S. Department of State or Department of Commerce, whichever is 
applicable.
CONFIDENTIALITY NOTE: This electronic transmission, including all attachments, 
is directed in confidence solely to the person(s) to whom it is addressed, or 
an authorized recipient, and may not otherwise be distributed, copied or 
disclosed. The contents of the transmission may also be subject to intellectual 
property rights and such rights are expressly claimed and are not waived. If 
you have received this transmission in error, please notify the sender 
immediately by return electronic transmission and then immediately delete this 
transmission, including all attachments, without copying, distributing or 
disclosing same.  The recipient should check this e-mail and any attachments 
for the presence of viruses. Houston Sigma Technologies L.P. accepts no 
liability for any damage caused by any virus transmitted by this e-mail.



Re: [Dovecot] 400 Bad Request response from pigeonhole.dovecot.org

2013-06-05 Thread Stephan Bosch

On 6/5/2013 3:43 PM, b...@indietorrent.org wrote:

I'm attempting to access the Pigeonhole documentation but am receiving a
400 Bad Request response from http://pigeonhole.dovecot.org/ . Is this
expected? If so, has the documentation moved?

Thanks for any help!


Thanks for the notification. The admin is looking into it.

Regards,

Stephan.


[Dovecot] Dovecot and time (again)

2013-06-05 Thread Rick Romero

I'm rehashing/reliving my issues from 2010:
http://www.dovecot.org/list/dovecot/2010-October/053528.html

In short, when calling deliver from vdelivermail (or procmail), and
delivering via NFS to Maildir, the timestamp on the file is GMT.  If
procmail or vdelivermail completely handle the email, the timestamp is CST.
The server is set to CST.

What's changed from the original issue? 
Previously was running dovecot 1.x on FreeBSD, now 2.1.7 on Debian 7.   I
know it's a few versions behind, but this is a deliver only server, and
ChangeLog doesn't show too many fixes for lda.
Of course, running the command from the command line works perfectly... So
where could my problem reside?
Two examples:

1st via Calling from procmail:
:0
* ? test -f /usr/lib/dovecot/dovecot-lda
{
:0w
|/usr/lib/dovecot/deliver -d $EXT@$HOST
}

-rw---    1 vpopmail  vchkpw  87196 Jun  5 13:43
1370439849.M812P29560.smtp101,S=87196,W=88094

2nd via Commandline:
#sudo -u vpopmail cat /tmp/testmail.txt | /usr/lib/dovecot/deliver -d
r...@havokmon.com

-rw---    1 vpopmail  vchkpw  27740 Jun  5 08:46
1370440001.M421646P29846.smtp101,S=27740,W=28243

I've thrown the TZ variable in the mix as well with no resolution
|/usr/bin/env -i TZ=CST /usr/lib/dovecot/deliver -d $EXT@$HOST
|/usr/bin/env -i TZ=America/Chicago /usr/lib/dovecot/deliver -d $EXT@$HOST

I've also set import_environment = TZ , but it doesn't seem to show in
dovecot -n ... 

Any other thoughts?

Side note - deliver behavior has changed since 1.x.  I used to be able to
specifiy the HOME directory, but now deliver requires the -d parameter, so
I've had to setup an Auth server where I didn't have to in the past.

Am I the only one who doesn't run my servers in GMT?  I seem to only find
my own posts when searching on this :)

Rick


[Dovecot] 400 Bad Request response from pigeonhole.dovecot.org

2013-06-05 Thread ben

I'm attempting to access the Pigeonhole documentation but am receiving a
400 Bad Request response from http://pigeonhole.dovecot.org/ . Is this
expected? If so, has the documentation moved?

Thanks for any help!

-Ben



[Dovecot] Director in v2.2.2

2013-06-05 Thread Joe Wong

Hi,

  I am going to try and study Dovecot with Director in v2.2.2, would like 
to confirm the Director bundled there is the latest version, as I saw


#define DIRECTOR_VERSION_NAME "director"
#define DIRECTOR_VERSION_MAJOR 1
#define DIRECTOR_VERSION_MINOR 3

in director.h

thanks,

- Joe



[Dovecot] Crash dovecot 1.2.15

2013-06-05 Thread ib
<>