Mailing List Archive

Temporary internal error
Hello,

I'm trying to bring my new Exim config to life but am not successful.

The version is 4.93 on Ubuntu 20.04. The command 'exim -bV' doesn't show
me any obvious errors. (It does show a lot but I don't understand all of
it.) Yet when I try this test command, I get errors:

---
# exim -bt demo@test.local
demo@test.local cannot be resolved at this time: Temporary internal error

# exim -bt test@gmx.de
test@gmx.de cannot be resolved at this time: domains check lookup or
other defer
---

The address demo@test.local is registered in my database as a valid
mailbox. And gmx.de is a valid external domain. This sort of command
used to work, but now it looks like there's a problem.

But what is the problem? Journal, mainlog and paniclog have nothing
about this event. Where should I look for the relevant problem
description? How should I know how to proceed?

---
# exim -bV
Exim version 4.93 #3 built 14-May-2020 13:29:45
Copyright (c) University of Cambridge, 1995 - 2018
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007
- 2018
Berkeley DB: Berkeley DB 5.3.28: (September 9, 2013)
Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc GnuTLS
move_frozen_messages Content_Scanning DANE DKIM DNSSEC Event I18N OCSP
PRDR PROXY SOCKS TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm
dbmjz dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql
sqlite
Authenticators: cram_md5 cyrus_sasl dovecot plaintext spa tls
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram
redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Malware: f-protd f-prot6d drweb fsecure sophie clamd avast sock cmdline
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Configuration file search path is
/etc/exim4/exim4.conf:/var/lib/exim4/config.autogenerated
Configuration file is /etc/exim4/exim4.conf
---

-Yves

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Temporary internal error [ In reply to ]
On 17/09/2020 20:32, Yves Goergen via Exim-users wrote:
> exim -bt demo@test.local

exim -d -bt demo@test.local

--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Temporary internal error [ In reply to ]
Hm, this prints more details, among others:

PGSQL new connection: socket=/var/run/postgresql database=) user=dfctl
lookup deferred: PGSQL invalid filename for socket: /var/run/postgresql

I'm not sure what's exactly invalid here. But it's not what I configured
either. This is the relevant config:

PGSQL_HOST = (/var/run/postgresql/)
PGSQL_USER = mailreader
PGSQL_DB = dfctl
hide pgsql_servers = "PGSQL_HOST/PGSQL_DB/PGSQL_USER"

Somehow Exim got confused with the database connection parts. The
parenthesis syntax was explained in the documentation, to avoid
confusion with all those slashes in there. Doesn't seem to work, it got
confused.

How should I configure a PostgreSQL connection using a local socket and
no password in Exim?

The socket path works fine in Dovecot, exactly as shown, with leading
and trailing slash.



-------- Ursprüngliche Nachricht --------
Von: Jeremy Harris via Exim-users <exim-users@exim.org>
Gesendet: Donnerstag, 17. September 2020, 21:42 MESZ
Betreff: [exim] Temporary internal error

On 17/09/2020 20:32, Yves Goergen via Exim-users wrote:
exim -bt demo@test.local

exim -d -bt demo@test.local



--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Temporary internal error [ In reply to ]
One step further: I added another slash at the database connection and
just left the password empty. Now I get this output:

PGSQL new connection: socket=/var/run/postgresql/ database=dfctl
user=mailreader
lookup deferred: PGSQL invalid filename for socket: /var/run/postgresql/

The first line looks as expected now, and the second, too. But why can't
Exim accept that path if all other applications can?



-------- Ursprüngliche Nachricht --------
Von: Yves Goergen via Exim-users <exim-users@exim.org>
Gesendet: Donnerstag, 17. September 2020, 21:56 MESZ
Betreff: [exim] Temporary internal error

Hm, this prints more details, among others:

PGSQL new connection: socket=/var/run/postgresql database=) user=dfctl
lookup deferred: PGSQL invalid filename for socket: /var/run/postgresql

I'm not sure what's exactly invalid here. But it's not what I configured
either. This is the relevant config:

PGSQL_HOST = (/var/run/postgresql/)
PGSQL_USER = mailreader
PGSQL_DB = dfctl
hide pgsql_servers = "PGSQL_HOST/PGSQL_DB/PGSQL_USER"

Somehow Exim got confused with the database connection parts. The
parenthesis syntax was explained in the documentation, to avoid
confusion with all those slashes in there. Doesn't seem to work, it got
confused.

How should I configure a PostgreSQL connection using a local socket and
no password in Exim?

The socket path works fine in Dovecot, exactly as shown, with leading
and trailing slash.



