Re: [Dovecot] Case-insensitive detail mailboxes?

2013-07-26 Thread Darac Marjal
On Thu, Jul 25, 2013 at 11:29:56AM -0500, /dev/rob0 wrote:
 We're using sieve with LMTP. We want to have lda_mailbox_autocreate 
 and lmtp_save_to_detail_mailbox. Is there a way to make the detail 
 case-insensitive? If so I have not found it yet.
 
 I suppose we could lowercase the input string for the SQL userdb 
 query, but that's not what is wanted. The idea being that if a user 
 makes a mailbox called Test is that user+t...@example.com and 
 user+t...@example.com should both go to that Test mailbox. If it 
 was lowercased, a mailbox called Test would be ignored and test 
 used.
 
 With autocreate, this could be a problem if mail is delivered to 
 autocreated case-sensitive mailboxes that the user won't see.
 
 Hmmm, maybe a global sieve script?

I use the following sieve snippet rather than
lmtp_save_to_detail_mailbox:

  if envelope :detail :regex to (.+) {
  set :upperfirst :lower detail ${1};
  fileinto :create Tagged/${detail};
  stop;
  }

So, if the detail portion of the TO address exists, set a variable
detail to be the first-letter-uppercased version of that portion (test
- Test, TEST - Test and so on) and file the message into Tagged/Test,
creating that if necessary.


signature.asc
Description: Digital signature


[Dovecot] Expunged message reappeared, giving a new UID

2013-07-26 Thread Simon Fraser

I am running dovecot 2.2.2 with tcp based replication, and experiencing
some duplicated emails. `doveconf -n` output is below.

I have narrowed it down to the following scenario:

An email arrives, and is successfully replicated to both nodes. It is in
INBOX/new/ at this point on both servers. 

Connect with a mail client, and delete the message - without delayed
expunge. So, for example, mutt (press 'd' then '$' to sync the mailbox),
or Evolution set to immediately delete.

The following log entry appears on the server the client is connected
to:

Jul 26 10:40:55 intmail3a dovecot: imap(srf):
Warning: /mail/spool/s/srf/mail/INBOX/dovecot-uidlist: Duplicate file
entry at line 5: 1374831638.M830754P11591.intmail3a,S=1289,W=1321 (uid
733481 - 733482) - retrying by re-reading from beginning
Jul 26 10:40:55 intmail3a dovecot: imap(srf): Warning:
Maildir /mail/spool/s/srf/mail/INBOX: Expunged message reappeared,
giving a new UID (old uid=733481,
file=1374831638.M830754P11591.intmail3a,S=1289,W=1321)

The email reappears in the mailbox, although this time it is in
INBOX/new on one node and INBOX/cur on the other. As best I can tell
it's always in 'new' on the server the client was connected to and in
'cur' on the other. 

If any other mailbox operation occurs before the delete (Marking the
message in question as 'read', receiving a new message into the mailbox
in a different lmtp session, marking as read or deleting  expunging
some other message) then this prevents the duplication from happening.

What can I do to prevent this happening? Is there a synchronisation
interval I can adjust, perhaps? Although the message does get
synchronised initially.

Thanks in advance,
Simon.


