Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2001 23:08:12 -0800
From:      Dima Dorfman <dima@unixfreak.org>
To:        "Nathan Vidican" <webmaster@wmptl.com>
Cc:        questions@freebsd.org
Subject:   Re: best way to alias an email address to a filename 
Message-ID:  <20010118070817.0A38D3E02@bazooka.unixfreak.org>
In-Reply-To: Message from "Nathan Vidican" <webmaster@wmptl.com>  of "Thu, 18 Jan 2001 00:10:31 EST." <200101180510.AAA80894@mail2.wmptl.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> What is the best way to alias an email address directly to a filename? 
> I have tried:
> 
> tester1:  /usr/local/htdocs/tester1.txt
> 
> But I get an error from sendmail stating that it cannot open output 
> file. If I chmod that file to 666, then it works fine. Seeing as how 
> I'd rather NOT leave a file chmod'd 666 sitting on a publically 
> accessable webserver, any ideas how else I should be going about this? 
> Perhaps some sort of pipe to the cat command? Or could this be fixed 
> using a simple ownership/permissions change?

IIRC, sendmail delivers to targets in the aliases file with the
permissions of whoever owns the aliases file, or 'nobody' if root owns
it.  E.g.., if joe owns /etc/aliases.db, then the file you want to
deliver to must be writable by joe.  Since root usually owns it, the
file must be writable by nobody.  This also means that if you don't
want to make the file writable by nobody, you can add another aliases
file, make it owned by joe, and make your target owned by joe, too.
Hopefully that wasn't too confusing.

Or maybe that was Postfix, not sendmail; I can't quite remember right
now.  You don't sound like you're in much of a hurry, so you may want
to just fool around with what I described above, or just chown the
file to nobody, which is the default user for mail delivery to files
and pipes.

Hope this helps

					Dima Dorfman
					dima@unixfreak.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010118070817.0A38D3E02>