On Tue, Jan 28, 2020 at 6:52 PM Jaroslaw Rafa <r...@rafa.eu.org> wrote:

>
> > postfix/trivial-rewrite[8119]: warning: connect to pgsql server
> > /var/run/postgresql: could not connect to server: No such file or
> > directory??Is the server running locally and accepting??connections on
> Unix
> > domain socket "/var/run/postgresql/.s.PGSQL.5432"??
>
> Maybe the reason is that your PostgreSQL socket isn't available from within
> Postfix chroot jail?
> Try placing it somewhere inside Postfix chroot jail.
>

Thanks for your reply. I moved the socket folder into Postfix's jail
"/var/spool/postfix/postgresql":

ls -ld /var/spool/postfix/postgresql
drwxrwsr-x 2 postgres postgres 4096 Jan 29 00:45 postgresql/

Postgresql starts correctly and creates the socket, however the issue
remains, i.e, I can connect to sever using
"psql" but I get same error messages from Postfix:

Jan 29 00:47:19 mail postfix/trivial-rewrite[10046]: warning: connect to
pgsql server /var/spool/postfix/postgresql:
could not connect to server: No such file or directory??
Is the server running locally and accepting??connections on Unix domain
socket "/var/spool/postfix/postgresql/.s.PGSQL.5432"??

Reply via email to