# 2.2.2: /mail/etc/dovecot/dovecot.conf
# OS: Linux 3.5.0-23-generic x86_64 Ubuntu 12.04.2 LTS
disable_plaintext_auth = no
doveadm_password = secret
first_valid_uid = 100
lda_mailbox_autocreate = yes
mail_gid = dovecot
mail_home = /mail/spool/%1n/%n
mail_location = maildir:~/mail:INBOX=~/mail/INBOX
mail_plugins = notify replication
mail_uid = 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 {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Sent Messages {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix =
  separator = .
}
passdb {
  args = /mail/etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  mail_replica = tcps:intmail3b:12345
  sieve_dir = ~/sieve
}
protocols = imap lmtp sieve
service aggregator {
  fifo_listener replication-notify-fifo {
mode = 0600
user = dovecot
  }
  unix_listener replication-notify {
mode = 0600
user = dovecot
  }
}
service config {
  unix_listener config {
user = dovecot
  }
}
service doveadm {
  inet_listener {
port = 12345
ssl = yes
  }
  user = dovecot
}
service replicator {
  process_min_avail = 1
}
ssl_cert = /mail/etc/certs/mail-cert.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = /mail/etc/certs/mail-key.pem
userdb {
  args = /mail/etc/dovecot/dovecot-ldap.userdb.conf.ext
  driver = ldap
}
protocol lmtp {
  mail_plugins = notify replication sieve
}
protocol lda {
  mail_plugins = notify replication sieve
}
protocol imap {
  mail_max_userip_connections = 30
}





-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 


[Dovecot] dovecot-lda not logging if dovecot runs under daemontools

2013-07-26 Thread Roberto Puzzanghera

Hello all,
I have dovecot running under daemontools and I can't see dovecot-lda in 
action when I read the logs.  I've set the logs to /dev/stderr because 
daemontools redirects /dev/stderr to /var/log/dovecot/current.
The dovecot server works fine and I know that dovecot-lda is actually 
doing the delivery, because the sieve facility is working as well. I can 
get lda log working -but only on syslog- if I override the log_path in 
this way:


protocol lda {
mail_plugins = $mail_plugins sieve
log_path =
}

I'm calling dovecot-lda in the usual qmail way. This is my 
.qmail-default:


|/var/qmail/bin/preline -f /usr/libexec/dovecot/deliver -d $EXT@$USER

As running dovecot under daemontools seems to be a common practice among 
qmail users, could any of you give me an hint on how dovecot should be 
configured to achieve the purpose?


Thanks in advance.
My doveconf follows

Roberto Puzzanghera


# dovecof -n

# 2.2.4: /etc/dovecot/dovecot/dovecot.conf
# OS: Linux 3.2.29-smp i686 Slackware 14.0
auth_default_realm = mydomain.net
auth_mechanisms = plain login
auth_socket_path = /var/run/dovecot/auth-userdb
auth_verbose = yes
default_login_user = vpopmail
disable_plaintext_auth = no
first_valid_gid = 89
first_valid_uid = 89
last_valid_gid = 89
last_valid_uid = 89
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
log_path = /dev/stderr
mail_access_groups = 89
mail_debug = yes
mail_gid = 89
mail_location = maildir:%h/Maildir
mail_plugins =  quota mail_log notify
mail_privileged_group = 89
mail_uid = 89
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 spamtest spamtestplus

namespace inbox {
inbox = yes
location =
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
auto = subscribe
special_use = \Junk
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix =
}
passdb {
args = /etc/dovecot/dovecot/conf.d/dovecot-sql.conf.ext
driver = sql
}
plugin {
autocreate = Sent
autocreate2 = Drafts
autocreate3 = Junk
autocreate4 = Trash
autosubscribe = Sent
autosubscribe2 = Drafts
autosubscribe3 = Junk
autosubscribe4 = Trash
mail_log_events = delete undelete expunge copy mailbox_delete 
mailbox_rename

mail_log_fields = uid box msgid size
quota = maildir:User quota
sieve = ~/sieve/dovecot.sieve
sieve_before = /etc/dovecot/sieve/
sieve_dir = ~/sieve
sieve_extensions = +spamtest +spamtestplus +relational 
+comparator-i;ascii-numeric

}
postmaster_address = postmaster@%d
protocols = imap pop3 sieve
sendmail_path = /var/qmail/bin/sendmail
service auth-worker {
user = $default_internal_user
}
service auth {
unix_listener auth-userdb {
group = vchkpw
mode = 0600
user = vpopmail
}
user = $default_internal_user
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
service_count = 1
vsz_limit = 64 M
}
ssl_cert = /etc/dovecot/ssl/certs/dovecot.pem
ssl_key = /etc/dovecot/ssl/private/dovecot.pem
userdb {
args = /etc/dovecot/dovecot/conf.d/dovecot-sql.conf.ext
driver = sql
}
verbose_ssl = yes
protocol lda {
mail_plugins =  quota mail_log notify sieve
}
protocol imap {
mail_plugins =  quota mail_log notify imap_quota
}
protocol pop3 {
mail_plugins =  quota mail_log notify
}


Re: [Dovecot] Duplicate Mails downloding issue

2013-07-26 Thread Kavish Karkera
Steffen , 

Cant understand what's happening here.

---
Jul 26 12:25:37 popserver dovecot: pop3(kavish.kark...@example.com): Error: 
Couldn't open INBOX: Timeout while waiting for lock

Jul 26 12:25:37 popserver dovecot: pop3(kavish.kark...@example.com): Couldn't 
open INBOX top=0/0, retr=0/0, del=0/0, size=0

Jul 26 12:39:02 popserver dovecot: imap-login: Login: 
user=kavish.kark...@example.com, method=PLAIN, rip=1.38.25.83, 
lip=121.241.242.35, mpid=27197, TLS, session=L9JM0WTiPgABJhlT

Jul 26 12:42:12 popserver dovecot: imap(kavish.kark...@example.com): Error: 
Timeout (180s) while waiting for lock for transaction log file 
/indexes//mail/v3store/example.com/kavish.kark...@example.com/.INBOX/dovecot.index.log

Jul 26 12:42:12 popserver dovecot: imap(kavish.kark...@example.com): Warning: 
Our dotlock file 
/indexes//mail/v3store/example.com/kavish.kark...@example.com/.INBOX/dovecot-uidlist.lock
 was modified (1374822548 vs 1374822714), assuming it wasn't overridden (kept 
it 180 secs)

