Matthew Weigel <unique <at> idempot.net> writes:

> Then you have grown your userbase too fast with a terrible setup, and now
> you're caught in the middle of fixing the problem or avoiding downtime.

Are you sure this is not a misunderstanding? When you host user accounts, on a
tight, default, setup of OpenBSD (or any other OS), and allow them to ftp into
their web-directories, how could one prevent them from uploading code that
mail()-s something? Aside of removing mini_sendmail, that is.

> Sure, if you go through and find every line of code where mail() is called,
> you can add logging at that point.  But so far you've refused to make any
> changes to the applications.

Are you sure that this is not a misunderstanding? Which sysadmin can 'make
changes to the applications' that his 200+ users run??

> His idea is the right one.  Most PHP applications I've dealt with support, at
> least through plugins or extensions, SMTP + AUTH for sending mail instead of
> PHP's mail().

Are you sure that this is not a misunderstanding? If you host, for example, any
CMS, it should have the functionality to the remote user, registered with that
CMS, to request a password reset. Which SMTP+AUTH do you want to use here??
AFAICS, here we need to allow a straightforward SMTP. The userbase is registered
in the various databases of the CMSes. And again, no sysadmin will re-write all
user-supplied applications to extract all those remote users for
SMTP-authentication. Get real, please!

> > The only two places where I, IMHO, can see a chance would be with an
> > extended
> > log or check of Apache or php; whenever a mail-call is logged, from
> > which directory, e.g.
> 
> I don't think PHP ever changes the working directly except explicitly;
> probably every call to mail() (which leads to mini_sendmail) occurs in the
> chroot /.

Exactly. So how to log it??

> > Yes. But that's a complete coder's work, isn't it? I wonder if there is no
> > other solution, as mentioned above.
> 
> There are, but they require you to set the parameters of how web apps can work
> in your environment so as to enforce a minimum of auditability. 

Yes, this is the crucial point. I'd be more than happy to learn how to set this,
for example in php.ini! Any suggestion will be appreciated!

>  sendmail_path = "/bin/mini_sendmail
> > -t -i"
> > is what I have in php.ini. I wonder, if there are no logging features for
> > mini_sendmail or so. I read the man-page online, but didn't see any.
> 
> Well, mini_sendmail is an external package... talk to the authors about that,
> but I think they'll tell you they can't really track what you need tracked.

So, how to solve the problem, then??

Thanks anyway,

Uwe

Reply via email to