Interesting idea, but it seemed like it should be simpler
than that.

Like an idiot I forgot that you can use SQL for any kind of
access_map, so I just used "check_recipient_access" and
made an SQL query to find users that were "close" to being
over quota.

This works for me, since we set the quota at something like 21M
and make it appear like it's 20M.  This gives a bit of head room
should a user need space while deleting email because IMAP
tries to copy to Trash folder.

So I just look for users at >= 20M and reject message at that
point.

If anyone wants the query or such, let me know.

--
David A. Niblett               | email: [EMAIL PROTECTED]
Network Administrator          | Phone: (352) 334-3400
Gainesville Regional Utilities | Web: http://www.gru.net/
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jesse Norell
Sent: Monday, September 25, 2006 1:27 PM
To: DBMail mailinglist
Subject: Re: [Dbmail] Postfix + dbmail-lmtpd


Hello,

  See this thread:

http://mailman.fastxs.net/pipermail/dbmail/2006-February/008105.html

  And read this:

http://www.postfix.org/SMTPD_PROXY_README.html


  Another approach to solving this with postfix would be a policy daemon
that checks quota.  I mentioned I started work on one here:

http://mailman.fastxs.net/pipermail/dbmail/2005-April/006544.html

Unfortunately I've not done anything further on it since then .. it's
probably half finished, if anyone wants a copy of the framework to work
on it.  I copied another policy daemon (one of the greylisting ones) and
was changing it .. iirc, I had all the command line processing / etc. in
place, what's left to be done is the actual function that performs the
sql lookup to check current disk usage and returns a go/no go result.  I
was making it flexible to handle postgresql and mysql, and you could
specify what dbmail version you had, so that function would actually
need to be written a few different ways (fairly trivial).  This would be
a nice script to go in dbmail contrib.

Jesse


> I know this is more a Postfix question, but it involves really 
> something that happens with dbmail-lmtpd local delivery.  So I'm 
> hoping that someone else has already explored how to fix this issue.
>
> Currently I use Postfix relay_domains and maps to determine if I 
> should accept email for a user.  I'm not positive that this is really 
> the "correct" way, but it's working fine.
>
> The issue is I have some low score spam being delivered to
> an existing mailbox.  The mailbox is full.  So I get this junk, can't 
> send it to the users sieve, spam, etc. folder.
>
> So the issue is postfix accepts the message, because the account 
> exists, so now it's queued.  Then LMTP delivery happens, and I get a 
> 5xx error about the box being full. Now Postfix tries to bounce the 
> message back to the sender and that fails because they don't exist, 
> etc, etc.
>
> I'm looking for a way to 5xx the message before it has a chance to 
> queue the message.  The relay_domain_maps doesn't care about the right

> hand side that is returned, so I can't drop the message there.
>
> Anyone have thoughts on how to accomplish this?
>
> --
> David A. Niblett               | email: [EMAIL PROTECTED]
> Network Administrator          | Phone: (352) 334-3400
> Gainesville Regional Utilities | Web: http://www.gru.net/
>


-- 
Jesse Norell
Kentec Communications, Inc.
_______________________________________________
Dbmail mailing list
[email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to