Jul 26 12:42:12 popserver dovecot: imap(kavish.kark...@example.com): Connection 
closed bytes=122/1222

Jul 26 12:45:53 popserver dovecot: imap(kavish.kark...@example.com): Warning: 
Maildir: Scanning 
/mail/v3store/example.com/kavish.kark...@example.com/Maildir/new took 1543 
seconds (13 readdir()s, 13 rename()s to cur/, why=0x10)

Jul 26 12:49:11 popserver dovecot: imap-login: Login: 
user=kavish.kark...@example.com, method=PLAIN, rip=1.38.25.83, 
lip=121.241.242.35, mpid=26747, TLS, session=tqCL9WTiOgABJhlT

Jul 26 12:52:53 popserver dovecot: imap(kavish.kark...@example.com): Error: 
Timeout (180s) while waiting for lock for transaction log file 
/indexes//mail/v3store/example.com/kavish.kark...@example.com/.INBOX/dovecot.index.log

ul 26 12:52:53 popserver dovecot: imap(kavish.kark...@example.com): Warning: 
Our dotlock file 
/indexes//mail/v3store/example.com/kavish.kark...@example.com/.INBOX/dovecot-uidlist.lock
 was modified (1374823189 vs 1374823271), assuming it wasn't overridden (kept 
it 180 secs)

Jul 26 12:52:53 popserver dovecot: imap(kavish.kark...@example.com): Connection 
closed bytes=122/1341

Jul 26 12:52:58 popserver dovecot: imap(kavish.kark...@example.com): Warning: 
Maildir: Scanning 
/mail/v3store/example.com/kavish.kark...@example.com/Maildir/new took 425 
seconds (14 readdir()s, 14 rename()s to cur/, why=0x10)

Jul 26 12:53:18 popserver dovecot: imap(kavish.kark...@example.com): Warning: 
Maildir /mail/v3store/example.com/kavish.kark...@example.com/Maildir: 
Synchronization took 1988 seconds (0 new msgs, 0 flag change attempts, 0 
expunge attempts)

Jul 26 12:53:18 popserver dovecot: imap(kavish.kark...@example.com): Warning: 
Transaction log file 
/indexes//mail/v3store/example.com/kavish.kark...@example.com/.INBOX/dovecot.index.log
 was locked for 1988 seconds

Jul 26 12:53:18 popserver dovecot: imap(kavish.kark...@example.com): Warning: 
Our dotlock file 
/indexes//mail/v3store/example.com/kavish.kark...@example.com/.INBOX/dovecot-uidlist.lock
 was modified (1374821406 vs 1374823373), assuming it wasn't overridden (kept 
it 1988 secs)

-

AND MAILS HAVE DOWNLOADED AGAIN. 

