Hi all,
First sorry i really couldn't find it back been searching everywhere even the docs and its bit confusing. I am using # doveadm -D sync -u *@mydomain.net remote:myserver.net # which works perfect however for security reasons we now need to change the sshd port on the remote server. How do i tell doveadm to use a custom SSH port (would love to continue to use just the ssh connection), if anyone could explain that would be great, because all i found is custom tcp or tcp ssl which is not what we want to use, as i wish to stick with custom ssh port.
Regards, r.
-- This email was Virus checked by UTM 9. http://www.astaro.org
On 11/18/2014 03:23 AM, dvm@rdyn.net wrote:
Hi all,
First sorry i really couldn't find it back been searching everywhere even the docs and its bit confusing. I am using # doveadm -D sync -u *@mydomain.net remote:myserver.net # which works perfect however for security reasons we now need to change the sshd port on the remote server. How do i tell doveadm to use a custom SSH port (would love to continue to use just the ssh connection), if anyone could explain that would be great, because all i found is custom tcp or tcp ssl which is not what we want to use, as i wish to stick with custom ssh port.
From the dsync man page
EXAMPLE SYNCHRONIZATION Synchronize mailboxes with a remote server. Any errors are written to stderr.
doveadm sync -u username@example.com
remote:server-replica.example.com
If you need more complex parameters to ssh, you can use e.g.:
doveadm sync -u username@example.com ssh -i id_dsa.dovecot \
mailuser@example.com doveadm dsync-server -u
username@example.com
Hi,
Thanks. Like i said i read it all and somehow i have some trouble interpreting it and that is why i mentioned that i kinly asked for some help not re-quoting the manual as that didn't lead to a successful attempt so after reading everything and trying everything out i tried the mailing-list.
the page is actually confusing and a kind user (thank you so much) emailed me and helped me out. (the man page is actually not correct in my opinion or i totally interpret it wrong :)
This did work :
# doveadm sync -u mailboxuser@mydomain.com ssh -p 15223 SSHLOGINUSER@mydomain.com doveadm dsync-server -u mailboxuser@mydomain.com
The main difference is the -p parameter (not present in sample and doc neither is the -i parameter so please next time don't quote blindly) and that it is the SSHLOGINuser that's important which in the sample is called mail-user (not the same in my opinion). Again i might have read it all wrong but else a small update to the wiki could be useful ? thanks mailing-list and the user that helped me out.
regards,
On 2014-11-18 09:32, Gedalya wrote:
On 11/18/2014 03:23 AM, dvm@rdyn.net wrote:
Hi all,
First sorry i really couldn't find it back been searching everywhere even the docs and its bit confusing. I am using # doveadm -D sync -u *@mydomain.net remote:myserver.net # which works perfect however for security reasons we now need to change the sshd port on the remote server. How do i tell doveadm to use a custom SSH port (would love to continue to use just the ssh connection), if anyone could explain that would be great, because all i found is custom tcp or tcp ssl which is not what we want to use, as i wish to stick with custom ssh port. From the dsync man page
EXAMPLE SYNCHRONIZATION Synchronize mailboxes with a remote server. Any errors are written to stderr.
doveadm sync -u username@example.com remote:server-replica.example.com
If you need more complex parameters to ssh, you can use e.g.:
doveadm sync -u username@example.com ssh -i id_dsa.dovecot
mailuser@example.com doveadm dsync-server -u username@example.com
On 11/18/2014 04:09 AM, dvm@rdyn.net wrote:
Hi,
Thanks. Like i said i read it all and somehow i have some trouble interpreting it and that is why i mentioned that i kinly asked for some help not re-quoting the manual as that didn't lead to a successful attempt so after reading everything and trying everything out i tried the mailing-list.
the page is actually confusing and a kind user (thank you so much) emailed me and helped me out. (the man page is actually not correct in my opinion or i totally interpret it wrong :)
You did. The man page is not confusing. It's also not there to tell you how to use a custom SSH port. it does way better. It tells you how to use *any* custom ssh options. For more information about that, see man ssh. The -i is an ssh option to use a private key file, -p to specify a remote port. Like I said, see man ssh.
This did work :
# doveadm sync -u mailboxuser@mydomain.com ssh -p 15223 SSHLOGINUSER@mydomain.com doveadm dsync-server -u mailboxuser@mydomain.com
The main difference is the -p parameter (not present in sample and doc neither is the -i parameter so please next time don't quote blindly)
They are present. See man ssh.
If you need more complex parameters to ssh, you can use e.g.: That's not blind. Notice the "parameters to ssh" and the "e.g." parts.
and that it is the SSHLOGINuser that's important which in the sample is called mail-user (not the same in my opinion). Again i might have read it all wrong but else a small update to the wiki could be useful ? thanks mailing-list and the user that helped me out.
Admittedly, I didn't help you, and someone else did. That's apparent. I nevertheless took the trouble to attempt to clarify what I did do.
Let's do even more:
doveadm sync -u mailboxuser@mydomain.com ssh -p 15223 SSHLOGINUSER@mydomain.com doveadm dsync-server -u mailboxuser@mydomain.com
part 1: doveadm sync -u mailboxuser@mydomain.com explanation: invoke dsync locally as mailboxuser@mydomain.com rest of the line (part 2 and 3): what command dsync should run in order to reach the other side part 2: ssh -p 15223 SSHLOGINUSER@mydomain.com a very ordinary invokation of ssh, with the -p parameter part 3, to be read as the rest of the *ssh command*, which is, what command to run on the remote server.
SSH(1) BSD General Commands Manual SSH(1)
NAME ssh — OpenSSH SSH client (remote login program)
SYNOPSIS ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-Q cipher | cipher-auth | mac | kex | key] [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command]
note the final "[command]" bit.
participants (2)
-
dvm@rdyn.net
-
Gedalya