#1000843 exim4: set message_id_header_domain cause SIGSEGV (maybe attempt to write to immutable memory)

#1000843#5
Date:
2021-11-30 05:56:46 UTC
From:
To:
Dear Maintainer,

When I set 'message_id_header_domain', 'message_id_header_text'
in /etc/exim4/exim4.conf.localmacros,

    % sendmail -t < test
    2021-11-30 14:50:47 1mrw2R-000EV4-KH SIGSEGV (maybe attempt to write to
    immutable memory)
    55742 segmentation fault  sendmail -t < test

If I remove these parameter, just fine.

Best Wishes,
Youhei

#1000843#10
Date:
2021-11-30 17:42:27 UTC
From:
To:
[...]

Hmm. Works for me:
ametzler@argenau:~$ /usr/sbin/exim  -bP | grep message_id
message_id_header_domain = midonly.argenau.bebt.de
message_id_header_text = blah
ametzler@argenau:~$ printf 'To: ametzler@localhost\nFrom: ametzler@localhost\nSubject: test\n\nblah\n' | /usr/sbin/sendmail -t
You have mail in /var/mail/ametzler

Anything special on your system?

cu Andreas

#1000843#15
Date:
2021-12-01 08:55:27 UTC
From:
To:
Hi, thanks for reply.
1. simple smarthost settings
   % cat update-exim4.conf.conf | grep -v ^#

   dc_eximconfig_configtype='smarthost'
   dc_other_hostnames=''
   dc_local_interfaces='127.0.0.1 ; ::1'
   dc_readhost='localhost'
   dc_relay_domains=''
   dc_minimaldns='false'
   dc_relay_nets=''
   dc_smarthost='mydomain.smtp.server::587'  <-- replaced
   CFILEMODE='644'
   dc_use_split_config='false'
   dc_hide_mailname='true'
   dc_mailname_in_oh='true'
   dc_localdelivery='maildir_home'

2. exim4.conf.localmacros as follows:
   % cat exim4.conf.localmacros
   MAILDIR_HOME_MAILDIR_LOCATION = $home/Maildir/INBOX
   message_id_header_domain = does.not.exist.domain <-- replaced
   message_id_header_text = hogehero                <-- replaced

...the exim4 started to check if the header_domain
can be resolved properly?

Best Wishes,
Youhei

#1000843#20
Date:
2021-12-02 17:34:06 UTC
From:
To:
Hello,

can you get a backtrace?

1. Add
deb http://debug.mirrors.debian.org/debian-debug/ sid-debug main
to
/etc/apt/sources.list
2. Install exim4-daemon-light-dbgsym libgnutls-dane0-dbgsym libgnutls30-dbgsym libhogweed6-dbgsym libnettle8-dbgsym libtasn1-6-dbgsym libp11-kit0-dbgsym
3.
root@argenau:~# gdb /usr/sbin/exim4 2>&1 | tee /tmp/exim4.backtrace
[...]
set pagination 0
run -t < /path/to/test
[crashes ....]
backtrace full
info registers
x/16i $pc
thread apply all backtrace
quit


If this does not work retry but do
set follow-fork-mode child
before the run command.

TIA, cu Andreas