# Postfix / Dovecot handshake failure for auth

## aschuBP

I normally use Gentoo to build webservers, not for email, so I was already in a bit of unfamiliar territory when I started this. I followed a few guides to what should (I would hope) have been a simple setup. To fully explain where we are in this build I'll need to go over a few things first.

This server is supposed to be an email server to transfer our business email over to from our current web server so as to have it stored locally in the office. The accounts at our domain are currently active, so I need to setup and test the server as well as migrate all the mail to the new server, before actually changing the domain over. I have a feeling this might be part of where the trouble is (regarding host names, etc).

Postfix starts, Dovecot starts, Squirrelmail is installed, but can't log into any mail accounts, the a mail client (thunderbird) can't connect to the server or verify its settings. The error log gives me the following:

 *Quote:*   

> 
> 
> Aug 28 16:09:01 beplused postfix/smtpd[31782]: error: open database /etc/mail/aliases.db: No such file or directory
> 
> Aug 28 16:09:01 beplused postfix/smtpd[31782]: cannot load Certificate Authority data: disabling TLS support
> ...

 

What other information is needed to start addressing this problem? As the server currently sits it has MySQL, PHP, Apache, Postfix, Dovecot, Squirrelmail, Horde installed.

Thanks for your help ahead of time, and I apologize for the vagueness of the actual question.

----------

## nativemad

Hi, 

 *Quote:*   

> Aug 28 16:09:01 beplused postfix/smtpd[31782]: error: open database /etc/mail/aliases.db: No such file or directory

 

To get rid of these entries, just run "newaliases" as root once.

 *Quote:*   

> Aug 28 16:09:01 beplused postfix/smtpd[31782]: warning: non-null host address bits in "127.0.0.1/8", perhaps you should use "127.0.0.0/8" instead 

 

Check that in main.cf the mynetworks variable is set to 127.0.0.0/8 (besides your other local networks)

 *Quote:*   

> Aug 28 16:09:01 beplused dovecot: auth: Fatal: Support not compiled in for passdb driver 'pam' 

 

It seems that you haven't had the USE-flag "pam" set, while you compiled dovecot... 

 *Quote:*   

> Aug 28 16:09:01 beplused postfix/smtpd[31790]: warning: SASL: Connect to private/auth failed: No such file or directory 
> 
> Aug 28 16:09:01 beplused postfix/smtpd[31790]: fatal: no SASL authentication mechanisms

 

This looks like you haven't had the USE-flag "dovecot-sasl" set, while you compiled postfix.

The hostnames shouldn't really be a problem, just use /etc/hosts to test things out.

But it looks like you tested the smtp-auth first (sending mails), which is a bit more complicated as postfix is hooked on dovecot... I would probably first just setup and test imap and pop3, as it is the same thing, but just plain dovecot... If that works, postfix should also be able to use it or at least you know where to search  :Wink: 

Hope that helps a bit... If not, the relevant parts of main.cf and dovecot.conf would be interesting, as well as a new log!   :Wink: 

Cheers

----------

## aschuBP

I re emerged postfix and dovecot and that fixed a good amount of the problems I was seeing, however there is another problem more evident now. (I'm also testing using telnet instead of a mail client). Here is the error log:

 *Quote:*   

> 
> 
> Sep 14 16:09:23 master: Warning: Killed with signal 15 (by pid=12643 uid=0 code=kill)
> 
> Sep 14 16:09:23 master: Info: Dovecot v2.0.19 starting up (core dumps disabled)
> ...

 

After looking up this error the solution was that the USE flag for pam is apparently not enabled, but when I went to enable it, it was already there. So now I'm at a loss of what to try next. For reference  here are the applicable use flags:

 *Quote:*   

> 
> 
> # Replace mysql with postgres for PostgreSQL
> 
> mail-mta/postfix dovecot-sasl mysql vda -pam
> ...

 

(It was short enough that I decided to post the entire file in case something is conflicting). Any more suggestions?

----------

## cach0rr0

 *aschuBP wrote:*   

> 
> 
> [codee]
> 
> # Replace mysql with postgres for PostgreSQL
> ...

 

what is this? your package.use ? 

because the above has USE="-pam" for both dovecot and postfix, meaning, pam == disabled

you also dont have pam enabled for cyrus-sasl

----------

