[exim] Re: Unable to deliver mail to localuser: local_delive…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Zacchaeus Scheffer
Dátum:  
Címzett: exim-users
Tárgy: [exim] Re: Unable to deliver mail to localuser: local_delivery defer (-1) Frozen
> Try a manual delivery of the spooled message, with debug enabled :-
>
> # exim -d+all -M 1s1rwf-00034B-0B 2>&1 | tee debuglog
>
> and inspect the detailed debug output. Find the part where
> it starts running the transport, specifically.
> --
> Cheers,
> Jeremy


Thanks Jeremy! At first, when I tried to run that command as root, it gave
some output ending with:

18:56:50 825 LOG: PANIC DIE
18:56:50 825 Cannot open main log file "/var/spool/exim/log/mainlog":
Permission denied: euid=0 egid=0
18:56:50 825 2024-05-09 18:56:50 Warning: purging the environment.
18:56:50 825 Suggested action: use keep_environment.
18:56:50 825 2024-05-09 18:56:50 Cannot open main log file
"/var/spool/exim/log/mainlog": Permission denied: euid=0 egid=0
18:56:50 825 exim: could not open panic log - aborting: see message(s)
above
18:56:50 825 search_tidyup called
18:56:50 825 >>>>>>>>>>>>>>>> Exim pid=825 (fresh-exec) terminating with
rc=1 >>>>>>>>>>>>>>>>

However, when I ran it inside "su - exim -s /bin/sh" (exim user:group is
exim:exim), I get the full following output:

19:01:24   888 Exim version 4.96.1 uid=979 gid=974 pid=888 D=fff9ffff
19:01:24   888 Support for: crypteq iconv() GnuTLS TLS_resume DANE DKIM
DNSSEC Event OCSP PIPECONNECT PRDR Queue_Ramp TCP_Fast_Open
19:01:24   888 Lookups (built-in): lsearch wildlsearch nwildlsearch
iplsearch dbm dbmjz dbmnz dnsdb
19:01:24   888 Authenticators: cram_md5 dovecot external plaintext spa tls
19:01:24   888 Routers: accept dnslookup ipliteral manualroute queryprogram
redirect
19:01:24   888 Transports: appendfile autoreply pipe smtp
19:01:24   888 Configure owner: 0:0
19:01:24   888 Size of off_t: 8
19:01:24   888 Compiler: GCC [11.3.0]
19:01:24   888 Library version: Glibc: Compile: 2.35
19:01:24   888                         Runtime: 2.35
19:01:24   888 Library version: BDB: Compile: Berkeley DB 5.3.28:
(September  9, 2013)
19:01:24   888                       Runtime: Berkeley DB 5.3.28:
(September  9, 2013)
19:01:24   888 Library version: GnuTLS: Compile: 3.7.7
19:01:24   888                          Runtime: 3.8.3
19:01:24   888 Library version: PCRE2: Compile: 10.40
19:01:24   888                         Runtime: 10.40 2022-04-14
19:01:24   888 Total 9 lookups
19:01:24   888 WHITELIST_D_MACROS unset
19:01:24   888 TRUSTED_CONFIG_LIST unset
19:01:24   888 Exim has no root privilege: uid=979 gid=974 euid=979 egid=974
19:01:24   888 changed uid/gid: forcing real = effective
19:01:24   888   uid=979 gid=974 pid=888
19:01:24   888   auxiliary group list: 974 1000
19:01:24   888 seeking password data for user "root": cache not available
19:01:24   888 getpwnam() succeeded uid=0 gid=0
19:01:24   888 LOG: MAIN
19:01:24   888   Warning: purging the environment.
19:01:24   888  Suggested action: use keep_environment.
2024-05-09 19:01:24 Warning: purging the environment.
 Suggested action: use keep_environment.
19:01:24   888 configuration file is
/gnu/store/076bissc2g84ic1lcb5jw9hx3wnvl7j7-exim-4.96.1/etc/exim.conf
19:01:24   888 log selectors = 0000cffc 64205022 0000000c
19:01:24   888 cwd=/var/empty 4 args: exim -d+all -M 1s1rwf-00034B-0B
exim: debugging permission denied


Seems like when running as root, exim refuses to keep root permissions, but
when running as exim, it has insufficient privileges? I have the following
local_delivery section:

local_delivery:
driver = appendfile
file = /var/mail/$local_part_data
delivery_date_add
envelope_to_add
return_path_add
#group = exim
#mode = 0660

and I have the /var/mail directory set like so:

# ls -la /var/mail
total 0
drwxrwxrwt 1 exim exim 0 Apr 30 17:10 ./
drwxr-xr-x 1 root root 88 May 9 18:39 ../


Thanks for the help,
-Zacchae

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/