Re: Doveadm Backup issues
On Sat, 6 Jun 2020, @lbutlr wrote: On 05 Jun 2020, at 17:09, Bernardo Reino wrote: USERS=$(cat /etc/dovecot/virtual_passwd | cut -d: -f1) Is that a standard file? It's not one I have. No, of course not! :) That's just my userdb/passdb (passwd-file). I would use (not that I have, but it seem like the way to get a list of users) USERS=$( doveadm user '*' ) There was a time when user enumeration didn't work as I wanted (had userdb as static) so I did it that way. Now I can do doveadm user '*' and it returns the list of users, but didn't bother to change that (I'm talking about a total of 16 users... :) Cheers.
Re: Doveadm Backup issues
On 05 Jun 2020, at 17:09, Bernardo Reino wrote: > USERS=$(cat /etc/dovecot/virtual_passwd | cut -d: -f1) Is that a standard file? It's not one I have. I would use (not that I have, but it seem like the way to get a list of users) USERS=$( doveadm user '*' ) -- You start a conversation you can't even finish it You're talkin' a lot, but you're not sayin' anything When I have nothing to say, my lips are sealed Say something once, why say it again?
Re: Doveadm Backup issues
On 6 Jun 2020, at 01:10, Bernardo Reino wrote: > > On Fri, 5 Jun 2020, Francis Augusto Medeiros-Logeay wrote: > >> Another related question: if backing up on another location on the same >> computer, using -A doesn't seem to recreate the structure of the original >> Maildir (for example, /var/mail/%d%n). >> >> Is there a way to do that? > > If I understand your question correctly (I may be missing context), you can > use dsync for that, e.g.: > > DEST=mdbox:/path/to/$MAILBOX/mdbox > dsync -u $MAILBOX backup $DEST > > where DEST is in "mail location" format (could also be > "maildir:/path/to/Maildir") > and $MAILBOX is a dovecot (virtual) user. > > My backup script does this: > > USERS=$(cat /etc/dovecot/virtual_passwd | cut -d: -f1) > for MAILBOX in $USERS; do >DEST=mdbox:/encrypted/snap_mail/$MAILBOX/mdbox >dsync -v -u $MAILBOX backup $DEST > done > > This runs periodically and does the local "backup". > Another server picks that up, also periodically, using rsync, which is the > real backup. > > Cheers. Thanks Bernardo. That’s what I want to do. But it’s just that it is confusing when there is a -A parameter that backups up all users, but apparently no way to specify individual paths on the destination. So I guess the -A option is only useful when backing up to a remote location that already has the same set of users. It would be nice to be able to soecify a format for the destination path without having use loops. But loop it is, then. :) Best, Francis
Re: Doveadm Backup issues
On Fri, 5 Jun 2020, Francis Augusto Medeiros-Logeay wrote: Another related question: if backing up on another location on the same computer, using -A doesn't seem to recreate the structure of the original Maildir (for example, /var/mail/%d%n). Is there a way to do that? If I understand your question correctly (I may be missing context), you can use dsync for that, e.g.: DEST=mdbox:/path/to/$MAILBOX/mdbox dsync -u $MAILBOX backup $DEST where DEST is in "mail location" format (could also be "maildir:/path/to/Maildir") and $MAILBOX is a dovecot (virtual) user. My backup script does this: USERS=$(cat /etc/dovecot/virtual_passwd | cut -d: -f1) for MAILBOX in $USERS; do DEST=mdbox:/encrypted/snap_mail/$MAILBOX/mdbox dsync -v -u $MAILBOX backup $DEST done This runs periodically and does the local "backup". Another server picks that up, also periodically, using rsync, which is the real backup. Cheers.
Re: Doveadm Backup issues
Hi, As said below, I am trying to use doveadm backup. I made some progress, but I think I misunderstand some of the basic principles behind the command. My main issue is: when using the -A flag, is there a way to create the backup user on the remote server if it doesn't exist there? Another related question: if backing up on another location on the same computer, using -A doesn't seem to recreate the structure of the original Maildir (for example, /var/mail/%d%n). Is there a way to do that? Best, Francis On 02.06.2020 14:31, Francis Augusto Medeiros-Logeay wrote: Hi, I'm trying to use doveadm backup but I'm having a few issues. When trying locally: `doveadm backup -D -A maildir:/usr/local/backup` It results that no mailbox is separated by user - all seems to sync on the same folder, messing up with the folder structure of the original maildir. When trying remotely: `doveadm backup -D -A -N ssh -i mykey r...@myremotebackup.com:/backup doveadmin dsync-server -A` I get this error line for each user: dsync-local(theu...@thedomain.com)<5DNrEXdG1l5tAgAAqsACHw>: Error: read(remote) failed: EOF (version not received) doveadm(theu...@thedomain.com): Fatal: execvp(ssh) failed: No such file or directory I'd be very thankful if someone could help me with this. Best, Francis
Doveadm Backup issues
Hi, I'm trying to use doveadm backup but I'm having a few issues. When trying locally: `doveadm backup -D -A maildir:/usr/local/backup` It results that no mailbox is separated by user - all seems to sync on the same folder, messing up with the folder structure of the original maildir. When trying remotely: `doveadm backup -D -A -N ssh -i mykey r...@myremotebackup.com:/backup doveadmin dsync-server -A` I get this error line for each user: dsync-local(theu...@thedomain.com)<5DNrEXdG1l5tAgAAqsACHw>: Error: read(remote) failed: EOF (version not received) doveadm(theu...@thedomain.com): Fatal: execvp(ssh) failed: No such file or directory I'd be very thankful if someone could help me with this. Best, Francis -- Francis Augusto Medeiros-Logeay Oslo, Norway
Re: Doveadm backup issues on dovecot 2.3.1
> On 02 April 2018 at 19:19 Ricardo Machini Barbosa> wrote: > > > Hello, > > > > After update dovecot from 2.3.0.1 to 2.3.1 the doveadm backup stopped to > work. > > > > Command line: > > doveadm -D backup -u em...@dominio.com.br -R tcp:mailsrv01:9011 > > Can you provide output of doveadm -Dv backup -u em...@dominio.com.br -R tcp:mailsrv01:9011 Aki
Doveadm backup issues on dovecot 2.3.1
Hello, After update dovecot from 2.3.0.1 to 2.3.1 the doveadm backup stopped to work. Command line: doveadm -D backup -u em...@dominio.com.br -R tcp:mailsrv01:9011 I updated dovecot on mailsrv01 to 2.3.1. Process on mailsrv01 (the count message stop and process stay this way until be killed - this occurs on different mailboxs) dovecot/doveadm-server [10.0.10.5 em...@dominio.com.br Cotacao Fornecedores export:6/86] Strace on this process: [pid 15644] epoll_wait(7, {}, 2, 4816) = 0 [pid 15644] epoll_wait(7, {}, 2, 5000) = 0 [pid 15644] close(22) = 0 [pid 15644] munmap(0x7f2927aeb000, 872) = 0 [pid 15644] close(25) = 0 [pid 15644] close(21) = 0 [pid 15644] munmap(0x7f2927aec000, 10744) = 0 [pid 15644] close(20) = 0 [pid 15644] munmap(0x7f2927ad4000, 37540) = 0 [pid 15644] close(23) = 0 [pid 15644] close(19) = 0 [pid 15644] close(11) = 0 [pid 15644] epoll_wait(7, {}, 2, 20174) = 0 Some informations: uname -a Linux mailsrv01 2.6.32-696.23.1.el6.x86_64 #1 SMP Tue Mar 13 22:44:18 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux dovecot --version 2.3.1 (c5a5c0c82) dovecot -n # 2.3.1 (c5a5c0c82): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.devel (61b47828) # OS: Linux 2.6.32-696.23.1.el6.x86_64 x86_64 CentOS release 6.9 (Final) # Hostname: mailsrv01 auth_master_user_separator = * auth_verbose_passwords = sha1 default_client_limit = 2000 deliver_log_format = subject=%s from:%f sender:%e to: %{to_envelope} size:%p msgid=%m status=%$ delivery_time=%{delivery_time} session_time=%{session_time} disable_plaintext_auth = no doveadm_allowed_commands = quota get,dsync-server,kick,purge,fts rescan,altmove,mailbox list,expunge,mailbox status doveadm_password = # hidden, use -P to show it lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes lmtp_rcpt_check_quota = yes login_greeting = IMAP4. login_trusted_networks = x.x.x.x/24 mail_fsync = never mail_gid = xxx mail_location = mdbox:~/mdbox:ALT=/altstorage%h/mdbox mail_plugins = quota quota_clone fts fts_solr zlib mail_uid = xxx 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 duplicate vnd.dovecot .filter namespace inbox { inbox = yes list = yes location = mailbox "Itens Enviados" { auto = subscribe special_use = \Sent } mailbox "Itens Excluídos" { auto = subscribe special_use = \Trash } mailbox Rascunhos { auto = subscribe special_use = \Drafts } mailbox Spam { auto = subscribe special_use = \Junk } prefix = separator = . } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { fts = solr fts_solr = url=http://x.x.x.x:8983/solr/dovecot/ imapsieve_mailbox1_before = file:/etc/dovecot/antispam/report-spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Spam imapsieve_mailbox2_before = file:/etc/dovecot/antispam/report-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Spam imapsieve_mailbox2_name = * last_login_dict = redis:host=x.x.x.x:port=6379 quota = count:User quota quota_clone_dict = redis:host=x.x.x.x:port=6379 quota_rule = *:bytes=0 quota_rule2 = Itens Excluídos:storage=+xM quota_vsizes = yes quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u sieve = ~/.dovecot.sieve sieve_before = /etc/dovecot/sieve/audit.sieve sieve_before2 = /etc/dovecot/sieve/duplicate.sieve sieve_before3 = /etc/dovecot/sieve/spam.sieve sieve_dir = ~/sieve sieve_global_extensions = +vnd.dovecot.pipe sieve_pipe_bin_dir = /etc/dovecot/antispam sieve_plugins = sieve_imapsieve sieve_extprograms sieve_vacation_default_period = 7d sieve_vacation_max_period = 30d sieve_vacation_min_period = 1h } protocols = imap pop3 lmtp sieve service anvil { client_limit = 2000 } service auth { client_limit = 2000 } service doveadm { inet_listener { port = 9011 } inet_listener http { port = 9010 } vsz_limit = 768 M } service imap-login { process_limit = 800 process_min_avail = 200 service_count = 1 vsz_limit = 512 M } service imap-postlogin { executable = script-login dovecot-postlogin imap unix_listener imap-postlogin { user = mail } user = $default_internal_user } service imap { executable = imap imap-postlogin process_limit = 2 vsz_limit = 768 M } service indexer-worker { vsz_limit = 512 M } service lmtp { inet_listener lmtp { address = * port = 24 } vsz_limit = 512 M } service managesieve-login { inet_listener sieve {