Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 15th July 2012, 23:26
mroppolo mroppolo is offline
Junior Member
 
Join Date: Jan 2010
Posts: 22
Thanks: 2
Thanked 0 Times in 0 Posts
Default imapsync: Can not open imap connection: Connection refused

Hi all -

I've just set up a new Debian "Squeeze" server and discovered imapsync was no longer part of the distribution. Fortunately, I kept a copy of the old package and installed it, including the related support packages.

When I issue the imapsync command:
imapsync \
--host1 <SourceServer> --user1 <EmailUser> --password1 <Password> --port1 163 --authmech1 LOGIN \
--host2 <DestServer> --user2 <EmailUser> --password2 <Password> --port2 164
I receive the error:
Can not open imap connection on <DestServer> with user <EmailUser> : IO::Socket::INET: connect: Connection refused
I used the following instructions from "The Perfect Server - Debian Squeeze (Debian 6.0) With BIND & Dovecot [ISPConfig 3]"

I double checked my router ports and they seem fine. ifconfig on the <DestServer> displays the correct IP address, but I cannot Telnet to it using port 164 (hence the connection refused error).

Can anyone help me resolve this ?

Thanks !
Reply With Quote
Sponsored Links
  #2  
Old 16th July 2012, 11:04
TiTex TiTex is offline
Senior Member
 
Join Date: Aug 2011
Location: Cluj-Napoca,Romania
Posts: 125
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via Skype™ to TiTex
Default

is your imap server actually runing on --port2 164 ?
or you redirected from your router external 164 to internal 143 ?
are your sure that the server isn't firewalled on the imap port ?
Reply With Quote
  #3  
Old 16th July 2012, 14:50
mroppolo mroppolo is offline
Junior Member
 
Join Date: Jan 2010
Posts: 22
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I'm really running imapsync on ports 143 and 144. I just changed the numbers in the thread to obfuscate.

1) I don't know how to verify on which port imap is running. I assumed it was port 143
2) I'm certain I'm not redirecting via the router
3) I don't know how to check if there's a a firewall blockage

If you could provide me with details, I will take a look and report back.

Thanks !
Reply With Quote
  #4  
Old 16th July 2012, 15:30
TiTex TiTex is offline
Senior Member
 
Join Date: Aug 2011
Location: Cluj-Napoca,Romania
Posts: 125
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via Skype™ to TiTex
Default

the easyest way to check if you establish the connection is with telnet
like if you're runing imapsync on the server where you will copy the mailbox
Code:
telnet mail-server.to-transfer.from 143
if this gives you connection refused or time out then you should check on that server from a terminal if imap is actually running ,
Code:
netstat -tnlp | grep 143
or
Code:
telnet localhost 143
if this works then check your firewall
Code:
iptables -nL
and 3rd check you router if your port's are configured as it should
external ip port -> internal server's ip imap port

Last edited by TiTex; 16th July 2012 at 17:37.
Reply With Quote
The Following User Says Thank You to TiTex For This Useful Post:
mroppolo (17th July 2012)
  #5  
Old 16th July 2012, 16:56
mroppolo mroppolo is offline
Junior Member
 
Join Date: Jan 2010
Posts: 22
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Thanks for the instructions ! I'm at work now, but will give it a try and provide an update later tonight.
Reply With Quote
  #6  
Old 17th July 2012, 03:29
mroppolo mroppolo is offline
Junior Member
 
Join Date: Jan 2010
Posts: 22
Thanks: 2
Thanked 0 Times in 0 Posts
 
Default It's Face-Palm time !

I discovered the error of my ways.

imap is running on the same port on both servers. I apparently mis-typed the command when I made my installation notes the last time I did this.

Thanks for taking the time to help me.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ispconfig 3 cant receive emails lishaw1968 Installation/Configuration 25 19th August 2013 10:37
ISPConfig "backend" completely unfunctional after a restart Xaymar Installation/Configuration 1 22nd August 2011 22:31
ISPConfig 3 Send/Receive mail not working. Acidut General 6 4th April 2010 11:24
High on Lenny - Lvm Mount Problem Serverman Technical 1 23rd June 2009 16:26
Mail not working epicuniversal General 5 13th June 2009 08:24


All times are GMT +2. The time now is 09:08.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.