it wouls be helpfull if you eloborate thsi logs in more detail. so we coluld 
resolve this ongoing issue.


We have 3 POP/IMAP Servers, running as load balancers through DNS round robin.


Dovecot version server 1 = 2.1.12
Dovecot version server 2 = 2.1.15
Dovecot version server 3 = 2.1.13

Mails and Indexes are stored over NFS  and we do have these setting enabled 


mail_nfs_storage = yes
# Mail index files also exist in NFS. Setting this to yes requires
# mmap_disable=yes and fsync_disable=no.
mail_nfs_index = yes



Regards,
Kavish Karkera




 From: Kavish Karkera kavish.kark...@yahoo.com
To: dovecot@dovecot.org dovecot@dovecot.org 
Sent: Thursday, 25 July 2013 9:18 PM
Subject: Re: [Dovecot] Duplicate Mails downloding issue
 


Got it ...Thanks a ton Steffen. :)


Regards,
Kavish Karkera



 From: Steffen Kaiser skdove...@smail.inf.fh-brs.de
To: Kavish Karkera kavish.kark...@yahoo.com 
Cc: dovecot@dovecot.org dovecot@dovecot.org 
Sent: Thursday, 25 July 2013 8:03 PM
Subject: Re: [Dovecot] Duplicate Mails downloding issue
 

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 25 Jul 2013, Kavish Karkera wrote:

 Thanks Steffen for the valuable knowledge.
 Need to know futher that, how could this lead to mails to get re-downloaded. 
 ??

