[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Two-part question



Stephen Touset wrote:

On Sat, 2004-06-26 at 11:27, Stephen Touset wrote:
On Sat, 2004-06-26 at 03:50, Darik Horn wrote:
Alternatively, you could wrap your local delivery agent with a script like this:

  #!/bin/ash
  if [ ! -e "$HOME" ]
  then
    # With an appropriate sudo configuration...
    sudo cp -r /etc/skel "$HOME"
    maildirmake "$HOME/Maildir"
  fi
  exec MyLDA "$@"
  # eof

If you use a lightweight shell like ash, then the overhead will be tolerable. YMMV.
Tried this. It's working except for one thing: the mail isn't actually
delivered. Could it possibly be that mail is being piped on standard
input, but standard input is never making it to procmail via the exec at
the end?

This appears to be a stickier solution than at first glance. The trick
is writing a sudoers file that allows the use of /bin/cp for a user's
own home directory, but nothing more. AFAIK, this is not possible. Even
worse, permissions must then be changed on the user's home directory to
correctly match his/her own. Try writing another sudoers line for
that...


Who owns the directory etc this creates? Who is the cp command being run as?

Are the sudo and maildirmake in the right order?


--

Cheers
John

-- spambait
1aaaaaaa@computerdatasafe.com.au  Z1aaaaaaa@computerdatasafe.com.au



Reply to: