Re: doveadm pw usage

2022-04-24 Thread Bernardo Reino

On Sun, 24 Apr 2022, ミユナ (alice) wrote:


Hello

when i want to assign a password to a user, I need to write the plain passwd 
to a text file then do:


# doveadm pw -p input.txt
{CRAM-MD5}77180880...


it's not that convenient to write to a file first.

does it support the format below?

doveadm pw "plain password"

providing the plain password as CL argument to generate a encrypted one.


The argument to "-p" is not a file containing the password, but the password 
itself!


so in your example above, the password would be "input.txt", which is pretty 
weak :)


Cheers.
PS: man doveadm-pw

Re: doveadm pw usage

2022-04-24 Thread alice

ok the helps says:

pw   [-l] [-p plaintext]

i just thought it specifies the text file.

thanks for clarifying it.



Bernardo Reino wrote:
The argument to "-p" is not a file containing the password, but the 
password itself!


Re: how to setup IMAPs with letsencrypt

2022-04-24 Thread Markus Winkler

On 24.04.22 02:45, Richard Hector wrote:

On 22/04/22 11:57, Joseph Tam wrote:

Keep in mind the subject name (CN or SAN AltNames) of your certificate
must match your IMAP server name e.g. if your certificate is
made for "www.mydomain.com", you'll have to configure your IMAP
clients to also use "www.mydomain.com" as the IMAP server name.

This typically means the web and IMAP server must reside on the
same server, otherwise you'll have to use DNS challenge method
to support multiple hostnames on the same certificate.


_A_ web server has to be there. It doesn't have to serve anything else 
useful. My mail server has a web server that only serves the LE challenge. 
Well, actually it's a proxy server that serves several other domains too, 
but there's nothing else served on that domain (at the moment).


if it wasn't already mentioned in this thread:

acme.sh (https://github.com/acmesh-official/acme.sh) has a builtin 
standalone webserver which can be used in such cases, there's no need for 
an additional web server. And Certbot has this functionality too.


acme.sh is a very simple and stable solution - it's just a shell script, no 
dependencies. I'm using it on a number of servers (together with 
Apache/Nginx or with the builtin standalone mode on mail gateways) without 
any problem.


Regards,
Markus


no full syncs after upgrading to dovecot 2.3.18

2022-04-24 Thread Arnaud Abélard

Hello,

I am working on replicating a server (and adding compression on the 
other side) and since I had "Error: dsync I/O has stalled, no activity 
for 600 seconds (version not received)" errors I upgraded both source 
and destination server with the latest 2.3 version (2.3.18). While 
before the upgrade all the 15 replication connections were busy after 
upgrading dovecot replicator dsync-status shows that most of the time 
nothing is being replicated at all. I can see some brief replications 
that last, but 99,9% of the time nothing is happening at all.


I have a replication_full_sync_interval of 12 hours but I have thousands 
of users with their last full sync over 90 hours ago.


"doveadm replicator status" also shows that i have over 35,000 queued 
full resync requests, but no sync, high or low queued requests so why 
aren't the full requests occuring?


There are no errors in the logs.

Thanks,

Arnaud





--
Arnaud Abélard
Responsable pôle Système et Stockage
Service Infrastructures
DSIN Université de Nantes
-



smime.p7s
Description: S/MIME Cryptographic Signature


Re: no full syncs after upgrading to dovecot 2.3.18

2022-04-24 Thread Paul Kudla (SCOM.CA Internet Services Inc.)



Question having similiar replication issues

pls read everything below and advise the folder counts on the 
non-replicated users?


i find  the total number of folders / account seems to be a factor and 
NOT the size of the mail box


ie i have customers with 40G of emails no problem over 40 or so folders 
and it works ok


300+ folders seems to be the issue

i have been going through the replication code

no errors being logged

i am assuming that the replication --> dhclient --> other server is 
timing out or not reading the folder lists correctly (ie dies after X 
folders read)


thus i am going through the code patching for log entries etc to find 
the issues.


see

[13:33:57] mail18.scom.ca [root:0] /usr/local/var/lib/dovecot
# ll
total 86
drwxr-xr-x  2 root  wheel  uarch4B Apr 24 11:11 .
drwxr-xr-x  4 root  wheel  uarch4B Mar  8  2021 ..
-rw-r--r--  1 root  wheel  uarch   73B Apr 24 11:11 instances
-rw-r--r--  1 root  wheel  uarch  160K Apr 24 13:33 replicator.db

