# Postfix/Dovecot not connecting

## BackinBlack

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 

```
 *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

```

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

```

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!  :Embarassed: 

----------

## freke

You can try to turn on verbose logging for dovecot (/etc/dovecot/conf.d/10-logging) to maybe see what exactly goes wrong.

ie.

```
auth_verbose = yes

auth_debug = yes
```

It should give some hints as to why auth fails and show the SQL-queries used.

----------

## BackinBlack

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

----------

## BackinBlack

Okie! Got the logs flowing! 

had to add to the dovecot.conf file.

```
 log_path = /var/log/dovecot.log

info_log_path = /var/log/dovecot-info.log

```

the output to this is 

```

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 

```

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!   :Sad: 

----------

## gentoo_lamb

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:

```

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

```

----------

## peje

@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

----------

## keet

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?

----------

## BackinBlack

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!

----------

