LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-23-2014, 07:11 AM   #1
Jason.01
LQ Newbie
 
Registered: May 2014
Posts: 7

Rep: Reputation: Disabled
Dovecot... Imap port problem


Im having problem seting up dovecot with imap emailing. I did edit dovecot.conf to listen to imap port 143 but every test with telnet returns in failure.
I followed ubuntu how-to on for dovecot. here https://help.ubuntu.com/community/Dovecot
Help find the mistake please. Any other files needed to edit or any iptables i have to open to get this working ?

This the error :
Quote:
telnet localhost 143
Trying ::1...
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
This is my dovecot.conf file :
Quote:
!include_try local.conf
protocols = imap
mail_location = maildir:/home/%u/Maildir
imap_listen = localhost

listen = *
protocol imap {
listen = *:143
ssl_listen = *:10943
..
}




disable_plaintext_auth = no
this is my Netstate -a
Quote:
root@server1:/home/sysadmin# netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 server1.mysite.:domain *:* LISTEN
tcp 0 0 10.0.3.15:domain *:* LISTEN
tcp 0 0 10.0.2.15:domain *:* LISTEN
tcp 0 0 localhost:domain *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:telnet *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp 0 0 localhost:953 *:* LISTEN
tcp 0 0 10.0.2.15:53977 direkte.vg.no:http ESTABLISHED
tcp 0 0 10.0.2.15:58587 direkte.vg.no:http TIME_WAIT
tcp 0 0 10.0.2.15:37296 track.adform.net:http TIME_WAIT
tcp 0 0 10.0.2.15:40376 50.31.164.186:https ESTABLISHED
tcp 116 0 10.0.2.15:50261 stackoverflow.com:https ESTABLISHED
tcp 0 0 10.0.2.15:36350 ec2-46-137-99-250.:http ESTABLISHED
tcp 0 0 10.0.2.15:58584 direkte.vg.no:http TIME_WAIT
tcp 116 0 10.0.2.15:50246 stackoverflow.com:https ESTABLISHED
tcp6 0 0 [::]:domain [::]:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN
tcp6 0 0 [::]:smtp [::]:* LISTEN
tcp6 0 0 localhost:953 [::]:* LISTEN
udp 0 0 server1.mysite.:domain *:*
udp 0 0 10.0.3.15:domain *:*
udp 0 0 10.0.2.15:domain *:*
udp 0 0 localhost:domain *:*
udp 0 0 *:bootpc *:*
udp 0 0 *:bootpc *:*
udp 0 0 *:51840 *:*
udp 0 0 *:42998 *:*
udp6 0 0 [::]:domain [::]:*
udp6 0 0 [::]:37494 [::]:*
udp6 0 0 [::]:42998 [::]:*
My understanding is SSL is not neccesary.

Last edited by Jason.01; 05-23-2014 at 07:13 AM.
 
Old 05-23-2014, 12:00 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Any other files needed to edit or any iptables i
You need to open port 143 on the fire wall for ssh if you want to ssh into it.
 
Old 05-23-2014, 03:04 PM   #3
GunFighT
Member
 
Registered: May 2014
Location: Romania
Distribution: Debian/Ubuntu, Rocky Linux
Posts: 53

Rep: Reputation: Disabled
Try with this:
Quote:
iptables -A INPUT -p tcp --dport 143 -j ACCEPT
Also try this:
Quote:
nmap -p 143 you`re.IP.address
from a remote linux machine.
 
Old 05-23-2014, 03:21 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
@OP
From the netstat output it's obvious that dovecot is not running.
Try to start the service and if it's not starting have a look at the logs (usually /var/log/mail.log) to find the reason. Then do what others say about opening port 143 in firewall

Also from the the netstat output, I see that you're running telnet. For security reasons, better stop it and use ssh to access your box


Regards
 
1 members found this post helpful.
Old 05-25-2014, 12:25 PM   #5
Jason.01
LQ Newbie
 
Registered: May 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
As batory said, my problem is dovecot is not running properly. This is causing really headache cause I cant seem to find settings that run with new 2.2.9 configurations.
My goal is only to use dovecot with Thunderbird to fetch email trough imap, no sql setting.
Follwing Ubuntu own dovecot guide has not helped me either https://help.ubuntu.com/community/Dovecot


This is 2014 setting for dovecot.conf but its still not working for me.

Quote:
!include conf.d/*.conf
protocols = imap

disable_plaintext_auth = no

ssl = no

log_path = /var/log/dovecot

mail_location = maildir:/home/%u/Maildir

protocol lda {

hostname = mail.primary_domain.tld

postmaster_address = postmaster@mysite.com

auth_socket_path = /var/run/dovecot/auth-master

mail_plugin_dir = /usr/lib/dovecot/modules/

mail_plugins = cmusieve

}

This is the error i get from this dovecot.conf setting when i do service dovecot start after stopping.

Quote:
Fatal: Dovecot is already running with PID 5390 (read from /var/run/dovecot/master.pid)
service dovecot restart
Quote:
service dovecot restart
dovecot stop/waiting
dovecot start/running, process 5584
Does not look like dovecot is running i suppose

Last edited by Jason.01; 05-25-2014 at 12:44 PM.
 
Old 05-25-2014, 12:31 PM   #6
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Check the state on 5390, it may have turned zombie on you. Kill it and try again.
 
Old 05-25-2014, 01:55 PM   #7
Jason.01
LQ Newbie
 
Registered: May 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
Cant see it as zombie

ps aux | grep 'Z'
Quote:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 5727 0.0 0.0 4684 824 pts/0 S+ 20:50 0:00 grep --color=auto Z
 
Old 05-25-2014, 04:06 PM   #8
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Can you see it running? If you can't find it running, you can delete the /var/run/dovecot/master.pid, it may have been created accidentally while you were working on it (starting/stopping) sometimes you can interrupt the service at the wrong moment and it doesn't get a chance to clean up. I don't know the command in dovecot but it's generally more productive to just tell the machine to read the configs rather than knock it down and then bring it back up.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Imap folders missing after changing mail servers - Dovecot Problem asiri85 Linux - Server 1 02-22-2011 05:10 PM
DOVECOT SSL/TLS connection problem on port 993 or 995 volga629 Linux - Server 9 12-16-2009 08:30 PM
dovecot IMAP simple problem a7mlinux Linux - General 1 07-11-2009 05:18 AM
Difference between Dovecot IMAP and Cyrus IMAP sever ? rajdeepbhattacharya Linux - Newbie 3 06-18-2008 03:20 AM
Dovecot imap mailbox access problem from network. vedang Fedora 2 12-26-2006 11:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration