Bug#635680: exim4: Fixed string appended when redefining	MAIN_HARDCODE_PRIMARY_HOSTNAME
    Andreas Metzler 
    ametzler at downhill.at.eu.org
       
    Thu Jul 28 17:21:49 UTC 2011
    
    
  
On 2011-07-28 Cyril Bouthors <cyb at debian.org> wrote:
> Package: exim4
> I'm unable to dynamically redefine primary_hostname at runtime because the weird
> "OSTNAME" string is appended at the end:
> # exim -bP primary_hostname
> primary_hostname = mail.isvtec.com
> # exim -DMAIN_HARDCODE_PRIMARY_HOSTNAME=foo.com -bP primary_hostname
> primary_hostname = foo.comOSTNAME
> # 
> It happens on any stand Debian/Exim configuration.
> If I replace MAIN_HARDCODE_PRIMARY_HOSTNAME by RANDOM_STRING in
> /var/lib/exim4/config.autogenerated (or exim.conf), it works as expected:
[...]
s/RANDOM_STRING/MUCH_SHORTER_STRING/
It looks like there is length limit on macro expansion in -D arguments:
-------------------------
ametzler at argenau:~$ cat /tmp/exim4conftest
.ifdef A123456789B123456789C123
primary_hostname = A123456789B123456789C123
.endif
ametzler at argenau:~$ /usr/sbin/exim -C /tmp/exim4conftest \
     -DA123456789B123456789C123=foo.com -bP primary_hostname
primary_hostname = foo.com3
ametzler at argenau:~$ cat /tmp/exim4conftest
.ifdef A123456789B123456789C12
primary_hostname = A123456789B123456789C12
.endif
ametzler at argenau:~$ /usr/sbin/exim -C /tmp/exim4conftest \
    -DA123456789B123456789C12=foo.com -bP primary_hostname
primary_hostname = foo.com
-------------------------
Setting the macro in a (.included) file works, however:
-------------------------
ametzler at argenau:~$ cat /tmp/exim4conftest
A123456789B123456789C123=blubb.com
.ifdef A123456789B123456789C123
primary_hostname = A123456789B123456789C123
.endif
ametzler at argenau:~$ /usr/sbin/exim -C /tmp/exim4conftest \
    -bP primary_hostname
primary_hostname = blubb.com
-------------------------
Please note that the -D option is almost useless for anything but
debugging, see the entry fo 4.72-3 in 
/usr/share/doc/exim4-daemon-*/NEWS.Debian.gz
cu andreas
    
    
More information about the Pkg-exim4-maintainers
mailing list