Re: [EXIM] Running under wrong uid/gid?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Lars Kellogg-Stedman
Date:  
À: Sheldon Hearn
CC: exim-users
Sujet: Re: [EXIM] Running under wrong uid/gid?
> LK> However, when using the EXPN command, the filter is run with
> LK> the uid/gid of exim (well, of exim_user and exim_group).
>
> Are you saying that exim _runs_ the .forward file contents when you send
> it an EXPN?!?!?!


Seems to be. Heck, it has to. Say your '.forward' file is a simple one (not
a filter), and contains something like:

foo@???

Exim has to process this to respond correctly to the EXPN command.

If you're using a filter, exim has to process it to find out where
mail would eventually get delivered to.

Given a .forward file like this:

# Exim Filter

logfile $home/Logs/mail 600
#logfile /tmp/eximlog 644
if error_message then finish endif

  logwrite "$tod_log      $message_id     $message_size   $sender_address $header_to:"
  deliver lars@???


I get the following error to expn:

553 lars@??? cannot be resolved at this time: <lars@???> - error in filter file: failed to open filter log file "/home/staff/lars/Logs/mail": Permission denied (euid=501 egid=4)

If I change the logfile to point to /tmp/eximlog, then /tmp/eximlog is created
with uid=501 and gid=4 (the uid/gid under which exim runs when not running as
root).

Ouch!

-- Lars

---
Lars Kellogg-Stedman * lars@??? * (617)353-8277
Office of Information Technology, Boston University


--
*** Exim information can be found at http://www.exim.org/ ***