[13:33:58] mail18.scom.ca [root:0] /usr/local/var/lib/dovecot
#

replicator.db seems to get updated ok but never processed properly.

# sync.users
n...@elirpa.com   high 00:09:41  463:47:01 - 
y
ke...@elirpa.com  high 00:09:23  463:45:43 - 
y
p...@scom.ca  high 00:09:41  463:46:51 - 
y
e...@scom.cahigh 00:09:43  463:47:01 - 
y
ed.ha...@dssmgmt.com  high 00:09:42  463:46:58 - 
y
p...@paulkudla.nethigh 00:09:44  463:47:03 580:35:07 
   y





so 



two things :

first to get the production stuff to work i had to write a script that 
whould find the bad sync's and the force a dsync between the servers


i run this every five minutes or each server.

in crontab

*/10****root/usr/bin/nohup 
/programs/common/sync.recover > /dev/null



python script to sort things out

# cat /programs/common/sync.recover
#!/usr/local/bin/python3

#Force sync between servers that are reporting bad?

import os,sys,django,socket
from optparse import OptionParser


from lib import *

#Sample Re-Index MB
#doveadm -D force-resync -u p...@scom.ca -f INBOX*



USAGE_TEXT = '''\
usage: %%prog %s[options]
'''

parser = OptionParser(usage=USAGE_TEXT % '', version='0.4')

parser.add_option("-m", "--send_to", dest="send_to", help="Send Email To")
parser.add_option("-e", "--email", dest="email_box", help="Box to Index")
parser.add_option("-d", "--detail",action='store_true', 
dest="detail",default =False, help="Detailed report")
parser.add_option("-i", "--index",action='store_true', 
dest="index",default =False, help="Index")


options, args = parser.parse_args()

print (options.email_box)
print (options.send_to)
print (options.detail)

#sys.exit()



print ('Getting Current User Sync Status')
command = commands("/usr/local/bin/doveadm replicator status '*'")


#print command

sync_user_status = command.output.split('\n')

#print sync_user_status

synced = []

for n in range(1,len(sync_user_status)) :
user = sync_user_status[n]
print ('Processing User : %s' %user.split(' ')[0])
if user.split(' ')[0] != options.email_box :
if options.email_box != None :
continue

if options.index == True :
command = '/usr/local/bin/doveadm -D force-resync -u %s 
-f INBOX*' %user.split(' ')[0]

command = commands(command)
command = command.output

#print user
for nn in range (len(user)-1,0,-1) :
#print nn
#print user[nn]

if user[nn] == '-' :
#print 'skipping ... %s' %user.split(' ')[0]

break



if user[nn] == 'y': #Found a Bad Mailbox
print ('syncing ... %s' %user.split(' ')[0])


if options.detail == True :
command = '/usr/local/bin/doveadm -D 
sync -u %s -d -N -l 30 -U' %user.split(' ')[0]

print (command)
command = commands(command)
command = command.output.split('\n')
print (command)
print ('Processed Mailbox for ... %s' 
%user.split(' ')[0] )
synced.append('Processed Mailbox for 
... %s' %user.split(' ')[0])

for nnn in range(len(command)):
synced.append(command[nnn] + '\n')
break


if options.detail == False :
#command = '/usr/local/bin/doveadm -D 
sync -u %s -d -N -l 30 -U' %user.split(' ')[0]

#print (command)
#command = os.system(command)
   

Re: doveadm pw usage

2022-04-24 Thread Sam Kuper
On Sun, Apr 24, 2022 at 06:45:19PM +0800, ミユナ (alice) wrote:
> Bernardo Reino wrote:
>> The argument to "-p" is not a file containing the password, but the
>> password itself!
>
> ok the helps says:
> 
> pw   [-l] [-p plaintext]
> 
> i just thought it specifies the text file.
> 
> thanks for clarifying it.

Easy mistake to make.

The orthographic difference between "plaintext" and "plain text" is
small.

The semantic difference is large:

https://en.wikipedia.org/wiki/Plaintext

https://en.wikipedia.org/wiki/Plain_text