RE: [exim] environment variable patch

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Eli
Date:  
À: 'Sub Zero', 'Darren Casey', exim-users
CC: 
Sujet: RE: [exim] environment variable patch
Scorpion wrote:
> I believe instead of doing this patch, adding:
>
> php_admin_value sendmail_path "sendmail -t -i -fUSER@???"
>
> To the httpd.conf would simply be better.


Sure, if you want to encode a full username to the email and force them to
only send from that address (many people wish to configure their from
address on their own, not to mention -f is a privileged option and normal
users should never be allowed to use that unless you really know what you're
doing - it's also not going to work "by default" I believe).

>Darren Casey wrote:
>> The original post was here :-
>>

http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20040202/msg00213.h
tml

Wow, that's old :) Yeah, my hostname changed.

http://www.hoktar.com/downloads/other/exim-4.53-env_vars.patch

That works for 4.54 as well, but has not been tested on 4.6 yet. Patching
up versions is pretty easy if you know a bit of C and how to patch. Here is
the only tested configuration:

acl_not_smtp                    = acl_check_pipe


begin acl

acl_check_pipe:
        warn    message         = X-Headers-Begin: $message_exim_id


        warn    message         = X-CGI-Client: $env_REMOTE_ADDR
                condition       = ${if def:env_REMOTE_ADDR {yes}{no}}
                logwrite        = CGI Client: $env_REMOTE_ADDR


        warn    message         = X-CGI-Server: $env_SERVER_NAME
(${env_SERVER_ADDR})
                condition       = ${if def:env_SERVER_ADDR {yes}{no}}
                logwrite        = CGI Server: $env_SERVER_NAME
(${env_SERVER_ADDR})


        warn    message         = X-CGI-Script: $env_SCRIPT_NAME
(${env_SCRIPT_FILENAME})
                condition       = ${if def:env_SCRIPT_NAME {yes}{no}}
                logwrite        = CGI Script: $env_SCRIPT_NAME
(${env_SCRIPT_FILENAME})


        warn    message         = X-Headers-End: $message_exim_id


        accept


I have never tested the environment variables in any other ACL. It doesn't
make sense to really use them in other ACLs, but you can - might even give
you access to interesting things should you need it? Philips main concern
with this is that you may accidentally give out sensitive data, which can
happen if you're not careful, so watch out :) The patch *is* extremely
handy though. It has been the only reason I have been able to catch every
spammer on every one of my webservers through formmail type scripts.
Without this, it wouldn't be possible given the setup I have (I allow From:
rewriting).

Eli.