-------- Ursprüngliche Nachricht --------
Von: Jeremy Harris via Exim-users <exim-users@exim.org>
Gesendet: Donnerstag, 17. September 2020, 21:42 MESZ
Betreff: [exim] Temporary internal error

On 17/09/2020 20:32, Yves Goergen via Exim-users wrote:
exim -bt demo@test.local

exim -d -bt demo@test.local





--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Temporary internal error [ In reply to ]
On 17/09/2020 20:56, Yves Goergen via Exim-users wrote:
>  PGSQL new connection: socket=/var/run/postgresql database=) user=dfctl
>  lookup deferred: PGSQL invalid filename for socket: /var/run/postgresql
>
> I'm not sure what's exactly invalid here. But it's not what I configured
> either. This is the relevant config:
>
> PGSQL_HOST = (/var/run/postgresql/)

Try with PGSQL_HOST = (/var/run/postgresql)

What does that do?

> PGSQL_USER = mailreader
> PGSQL_DB   = dfctl
> hide pgsql_servers = "PGSQL_HOST/PGSQL_DB/PGSQL_USER"

--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Temporary internal error [ In reply to ]
It does the same, just without the trailing slash. Note that this path
is a directory, not a file.

I couldn't find any web page that mentions using a Postgres database
through a UNIX socket with Exim. Am I the first to try that?



-------- Ursprüngliche Nachricht --------
Von: Jeremy Harris via Exim-users <exim-users@exim.org>
Gesendet: Donnerstag, 17. September 2020, 22:31 MESZ
Betreff: [exim] Temporary internal error

On 17/09/2020 20:56, Yves Goergen via Exim-users wrote:
 PGSQL new connection: socket=/var/run/postgresql database=) user=dfctl
 lookup deferred: PGSQL invalid filename for socket: /var/run/postgresql

I'm not sure what's exactly invalid here. But it's not what I configured
either. This is the relevant config:

PGSQL_HOST = (/var/run/postgresql/)

Try with PGSQL_HOST = (/var/run/postgresql)

What does that do?

PGSQL_USER = mailreader
PGSQL_DB   = dfctl
hide pgsql_servers = "PGSQL_HOST/PGSQL_DB/PGSQL_USER"



--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Temporary internal error [ In reply to ]
On 17/09/2020 20:56, Yves Goergen via Exim-users wrote:
> PGSQL new connection: socket=/var/run/postgresql database=)
> user=dfctl
> lookup deferred: PGSQL invalid filename for socket:
> /var/run/postgresql
>
> I'm not sure what's exactly invalid here.

On Thu, 2020-09-17 at 22:43 +0200, Yves Goergen via Exim-users wrote:
> It does the same, just without the trailing slash. Note that this
> path is a directory, not a file.

A UNIX domain socket is simply a special kind of file. The error
message refers to a filename, and the example in the documentation uses
a filename. So why are you passing it a directory name, rather than a
filename? :-)

Regards,

Adam


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Temporary internal error [ In reply to ]
Every application seems to want the directory only and figure out what
to do from there. Exim is different, it wants the explicit file. Now it
works.

Thank you.

The error message might be more helpful if it mentioned what exactly is
"invalid" here.

I also found this code:
https://fossies.org/linux/exim/src/lookups/pgsql.c - Looks like the path
must contain a slash and a dot and then Exim takes that apart in a
certain way. This could simply be included in the message to give a hint
about the file name required.



-------- Ursprüngliche Nachricht --------
Von: Adam D. Barratt via Exim-users <exim-users@exim.org>
Gesendet: Donnerstag, 17. September 2020, 23:23 MESZ
Betreff: [exim] Temporary internal error

On 17/09/2020 20:56, Yves Goergen via Exim-users wrote:
PGSQL new connection: socket=/var/run/postgresql database=)
user=dfctl
lookup deferred: PGSQL invalid filename for socket:
/var/run/postgresql

I'm not sure what's exactly invalid here.

On Thu, 2020-09-17 at 22:43 +0200, Yves Goergen via Exim-users wrote:
It does the same, just without the trailing slash. Note that this
path is a directory, not a file.

A UNIX domain socket is simply a special kind of file. The error
message refers to a filename, and the example in the documentation uses
a filename. So why are you passing it a directory name, rather than a
filename? :-)

Regards,

Adam




--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Temporary internal error [ In reply to ]
On 9/17/2020 1:56 PM, Yves Goergen via Exim-users wrote:
> Hm, this prints more details, among others:
>
>  PGSQL new connection: socket=/var/run/postgresql database=) user=dfctl
>  lookup deferred: PGSQL invalid filename for socket: /var/run/postgresql
>
> I'm not sure what's exactly invalid here. But it's not what I
> configured either. This is the relevant config:
>
> PGSQL_HOST = (/var/run/postgresql/)
> PGSQL_USER = mailreader
> PGSQL_DB   = dfctl
> hide pgsql_servers = "PGSQL_HOST/PGSQL_DB/PGSQL_USER"
>

I can tell you at least one problem right off. Ubuntu 20.04 doesn't use
/var/run but /run. In fact, there IS NO /var/run directory! I had to
deal with the same thing for another program. I wound up just making a
symlink of /run in /var/run (i.e. ln -s /run /var/run) and that solved
the issue.  But you don't have to do that. Since your config shows
/var/run/postgresql then change it to /run/postgresql and see if that
doesn't help.


--
--- Dan



--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Temporary internal error [ In reply to ]
Frankly, if other programs are accepting /var/run then something is
screwy. I've got Ubuntu 20.04 LTS on my server and /var/run doesn't
exist without help. I.e.:
lrwxrwxrwx 1 root root 4 May 17 05:52 /var/run -> /run


On 9/17/2020 2:20 PM, Yves Goergen via Exim-users wrote:
> One step further: I added another slash at the database connection and
> just left the password empty. Now I get this output:
>
>  PGSQL new connection: socket=/var/run/postgresql/ database=dfctl
> user=mailreader
>  lookup deferred: PGSQL invalid filename for socket: /var/run/postgresql/
>
> The first line looks as expected now, and the second, too. But why
> can't Exim accept that path if all other applications can?
>
>
>
> -------- Ursprüngliche Nachricht --------
> Von: Yves Goergen via Exim-users <exim-users@exim.org>
> Gesendet: Donnerstag, 17. September 2020, 21:56 MESZ
> Betreff: [exim] Temporary internal error
>
> Hm, this prints more details, among others:
>
>    PGSQL new connection: socket=/var/run/postgresql database=) user=dfctl
>    lookup deferred: PGSQL invalid filename for socket:
> /var/run/postgresql
>
> I'm not sure what's exactly invalid here. But it's not what I configured
> either. This is the relevant config:
>
> PGSQL_HOST = (/var/run/postgresql/)
> PGSQL_USER = mailreader
> PGSQL_DB   = dfctl
> hide pgsql_servers = "PGSQL_HOST/PGSQL_DB/PGSQL_USER"
>
> Somehow Exim got confused with the database connection parts. The
> parenthesis syntax was explained in the documentation, to avoid
> confusion with all those slashes in there. Doesn't seem to work, it got
> confused.
>
> How should I configure a PostgreSQL connection using a local socket and
> no password in Exim?
>
> The socket path works fine in Dovecot, exactly as shown, with leading
> and trailing slash.
>
>
>
> -------- Ursprüngliche Nachricht --------
> Von: Jeremy Harris via Exim-users <exim-users@exim.org>
> Gesendet: Donnerstag, 17. September 2020, 21:42 MESZ
> Betreff: [exim] Temporary internal error
>
> On 17/09/2020 20:32, Yves Goergen via Exim-users wrote:
> exim -bt demo@test.local
>
> exim -d -bt demo@test.local
>
>
>
>
>

--
--- Dan


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Temporary internal error [ In reply to ]
Yes, /var/run does exist. That wasn't my issue. It was that Exim needs
the full file name of the socket (/var/run/postgresql/.s.PGSQL.5432),
not just the directory (/var/run/postgresql) as other programs.

But I noticed that /var/run is a link to /run. I might change my
configurations to use /run directly. Not sure if that's better.

-Yves


-------- Ursprüngliche Nachricht --------
Von: Dan Egli via Exim-users <exim-users@exim.org>
Gesendet: Freitag, 18. September 2020, 04:16 MESZ
Betreff: [exim] Temporary internal error

On 9/17/2020 1:56 PM, Yves Goergen via Exim-users wrote:
Hm, this prints more details, among others:

 PGSQL new connection: socket=/var/run/postgresql database=) user=dfctl
 lookup deferred: PGSQL invalid filename for socket: /var/run/postgresql

I'm not sure what's exactly invalid here. But it's not what I
configured either. This is the relevant config:

PGSQL_HOST = (/var/run/postgresql/)
PGSQL_USER = mailreader
PGSQL_DB   = dfctl
hide pgsql_servers = "PGSQL_HOST/PGSQL_DB/PGSQL_USER"


I can tell you at least one problem right off. Ubuntu 20.04 doesn't use
/var/run but /run. In fact, there IS NO /var/run directory! I had to
deal with the same thing for another program. I wound up just making a
symlink of /run in /var/run (i.e. ln -s /run /var/run) and that solved
the issue.  But you don't have to do that. Since your config shows
/var/run/postgresql then change it to /run/postgresql and see if that
doesn't help.




--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/