Re: postfix alias and dovecot quota

2014-07-03 Thread Alexandre Ellert
Le 1 juil. 2014 à 04:57, Nick Edwards nick.z.edwa...@gmail.com a écrit 
:



http://dovecot.2317879.n4.nabble.com/Postfix-aliases-with-quota-status-service-td43511.html
search for post from Ulrich Zehl


Thanks for the link, I use a SQL backend containing user and alias data.
So I've changed the user_query to include alias and it's actually 
working fine on my test environnement.


Re: postfix alias and dovecot quota

2014-06-30 Thread Nick Edwards
On 6/29/14, Alexandre Ellert aell...@numeezy.com wrote:
 Le 29 juin 2014 à 06:24, Nick Edwards nick.z.edwa...@gmail.com a écrit :

 it is the job of postfix to do this, aliases are just that, aliases of

 the real mail account, they do not exist in real storage, else, they
 would not be alias.

 The problem i'm trying to solve is about dovecot capability to serve quota
 status via Postfix policy server protocol.
 It works fine when the destination address is a real mailbox, but if it's a
 Postfix alias, then the email is not rejected because dovecot doesn't know
 this user.
 Maybe it's a wrong idea to try to make Postfix alias visible to dovecot.

 Do you have another suggestion ?

of course its wrong
mail aliases are for MTA's *only*  its not for dovecot (or any
pop3/imap server), if postfix is not saying oh ok alias foo really
goes to user bar, do we;ll check out bar's quota, status etc,, then ur
postfix is foobarred somehow.


Re: postfix alias and dovecot quota

2014-06-30 Thread Jiri Bourek



On 30.6.2014 12:33, Nick Edwards wrote:

On 6/29/14, Alexandre Ellert aell...@numeezy.com wrote:

Le 29 juin 2014 à 06:24, Nick Edwards nick.z.edwa...@gmail.com a écrit :


it is the job of postfix to do this, aliases are just that, aliases of



the real mail account, they do not exist in real storage, else, they
would not be alias.


The problem i'm trying to solve is about dovecot capability to serve quota
status via Postfix policy server protocol.
It works fine when the destination address is a real mailbox, but if it's a
Postfix alias, then the email is not rejected because dovecot doesn't know
this user.
Maybe it's a wrong idea to try to make Postfix alias visible to dovecot.

Do you have another suggestion ?


of course its wrong
mail aliases are for MTA's *only*  its not for dovecot (or any
pop3/imap server), if postfix is not saying oh ok alias foo really
goes to user bar, do we;ll check out bar's quota, status etc,, then ur
postfix is foobarred somehow.



I'm not completely sure about that. If you want to use Dovecot's 
quota-status to reject message during SMTP session, Postfix' smtpd 
process needs to do that and - to my knowledge - it's only able to pass 
recipient address, not the aliases involved.


I was looking for a solution to this few months ago as well. In the end 
I created sort of policy service proxy between Postfix and Dovecot. The 
proxy looks up aliases in database, converts them into real users and 
asks Dovecot about those. Final result is then reported back to 
postfix/smtpd.


Re: postfix alias and dovecot quota

2014-06-30 Thread Nathan Schultheiss
I've the same problem.

Dovecot can reply REJECT when Postfix ask for know the quota of the real user.
But if the email it's alias, Dovecot does not know the email and reply DUNNO, 
but when the mail must be delivred by the LDA, Dovecot reject because the user 
it's over quota.

I search since several weeks how to fix that and for postfix ask the 
quota-service with the real user email and not the alias.
Because Postfix know the real user email because it's search it on the first 
time before ask Dovecot...

I don't understand that postfix can't have a feature for check the 
quota-service with the real user email and not the alias...

It's possible that I was wrong and not really understand the Postfix doku 
(that's really possible).

If anobody have one idea that would be great, because I'm really lost, and I 
think i'm not alone :)

Bests Regards,
Nathan

- Mail original -
De: Jiri Bourek bou...@thinline.cz
À: dovecot@dovecot.org
Envoyé: Lundi 30 Juin 2014 13:37:26
Objet: Re: postfix alias and dovecot quota



On 30.6.2014 12:33, Nick Edwards wrote:
 On 6/29/14, Alexandre Ellert aell...@numeezy.com wrote:
 Le 29 juin 2014 à 06:24, Nick Edwards nick.z.edwa...@gmail.com a écrit :

 it is the job of postfix to do this, aliases are just that, aliases of

 the real mail account, they do not exist in real storage, else, they
 would not be alias.

 The problem i'm trying to solve is about dovecot capability to serve quota
 status via Postfix policy server protocol.
 It works fine when the destination address is a real mailbox, but if it's a
 Postfix alias, then the email is not rejected because dovecot doesn't know
 this user.
 Maybe it's a wrong idea to try to make Postfix alias visible to dovecot.

 Do you have another suggestion ?

 of course its wrong
 mail aliases are for MTA's *only*  its not for dovecot (or any
 pop3/imap server), if postfix is not saying oh ok alias foo really
 goes to user bar, do we;ll check out bar's quota, status etc,, then ur
 postfix is foobarred somehow.


I'm not completely sure about that. If you want to use Dovecot's 
quota-status to reject message during SMTP session, Postfix' smtpd 
process needs to do that and - to my knowledge - it's only able to pass 
recipient address, not the aliases involved.

I was looking for a solution to this few months ago as well. In the end 
I created sort of policy service proxy between Postfix and Dovecot. The 
proxy looks up aliases in database, converts them into real users and 
asks Dovecot about those. Final result is then reported back to 
postfix/smtpd.


Re: postfix alias and dovecot quota

2014-06-30 Thread Matthijs de Groot

 On 30 Jun 2014, at 15:01, Nathan Schultheiss nat...@schultheiss.fr wrote:
 
 ...
 
 I search since several weeks how to fix that and for postfix ask the 
 quota-service with the real user email and not the alias.
 Because Postfix know the real user email because it's search it on the first 
 time before ask Dovecot...
 
 I don't understand that postfix can't have a feature for check the 
 quota-service with the real user email and not the alias...
 
 It's possible that I was wrong and not really understand the Postfix doku 
 (that's really possible).
 
You’re not: http://www.postfix.org/SMTPD_POLICY_README.html#protocol

 If anobody have one idea that would be great, because I'm really lost, and I 
 think i'm not alone :)

One idea is to use the same data source for the userdb of postfix and dovecot. 
Mail alias data that postfix uses would then also become available for dovecot. 
Dovecot would then be able to correctly resolve mail aliases to users and 
provide useful quota information about the mailbox.

Re: postfix alias and dovecot quota

2014-06-30 Thread Nick Edwards
On 6/30/14, Jiri Bourek bou...@thinline.cz wrote:


 On 30.6.2014 12:33, Nick Edwards wrote:
 On 6/29/14, Alexandre Ellert aell...@numeezy.com wrote:
 Le 29 juin 2014 à 06:24, Nick Edwards nick.z.edwa...@gmail.com a écrit
 :

 it is the job of postfix to do this, aliases are just that, aliases of

 the real mail account, they do not exist in real storage, else, they
 would not be alias.

 The problem i'm trying to solve is about dovecot capability to serve
 quota
 status via Postfix policy server protocol.
 It works fine when the destination address is a real mailbox, but if it's
 a
 Postfix alias, then the email is not rejected because dovecot doesn't
 know
 this user.
 Maybe it's a wrong idea to try to make Postfix alias visible to dovecot.

 Do you have another suggestion ?

 of course its wrong
 mail aliases are for MTA's *only*  its not for dovecot (or any
 pop3/imap server), if postfix is not saying oh ok alias foo really
 goes to user bar, do we;ll check out bar's quota, status etc,, then ur
 postfix is foobarred somehow.


 I'm not completely sure about that. If you want to use Dovecot's
 quota-status to reject message during SMTP session, Postfix' smtpd
 process needs to do that and - to my knowledge - it's only able to pass
 recipient address, not the aliases involved.

 I was looking for a solution to this few months ago as well. In the end
 I created sort of policy service proxy between Postfix and Dovecot. The
 proxy looks up aliases in database, converts them into real users and
 asks Dovecot about those. Final result is then reported back to
 postfix/smtpd.


http://dovecot.2317879.n4.nabble.com/Postfix-aliases-with-quota-status-service-td43511.html
search for post from Ulrich Zehl


Re: postfix alias and dovecot quota

2014-06-29 Thread Alexandre Ellert
Le 29 juin 2014 à 06:24, Nick Edwards nick.z.edwa...@gmail.com a écrit :

 it is the job of postfix to do this, aliases are just that, aliases of

 the real mail account, they do not exist in real storage, else, they
 would not be alias.

The problem i’m trying to solve is about dovecot capability to serve quota 
status via Postfix policy server protocol.
It works fine when the destination address is a real mailbox, but if it’s a 
Postfix alias, then the email is not rejected because dovecot doesn’t know this 
user.
Maybe it’s a wrong idea to try to make Postfix alias visible to dovecot.

Do you have another suggestion ?

postfix alias and dovecot quota

2014-06-28 Thread Alexandre Ellert
Hello,

Can someone tell me if it’s possible to configure dovecot to answer quota 
information about real mailbox when I query a postfix alias mailbox (this 
information is actually in a mysql database) ?

Example :

doveadm quota get - u al...@domain.com
doveadm(al...@domain.com): Fatal: User doesn't exist

doveadm quota get - u realmail...@domain.com
Quota name Type  Value   Limit  
  %
user   STORAGE 2048853 2048000  
100
user   MESSAGE6783   -  
  0

I’d like to have this result :
doveadm quota get - u al...@domain.com
Quota name Type  Value   Limit  
  %
user   STORAGE 2048853 2048000  
100
user   MESSAGE6783   -  
  0

doveadm quota get - u realmail...@domain.com
Quota name Type  Value   Limit  
  %
user   STORAGE 2048853 2048000  
100
user   MESSAGE6783   -  
  0

Thanks for your help.

Alexandre.

Re: postfix alias and dovecot quota

2014-06-28 Thread Nick Edwards
it is the job of postfix to do this, aliases are just that, aliases of
the real mail account, they do not exist in real storage, else, they
would not be aliaes.

On 6/29/14, Alexandre Ellert aell...@numeezy.com wrote:
 Hello,

 Can someone tell me if it's possible to configure dovecot to answer quota
 information about real mailbox when I query a postfix alias mailbox (this
 information is actually in a mysql database) ?

 Example :

 doveadm quota get - u al...@domain.com
 doveadm(al...@domain.com): Fatal: User doesn't exist

 doveadm quota get - u realmail...@domain.com
 Quota name Type  Value   Limit
  %
 user   STORAGE 2048853 2048000
100
 user   MESSAGE6783   -
  0

 I'd like to have this result :
 doveadm quota get - u al...@domain.com
 Quota name Type  Value   Limit
  %
 user   STORAGE 2048853 2048000
100
 user   MESSAGE6783   -
  0

 doveadm quota get - u realmail...@domain.com
 Quota name Type  Value   Limit
  %
 user   STORAGE 2048853 2048000
100
 user   MESSAGE6783   -
  0

 Thanks for your help.

 Alexandre.