[Exim] problem changing UID

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Michael Collin Nielsen
Date:  
À: exim-users
Sujet: [Exim] problem changing UID
I'm seeing some problems with exim-4.04 when exim is to change uid.
I am running exim suid, which seem to be the only answer to questions of
this type on the mailinglist. The directory in which exim is installed is
automounted from the localhost with setuid option.

I use MailScanner to scan all mail for virus, and therefore I have an
'incomming' and an 'outgoing' exim proces, proces information is like
this:

as exim /pack/exim-4.05/bin/exim -bd
as exim /pack/exim-4.05/bin/exim -C /etc/eximmail/exim_outgoing.conf -q30m

the exim binary is installed suid root. I host several domains on my
server, therefore i have domains and local_parts check in my routers.
In the outgoing configfile I have, problems with the following with a
majordomo and a vacation router:

Majordomo:

virtual_mailingslists_majordomo:
driver = redirect
allow_fail
allow_defer
domains = dsearch;/etc/eximmail/domains
data =
${lookup{$local_part}lsearch{/etc/eximmail/domains/$domain/majordomo_aliases}}
qualify_preserve_domain
file_transport = address_file
pipe_transport = address_pipe
user = majordom
group = majordom

In my majordomo_alias file I have for each majordomo list:
listname-approval: user
listname-outgoingalias: :include:/pack/majordomo/hum/lists/listname
listname-owner: user
listname-request: "|/pack/majordomo/hum/wrapper request-answer listname"
owner-listname: user

This works fine for. And mails for the mailinglists are deliveres as
expected. However if I try to send a mail directly to the
listname-outgoingalias the message is temporarily rejected and exim
complains:
unable to set gid=54 or uid=54 (euid=64):virtual_mailingslists_majordomo
router
internal problem in virtual_mailingslists_majordomo router: failure to
transfer data from subprocess

It looks as if exim cannot change uid...


Vacation:
# For smart user vacation feature
user_vacation:
  driver = accept
  domains = dsearch;/etc/eximmail/domains
  local_parts = lsearch;/etc/eximmail/domains/$domain/users
  check_local_user
  require_files = $home/.test_vacation.enabled
  senders = !^.*-request@.* : !^owner-.*@.* : !^postmaster@.* : \
            ! ^listmaster@.* : !^mailer-daemon@.*
  transport = vacation_reply
  unseen
# TRANSPORT for smart user vacation feature
vacation_reply:
  driver = autoreply
  file = $home/.test_vacation.msg
  file_expand
  log = $home/.test_vacation.log
  once = $home/.test_vacation.db
  once_repeat = 7d
  from = $local_part@$domain
  to = $sender_address
  subject = "Re: $h_subject"


When I enable this by setting up the appropiate
.test_vacation-files for a normal user and send a mail to that user I see
the mail arrive in and leave the incomming que. But when it is handled by
the outgoing exim proces it fails. The message is delivered to the local
user, but exim complains:
Failed to create spool file
/var/spool/exim_outgoing/input//17UQbX-0003Sr-00-D: Permission denied
And no mail is returned to the original sender, nothing is written to the
.test...log file not .test....db file.
If, however I use a .test...db file that already contains the sender, then
exim logs i the .test...log file: previously sent to michael@???

If I create the .test_vacation.. files for the exim-user then everything
works like a charm.

Again I could suspect that exim somehow does not want to thange uid.


--
   Michael Collin Nielsen  mailto:michael@hum.auc.dk
   M.Sc.E.E.               http://www.hum.auc.dk/~michael
   Sysadm in Faculty of Humanities, Aalborg University