Because Dovecot detects that the UID list is erroreous and therefore 
rebuilts it. To prevent data loss, either the complete list of messages or 
just the conflicting ones [the messages that had been delivered in 
parallel and 

Re: [Dovecot] Duplicate Mails downloding issue

2013-07-26 Thread Charles Marcus

On 2013-07-26 8:28 AM, Kavish Karkera kavish.kark...@yahoo.com wrote:

We have 3 POP/IMAP Servers, running as load balancers through DNS round robin.


Dovecot version server 1 = 2.1.12
Dovecot version server 2 = 2.1.15
Dovecot version server 3 = 2.1.13

Mails and Indexes are stored over NFS  and we do have these setting enabled


mail_nfs_storage = yes
# Mail index files also exist in NFS. Setting this to yes requires
# mmap_disable=yes and fsync_disable=no.
mail_nfs_index = yes


There';s your problem.

You need to implement the Dovecot Director, which was created 
specifically to address this kind of issue...


http://wiki2.dovecot.org/Director

--

Best regards,

Charles




Re: [Dovecot] Duplicate Mails downloding issue

2013-07-26 Thread Kavish Karkera
Yes, Thanks Charles, 

Working with Director is in process, we will soon implement this, I hope it 
would help to solve this ongoing  issue.

But, i want to  know the cause . why is it happening 

Regards,
Kavish Karkera





 From: Charles Marcus cmar...@media-brokers.com
To: dovecot@dovecot.org 
Sent: Friday, 26 July 2013 6:38 PM
Subject: Re: [Dovecot] Duplicate Mails downloding issue
 

On 2013-07-26 8:28 AM, Kavish Karkera kavish.kark...@yahoo.com wrote:
 We have 3 POP/IMAP Servers, running as load balancers through DNS round robin.


 Dovecot version server 1 = 2.1.12
 Dovecot version server 2 = 2.1.15
 Dovecot version server 3 = 2.1.13

 Mails and Indexes are stored over NFS  and we do have these setting enabled


 mail_nfs_storage = yes
 # Mail index files also exist in NFS. Setting this to yes requires
 # mmap_disable=yes and fsync_disable=no.
 mail_nfs_index = yes

There';s your problem.

You need to implement the Dovecot Director, which was created 
specifically to address this kind of issue...

http://wiki2.dovecot.org/Director

-- 

Best regards,

Charles

Re: [Dovecot] Duplicate Mails downloding issue

2013-07-26 Thread Charles Marcus

On 2013-07-26 9:22 AM, Kavish Karkera kavish.kark...@yahoo.com wrote:

But, i want to  know the cause . why is it happening


Thought it was obvious... it is caused by the inherent problems with NFS 
file lock contention when accessed by multiple systems.


Again, this is *why* the Director was written.

--

Best regards,

Charles




Re: [Dovecot] Duplicate Mails downloding issue

2013-07-26 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 26 Jul 2013, Kavish Karkera wrote:


Jul 26 12:25:37 popserver dovecot: pop3(kavish.kark...@example.com): Error: 
Couldn't open INBOX: Timeout while waiting for lock
Jul 26 12:42:12 popserver dovecot: imap(kavish.kark...@example.com): Error: 
Timeout (180s) while waiting for lock for transaction log file 
/indexes//mail/v3store/example.com/kavish.kark...@example.com/.INBOX/dovecot.index.log

it wouls be helpfull if you eloborate thsi logs in more detail. so we coluld 
resolve this ongoing issue.

We have 3 POP/IMAP Servers, running as load balancers through DNS round robin.

Dovecot version server 1 = 2.1.12
Dovecot version server 2 = 2.1.15
Dovecot version server 3 = 2.1.13

Mails and Indexes are stored over NFS  and we do have these setting enabled

mail_nfs_storage = yes
# Mail index files also exist in NFS. Setting this to yes requires
# mmap_disable=yes and fsync_disable=no.
mail_nfs_index = yes


you have three servers, into which the same user logs in simultaneously, 
but they share the same storage area.


Say, kavish.kark...@example.com logs into server2 with IMAP and keeps the 
mailbox locked, because it IDLEs there. Now kavish.kark...@example.com 
logs into server1 and wants to access INBOX a second time in parallel to 
server2, which has the lock still. Because both servers do not 
communicating with each other, server2 do not give up the lock, in order 
to let server1 proceed.


If kavish.kark...@example.com would only log into server2 (or server1, it 
does not matter which server, as long as kavish.kark...@example.com do not 
log into two servers the same time), Dovecot would handle it. But because 
you use DNS round robin as load balancer, you cannot ensure this.


- -- 
Steffen Kaiser

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

iQEVAwUBUfJ/m13r2wJMiz2NAQIWzAf7Bjyx8WarthCZLeSmLb1qGOxCrqmtzlmU
qrq2b3+ccpo3/0H5czgfRhX4+bedzV+M0DPH9KzyOtwD7AZrQ8EdarrmG2g8vzZZ
GP5vw+6NTZS/PCR+kj2wGgcF0qyPgyrcGp3cmUbCENwujAFwHXo2N+NRrqqEXuR1
l7zVVR7vWp3afQRtNBgyxeFeWI+Zd/MNKuEv6PoqQvfWu4y0KXl03aiImbrAx3eR
ZKvpN26rQvRE0P5AIyoGy2n6xuh7V+itZf1UlydONVEE4nC1LFvM6eD9n3bPp3Dc
JQmNvefv0OUVaNWxBSpafSN4uk4whZ+zwDNOyzhnDTO09Rdw+4rotw==
=vHAq
-END PGP SIGNATURE-

Re: [Dovecot] Fw: POP3 issues

2013-07-26 Thread Thomas I Higgins
Nevermind - Due to your response, I was able to get the admin to agree to
upgrade the version to a 2.x version.  If the problem persists I will open
a new thread.  Thanks for reviewing.

Re: [Dovecot] Expunged message reappeared, giving a new UID

2013-07-26 Thread Simon Fraser

I've just converted the mailboxes to mdbox, so mail_location now looks
like this:

mail_location = mdbox:~/mail

The log entry about messages reappearing no longer happens, but the
symptoms are the same - if I delete a message, it instantly reappears.

Simon.


On Fri, 2013-07-26 at 11:28 +0100, Simon Fraser wrote:
 I am running dovecot 2.2.2 with tcp based replication, and experiencing
 some duplicated emails. `doveconf -n` output is below.
 
 I have narrowed it down to the following scenario:
 
 An email arrives, and is successfully replicated to both nodes. It is in
 INBOX/new/ at this point on both servers. 
 
 Connect with a mail client, and delete the message - without delayed
 expunge. So, for example, mutt (press 'd' then '$' to sync the mailbox),
 or Evolution set to immediately delete.
 
 The following log entry appears on the server the client is connected
 to:
 
 Jul 26 10:40:55 intmail3a dovecot: imap(srf):
 Warning: /mail/spool/s/srf/mail/INBOX/dovecot-uidlist: Duplicate file
 entry at line 5: 1374831638.M830754P11591.intmail3a,S=1289,W=1321 (uid
 733481 - 733482) - retrying by re-reading from beginning
 Jul 26 10:40:55 intmail3a dovecot: imap(srf): Warning:
 Maildir /mail/spool/s/srf/mail/INBOX: Expunged message reappeared,
 giving a new UID (old uid=733481,
 file=1374831638.M830754P11591.intmail3a,S=1289,W=1321)
 
 The email reappears in the mailbox, although this time it is in
 INBOX/new on one node and INBOX/cur on the other. As best I can tell
 it's always in 'new' on the server the client was connected to and in
 'cur' on the other. 
 
 If any other mailbox operation occurs before the delete (Marking the
 message in question as 'read', receiving a new message into the mailbox
 in a different lmtp session, marking as read or deleting  expunging
 some other message) then this prevents the duplication from happening.
 
 What can I do to prevent this happening? Is there a synchronisation
 interval I can adjust, perhaps? Although the message does get
 synchronised initially.
 
 Thanks in advance,
 Simon.
 
 
 # 2.2.2: /mail/etc/dovecot/dovecot.conf
 # OS: Linux 3.5.0-23-generic x86_64 Ubuntu 12.04.2 LTS
 disable_plaintext_auth = no
 doveadm_password = secret
 first_valid_uid = 100
 lda_mailbox_autocreate = yes
 mail_gid = dovecot
 mail_home = /mail/spool/%1n/%n
 mail_location = maildir:~/mail:INBOX=~/mail/INBOX
 mail_plugins = notify replication
 mail_uid = 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 {
   inbox = yes
   location =
   mailbox Drafts {
 special_use = \Drafts
   }
   mailbox Junk {
 special_use = \Junk
   }
   mailbox Sent {
 special_use = \Sent
   }
   mailbox Sent Messages {
 special_use = \Sent
   }
   mailbox Trash {
 special_use = \Trash
   }
   prefix =
   separator = .
 }
 passdb {
   args = /mail/etc/dovecot/dovecot-ldap.conf.ext
   driver = ldap
 }
 plugin {
   mail_replica = tcps:intmail3b:12345
   sieve_dir = ~/sieve
 }
 protocols = imap lmtp sieve
 service aggregator {
   fifo_listener replication-notify-fifo {
 mode = 0600
 user = dovecot
   }
   unix_listener replication-notify {
 mode = 0600
 user = dovecot
   }
 }
 service config {
   unix_listener config {
 user = dovecot
   }
 }
 service doveadm {
   inet_listener {
 port = 12345
 ssl = yes
   }
   user = dovecot
 }
 service replicator {
   process_min_avail = 1
 }
 ssl_cert = /mail/etc/certs/mail-cert.pem
 ssl_client_ca_dir = /etc/ssl/certs
 ssl_key = /mail/etc/certs/mail-key.pem
 userdb {
   args = /mail/etc/dovecot/dovecot-ldap.userdb.conf.ext
   driver = ldap
 }
 protocol lmtp {
   mail_plugins = notify replication sieve
 }
 protocol lda {
   mail_plugins = notify replication sieve
 }
 protocol imap {
   mail_max_userip_connections = 30
 }
 
 
 
 
 





-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 


Re: [Dovecot] Expunged message reappeared, giving a new UID

2013-07-26 Thread Reindl Harald


Am 26.07.2013 17:41, schrieb Simon Fraser:
 I've just converted the mailboxes to mdbox, so mail_location now looks
 like this:
 
 mail_location = mdbox:~/mail
 
 The log entry about messages reappearing no longer happens, but the
 symptoms are the same - if I delete a message, it instantly reappears

look in the thread Duplicate Mails downloding issue

since you said I am running dovecot 2.2.2 with tcp based replication
it sounds like the same problem - hint: Dovecot Director



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Expunged message reappeared, giving a new UID

2013-07-26 Thread Simon Fraser
On Fri, 2013-07-26 at 17:47 +0200, Reindl Harald wrote:
 
 Am 26.07.2013 17:41, schrieb Simon Fraser:
  I've just converted the mailboxes to mdbox, so mail_location now looks
  like this:
  
  mail_location = mdbox:~/mail
  
  The log entry about messages reappearing no longer happens, but the
  symptoms are the same - if I delete a message, it instantly reappears
 
 look in the thread Duplicate Mails downloding issue
 
 since you said I am running dovecot 2.2.2 with tcp based replication
 it sounds like the same problem - hint: Dovecot Director
 

I've read that thread. I'm not seeing any lock file errors, I'm not
running over NFS but rather using dovecot's own replication for the mail
store, and I'm not using pop3. I'm also not seeing the mails
_downloaded_ again but rather reappear on the server after they have
been removed: I can watch the message disappear from one server and then
be replaced.

I've looked at the documentation for Director and while it looks nice, I
don't see how it relates to my problem, as it seems to be for
shared-storage deployments. I have tested this with a mail client that's
connecting to only one node - this is a test service, and so that one
imap connection is the only client. 

Simon.



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 


Re: [Dovecot] Expunged message reappeared, giving a new UID

2013-07-26 Thread Daniel Parthey
Hi Simon,

Version 2.2.2 is not current any more. I would try to update to the latest 
stable version 2.2.4 first, since some dsync bugs have been fixed between 2.2.2 
and 2.2.4:

http://www.dovecot.org/doc/NEWS-2.2

Regards
Daniel

[Dovecot] Namespace, Sieve and upgrading to dovecot 2.0 -- no folder INBOX/

2013-07-26 Thread Ben
I just upgraded from debian squeeze-wheezy. This meant upgrading from 
dovecot 1.2 to 2.1.7 and upgrading to Pigdeonhole sieve. I have dovecot 
configured to use sieve and virtual users (I'll post config below)


Now any message that come in get filtered by sieve, but any messages 
that don't hit any filters gives the error (in the sieve log):
 msgid=x...@xxx.com: failed to store into mailbox 'INBOX/': Invalid 
mailbox name


As far as I can tell, Pidgeonhole has hard-coded to the behavior of 
'keep' (that is unfiltered emails) to be:

fileinto INBOX/

However, in my setup INBOX/ is not a valid folder. INBOX is. Is 
there a way to get pidgeonhole sieve to treat 'keep' as fileinto 
INBOX? Or do I need to reconfigure my dovecot namespaces? I tried 
playing with them, but everything works right now (sharing, etc) and 
when I changed my prefix on the inbox, etc, it did weird things 
(INBOX.INBOX.FOLDER) instead of (INBOX.Folder).


Suggestions?

Here is, I believe the relevant config info:

dovecot.conf:

namespace {
  inbox = yes
  location =
  prefix =
  separator = /
  type = private
}
namespace {
  list = children
  location = maildir:/Mail/Users/%%n/:INDEX=/Mail/Users/%u/shared/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}

Thanks,

Ben


Re: [Dovecot] Namespace, Sieve and upgrading to dovecot 2.0 -- no folder INBOX/

2013-07-26 Thread Alberto Cabello Sanchez
 Now any message that come in get filtered by sieve, but any messages
 that don't hit any filters gives the error (in the sieve log):
   msgid=x...@xxx.com: failed to store into mailbox 'INBOX/': Invalid
 mailbox name

 As far as I can tell, Pidgeonhole has hard-coded to the behavior of
 'keep' (that is unfiltered emails) to be:
  fileinto INBOX/

Does sieve-filter -m switch help?



Re: [Dovecot] dbus support in dovecot?

2013-07-26 Thread Stan Hoeppner
On 7/25/2013 10:25 PM, Gene Heskett wrote:
 On Thursday 25 July 2013 22:45:04 Stan Hoeppner did opine:
 
 On 7/25/2013 2:45 PM, Gene Heskett wrote:
 However, I would really like to start with some in depth docs, docs I
 am not having a lot of luck finding.  But I am not, as you can see,
 too bashful to go ask the source. ;)

 The main problem you're facing right now is that you don't really yet
 grasp what IMAP is all about.
 
 Is wiki2 the sum total of the docs for this?  If it is the definitive 
 manual, great.

AFAIK the wiki documentation isn't complete, but should have
everything needed to get a new Dovecot server up and running.  What it
won't have is anything remotely related to mail file import/migration
from a workstation/MUA setup.  Dovecot is server application.  Any
migration docs are geared toward migrating existing mail from other IMAP
server platforms, such as Courier or UW-IMAP, etc.  It is definitely NOT
aimed at the desktop user space, i.e. it's not meant to run concurrently
on a *nix PC that is used for desktop GUI applications.

It surely can as it is just another *nix app, but as with any server app
one will rely on to be up 100% you really want a dedicated box, UPS, the
whole 9 yards.  For a SOHO environment with few users it doesn't need to
be an expensive hulk of a server, just reliable.  The cheapest new PCs
usually have a dual/quad core CPU, 4GB RAM, 1TB HD, and ethernet, and
this would be overkill performance wise.  Get a little 500 KVA APC UPS
with data cable and setup apcupsd to do auto shutdown when the battery
runs low during an outage.

 In a nutshell, once you install Dovecot,
 or any IMAP server, it becomes the single point of control and access to
 all of your mail.  You install an IMAP MUA on each client PC, point
 these at Dovecot, and you're basically done.  They can all be logged
 into the same account simultaneously, and any new mail will show up in
 the INBOX on all clients simultaneously, or nearly so.
 
 This restriction to the INBOX bothers me because the present kmail setup 
 I'm using has about 55 individual folders such that messages from a mailing 
 list are sorted by kmail and placed in the appropriate folder/directory.  
 That includes this mailing list.

I've never used kmail.  Does it have an IMAP connector?  If so, once you
have the Dovecot server up and working and kmail configured and working
with IMAP, you'd simply copy the emails in the current folders over to
newly created folders of the same name.  AFAIK you can't just do any
drag 'n drop existing mail folders.

 You typically don't need to configure the clients other than telling
 them where the server is and plugging in login credentials.  The rest is
 pretty much automatic.  Any folders the user has access to should
 display automatically without needing to manually subscribe.  At least
 this is how it works with Thunderbird.
...
 But back to t-bird, can it be made to look the same in terms of folders vs 
 folder contents, with say 3 local copies, one on this box, and one each on 
 the boxes running the cnc machines?  All accomplished hopefully by getting 
 one copy working, and copying its configs to the other 2, or maybe 3 
 machines.  I use the lappy in the shop to ssh into the cnc boxes so I can 
 sit in relative comfort when making more copies of some part. 90% of the 
 stuff I do is one off's, but I might need a 12 pack of a custom bolt or ??

If you install default Tbird on each machine, all that's required
afterward is to create an account profile, input the IMAP server IP
address, SMTP relay server address, and enter the username/pwd when
prompted.  This assumes the user already exists on the Dovecot server.
At that point the view and folder list should be identical on each Tbird.

 In other words, with an IMAP server, you simply ditch most of your old
 way of doing things with your MUAs.  The only program that will
 write/read your mail files will be the IMAP server, Dovecot in this
 case.  All the clients must access mail through an IMAP connection.
 
 Where does dovecot actually keep the email corpus?

If you're referring to the user mail files, they are stored in the
location you specify in dovecot.conf.  This will be a local filesystem
directory on the server box.  All mail for all users will be stored
here, once.  You will no longer store any mail files on the client PCs.
 By having all the mail on the server you can access it from any
computer running an MUA.  And in fact from anywhere in the world with an
internet connection, assuming you configure your local internet router
properly.  You can also install an webmail server that connects to
Dovecot via IMAP.  Then you can access the emails from any device with a
web browser and net connection.  I use Roundcube for this.  Other
options are SoGo, Squirrelmail, etc.

In fact if you install such a webmail server alongside Dovecot, you
don't need to have an MUA on any client PC.  Just Firefox, or your
favorite browser.

 I am