R: Re: Duplicate messages

2014-12-16 Thread absolutely_f...@libero.it
Hi Miloš,
unfortunately, I have no X-UIDL header in my mailboxes.
Thank you


>Messaggio originale
>Da: ghostlovescor...@gmail.com
>Data: 13/12/2014 10.25
>A: "absolutely_f...@libero.it", 
>Ogg: Re: Duplicate messages
>
>-BEGIN PGP SIGNED MESSAGE-
>Hash: SHA256
>
>On 12/12/14 09:39, absolutely_f...@libero.it wrote:
>> Hi, I just moved mail spool to a different network storage. Now,
>> several users are complaining about duplicate message that are
>> fetched by their clients (Outlook, Microsoft Outlook). What is the
>> reason?
>> 
>> This is my conf:
>> 
>> # dovecot -n # 2.0.9: /etc/dovecot/dovecot.conf # OS: Linux
>> 2.6.32-71.el6.x86_64 x86_64 CentOS release 6.6 (Final) 
>> auth_mechanisms = plain login digest-md5 cram-md5 
>> disable_plaintext_auth = no first_valid_gid = 89 first_valid_uid =
>> 89 mail_gid = 89 mail_location = maildir:/coraid-s2l2/domains 
>> 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 imapflags notify mbox_write_locks = fcntl 
>> namespace { inbox = yes location = prefix = INBOX. separator = . 
>> type = private } passdb { args = /etc/dovecot/dovecot-sql.conf.ext 
>> driver = sql } passdb { args =
>> /etc/dovecot/dovecot-sql-crypt.conf.ext driver = sql } plugin { 
>> sieve = ~/.dovecot.sieve sieve_dir = ~/sieve sieve_extensions =
>> +notify +imapflags sieve_max_script_size = 1M } protocols = imap
>> pop3 lmtp sieve ssl_cert = > ssl_key = > /etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lmtp { 
>> mail_plugins = } protocol lda { mail_plugins = }
>> 
>Hello,
>
>Please check if those users have X-UIDL header in their emails. If do,
>remove header. That should solve the problem.
>
>Regards,
>Miloš
>-BEGIN PGP SIGNATURE-
>Version: GnuPG v2
>
>iQEcBAEBCAAGBQJUjAYJAAoJEBkMFHhDgrs5LgAH/2uTkvRPLr0LEme+srIk72cw
>F5yYiH17K7vaPERTPrmKWZGtpezylWK/7YevjCE44+60L8JZqmIVQ99JRZcvMfSh
>KP5qu7A41EVXSsAiB75NfTcUEMAYYRSZHpu2rl9lFnGA+5zH9DCqSQrzyatF/DAl
>pdmLHVDH4Cj9rNAVdEl5u1e3rC0VCV3xXGgIBkIR9wdIhtrzW7Bdt2Ove08ct93t
>Uqj7mhtTxxBoUU2fDzkLZRdCSQpf8HiaKcgWQPNIcRGM0i+hbw42Sgwyl0XFiXfx
>f9YxPcT8OahF1+lCnVvQXhR2TiLTbBn+nFN7yWkrNkPlqs8lfIh1t9JOzldrO48=
>=YCbh
>-END PGP SIGNATURE-
>


Dovecot lda Panic: file mail-transaction-log.c

2014-12-16 Thread Alessio Cecchi

Hi,

I'm running:

# 2.2.15: /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.6 (3e924b1b6c5c+)
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.10

with mailbox in Maildir format and LDA to delivery new email (+ sieve 
for filter)


on the server there is an email account that is used for "archive", it 
only receives messages and nobody connects to it. Today dovecot was 
unable to delibery, via LDA, email in the Maildir and in the log i found 
the following error.


Login via POP or IMAP works fine but is impossibile to delivery new 
email (the INBOX have about 135000 emails). I have delete all files in 
Maildir except cur/ new/ tmp/ and rebuild the dovecot cache, but the 
error is the same.


Could be a sieve problem? In the user's home there was a file called 
.dovecot.lda-dupes.lock


What is wrong?

Dec 16 06:53:25 mx02eeh dovecot: lda(u...@domain.com): sieve: 
msgid=, from=s...@pippo.com, 
subject="": stored mail into mailbox 'INBOX'


Dec 16 06:53:25 mx02eeh dovecot: lda(u...@domain.com): Panic: file 
mail-transaction-log.c: line 271 (mail_transaction_log_rotate): 
assertion failed:

(file->locked)

