Re: New install - getting error: "Failed to initialize SSL server context: Couldn't parse DH parameters"

2018-11-12 Thread Markus Schönhaber
James Brown, Tue, 13 Nov 2018 14:28:47 +1100:

> I’ve used:
> 
> Openssl gendh 2048
> 
> And put the output:
[...]
> 
> Into a file dh.pem and then added
> 
> ssl_dh=/usr/local/etc/dovecot/dh.pem

Try
ssl_dh=

Re: New install - getting error: "Failed to initialize SSL server context: Couldn't parse DH parameters"

2018-11-12 Thread James Brown
Ah… that’s better!

No error now.

Thanks Aki.

> On 13 Nov 2018, at 4:06 pm, Tuomi, Aki  wrote:
> 
> Actually you need to use ssl_dh=<
> /usr/local/etc/dovecot/dh.pem
> 
> Note the <
> 
> Aki
> 
>  Original message 
> From: "Michael A. Peters" 
> Date: 13/11/2018 05:44 (GMT+02:00)
> To: dovecot@dovecot.org
> Subject: Re: New install - getting error: "Failed to initialize SSL server 
> context: Couldn't parse DH parameters"
> 
> try
> 
> openssl dhparam -out /usr/local/etc/dovecot/dh.pem 2048
> 
> On 11/12/2018 07:28 PM, James Brown wrote:
> > I’m setting up Dovecot using Homebrew on a new server and am getting 
> > this when I try to login via IMAP:
> > 
> > Nov 13 14:13:35 auth: Debug: auth client connected (pid=30719)
> > Nov 13 14:13:35 imap-login: Info: Aborted login (no auth attempts in 0 
> > secs): user=<>, rip=::1, lip=::1, secured, 
> > session=
> > Nov 13 14:18:33 auth: Debug: Loading modules from directory: 
> > /usr/local/Cellar/dovecot/2.3.2.1/lib/dovecot/auth
> > Nov 13 14:18:33 auth: Debug: Module loaded: 
> > /usr/local/Cellar/dovecot/2.3.2.1/lib/dovecot/auth/lib20_auth_var_expand_crypt.so
> > Nov 13 14:18:33 auth: Debug: Read auth token secret from 
> > /usr/local/var/run/dovecot/auth-token-secret.dat
> > Nov 13 14:18:33 auth: Debug: auth client connected (pid=30848)
> > Nov 13 14:18:33 imap-login: Error: Failed to initialize SSL server 
> > context: Couldn't parse DH parameters: error:0906D06C:PEM 
> > routines:PEM_read_bio:no start line: Expecting: DH PARAMETERS: user=<>, 
> > rip=::1, lip=::1, secured, session=
> > Nov 13 14:18:33 imap-login: Info: Disconnected: TLS initialization 
> > failed. (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, 
> > secured, session=
> > 
> > I’ve used:
> > 
> > Openssl gendh 2048
> > 
> > And put the output:
> > 
> > -BEGIN DH PARAMETERS-
> > MIIBCAKCAQEA0IF7kQX32IJFm/5HEVwYf7Be4G9iY86MvLiFLL3wHGqcPT3EMsIv
> > YSe5XOT0Q7DGXPOZ+DLlJq8KDHxWKNI6j/0ZaRBrF38CWj8Jqxa8pqo9FVSWj45b
> > JwSLqBSoBIEFWibqSE6L8wlV8xjMsB34xLHduJDNbaBzsooN749CopTkmkuGeXKH
> > waOEbDzlOq+qHEa4bjx2/e/TnPj0kCrMnfeU4QILo1rJwuN4nY6k7fGwgEDVa2hE
> > oOrVfJxyuuuiblahblahblahhhXCGsxhlDQO
> > QmzOhHqPovzbBByO9iR5fu3xbNm9YRxPowIBAg==
> > -END DH PARAMETERS——
> > 
> > Into a file dh.pem and then added
> > 
> > ssl_dh=/usr/local/etc/dovecot/dh.pem
> > 
> > To my dovecot.conf file.
> > 
> > Reloaded Dovecot but still get the same error.
> > 
> > Any suggestions?
> > 
> > macOS 10.13.6, Dovecot 2.3.2.1
> > 
> > Any suggestions?
> > 
> > Thanks,
> > 
> > James.
> 




Re: New install - getting error: "Failed to initialize SSL server context: Couldn't parse DH parameters"

2018-11-12 Thread Tuomi, Aki
Actually you need to use ssl_dh= Date: 13/11/2018  05:44  (GMT+02:00) To: 
dovecot@dovecot.org Subject: Re: New install - getting error: "Failed to 
initialize SSL server context: Couldn't parse DH parameters" tryopenssl dhparam 
-out /usr/local/etc/dovecot/dh.pem 2048On 11/12/2018 07:28 PM, James Brown 
wrote:> I’m setting up Dovecot using Homebrew on a new server and am getting > 
this when I try to login via IMAP:> > Nov 13 14:13:35 auth: Debug: auth client 
connected (pid=30719)> Nov 13 14:13:35 imap-login: Info: Aborted login (no auth 
attempts in 0 > secs): user=<>, rip=::1, lip=::1, secured, > 
session=> Nov 13 14:18:33 auth: Debug: 
Loading modules from directory: > 
/usr/local/Cellar/dovecot/2.3.2.1/lib/dovecot/auth> Nov 13 14:18:33 auth: 
Debug: Module loaded: > 
/usr/local/Cellar/dovecot/2.3.2.1/lib/dovecot/auth/lib20_auth_var_expand_crypt.so>
 Nov 13 14:18:33 auth: Debug: Read auth token secret from > 
/usr/local/var/run/dovecot/auth-token-secret.dat> Nov 13 14:18:33 auth: Debug: 
auth client connected (pid=30848)> Nov 13 14:18:33 imap-login: Error: Failed to 
initialize SSL server > context: Couldn't parse DH parameters: 
error:0906D06C:PEM > routines:PEM_read_bio:no start line: Expecting: DH 
PARAMETERS: user=<>, > rip=::1, lip=::1, secured, 
session=> Nov 13 14:18:33 imap-login: Info: 
Disconnected: TLS initialization > failed. (no auth attempts in 0 secs): 
user=<>, rip=::1, lip=::1, > secured, 
session=> > I’ve used:> > Openssl gendh 2048> 
> And put the output:> > -BEGIN DH PARAMETERS-> 
MIIBCAKCAQEA0IF7kQX32IJFm/5HEVwYf7Be4G9iY86MvLiFLL3wHGqcPT3EMsIv> 
YSe5XOT0Q7DGXPOZ+DLlJq8KDHxWKNI6j/0ZaRBrF38CWj8Jqxa8pqo9FVSWj45b> 
JwSLqBSoBIEFWibqSE6L8wlV8xjMsB34xLHduJDNbaBzsooN749CopTkmkuGeXKH> 
waOEbDzlOq+qHEa4bjx2/e/TnPj0kCrMnfeU4QILo1rJwuN4nY6k7fGwgEDVa2hE> 
oOrVfJxyuuuiblahblahblahhhXCGsxhlDQO> 
QmzOhHqPovzbBByO9iR5fu3xbNm9YRxPowIBAg==> -END DH PARAMETERS——> > Into a 
file dh.pem and then added> > ssl_dh=/usr/local/etc/dovecot/dh.pem> > To my 
dovecot.conf file.> > Reloaded Dovecot but still get the same error.> > Any 
suggestions?> > macOS 10.13.6, Dovecot 2.3.2.1> > Any suggestions?> > Thanks,> 
> James.

replication guide

2018-11-12 Thread lty



DOVECOT -N 


# 2.2.36 (1f10bfa63): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.24 (124e06aa)
# OS: Linux 2.6.32-431.23.3.el6.x86_64 x86_64 CentOS release 6.9 (Final)

 

plugin { 

''' 

mail_replica = tcp:10.1.1.20: 

# replication_sync_timeout = 2s 

replication_sync_timeout = 2 

 

} 

 

/VAR/LOG/DOVECOT/DOVECOT.LOG 


doveadm(l...@cndns.com): Error: replication(l...@cndns.com): Invalid
replication_sync_timeout value: 2s 


I am talking about the replication_sync_timeout = 2s in the
configuration file changed to replication_sync_timeout = 2, no prompt
error,  but I get the following prompt 

/VAR/LOG/DOVECOT/DOVECOT.LOG 


Nov 12 14:01:10 replicator: Panic: data stack: Out of memory when
allocating 268435496 bytes
Nov 12 14:01:10 replicator: Error: Raw backtrace:
/usr/lib64/dovecot/libdovecot.so.0() [0x3bdd69f74a] ->
/usr/lib64/dovecot/libdovecot.so.0() [0x3bdd69f7b6] ->
/usr/lib64/dovecot/libdovecot.so.0() [0x3bdd630b8a] ->
/usr/lib64/dovecot/libdovecot.so.0() [0x3bdd69d34a] ->
/usr/lib64/dovecot/libdovecot.so .0() [0x3bdd69d558] ->
/usr/lib64/dovecot/libdovecot.so.0() [0x3bdd6bb818] ->
/usr/lib64/dovecot/libdovecot.so.0() [0x3bdd69b0a2] -> /usr/
Lib64/dovecot/libdovecot.so.0(buffer_write+0x89) [>xvebd/b. ->
dovecot/replicator() [0x4040d0] ->
/usr/lib64/dovecot/libdovecot.so.0(io_loop_call_io+0x61) [0x3bdd6b4921]
-> /usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0xbf
) [0x3bdd6b65cf] ->
/usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run+0x3c)
[0x3bdd6b49dc] -> /usr/lib64/dovecot/libdovecot.so.0(io_loop_run+0x38)
[0x3bdd6b4b98] -> /usr/lib64/do
Vecot/libdovecot.so.0(master_service_run+0x13) [0x3bdd63ad43] ->
dovecot/replicator(main+0x17e) [0x40461e] ->
/lib64/libc.so.6(__libc_start_main+0xfd) [0x3bb6a1ed1d] -> dovecot/
Replicator() [0x4031f9]
Nov 12 14:01:10 replicator: Fatal: master: service(replicator): child
19591 killed with signal 6 (core dumps disabled) 

/VAR/LOG/DOVECOT/SIEVE.LOG 


Nov 12 13:54:36 lda(l...@cndns.com): Warning: replication(l...@cndns.com):
Remote sent invalid input: -
Nov 12 13:54:36 lda(l...@cndns.com): Info: sieve: msgid=unspecified:
stored mail into mailbox 'Junk'
Nov 12 14:01:10 lda(l...@cndns.com): Warning: replication(lty@cndnscom):
Sync failure:
Nov 12 14:01:10 lda(l...@cndns.com): Warning: replication(l...@cndns.com):
Remote sent invalid input: - 


Please help me, thank you

Re: New install - getting error: "Failed to initialize SSL server context: Couldn't parse DH parameters"

2018-11-12 Thread James Brown
> On 11/12/2018 07:28 PM, James Brown wrote:
>> I’m setting up Dovecot using Homebrew on a new server and am getting this 
>> when I try to login via IMAP:
>> Nov 13 14:13:35 auth: Debug: auth client connected (pid=30719)
>> Nov 13 14:13:35 imap-login: Info: Aborted login (no auth attempts in 0 
>> secs): user=<>, rip=::1, lip=::1, secured, 
>> session=
>> Nov 13 14:18:33 auth: Debug: Loading modules from directory: 
>> /usr/local/Cellar/dovecot/2.3.2.1/lib/dovecot/auth
>> Nov 13 14:18:33 auth: Debug: Module loaded: 
>> /usr/local/Cellar/dovecot/2.3.2.1/lib/dovecot/auth/lib20_auth_var_expand_crypt.so
>> Nov 13 14:18:33 auth: Debug: Read auth token secret from 
>> /usr/local/var/run/dovecot/auth-token-secret.dat
>> Nov 13 14:18:33 auth: Debug: auth client connected (pid=30848)
>> Nov 13 14:18:33 imap-login: Error: Failed to initialize SSL server context: 
>> Couldn't parse DH parameters: error:0906D06C:PEM routines:PEM_read_bio:no 
>> start line: Expecting: DH PARAMETERS: user=<>, rip=::1, lip=::1, secured, 
>> session=
>> Nov 13 14:18:33 imap-login: Info: Disconnected: TLS initialization failed. 
>> (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, 
>> session=
>> I’ve used:
>> Openssl gendh 2048
>> And put the output:
>> -BEGIN DH PARAMETERS-
>> MIIBCAKCAQEA0IF7kQX32IJFm/5HEVwYf7Be4G9iY86MvLiFLL3wHGqcPT3EMsIv
>> YSe5XOT0Q7DGXPOZ+DLlJq8KDHxWKNI6j/0ZaRBrF38CWj8Jqxa8pqo9FVSWj45b
>> JwSLqBSoBIEFWibqSE6L8wlV8xjMsB34xLHduJDNbaBzsooN749CopTkmkuGeXKH
>> waOEbDzlOq+qHEa4bjx2/e/TnPj0kCrMnfeU4QILo1rJwuN4nY6k7fGwgEDVa2hE
>> oOrVfJxyuuuiblahblahblahhhXCGsxhlDQO
>> QmzOhHqPovzbBByO9iR5fu3xbNm9YRxPowIBAg==
>> -END DH PARAMETERS——
>> Into a file dh.pem and then added
>> ssl_dh=/usr/local/etc/dovecot/dh.pem
>> To my dovecot.conf file.
>> Reloaded Dovecot but still get the same error.
>> Any suggestions?
>> macOS 10.13.6, Dovecot 2.3.2.1
>> Any suggestions?
>> Thanks,
>> James.
> 
> 
> On 13 Nov 2018, at 2:43 pm, Michael A. Peters  wrote:
> 
> try
> 
> openssl dhparam -out /usr/local/etc/dovecot/dh.pem 2048

Thanks Michael. Gave that a go, and it successfully created the file, I 
reloaded Dovecot, but still get the same error.

James.


Re: New install - getting error: "Failed to initialize SSL server context: Couldn't parse DH parameters"

2018-11-12 Thread Michael A. Peters

try

openssl dhparam -out /usr/local/etc/dovecot/dh.pem 2048

On 11/12/2018 07:28 PM, James Brown wrote:
I’m setting up Dovecot using Homebrew on a new server and am getting 
this when I try to login via IMAP:


Nov 13 14:13:35 auth: Debug: auth client connected (pid=30719)
Nov 13 14:13:35 imap-login: Info: Aborted login (no auth attempts in 0 
secs): user=<>, rip=::1, lip=::1, secured, 
session=
Nov 13 14:18:33 auth: Debug: Loading modules from directory: 
/usr/local/Cellar/dovecot/2.3.2.1/lib/dovecot/auth
Nov 13 14:18:33 auth: Debug: Module loaded: 
/usr/local/Cellar/dovecot/2.3.2.1/lib/dovecot/auth/lib20_auth_var_expand_crypt.so
Nov 13 14:18:33 auth: Debug: Read auth token secret from 
/usr/local/var/run/dovecot/auth-token-secret.dat

Nov 13 14:18:33 auth: Debug: auth client connected (pid=30848)
Nov 13 14:18:33 imap-login: Error: Failed to initialize SSL server 
context: Couldn't parse DH parameters: error:0906D06C:PEM 
routines:PEM_read_bio:no start line: Expecting: DH PARAMETERS: user=<>, 
rip=::1, lip=::1, secured, session=
Nov 13 14:18:33 imap-login: Info: Disconnected: TLS initialization 
failed. (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, 
secured, session=


I’ve used:

Openssl gendh 2048

And put the output:

-BEGIN DH PARAMETERS-
MIIBCAKCAQEA0IF7kQX32IJFm/5HEVwYf7Be4G9iY86MvLiFLL3wHGqcPT3EMsIv
YSe5XOT0Q7DGXPOZ+DLlJq8KDHxWKNI6j/0ZaRBrF38CWj8Jqxa8pqo9FVSWj45b
JwSLqBSoBIEFWibqSE6L8wlV8xjMsB34xLHduJDNbaBzsooN749CopTkmkuGeXKH
waOEbDzlOq+qHEa4bjx2/e/TnPj0kCrMnfeU4QILo1rJwuN4nY6k7fGwgEDVa2hE
oOrVfJxyuuuiblahblahblahhhXCGsxhlDQO
QmzOhHqPovzbBByO9iR5fu3xbNm9YRxPowIBAg==
-END DH PARAMETERS——

Into a file dh.pem and then added

ssl_dh=/usr/local/etc/dovecot/dh.pem

To my dovecot.conf file.

Reloaded Dovecot but still get the same error.

Any suggestions?

macOS 10.13.6, Dovecot 2.3.2.1

Any suggestions?

Thanks,

James.




New install - getting error: "Failed to initialize SSL server context: Couldn't parse DH parameters"

2018-11-12 Thread James Brown
I’m setting up Dovecot using Homebrew on a new server and am getting this when 
I try to login via IMAP:

Nov 13 14:13:35 auth: Debug: auth client connected (pid=30719)
Nov 13 14:13:35 imap-login: Info: Aborted login (no auth attempts in 0 secs): 
user=<>, rip=::1, lip=::1, secured, session=
Nov 13 14:18:33 auth: Debug: Loading modules from directory: 
/usr/local/Cellar/dovecot/2.3.2.1/lib/dovecot/auth
Nov 13 14:18:33 auth: Debug: Module loaded: 
/usr/local/Cellar/dovecot/2.3.2.1/lib/dovecot/auth/lib20_auth_var_expand_crypt.so
Nov 13 14:18:33 auth: Debug: Read auth token secret from 
/usr/local/var/run/dovecot/auth-token-secret.dat
Nov 13 14:18:33 auth: Debug: auth client connected (pid=30848)
Nov 13 14:18:33 imap-login: Error: Failed to initialize SSL server context: 
Couldn't parse DH parameters: error:0906D06C:PEM routines:PEM_read_bio:no start 
line: Expecting: DH PARAMETERS: user=<>, rip=::1, lip=::1, secured, 
session=
Nov 13 14:18:33 imap-login: Info: Disconnected: TLS initialization failed. (no 
auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, 
session=

I’ve used:

Openssl gendh 2048

And put the output:

-BEGIN DH PARAMETERS-
MIIBCAKCAQEA0IF7kQX32IJFm/5HEVwYf7Be4G9iY86MvLiFLL3wHGqcPT3EMsIv
YSe5XOT0Q7DGXPOZ+DLlJq8KDHxWKNI6j/0ZaRBrF38CWj8Jqxa8pqo9FVSWj45b
JwSLqBSoBIEFWibqSE6L8wlV8xjMsB34xLHduJDNbaBzsooN749CopTkmkuGeXKH
waOEbDzlOq+qHEa4bjx2/e/TnPj0kCrMnfeU4QILo1rJwuN4nY6k7fGwgEDVa2hE
oOrVfJxyuuuiblahblahblahhhXCGsxhlDQO
QmzOhHqPovzbBByO9iR5fu3xbNm9YRxPowIBAg==
-END DH PARAMETERS——

Into a file dh.pem and then added

ssl_dh=/usr/local/etc/dovecot/dh.pem

To my dovecot.conf file.

Reloaded Dovecot but still get the same error.

Any suggestions?

macOS 10.13.6, Dovecot 2.3.2.1

Any suggestions?

Thanks,

James.

Re: Disaster Recovery Help

2018-11-12 Thread Giovanni Bisanti
Yes, I think I have to try this. Have you ever used iMazing? does it
export emails?

On Tue, 2018-11-13 at 10:05 +1100, James Brown wrote:
> > On 13 Nov 2018, at 9:48 am, Giovanni Bisanti  wrote:
> > 
> > the Account on the iPhone is IMAP, I'm not sure I understand the
> > process you are describing
> > 
> 
> iMazing might be able to help you get the mail off the iPhone:
> 
> https://imazing.com
> 
> Then transfer to you Dovecot Maildir. (Have never done this - it’s
> just a suggestion).
> 
> James.


Re: Disaster Recovery Help

2018-11-12 Thread James Brown
> On 13 Nov 2018, at 9:48 am, Giovanni Bisanti  > wrote:
> 
> the Account on the iPhone is IMAP, I'm not sure I understand the process you 
> are describing
> 

iMazing might be able to help you get the mail off the iPhone:

https://imazing.com 

Then transfer to you Dovecot Maildir. (Have never done this - it’s just a 
suggestion).

James.

Re: Disaster Recovery Help

2018-11-12 Thread Benny Pedersen

Giovanni Bisanti skrev den 2018-11-12 23:48:

the Account on the iPhone is IMAP, I'm not sure I understand the
process you are describing


then its not a dovecot problem to solve, sorry


Re: Disaster Recovery Help

2018-11-12 Thread Benny Pedersen

Giovanni Bisanti TEST 2 skrev den 2018-11-12 20:19:

I lost the whole maildir from my server fro 3 users. They all have
iPhones with all the messages safely stored on the Apple Mail app on
their phone. There is no way to export them/move them.


pop3 ?


Is there a way to get Dovecot to just download all the messages and
folder structure from the client and restore it on the server?


yes, if clients did pop3 setup to the server it works as designed, only 
fail is then clients wanted imap :=)


ask clients to make another imap setup, while keeping the pop3 setup, if 
both uses the same sasl login on dovecot, then in iphone its a matter of 
move mails withing folders



Your help is very very much appreciated.


i disabled pop3 on dovecot, no more problems with my own clients, not 
even from iphone users


Help Disaster Recovery

2018-11-12 Thread Giovanni Bisanti
I lost the whole maildir from my server fro 3 users. They all have
iPhones with all the messages safely stored on the Apple Mail app on
their phone. There is no way to export them/move them.

Is there a way to get Dovecot to just download all the messages and
folder structure from the client and restore it on the server?

Your help is very very much appreciated.

Thanks,
ttyllc


Disaster Recovery Help

2018-11-12 Thread Giovanni Bisanti
I lost the whole maildir from my server fro 3 users. They all have
iPhones with all the messages safely stored on the Apple Mail app on
their phone. There is no way to export them/move them.

Is there a way to get Dovecot to just download all the messages and
folder structure from the client and restore it on the server?

Your help is very very much appreciated.

Thanks,
ttyllc


Disaster Recovery Help

2018-11-12 Thread Giovanni Bisanti
I lost the whole maildir from my server fro 3 users. They all have
iPhones with all the messages safely stored on the Apple Mail app on
their phone. There is no way to export them/move them.

Is there a way to get Dovecot to just download all the messages and
folder structure from the client and restore it on the server?

Your help is very very much appreciated.

Thanks,
ttyllc


Disaster Recovery Help

2018-11-12 Thread Giovanni Bisanti TEST 2
I lost the whole maildir from my server fro 3 users. They all have
iPhones with all the messages safely stored on the Apple Mail app on
their phone. There is no way to export them/move them.

Is there a way to get Dovecot to just download all the messages and
folder structure from the client and restore it on the server?

Your help is very very much appreciated.

Thanks,
ttyllc


Seen-Flag and Virtual

2018-11-12 Thread Dieter Knopf
Hello,

We have a very large folder structure (in a public namespace) on our
Dovecot server and would now like to create a virtual folder
containing all mails of the publick namespace.

This worked quite well with dovecot-virtual, but the read status
(\seen) is not preserved.
i.e. when I read a mail inside the virtual folder, the read status
does not affect the original mail.

Dovecut was configured with per-user \seen-flag.

Is it possible to synchronize the \seen-flag somehow?

Thanks

Dieter


Re: Cannot make disable_plaintext_auth = no works in configuration

2018-11-12 Thread Tanstaafl
On 11/11/2018, 4:02:25 AM, Steve Leung  wrote:
> Hi,
> 
> No matter how I try, I cannot make the config disable_plaintext_auth =
> no to work. I have set it up in 10-auth.conf but when I check with
> doveconf -a it is still disable_plaintext_auth = yes.

As expected.

doveconf -a shows all DEFAULT settings

doveconf -n shows your custom/current settings being used by the running
dovecot system.

What does doveconf -n show?


Re: moving only new mails from one server to another

2018-11-12 Thread Andrew McGlashan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

On 12/11/18 9:29 pm, Nicolas wrote:
> Hello,
> 
> I think it is not really the right place to post about that, but
> lot of dovecot experts there ;)
> 
> Basically, I have a server with dovecot 2.2.9 that has new
> (unread) mails  (because of a bad DNS config at a migration time).
> 
> Is there an easy way to move only these unread mails to a another
> server ? (no perms trouble here : all vmail:vmail)
> 
> Though to iterate through all /var/vmail/*/*/Maildir/new and
> scp/rsync them.
> 
> Would that work ?

TMPFILE=$(mktemp)
cd /
tar cf "${TMPFILE}" \
./var/vmail/*/Maildir/new/1* \
./var/vmail/*/Maildir/.*/new/1*
scp -p "${TMPFILE}" remoteserver:/tmp/

Login to remote server:

cd /
tar xf /tmp/NAME_OF_TAR_FILE


Cheers
A.
-BEGIN PGP SIGNATURE-

iHUEAREIAB0WIQTJAoMHtC6YydLfjUOoFmvLt+/i+wUCW+mMjAAKCRCoFmvLt+/i
+7W0AP9eMmwwOihJAppUjcaf5lN8bsst2CtAmNSAtAm0dZmnDQEAznuJsw7nORui
WWYlMSiE35eHSTXZV6UvgEPxsZROhfs=
=2drw
-END PGP SIGNATURE-


moving only new mails from one server to another

2018-11-12 Thread Nicolas

Hello,

I think it is not really the right place to post about that, but lot of 
dovecot experts there ;)


Basically, I have a server with dovecot 2.2.9 that has new (unread) 
mails  (because of a bad DNS config at a migration time).


Is there an easy way to move only these unread mails to a another server 
? (no perms trouble here : all vmail:vmail)


Though to iterate through all /var/vmail/*/*/Maildir/new and scp/rsync them.

Would that work ?

Thanks in advance for your time.

Nicolas



Panic: file dsync-brain-mailbox-tree.c: line 448: unreached

2018-11-12 Thread Marc Weustink

Hi all,

To backup our imap folders I've a cronjob running in the night:
 /usr/bin/doveadm -o stats_writer_socket_path=  backup -R -A -N 
tcp:xxx.yyy.zzz:4191


This ran successful when I set it up and didn't look at it anymore.
Recently I noticed errors:

dsync-local(administration): Panic: file 
dsync-mailbox-tree-sync.c: line 1253 (sync_create_mailboxes): assertion 
failed: (node->ns == other_node->ns)
dsync-local(administration): Error: Raw 
backtrace: /usr/lib/dovecot/libdovecot.so.0(+0xcceca) [0x7f7029099eca] 
-> /usr/lib/dovecot/libdovecot.so.0(+0xccf21) [0x7f7029099f21] -> 
/usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f7029006f44] -> 
/usr/bin/doveadm(+0x5206c) [0x558ba9fec06c] -> 
/usr/bin/doveadm(dsync_mailbox_trees_sync_init+0x2a2) [0x558ba9fedba2] 
-> /usr/bin/doveadm(dsync_brain_recv_mailbox_tree_deletes+0x246) 
[0x558ba9fdf6d6] -> /usr/bin/doveadm(dsync_brain_run+0x5b8) 
[0x558ba9fdbec8] -> /usr/bin/doveadm(+0x42260) [0x558ba9fdc260] -> 
/usr/bin/doveadm(+0x585bf) [0x558ba9ff25bf] -> 
/usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x69) [0x7f70290b2029] 
-> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x109) 
[0x7f70290b3959] -> 
/usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x52) 
[0x7f70290b2132] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) 
[0x7f70290b2348] -> /usr/bin/doveadm(+0x27e39) [0x558ba9fc1e39] -> 
/usr/bin/doveadm(+0x2a3c7) [0x558ba9fc43c7] -> 
/usr/bin/doveadm(+0x2b1f6) [0x558ba9fc51f6] -> 
/usr/bin/doveadm(doveadm_mail_try_run+0x1fa) [0x558ba9fc597a] -> 
/usr/bin/doveadm(main+0x45b) [0x558ba9fb4ceb] -> 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f702891a830] 
-> /usr/bin/doveadm(_start+0x29) [0x558ba9fb4e69]

Aborted (core dumped)

I've added the dovecot repo to get dovecot automatically updated, so I 
cannot tell with which version it started.


my doveconf -n:

[sudo] password for infraadmin:
# 2.3.3 (dcead646b): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.3 (f018bbab)
# OS: Linux 4.4.0-137-generic x86_64 Ubuntu 16.04.5 LTS autofs
# Hostname: xxx.xxx.xxx
dict {
  acl = pgsql:/etc/dovecot/dovecot-dict-sql-local.conf.ext
}
doveadm_password = # hidden, use -P to show it
mail_debug = yes
mail_gid = vmail
mail_home = /home/mail/backup/%n
mail_location = maildir:/home/mail/backup/%n/mail
mail_uid = vmail
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 index ihave duplicate mime foreverypart extracttext

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 = /
  type = private
}
namespace public {
  location = 
maildir:/home/mail/backup/Common/mail:INDEXPVT=/home/mail/backup/%n/mail/common

  prefix = Common/
  separator = /
  subscriptions = no
  type = public
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  sieve = file:~/sieve;active=~/.dovecot.sieve
}
protocols = " sieve"
service auth {
  unix_listener auth-userdb {
mode = 0777
  }
}
service dict {
  unix_listener dict {
group = vmail
user = vmail
  }
}
ssl = no
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}