Skip site navigation (1) Skip section navigation (2)

Re: nossl authentication

From: Jim Nasby <decibel(at)decibel(dot)org>
To: Tom Allison <tom(at)tacocat(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org, Postfix users <postfix-users(at)postfix(dot)org>, DBMail mailinglist <dbmail(at)dbmail(dot)org>
Subject: Re: nossl authentication
Date: 2006-11-28 02:49:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Nov 19, 2006, at 10:25 AM, Tom Allison wrote:
> postfix doesn't appear to "do" SSL connections and I turned on ssl.
> I'm trying to connect to the database dbmail to read a view that I  
> created using the dbmail_ tables.  I've verified that the username  
> and password have SELECT rights to this view using psql.
> This is to support the statement in postfix of:
> local_recipient_maps = pgsql:/etc/postfix/
> where contains:
> user     =  postfix
> password =  XXXXXXXXX
> hosts    =
> dbname   =  dbmail
> query = SELECT username FROM postfix_users WHERE username = '%s'
> Everytime postfix tries to authenticate against postgresql, it  
> fails because it can't do a SSL and doesn't bother to try a non-ssl  
> connection.  At least that's what I'm led to believe.
> I've tried settting pg_hba to:
> local   all         postgres                          ident sameuser
> local   all         all                               md5
> host    dbmail      all          md5
> hostssl all         all        md5
> hostssl all         all        md5
> host    all         all         ::1/128               md5
> I keep getting the same error:
> Nov 19 10:57:11 cling postfix/smtpd[5364]: warning: connect to  
> pgsql server SSL SYSCALL error: Success?
> 2006-11-19 10:57:11 EST 5517 [unknown] LOG:  connection received:  
> host= port=32990
> 2006-11-19 10:57:11 EST 5517 [unknown] LOG:  could not accept SSL  
> connection: EOF detected
> Every one of these results in a temporary delivery failure of the  
> incoming email.  I believe it's specifically a tempororary lookup  
> failure.
> I've tried setting hostnossl connections for the user postfix but  
> they aren't being effective.

Actually, I think that means that postfix *is* trying to connect with  
SSL, but since there's no hostssl line for localhost, it's getting  

Try adding

hostssl dbmail      all          md5

to the end of the file.

Better yet would be to try getting postfix not to use SSL, since it's  
just burning cycles for no reason if postfix and PostgreSQL are on  
the same machine. Better yet would be a local socket connection. If  
you make use of pg_service.conf I suspect you can do that, even if  
postfix doesn't have the right support for it.
Jim Nasby                                            jim(at)nasby(dot)net
EnterpriseDB      512.569.9461 (cell)

In response to

pgsql-novice by date

Next:From: Jim NasbyDate: 2006-11-28 02:52:00
Subject: Re: SSL
Previous:From: Jim NasbyDate: 2006-11-28 02:37:51
Subject: Re: PostgreSQL doesn't accept connections when Windows Server is rebooted

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group