Dec 16 06:53:25 mx02eeh dovecot: lda(u...@domain.com): Error: Raw 
backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x75e1a) [0x7f8f2aca4e1a] 
-> /usr/lib/
dovecot/libdovecot.so.0(i_syslog_fatal_handler+0x33) [0x7f8f2aca4ee3] -> 
/usr/lib/dovecot/libdovecot.so.0(i_error+0) [0x7f8f2ac562bf] -> 
/usr/lib/dovecot/lib
dovecot-storage.so.0(+0xd6fc5) [0x7f8f2afe5fc5] -> 
/usr/lib/dovecot/libdovecot-storage.so.0(mail_index_write+0x1f5) 
[0x7f8f2afe4e15] -> /usr/lib/dovecot/libd
ovecot-storage.so.0(mail_index_sync_commit+0x2c4) [0x7f8f2afdc854] -> 
/usr/lib/dovecot/libdovecot-storage.so.0(+0x55b08) [0x7f8f2af64b08] -> 
/usr/lib/dovecot
/libdovecot-storage.so.0(maildir_transaction_save_commit_pre+0x40f) 
[0x7f8f2af5f43f] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0xb7038) 
[0x7f8f2afc6038] -
> 
/usr/lib/dovecot/libdovecot-storage.so.0(mail_index_transaction_commit_full+0x9f) 
[0x7f8f2afd3c6f] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_transa
ction_commit+0xa5) [0x7f8f2afc5bf5] -> 
/usr/lib/dovecot/lib10_quota_plugin.so(+0xbd82) [0x7f8f29c7ed82] -> 
/usr/lib/dovecot/libdovecot-storage.so.0(+0x99ca6)
 [0x7f8f2afa8ca6] -> 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_transaction_commit_get_changes+0x4f) 
[0x7f8f2af91b9f] -> /usr/lib/dovecot/libdovecot-st
orage.so.0(mailbox_transaction_commit+0x16) [0x7f8f2af91c56] -> 
/usr/lib/dovecot/libdovecot-sieve.so.0(+0x44047) [0x7f8f29616047] -> 
/usr/lib/dovecot/libdove
cot-sieve.so.0(+0x3a829) [0x7f8f2960c829] -> 
/usr/lib/dovecot/libdovecot-sieve.so.0(sieve_result_execute+0x1e2) 
[0x7f8f2960cb72] -> /usr/lib/dovecot/libdovec
ot-sieve.so.0(sieve_execute+0x56) [0x7f8f2961d936] -> 
/usr/lib/dovecot/lib90_sieve_plugin.so(+0x2f2e) [0x7f8f2986df2e] -> 
/usr/lib/dovecot/libdovecot-lda.so.
0(mail_deliver+0x45) [0x7f8f2b2313c5] -> 
/usr/libexec/dovecot/dovecot-lda(main+0x6ac) [0x402eec] -> 
/lib/libc.so.6(__libc_start_main+0xfd) [0x7f8f2a8ebcad] -

> /usr/libexec/dovecot/dovecot-lda() [0x4025c9]

My dovecot config:

# 2.2.15: /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.6 (3e924b1b6c5c+)
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.10
auth_cache_negative_ttl = 10 mins
auth_cache_size = 10 M
auth_cache_ttl = 20 mins
auth_worker_max_count = 50
deliver_log_format = msgid=%m, from=%f, subject="%s": %$
dict {
  acl = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  expire = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
first_valid_gid = 89
first_valid_uid = 89
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags
imap_idle_notify_interval = 29 mins
imap_logout_format = in=%i out=%o session=<%{session}>
last_valid_gid = 89
last_valid_uid = 89
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
listen = *
mail_fsync = always
mail_location = maildir:~/Maildir
mail_plugins = quota acl expire
mailbox_list_index = yes
maildir_very_dirty_syncs = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope 
encoded-character subaddress comparator-i;ascii-numeric relational regex 
imap4flags copy include variables body enotify environment mailbox date 
ihave duplicate vnd.dovecot.duplicate

mmap_disable = yes
namespace {
  list = children
  location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  prefix = shared/%%n/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Spam {
auto = subscribe
special_use = \Junk
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix =
  separator = /
}
passdb {
  args = /etc/dovecot/dovecot-deny-sql.conf.ext
  den

LDAP: Connection appears to be hanging, reconnecting

2014-12-16 Thread Matthias Egger
Hello List

I have a strange problem here which i try to analyse, but i'm stuck.
Maybe someone has a hint?

What happened:
A few weeks ago one of the LDAPS Servers which is not maintained by us
has crashed. From that moment on, users could still login to check their
emails, but they were not able to send any email through postfix (which
uses smtpd_sasl_type = dovecot)

What i do not understand, is why did dovecot not switch to the second
configured LDAPS Server? It looks like it retried for ever to reconnect
to the crashed LDAP Server.

From the moment of the crash we see a lot of Errors like these in our
logfiles:

Nov 30 16:51:53 servername dovecot: [ID 583609 mail.error] auth: Error:
ldap(userone,USERS_IP1,): Connection appears to be
hanging, reconnecting

AND

Nov 30 16:51:59 servername dovecot: [ID 583609 mail.error] auth: Error:
plain(usertwo,USERS_IP2,): Request 1982.83548 timed
out after 151 secs, state=1

The used dovecot version is 2.2.13, runs on a solaris 10 system and the
configuration for passdb and userdb are:

passdb {
  args = /etc/dovecot-ldap.conf
  default_fields =
  deny = no
  driver = ldap
  master = no
  name =
  override_fields =
  pass = no
  result_failure = continue
  result_internalfail = continue
  result_success = return-ok
  skip = never
}

userdb {
  args = /etc/dovecot-ldap.conf
  default_fields =
  driver = ldap
  name =
  override_fields =
  result_failure = continue
  result_internalfail = continue
  result_success = return-ok
  skip = never
}

And the dovecot-ldap.conf contains (obfuscated):

uris = ldaps://server2.tld ldaps://server1.tld
ldaps://server4.tld ldaps://server3.tld
dn   = ...
dnpass   = ...
ldap_version = 3
auth_bind= yes
base = ...
scope= onelevel
user_attrs   = homeDirectory=home,uidNumber=uid,gidNumber=gid
user_filter  = ...
pass_attrs   = uid=user
pass_filter  = ...

The strange thing is, that with the very same binaries and configuration
(okay, some minimal modifications have been made to bind to the correct
interfaces...) a test on our testsystem works as it should.

When we shutdown slapd, dovecot recognizes it an connects to the
alternate LDAPS. When we shutdown slapd and start a netcat (just to let
something listening without responding)... you guess it. Dovecot does
recognize it and switches over to the alternate testsystem.

So on our testsystem, everything worked as it should. But the productive
system did not. And since the LDAPS are not maintained by us it is
somewhat hard to try to reproduce something.

At least i got the logfiles from server2.tld and server1.tld. But they
only show what i still knew. Our server connected to server2.tld until
the crash happened. But server1.tld never got any connection.

Has someone an idea what i could try to find out why dovecot did not
switch to server1.tld?

Best regards
Matthias Egger
-- 
Matthias Egger
ETH Zurich
Department of Information Technology  maeg...@ee.ethz.ch
and Electrical Engineering
IT Support Group (ISG.EE), ETL/F/24.1 Phone +41 (0)44 632 03 90
Physikstrasse 3, CH-8092 Zurich   Fax   +41 (0)44 632 11 95



smime.p7s
Description: S/MIME Cryptographic Signature


Re: LDAP: Connection appears to be hanging, reconnecting

2014-12-16 Thread Simon Fraser



On 16/12/14 16:30, Matthias Egger wrote:


What happened:
A few weeks ago one of the LDAPS Servers which is not maintained by us
has crashed. From that moment on, users could still login to check their
emails, but they were not able to send any email through postfix (which
uses smtpd_sasl_type = dovecot)

What i do not understand, is why did dovecot not switch to the second
configured LDAPS Server? It looks like it retried for ever to reconnect
to the crashed LDAP Server.


This is speculation, but what has happened to us in the past is that the 
LDAP server stopped responding to queries, but the TCP socket was still 
open for connections. A new TCP connection would be established, but the 
daemon would not be notified of it.


So, depending on precisely how the first LDAP server crashed, it may not 
be the same test as killing the process, but closer to sending it 'kill 
-STOP' (and then 'kill -CONT' afterwards, obviously)


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 lda Panic: file mail-transaction-log.c

2014-12-16 Thread Alessio Cecchi


Il 16/12/2014 17:07, Alessio Cecchi ha scritto:

Hi,

I'm running:

# 2.2.15: /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.6 (3e924b1b6c5c+)
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.10

with mailbox in Maildir format and LDA to delivery new email (+ sieve 
for filter) 


I found the problem but not the solution.

This is my sieve default:

require ["vnd.dovecot.duplicate", "fileinto", "mailbox"];
if header :matches "X-Spam-Status" "Yes, *" {
fileinto "Spam";
}

if duplicate {
fileinto "Trash";
}

If I remove the "if duplicate" rule delivery works fine.

Could be a Pigeonhole bug?


Re: Replication sieve scripts.

2014-12-16 Thread Hanns Mattes
Hi

Am 15.12.2014 um 14:00 schrieb Hanns Mattes:
> After the following upgrade, the sieve-scripts are replicated - very
> good.

I stand corrected. They are sometimes updated, sometimes not. I didn't
have time for testing (and I don't see a system), but it's not reliably.

I will report after some testing.

Regards Hanns


replication - more than 2 servers?

2014-12-16 Thread Ron Cleven
We tested dovecot for a fair amount of time and decided finally to put 
it into production under CentOS 7 (we are running 2.2.10).  I just 
joined the list, so I apologize for what is probably a question that has 
been answered many times, but I was wondering if there are any plans to 
implement replication among 3 or more servers (all "masters", as with 
2)?  As best as I can tell, replication seems to be limited to 2 
servers, and it is not obvious to me even how more than 2 would be 
supported syntactically in the configs.  That is, what might be an 
example of the "mail_replica" clauses if such a thing was supported?


Re: replication - more than 2 servers?

2014-12-16 Thread Reindl Harald


Am 16.12.2014 um 21:13 schrieb Ron Cleven:

We tested dovecot for a fair amount of time and decided finally to put
it into production under CentOS 7 (we are running 2.2.10).  I just
joined the list, so I apologize for what is probably a question that has
been answered many times, but I was wondering if there are any plans to
implement replication among 3 or more servers (all "masters", as with
2)?  As best as I can tell, replication seems to be limited to 2
servers, and it is not obvious to me even how more than 2 would be
supported syntactically in the configs.  That is, what might be an
example of the "mail_replica" clauses if such a thing was supported?


if you *really* have that large number of users and load you should 
split them to different servers (replicated server pairs) because you 
end in replication overhead eating away all the benefits otherwise


master-master replication independent of the software is somehow limited 
by phyiscs (delays, replication traffic, replication I/O) and can't 
scale endless




signature.asc
Description: OpenPGP digital signature


Re: replication - more than 2 servers?

2014-12-16 Thread l...@airstreamcomm.net
Dovecot replication will never scale until it implements some form of token 
ring topology where data is sharded.  You should look at obox plugin for 
dovecot and some form of S3 compatible storage that can be available in 
multiple data centers.  We are using (pithos.io) and the Cassandra database to 
backend a test cluster with good results between two data centers.  This could 
potentially scale infinitely if that's what you need.  



> On Dec 16, 2014, at 2:39 PM, Reindl Harald  wrote:
> 
> 
>> Am 16.12.2014 um 21:13 schrieb Ron Cleven:
>> We tested dovecot for a fair amount of time and decided finally to put
>> it into production under CentOS 7 (we are running 2.2.10).  I just
>> joined the list, so I apologize for what is probably a question that has
>> been answered many times, but I was wondering if there are any plans to
>> implement replication among 3 or more servers (all "masters", as with
>> 2)?  As best as I can tell, replication seems to be limited to 2
>> servers, and it is not obvious to me even how more than 2 would be
>> supported syntactically in the configs.  That is, what might be an
>> example of the "mail_replica" clauses if such a thing was supported?
> 
> if you *really* have that large number of users and load you should split 
> them to different servers (replicated server pairs) because you end in 
> replication overhead eating away all the benefits otherwise
> 
> master-master replication independent of the software is somehow limited by 
> phyiscs (delays, replication traffic, replication I/O) and can't scale endless
> 


dsync "Error: imapc: Remote server didn't send BODY[] for UID"

2014-12-16 Thread Randall Gellens
Anyone know what this means and what the implications are?  Does this 
mean some messages are missing?


$sudo dsync -D -v -f -R -o mail_fsync=never backup -u test imapc:
...
dsync(test): Error: imapc: Remote server didn't send BODY[] for UID 
266 in #somefolder


--
Randall Gellens
Opinions are personal;facts are suspect;I speak for myself only
-- Randomly selected tag: ---
Hippogriff:  An animal (now extinct) which was half horse and half
griffin.  The griffin was itself a compound creature, half lion and
half eagle.  The hippogriff was actually, therefore, only one quarter
eagle, which is two dollars and fifty cents in gold.  The study of
zoology is full of surprises.