Re: sendmail aliasing to local file doesn't work
On Thu, 27 Sep 2001, Rokas Ralys wrote:
> I run Sendmail 8.12 (latest unstable). In aliases file
> there is line like:
> mail_address: /tmp/some_file
>
> I get errors in /var/log/mail.log like this:
> Sep 27 15:38:02 w2001 sm-mta[3317]: f8RDbxv5003316: to=/tmp/some_file,
> ctladdr=<mail_address@mail_server.lt> (1/0), delay=00:00:02,
> xdelay=00:00:00, mailer=*file*, pri=731292, dsn=5.0.0, stat=Can't create output
1) in /etc/mail/sendmail.mc, change the following:
define(`confSAFE_FILE_ENV', `/')dnl
to
dnl define(`confSAFE_FILE_ENV', `/')dnl
2) the default uid/gid for delivery agents is 1:1 (daemon), if you want
to write arbitrary files, you can either chown them to daemon:daemon,
or, put the following in sendmail.mc:
confDEF_USER_ID DefaultUser [1:1] Default user id.
*NOTE* *NOTE* If you change the default user to root - you're going to
allow *ANYONE* *ANYWHERE* to write *ARBITRARY* files on your system !!!
--
Rick Nelson
<Overfiend> Culus: wanna suspend me for it? :)
<Culus> Overfiend: Go maliciously crack a few severs and we'll talk
<Overfiend> Culus: damn, it has to be malicious?
<Culus> Overfiend: Sadly, yes
Reply to: