From: mouss on
Mauro Faccenda a écrit :
> Hi Reinaldo,
>
> On Fri, Mar 19, 2010 at 7:34 PM, Reinaldo de Carvalho
> <reinaldoc(a)gmail.com> wrote:
>> On Fri, Mar 19, 2010 at 6:40 PM, Mauro Faccenda <faccenda(a)gmail.com> wrote:
>>> Alternative to that patch? I did some searches and as far as I could
>>> see, none of the alternatives (that I've found) could reject the
>>> message in SMTP. I think it's nice to not generate bouncing
>>> messages/backscatter. But if someone have an alternative besides that,
>>> it's always welcome.
>>>
>>>
>> 1. http://postfixquotareject.ramattack.net/
>
> I took a look at it and, unless I missunderstood, I'll need to add a
> line for each mailbox in the database and that's inviable for my
> setup.
>
> Also I droped the use of the VDA patches, since it implements
> everything in Postfix's LDA and I am actually using the Dovecot's
> (deliver).

well, if you use dovecot, then forget about vda and the like.

if you really need quota, then dovecot-sieve has quota support. if
you're not happy (now you no longer play the game?), then report what's
not good enough.

(PS. the "now yo no longer..." thing is of course John Lennon's
"Watching the wheels").

>
>> 2. Write a policyd to check the quota and reject the message.
>
> Can you recommend me any documentation/tips for doing it?
>

This is harder than it looks. do you really need to worry about all this
stuff or are you inventing problems?

From: Robert Schetterer on
Am 22.03.2010 22:36, schrieb Mauro Faccenda:
> Hi Robert,
>
> On Mon, Mar 22, 2010 at 5:53 PM, Robert Schetterer
> <robert(a)schetterer.org> wrote:
> [snip]
>>>> 1. http://postfixquotareject.ramattack.net/
>>>
>>> I took a look at it and, unless I missunderstood, I'll need to add a
>>> line for each mailbox in the database and that's inviable for my
>>> setup.
>>>
> [snip]
>>
>> Hi i didnt analyse
>> postfixquotareject.ramattack.net deeply yet
>> but with dovecot lda deliver you can have
>> all quota stuff in mysql so
>> it should be possible
>> to have a policy daemon using dovecot-quota-mysql
>> dont know if postfixquotareject can be used for that yet
>> but its code should be a possible example layout for writing
>> a policy server for dovecot-quota-mysql
>> i will test this in the near future
>>
>> i have vda patch up and running too without any problems but my goal
>> ist using the policy server variant as it feels more code clean to postfix
>
> My setup uses LDAP (MS Active Directory) as a backend. I need that
> when someone creates a user in the AD and sets it's e-mail address,
> automatically that account can receive e-mails.
>
> I'm using the Dovecot LDA (deliver) quota management and it's working
> properly, but I'd like to reject messages in SMTP time, so the sender
> can have a comprehensive error message without needing to send him a
> bounce messages.
>
> Right now, I can silently drop the message with 'deliver'. It's not
> the ideal situation that I'd like to have, but it's already
> acceptable.
>
> Thank you for your attention. ;)
>
> Mauro

you need a policy server anyway
this needs to know the setuped quota of the mailbox
how much is used from this quota ( left space )
and size of incomming message, rest might are simple math compares
so you need to think where to get these infos and catch it together
in a policy server

--
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria

From: Robert Schetterer on
Am 23.03.2010 00:14, schrieb mouss:
> Mauro Faccenda a écrit :
>> Hi Reinaldo,
>>
>> On Fri, Mar 19, 2010 at 7:34 PM, Reinaldo de Carvalho
>> <reinaldoc(a)gmail.com> wrote:
>>> On Fri, Mar 19, 2010 at 6:40 PM, Mauro Faccenda <faccenda(a)gmail.com> wrote:
>>>> Alternative to that patch? I did some searches and as far as I could
>>>> see, none of the alternatives (that I've found) could reject the
>>>> message in SMTP. I think it's nice to not generate bouncing
>>>> messages/backscatter. But if someone have an alternative besides that,
>>>> it's always welcome.
>>>>
>>>>
>>> 1. http://postfixquotareject.ramattack.net/
>>
>> I took a look at it and, unless I missunderstood, I'll need to add a
>> line for each mailbox in the database and that's inviable for my
>> setup.
>>
>> Also I droped the use of the VDA patches, since it implements
>> everything in Postfix's LDA and I am actually using the Dovecot's
>> (deliver).
>
> well, if you use dovecot, then forget about vda and the like.
>
> if you really need quota, then dovecot-sieve has quota support. if
> you're not happy (now you no longer play the game?), then report what's
> not good enough.

overquota dovecot is not done at smtp income stage
a overquta bounce of deliver might get backscatter

>
> (PS. the "now yo no longer..." thing is of course John Lennon's
> "Watching the wheels").
>
>>
>>> 2. Write a policyd to check the quota and reject the message.
>>
>> Can you recommend me any documentation/tips for doing it?
>>
>
> This is harder than it looks. do you really need to worry about all this
> stuff or are you inventing problems?



--
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria

From: Mauro Faccenda on
On Mon, Mar 22, 2010 at 9:14 PM, Robert Schetterer
<robert(a)schetterer.org> wrote:
> Am 23.03.2010 00:14, schrieb mouss:
>>> Also I droped the use of the VDA patches, since it implements
>>> everything in Postfix's LDA and I am actually using the Dovecot's
>>> (deliver).
>>
>> well, if you use dovecot, then forget about vda and the like.
>>
>> if you really need quota, then dovecot-sieve has quota support. if
>> you're not happy (now you no longer play the game?), then report what's
>> not good enough.
>
> overquota dovecot is not done at smtp income stage
> a overquta bounce of deliver might get backscatter

That's what I was thinking when I read it.

>
>>
>> (PS. the "now yo no longer..." thing is of course John Lennon's
>> "Watching the wheels").
>>
>>>
>>>> 2. Write a policyd to check the quota and reject the message.
>>>
>>> Can you recommend me any documentation/tips for doing it?
>>>
>>
>> This is harder than it looks. do you really need to worry about all this
>> stuff or are you inventing problems?

Well, I don't think I'm inventing problems, maybe I could do it in a
easier way, and that's why I sent this mail to this list. ;)

I had a lot of trouble with my mail servers getting into blacklists
due to backscatter and in this setup I think I'll be more cautious
about it.

Thanks anyway. I think I'll take a look in that PHP code Robert posted
in a previous message.


Mauro

From: mouss on
Robert Schetterer a écrit :
> Am 23.03.2010 00:14, schrieb mouss:
>> Mauro Faccenda a écrit :
>>> Hi Reinaldo,
>>>
>>> On Fri, Mar 19, 2010 at 7:34 PM, Reinaldo de Carvalho
>>> <reinaldoc(a)gmail.com> wrote:
>>>> On Fri, Mar 19, 2010 at 6:40 PM, Mauro Faccenda <faccenda(a)gmail.com> wrote:
>>>>> Alternative to that patch? I did some searches and as far as I could
>>>>> see, none of the alternatives (that I've found) could reject the
>>>>> message in SMTP. I think it's nice to not generate bouncing
>>>>> messages/backscatter. But if someone have an alternative besides that,
>>>>> it's always welcome.
>>>>>
>>>>>
>>>> 1. http://postfixquotareject.ramattack.net/
>>> I took a look at it and, unless I missunderstood, I'll need to add a
>>> line for each mailbox in the database and that's inviable for my
>>> setup.
>>>
>>> Also I droped the use of the VDA patches, since it implements
>>> everything in Postfix's LDA and I am actually using the Dovecot's
>>> (deliver).
>> well, if you use dovecot, then forget about vda and the like.
>>
>> if you really need quota, then dovecot-sieve has quota support. if
>> you're not happy (now you no longer play the game?), then report what's
>> not good enough.
>
> overquota dovecot is not done at smtp income stage
> a overquta bounce of deliver might get backscatter
>

No, it's not backscatter. if bounces happen too often, then there is a
serious problem (bounces are only part of the problem). but if they
occur rarely, then that's not a problem. after all,
- mailing lists do send confirmation requests to possibly forged
addresses. nobody has said this is backscatter.
- unless you go the fanatic way that says you must deliver to the
mailbox before sending "ok", delivery problems may occur. in which case,
bounces are desirable.

back to the quota issue, this was already discussed here multiple times.
there are many mitigation approaches, and I won't repeat the discussion.
one suggested approach is to update an access map.