Re: [Exim] checking quota before accepting the message

Góra strony
Delete this message
Reply to this message
Autor: Nathan Ollerenshaw
Data:  
Dla: exim-users
Temat: Re: [Exim] checking quota before accepting the message
On Aug 13, 2004, at 5:35 PM, Philip Hazel wrote:

> I have always steered clear of trying to build in quota-checking at
> RCPT time, for a number of reasons, not least of which is the
> permissions problem. The Exim process that is receiving is running as
> "exim"; it may not be able to access the relevant files/directories in
> order to do quota calculations; nor can it access the data for system
> quotas.


Right. That's important for people running exim on a system with real
user accounts, or people who use a different uid/gid per user etc.

We have the classic 'toaster' style system where everything is owned by
a single user, so permissions wouldn't be a problem.

But, to fix the problem for everyone, you could fork off a 'fake'
delivery process which just reports back to the parent regarding quota
usage? A bit heavy I know, but its better than letting the messages sit
in the queue IMHO.

>> Would be really useful for people doing large mail systems, I think.
>> Philip, wishlist? :)
>
> I don't think it is possible to do this directly inside Exim.
>
> The "right" way is probably for somebody to write a daemon that can
> run as root and be accessed via a socket.


Can I twist your arm somehow? Jeremy Harris posted an ingenious ACL
which updates an entry in an SQL table which flags that a mailbox is
over quota, and then other parts of the ACL do other checks etc. I
could implement something similar, I think, before my head explodes.

Failing a feature like that, what should I do with these messages
queuing up due to full mailboxes? Can I make them bounce or is it ok to
let them sit there for the timeout period and let them bounce later?

Some of the big mailservers you hit out there, hotmail etc, will tell
you if a mailbox is full at RCPT time. I'd really like to be able to do
that in a clean way.

I'll keep thinking about it. Maybe some external program is the way, as
you say, but I'm not convinced yet. I need the ideas to percolate
through my brain.

Thanks,

Nathan.

--
Nathan Ollerenshaw - UNIX Systems Engineer
ValueCommerce - http://www.valuecommerce.ne.jp/