Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix/Dovecot not connecting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
BackinBlack
n00b
n00b


Joined: 09 May 2014
Posts: 5
Location: Baltimore, MD

PostPosted: Fri May 09, 2014 11:40 pm    Post subject: Postfix/Dovecot not connecting Reply with quote

Hi there!
I am kinda new here I have been messing with Gentoo for a few years not ( on and off )
I am setting up a small server and am in need of a small mail system.
I did one of these years ago and found it easy!
Now it seems things have changed a lot and I can seem to get anything to connect to imap or pop3

Postfix is running 100% I can send and receive mail with SSH using mutt.

But nothing outside of the box will connect to dovecot imap or pop3
the only message I get is

Code:
 *BYE Disconnected: Auth process broken
Connection to host lost.


I have no idea what is going on here years ago it worked on the first shot right after the emerge of both programs.


This is my postfix conf

Code:


command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = localhost
mydomain = domain.tld
myorigin = $myhostname
myorigin = $mydomain
inet_interfaces = all
unknown_local_recipient_reject_code = 550
mynetworks_style = host
mynetworks = 10.0.0.2/28, 127.0.0.0/8
debug_peer_level = 2
debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /etc/postfix
readme_directory = no
home_mailbox = .maildir/



and this is my dovecot conf

Code:


protocols = imap pop3 lmtp
listen = *, ::

dict {
  #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}

!include conf.d/*.conf

!include_try local.conf



even looking at my backups from years ago the conf files have change ALOT!


Thanks in advance! :oops:
Back to top
View user's profile Send private message
freke
Guru
Guru


Joined: 23 Jan 2003
Posts: 487
Location: Somewhere in Denmark

PostPosted: Sun May 11, 2014 12:08 pm    Post subject: Reply with quote

You can try to turn on verbose logging for dovecot (/etc/dovecot/conf.d/10-logging) to maybe see what exactly goes wrong.
ie.
Code:
auth_verbose = yes
auth_debug = yes


It should give some hints as to why auth fails and show the SQL-queries used.
Back to top
View user's profile Send private message
BackinBlack
n00b
n00b


Joined: 09 May 2014
Posts: 5
Location: Baltimore, MD

PostPosted: Sun May 11, 2014 11:20 pm    Post subject: Reply with quote

Odd there is no log files for either postfix or dovecot.

I went back and redid everything with the help of https://wiki.archlinux.org/index.php/Simple_Virtual_User_Mail_System

Now my postfix wont even send mail to local boxes.

I just cant seem to get it right and my box is telling me nothings wrong lol
Back to top
View user's profile Send private message
BackinBlack
n00b
n00b


Joined: 09 May 2014
Posts: 5
Location: Baltimore, MD

PostPosted: Sun May 11, 2014 11:31 pm    Post subject: Reply with quote

Okie! Got the logs flowing!

had to add to the dovecot.conf file.

Code:
 log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot-info.log


the output to this is
Code:


May 11 19:27:48 auth: Fatal: LDAP: No uris or hosts set
May 11 19:27:48 master: Error: service(auth): command startup failed, throttling for 4 secs


and the dovecot-info log is

Code:

May 11 19:27:48 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
May 11 19:27:48 imap-login: Info: Disconnected: Auth process broken (disconnected before auth was ready, wait$



For a odd reason I can remember having this problem before! :(
Back to top
View user's profile Send private message
gentoo_lamb
n00b
n00b


Joined: 19 Apr 2014
Posts: 3

PostPosted: Fri May 16, 2014 7:38 pm    Post subject: Reply with quote

It sounds like iptables is blocking dovecot from working. Add a line to your iptables rules (near the start) allowing whatever port dovecot uses. Something like this:
Code:

iptables -A INPUT -i eth0 -p tcp --dport 25 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --sport 25 -m state --state ESTABLISHED -j ACCEPT
Back to top
View user's profile Send private message
peje
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jan 2003
Posts: 98

PostPosted: Fri May 16, 2014 9:31 pm    Post subject: Reply with quote

@Backinblack I suggest you to change in the dovecot dir /etc/dovecot and run the command doveconf -n if there are errors you should first repair your config...
cu Peje
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 534

PostPosted: Sat May 17, 2014 12:23 am    Post subject: Reply with quote

I'm rather new to Postfix and Dovecot, myself, so hopefully I won't lead you astray, but:

How do /etc/dovecot/conf.d/10-auth.conf and /etc/dovecot/conf.d/auth-ldap.conf.ext look?

It sounds like it's using L.D.A.P.-based authentication, but that might not be set up properly.

Is '!include auth-ldap.conf.ext' uncommented in 10-auth.conf? Are you trying to use L.D.A.P. authentication?
Back to top
View user's profile Send private message
BackinBlack
n00b
n00b


Joined: 09 May 2014
Posts: 5
Location: Baltimore, MD

PostPosted: Sat May 17, 2014 12:27 am    Post subject: Boom! Reply with quote

Got it working! for some off the wall reason my box changed some of the info in 10-auth.
So that's working now among the other few problems I can log in with my webmail and I can send mail local but cant receive mail from the internet. or send mail to it.
I had this problem before as well! I had to walk away for a few days to calm down lol!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum