[exim] Running exim as a user with no username

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Mike Cardwell
Fecha:  
A: exim-users
Asunto: [exim] Running exim as a user with no username
Hi guys,

This is my first post, so an enthusiastic Hello to you all. Here is my
problem:

I have a system whereby users are stored in a Windows AD and are mapped
to the Linux server via LDAP. The Linux server runs Apache2 and
exim4.54. When a cgi script runs, it runs underneath suphp. If it tries
to send an email by calling the exim binary directly rather than
connecting to the local network socket it works fine, unless... I turn
off LDAP. The cgi's continue to run under the correct UID, but Exim
fails to do a getpwuid(uid) so panics and drops the mail. I hacked
src/exim.c to set the uid to be that of the exim user if getpwuid()
fails. That seems to work fine and it stops panicking, except... the
"Return-path" and default "Sender" is always set to "exim@???".

I would like the Return-path and default Sender to be set to
"webmaster@$domain". I'm guessing $domain could be pulled out of the
environment variable "VHOST" which is set in our Apache configuration.
Any suggestions?

I *could* leave LDAP on, but it seems like a waste of resources to be
constantly querying the AD, unless I can get this one last thing working...

Thanks in advance,
Mike