problem with quota warning script execution, error 75

2016-10-10 Thread Ximo Mira
Hi, 

Im quite new to dovecot and im trying to run quota warning script with no 
success. Using "quota = count:User quota" and this script: 
 
#!/bin/sh 
PERCENT=$1 
USER=$2 
cat << EOF | /usr/libexec/dovecot/dovecot-lda -d $USER -o 
"plugin/quota=count:User quota:noenforcing" 
From: supp...@company.com 
To: $USER 
Subject: Quota alert 

Quota usage is $PERCENT% 
Bye 

EOF 
 

If I run the script manually from command line it works and message is 
delivered. If user reaches first configured limit (85%) Im getting this error. 

Oct 10 10:38:01 auth: Error: userdb(u...@domain.com): client doesn't have 
lookup permissions for this user: userdb reply doesn't contain uid (to bypass 
this check, set: service auth { unix_listener /var/run/dovecot/auth-userdb { 
mode=0777 } }) 
Oct 10 10:38:01 lda(u...@domain.com): Error: user u...@domain.com: Auth USER 
lookup failed 
Oct 10 10:38:01 lda: Fatal: Internal error occurred. Refer to server log for 
more information. 
Oct 10 10:38:01 quota-warning: Fatal: master: service(quota-warning): child 
24515 returned error 75 

Auth is LDAP based. 


Re: problem with quota warning script execution, error 75

2016-10-10 Thread Aki Tuomi


On 10.10.2016 11:49, Ximo Mira wrote:
> Hi, 
>
> Im quite new to dovecot and im trying to run quota warning script with no 
> success. Using "quota = count:User quota" and this script: 
>  
> #!/bin/sh 
> PERCENT=$1 
> USER=$2 
> cat << EOF | /usr/libexec/dovecot/dovecot-lda -d $USER -o 
> "plugin/quota=count:User quota:noenforcing" 
> From: supp...@company.com 
> To: $USER 
> Subject: Quota alert 
>
> Quota usage is $PERCENT% 
> Bye 
>
> EOF 
>  
>
> If I run the script manually from command line it works and message is 
> delivered. If user reaches first configured limit (85%) Im getting this 
> error. 
>
> Oct 10 10:38:01 auth: Error: userdb(u...@domain.com): client doesn't have 
> lookup permissions for this user: userdb reply doesn't contain uid (to bypass 
> this check, set: service auth { unix_listener /var/run/dovecot/auth-userdb { 
> mode=0777 } }) 
> Oct 10 10:38:01 lda(u...@domain.com): Error: user u...@domain.com: Auth USER 
> lookup failed 
> Oct 10 10:38:01 lda: Fatal: Internal error occurred. Refer to server log for 
> more information. 
> Oct 10 10:38:01 quota-warning: Fatal: master: service(quota-warning): child 
> 24515 returned error 75 
>
> Auth is LDAP based. 
Hi

can you run the script by hand so that you do
./script params ; echo $?

Aki


Re: problem with quota warning script execution, error 75

2016-10-10 Thread Ximo Mira
Like this? 

[root@server quota]# ./quota-warning.sh 85 existing_mail...@domain.com ; echo $ 
$ 

Got message succesfully delivered. 


- Mensaje original -

De: "Aki Tuomi"  
Para: dovecot@dovecot.org 
Enviados: Lunes, 10 de Octubre 2016 11:14:01 
Asunto: Re: problem with quota warning script execution, error 75 



On 10.10.2016 11:49, Ximo Mira wrote: 
> Hi, 
> 
> Im quite new to dovecot and im trying to run quota warning script with no 
> success. Using "quota = count:User quota" and this script: 
>  
> #!/bin/sh 
> PERCENT=$1 
> USER=$2 
> cat << EOF | /usr/libexec/dovecot/dovecot-lda -d $USER -o 
> "plugin/quota=count:User quota:noenforcing" 
> From: supp...@company.com 
> To: $USER 
> Subject: Quota alert 
> 
> Quota usage is $PERCENT% 
> Bye 
> 
> EOF 
>  
> 
> If I run the script manually from command line it works and message is 
> delivered. If user reaches first configured limit (85%) Im getting this 
> error. 
> 
> Oct 10 10:38:01 auth: Error: userdb(u...@domain.com): client doesn't have 
> lookup permissions for this user: userdb reply doesn't contain uid (to bypass 
> this check, set: service auth { unix_listener /var/run/dovecot/auth-userdb { 
> mode=0777 } }) 
> Oct 10 10:38:01 lda(u...@domain.com): Error: user u...@domain.com: Auth USER 
> lookup failed 
> Oct 10 10:38:01 lda: Fatal: Internal error occurred. Refer to server log for 
> more information. 
> Oct 10 10:38:01 quota-warning: Fatal: master: service(quota-warning): child 
> 24515 returned error 75 
> 
> Auth is LDAP based. 
Hi 

can you run the script by hand so that you do 
./script params ; echo $? 

Aki 


Re: problem with quota warning script execution, error 75

2016-10-10 Thread Aki Tuomi
No,

./quota-warning.sh 85 existing_mail...@domain.com ; echo $?

the '?' is part of the cmdline.

On 10.10.2016 12:21, Ximo Mira wrote:
> Like this? 
>
> [root@server quota]# ./quota-warning.sh 85 existing_mail...@domain.com ; echo 
> $ 
> $ 
>
> Got message succesfully delivered. 
>
>
> - Mensaje original -
>
> De: "Aki Tuomi"  
> Para: dovecot@dovecot.org 
> Enviados: Lunes, 10 de Octubre 2016 11:14:01 
> Asunto: Re: problem with quota warning script execution, error 75 
>
>
>
> On 10.10.2016 11:49, Ximo Mira wrote: 
>> Hi, 
>>
>> Im quite new to dovecot and im trying to run quota warning script with no 
>> success. Using "quota = count:User quota" and this script: 
>>  
>> #!/bin/sh 
>> PERCENT=$1 
>> USER=$2 
>> cat << EOF | /usr/libexec/dovecot/dovecot-lda -d $USER -o 
>> "plugin/quota=count:User quota:noenforcing" 
>> From: supp...@company.com 
>> To: $USER 
>> Subject: Quota alert 
>>
>> Quota usage is $PERCENT% 
>> Bye 
>>
>> EOF 
>>  
>>
>> If I run the script manually from command line it works and message is 
>> delivered. If user reaches first configured limit (85%) Im getting this 
>> error. 
>>
>> Oct 10 10:38:01 auth: Error: userdb(u...@domain.com): client doesn't have 
>> lookup permissions for this user: userdb reply doesn't contain uid (to 
>> bypass this check, set: service auth { unix_listener 
>> /var/run/dovecot/auth-userdb { mode=0777 } }) 
>> Oct 10 10:38:01 lda(u...@domain.com): Error: user u...@domain.com: Auth USER 
>> lookup failed 
>> Oct 10 10:38:01 lda: Fatal: Internal error occurred. Refer to server log for 
>> more information. 
>> Oct 10 10:38:01 quota-warning: Fatal: master: service(quota-warning): child 
>> 24515 returned error 75 
>>
>> Auth is LDAP based. 
> Hi 
>
> can you run the script by hand so that you do 
> ./script params ; echo $? 
>
> Aki 


Re: problem with quota warning script execution, error 75

2016-10-10 Thread Ximo Mira
Output is 0 and mail is delivered. 

[root@server quota]# ./quota-warning.sh 85 existing_mail...@domain.com ; echo 
$? 
0 

- Mensaje original -

De: "Aki Tuomi"  
Para: dovecot@dovecot.org 
Enviados: Lunes, 10 de Octubre 2016 11:37:26 
Asunto: Re: problem with quota warning script execution, error 75 

No, 

./quota-warning.sh 85 existing_mail...@domain.com ; echo $? 

the '?' is part of the cmdline. 

On 10.10.2016 12:21, Ximo Mira wrote: 
> Like this? 
> 
> [root@server quota]# ./quota-warning.sh 85 existing_mail...@domain.com ; echo 
> $ 
> $ 
> 
> Got message succesfully delivered. 
> 
> 
> - Mensaje original - 
> 
> De: "Aki Tuomi"  
> Para: dovecot@dovecot.org 
> Enviados: Lunes, 10 de Octubre 2016 11:14:01 
> Asunto: Re: problem with quota warning script execution, error 75 
> 
> 
> 
> On 10.10.2016 11:49, Ximo Mira wrote: 
>> Hi, 
>> 
>> Im quite new to dovecot and im trying to run quota warning script with no 
>> success. Using "quota = count:User quota" and this script: 
>>  
>> #!/bin/sh 
>> PERCENT=$1 
>> USER=$2 
>> cat << EOF | /usr/libexec/dovecot/dovecot-lda -d $USER -o 
>> "plugin/quota=count:User quota:noenforcing" 
>> From: supp...@company.com 
>> To: $USER 
>> Subject: Quota alert 
>> 
>> Quota usage is $PERCENT% 
>> Bye 
>> 
>> EOF 
>>  
>> 
>> If I run the script manually from command line it works and message is 
>> delivered. If user reaches first configured limit (85%) Im getting this 
>> error. 
>> 
>> Oct 10 10:38:01 auth: Error: userdb(u...@domain.com): client doesn't have 
>> lookup permissions for this user: userdb reply doesn't contain uid (to 
>> bypass this check, set: service auth { unix_listener 
>> /var/run/dovecot/auth-userdb { mode=0777 } }) 
>> Oct 10 10:38:01 lda(u...@domain.com): Error: user u...@domain.com: Auth USER 
>> lookup failed 
>> Oct 10 10:38:01 lda: Fatal: Internal error occurred. Refer to server log for 
>> more information. 
>> Oct 10 10:38:01 quota-warning: Fatal: master: service(quota-warning): child 
>> 24515 returned error 75 
>> 
>> Auth is LDAP based. 
> Hi 
> 
> can you run the script by hand so that you do 
> ./script params ; echo $? 
> 
> Aki 


Re: problem with quota warning script execution, error 75

2016-10-10 Thread Aki Tuomi
You are running LDA directly, from within user's context. You need to
let your users access auth-userdb, as explained in the error log entry:

service auth {
 unix_listener /var/run/dovecot/auth-userdb {
  mode=0777
 }
}

Aki

On 10.10.2016 12:41, Ximo Mira wrote:
> Output is 0 and mail is delivered. 
>
> [root@server quota]# ./quota-warning.sh 85 existing_mail...@domain.com ; echo 
> $? 
> 0 
>
> - Mensaje original -
>
> De: "Aki Tuomi"  
> Para: dovecot@dovecot.org 
> Enviados: Lunes, 10 de Octubre 2016 11:37:26 
> Asunto: Re: problem with quota warning script execution, error 75 
>
> No, 
>
> ./quota-warning.sh 85 existing_mail...@domain.com ; echo $? 
>
> the '?' is part of the cmdline. 
>
> On 10.10.2016 12:21, Ximo Mira wrote: 
>> Like this? 
>>
>> [root@server quota]# ./quota-warning.sh 85 existing_mail...@domain.com ; 
>> echo $ 
>> $ 
>>
>> Got message succesfully delivered. 
>>
>>
>> - Mensaje original - 
>>
>> De: "Aki Tuomi"  
>> Para: dovecot@dovecot.org 
>> Enviados: Lunes, 10 de Octubre 2016 11:14:01 
>> Asunto: Re: problem with quota warning script execution, error 75 
>>
>>
>>
>> On 10.10.2016 11:49, Ximo Mira wrote: 
>>> Hi, 
>>>
>>> Im quite new to dovecot and im trying to run quota warning script with no 
>>> success. Using "quota = count:User quota" and this script: 
>>>  
>>> #!/bin/sh 
>>> PERCENT=$1 
>>> USER=$2 
>>> cat << EOF | /usr/libexec/dovecot/dovecot-lda -d $USER -o 
>>> "plugin/quota=count:User quota:noenforcing" 
>>> From: supp...@company.com 
>>> To: $USER 
>>> Subject: Quota alert 
>>>
>>> Quota usage is $PERCENT% 
>>> Bye 
>>>
>>> EOF 
>>>  
>>>
>>> If I run the script manually from command line it works and message is 
>>> delivered. If user reaches first configured limit (85%) Im getting this 
>>> error. 
>>>
>>> Oct 10 10:38:01 auth: Error: userdb(u...@domain.com): client doesn't have 
>>> lookup permissions for this user: userdb reply doesn't contain uid (to 
>>> bypass this check, set: service auth { unix_listener 
>>> /var/run/dovecot/auth-userdb { mode=0777 } }) 
>>> Oct 10 10:38:01 lda(u...@domain.com): Error: user u...@domain.com: Auth 
>>> USER lookup failed 
>>> Oct 10 10:38:01 lda: Fatal: Internal error occurred. Refer to server log 
>>> for more information. 
>>> Oct 10 10:38:01 quota-warning: Fatal: master: service(quota-warning): child 
>>> 24515 returned error 75 
>>>
>>> Auth is LDAP based. 
>> Hi 
>>
>> can you run the script by hand so that you do 
>> ./script params ; echo $? 
>>
>> Aki 


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10-Oct-16 06:45, Aki Tuomi wrote:

We do already support various non-GNU platforms, but our code does expect C99 
conforming compiler these days. We also use autotools and libtool. rpcgen 
should be available, at least according to
http://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds4/rpcgen.htm

Does your build end at some particular point?


a) found rpcgen - not installed by default (it is included in 
bos.net.tcp.adt - recognizable for AIX admins). Thanks for the pointer! 
FYI, although the documentation is AIX 6.1, the program has been around 
much longer - only the web documentation is non existent.


b) yes, it ended at some point (was in first post), but I shall try 
again with rpcgen installed - see if that goes better.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10-Oct-16 06:45, Aki Tuomi wrote:

We do already support various non-GNU platforms, but our code does expect C99 
conforming compiler these days. We also use autotools and libtool. rpcgen 
should be available, at least according to
http://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds4/rpcgen.htm


oops - this is in bos.net.nfs.server!

FYI:

root@x064:[/data/prj/aixtools/dovecot/dovecot-2.2.25]lslpp -w 
/usr/bin/rpcgen

  File Fileset   Type

  /usr/bin/rpcgen bos.net.nfs.serverFile


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...

Making all in lib-http
source='test-http-auth.c' object='test-http-auth.o' libtool=no  
DEPDIR=.deps depmode=xlc /bin/sh ../../depcomp  xlc_r -DHAVE_CONFIG_H 
-I. -I../..  -I../../src/lib -I../../src/lib-test  -I../../src/lib-dns 
-I../../src/lib-ssl-iostream  -I../../src/lib-master -I/opt/include 
-I/opt/buildaix/include  -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 
-I/opt/buildaix/includes  -c -o test-http-auth.o test-http-auth.c
"test-http-auth.c", line 27.27: 1506-022 (S) "scheme" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 27.37: 1506-196 (W) Initialization between 
types "struct http_auth_challenge_test* const" and "char*" is not allowed.
"test-http-auth.c", line 28.33: 1506-022 (S) "data" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 28.41: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 29.33: 1506-022 (S) "params" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 30.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 30.52: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 30.70: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 30.76: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 33.33: 1506-022 (S) "scheme" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 33.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 43.27: 1506-022 (S) "scheme" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 43.37: 1506-196 (W) Initialization between 
types "struct http_auth_challenge_test* const" and "char*" is not allowed.
"test-http-auth.c", line 44.33: 1506-022 (S) "data" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 44.41: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 45.33: 1506-022 (S) "params" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 46.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 46.52: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 47.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 47.50: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 48.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 48.52: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 49.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 49.53: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 50.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 50.49: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 53.33: 1506-022 (S) "scheme" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 53.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 60.27: 1506-022 (S) "scheme" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 60.37: 1506-196 (W) Initialization between 
types "struct http_auth_challenge_test* const" and "char*" is not allowed.
"test-http-auth.c", line 61.33: 1506-022 (S) "data" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 61.41: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 62.33: 1506-022 (S) "params" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 63.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 63.52: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 64.4

Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Stephan Bosch



Op 10-10-2016 om 14:39 schreef Michael Felt:

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...


It seems to fail on a C99 feature called Compound Literal (see 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, Section 6.5.2.5).


It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html

I have no idea why it would fail here.

Regards,

Stephan.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 14:59, Stephan Bosch wrote:



Op 10-10-2016 om 14:39 schreef Michael Felt:

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...


It seems to fail on a C99 feature called Compound Literal (see 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, Section 
6.5.2.5).


It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



I have no idea why it would fail here.

Regards,

Stephan.


Well, if I had the budget to buy the latest version (version 13 is your 
doclink) - then maybe it would work for me. I do not have the resources 
to upgrade from v11. Sad day for me I guess.


Or lucky for me that "Compound Literal" is not used much - this is the 
first time I have run into it.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Stephan Bosch



Op 10-10-2016 om 17:16 schreef Michael Felt:

On 10/10/2016 14:59, Stephan Bosch wrote:



Op 10-10-2016 om 14:39 schreef Michael Felt:

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...


It seems to fail on a C99 feature called Compound Literal (see 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, Section 
6.5.2.5).


It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



I have no idea why it would fail here.

Regards,

Stephan.


Well, if I had the budget to buy the latest version (version 13 is 
your doclink) - then maybe it would work for me. I do not have the 
resources to upgrade from v11. Sad day for me I guess.


Or lucky for me that "Compound Literal" is not used much - this is the 
first time I have run into it.


Well, older versions are supposed to support it too:

https://www.ibm.com/support/knowledgecenter/SSGH3R_11.1.0/com.ibm.xlcpp111.aix.doc/language_ref/compound_literals.html

Regards,

Stephan.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 17:29, Stephan Bosch wrote:



Op 10-10-2016 om 17:16 schreef Michael Felt:

On 10/10/2016 14:59, Stephan Bosch wrote:



Op 10-10-2016 om 14:39 schreef Michael Felt:

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...


It seems to fail on a C99 feature called Compound Literal (see 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, Section 
6.5.2.5).


It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



I have no idea why it would fail here.

Regards,

Stephan.


Well, if I had the budget to buy the latest version (version 13 is 
your doclink) - then maybe it would work for me. I do not have the 
resources to upgrade from v11. Sad day for me I guess.


Or lucky for me that "Compound Literal" is not used much - this is 
the first time I have run into it.


Well, older versions are supposed to support it too:

https://www.ibm.com/support/knowledgecenter/SSGH3R_11.1.0/com.ibm.xlcpp111.aix.doc/language_ref/compound_literals.html 



Regards,

Stephan.


I am trying to work on it. Hard to read until you know what you are 
looking at.


I had already seen that 11.1 also shows the link - I guess it does not 
like the nested form.


And, it looks as if you have too many {} pairs (one too many outside 
pairs) - the .info report was mentioning they were more than needed and 
'skipping' iirc.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 14:59, Stephan Bosch wrote:

It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



I have no idea why it would fail here.


I see it is also in version 11 - so, maybe still syntax:

This is the doc:

The following example passes a constant structure variable of type point 
containing two integer members to the function drawline:


drawline((struct point){6,7});

While the code is:
.challenges = (struct http_auth_challenge_test []) {
{ .scheme = "Basic",
.data = NULL,
.params = (struct http_auth_param []) {
{ "realm", "WallyWorld" }, { NULL, NULL 
}
}
},{
.scheme = NULL
}

The difference I notice is that, much prettier btw, you are also specifying the 
struct .names, and perhaps, in
Compound literal syntax

   .-,.
   V  |

-(--/type_name/--)--{/initializer_list/-+--}-><


"initializer_list" is exclusive of (additional) declarers.

The messages seem to indicate the parser does not like them being there...
"test-http-auth.c", line 27.27: 1506-022 (S) "scheme" is not a member of "const 
struct http_auth_challenges_test".
"test-http-auth.c", line 27.37: 1506-196 (W) Initialization between types "struct 
http_auth_challenge_test* const" and "char*" is not allowed.
"test-http-auth.c", line 28.33: 1506-022 (S) "data" is not a member of "const struct 
http_auth_challenges_test".
"test-http-auth.c", line 28.41: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 29.33: 1506-022 (S) "params" is not a member of "const 
struct http_auth_challenges_test".
"test-http-auth.c", line 30.43: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 30.52: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 30.70: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 30.76: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.

To understand|study it, I simplified it to:

 +7  #include "http-auth.h"
+8
+9  struct http_auth_challenge_test {
   +10  const char *scheme;
   +11  const char *data;
   +12  struct http_auth_param *params;
   +13  };
   +14
   +15  struct http_auth_challenges_test {
   +16  const char *challenges_in;
   +17  struct http_auth_challenge_test *challenges;
   +18  };
   +19
   +20  /* Valid auth challenges tests */
   +21  static struct http_auth_challenges_test
   +22  valid_auth_challenges_tests[] = {
   +23  { "Basic realm=\"WallyWorld\"",
   +24  "Basic",
   +25  NULL,
   +26   "realm", "WallyWorld",
   +27   NULL, NULL
   +28  },{
   +29  NULL,
   +30  NULL,
   +31  NULL, NULL
   +32  }
   +33  };

(lots of experimenting!)
I got it down to these messages:
"test-http-auth.c", line 24.25: 1506-196 (W) Initialization between types "struct 
http_auth_challenge_test*" and "char*" is not allowed.
"test-http-auth.c", line 25.25: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 26.26: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 26.35: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 27.26: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 27.32: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 31.25: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 31.31: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.

As 'it' kept complaining about the unnecessary opening { I am thinking that 
their design does not leave space fot nesting arrarys of initialization. And I 
would tend to agree with there being 'lazy'.
That does not fix my problem. Going to look for a - maybe less elegant - but 
workable (and if found I hope acceptable) work-around.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 17:29, Stephan Bosch wrote:



Op 10-10-2016 om 17:16 schreef Michael Felt:

On 10/10/2016 14:59, Stephan Bosch wrote:



Op 10-10-2016 om 14:39 schreef Michael Felt:

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...


It seems to fail on a C99 feature called Compound Literal (see 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, Section 
6.5.2.5).


It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



I have no idea why it would fail here.

Regards,

Stephan.


Well, if I had the budget to buy the latest version (version 13 is 
your doclink) - then maybe it would work for me. I do not have the 
resources to upgrade from v11. Sad day for me I guess.


Or lucky for me that "Compound Literal" is not used much - this is 
the first time I have run into it.


Well, older versions are supposed to support it too:

https://www.ibm.com/support/knowledgecenter/SSGH3R_11.1.0/com.ibm.xlcpp111.aix.doc/language_ref/compound_literals.html 

As I said, or implied - reading the code was new - as actually, normally 
I saw the C89 way to do things.


I wrote a simple test for myself to come to grips on the syntax expected 
- nothing nested, but seems to be passing test #1


+1  typedef struct {
+2  char * p1;
+3  char * p2;
+4  } http_auth_param_t;
+5
+6  http_auth_param_t a[] =
+7  { "a1", "a2",
+8"b1", "b2"
+9  };
   +10
   +11  main()
   +12  {
   +13  http_auth_param_t b[] = {
   +14  (http_auth_param_t) { .p1 = "c1" },
   +15  (http_auth_param_t) { .p2 = "e2" }
   +16  };
   +17
   +18  printf("%s\n", a[0].p1);
   +19  printf("%s\n", b[1].p2);
   +20  }

returns:
!cc c99_comp_literal.c; ./a.out
a1
e2



Regards,

Stephan.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 19:44, Michael Felt wrote:

   +11  main()
   +12  {
   +13  http_auth_param_t b[] = {
   +14  (http_auth_param_t) { .p1 = "c1" },
   +15  (http_auth_param_t) { .p2 = "e2" }
   +16  };
   +17
   +18  printf("%s\n", a[0].p1);
   +19  printf("%s\n", b[1].p2);
   +20  }


Updated to:

+1  typedef struct {
+2  char * p1;
+3  char * p2;
+4  } http_auth_param_t;
+5
+6  http_auth_param_t a[] =
+7  { "a1", "a2",
+8"b1", "b2"
+9  };
   +10
   +11  struct xxx {
   +12  char *lbl;
   +13  http_auth_param_t a[];
   +14  };
   +15  struct xxx X = (struct xxx) {
   +16  .lbl = "labelX",
   +17  .a = {
   +18 (http_auth_param_t) { .p1 = "c1" },
   +19 (http_auth_param_t) { .p2 = "g2" },
   +20 (http_auth_param_t) { }
   +21  }
   +22  };
   +23  main()
   +24  {
   +25  http_auth_param_t b[] = {
   +26  (http_auth_param_t) { .p1 = "c1" },
   +27  (http_auth_param_t) { .p2 = "e2" },
   +28  (http_auth_param_t) { }
   +29  };
   +30
   +31  printf("%s\n", a[0].p1);
   +32  printf("%s\n", b[1].p2);
   +33  printf("%s\n", X.a[1].p2);
   +34  }

!cc c99_comp_literal.c; ./a.out
a1
e2
g2

The key element seems to be in the struct definition:

this works:

   +11  struct xxx {
   +12  char *lbl;
   +13  http_auth_param_t a[];
   +14  };

but

   +11  struct xxx {
   +12  char *lbl;
   +13  http_auth_param_t *a;
   +14  };

!cc c99_comp_literal.c; ./a.out
"c99_comp_literal.c", line 18.20: 1506-196 (S) Initialization between 
types "struct {...}*" and "struct {...}" is not allowed.
"c99_comp_literal.c", line 19.20: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"c99_comp_literal.c", line 20.20: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.


I (am guessing) think the reason is because *a could be an array of 
"random"(ized) pointers pointing to single instance, while [] says it 
will be an array of structs.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 14:59, Stephan Bosch wrote:

It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



OK - it is supported, but "not in the same way as gcc".


Getting it to simplified cases:

No GO is stated as: flexible array member cannot be used as a member of 
a structure - line25


   +23  struct yyy {
   +24  char *newLBL;
   +25  http_auth_param_t auth[];
   +26  };
   +27
   +28  struct yyy
   +29  YYY[] = {
   +30 (struct yyy) {
   +31.newLBL = "LBL1"
   +32 },
   +33 (struct yyy) {
   +34.newLBL = "LBL2"
   +35 }
   +36  };
!cc c99_comp_literal.c;
"c99_comp_literal.c", line 29.1: 1506-995 (S) An aggregate containing a 
flexible array member cannot be used as a member of a structure or as an 
array element.


So, to get it to work with a pointer "inside" the data needs to be 
initialized more like this:

(what was line 25, is now line 32)

   +11  struct xxx {
   +12  char *lbl;
   +13  http_auth_param_t a[];
   +14  };
   +15  struct xxx X1 = (struct xxx) {
   +16  .lbl = "labelX",
   +17  .a = {
   +18 (http_auth_param_t) { .p1 = "c1" },
   +19 (http_auth_param_t) { .p2 = "g2" },
   +20 (http_auth_param_t) { }
   +21  }
   +22  };
   +23  struct xxx X2 = (struct xxx) {
   +24  .lbl = "labelX",
   +25  .a = {
   +26 (http_auth_param_t) { .p1 = "z1" },
   +27 (http_auth_param_t) { }
   +28  }
   +29  };
   +30  struct yyy {
   +31  char *newLBL;
   +32  http_auth_param_t *auth;
   +33  };
   +34
   +35  struct yyy
   +36  YYY[] = {
   +37 (struct yyy) {
   +38.newLBL = "LBL1",
   +39.auth = X1.a
   +40 },
   +41 (struct yyy) {
   +42.newLBL = "LBL2",
   +43.auth = X2.a
   +44 },
   +45 { }
   +46  };

Shall work on a 'patch' asap (which might be in 24+ hours)

Michael


Hierarchy separator and LAYOUT=FS change

2016-10-10 Thread Simeon Ott
Hello,

I stumbled across a 5-year-old post on the dovecot list about changing the 
dovecot hierarchy separator to enable shared mailboxes 
(http://www.dovecot.org/list/dovecot/2011-January/056201.html 
).
At the moment I’m stuck in a pretty similar situation. Migrated from courier to 
dovecot 2 years ago and preserved the dot-separator. 
Because I’m using the e-mail adress as a username, the dots for folder 
separation and the dots in the email adresses getting messed up -

I do have a pretty small mailserver with about 150 accounts. The Maildir 
filestructur of a typical mail account looks like this:
drwx--  2 vmail vmail  4096 Oct 10 20:02 cur
drwx--  5 vmail vmail  4096 Oct  3 07:48 .Daten.Administration
drwx--  5 vmail vmail  4096 Oct  3 09:51 .Daten.Anfragen, Werbung
drwx--  5 vmail vmail  4096 Oct  3 08:02 .Daten
drwx--  5 vmail vmail  4096 Oct  6 09:57 .Daten.Intern
drwx--  5 vmail vmail  4096 Oct  3 08:03 .Daten.Intern.Fahrzeuge
drwx--  5 vmail vmail  4096 Oct  6 12:57 .Daten.Intern.Infos, FileMaker etc
drwx--  5 vmail vmail  4096 Oct  3 09:19 .Daten.Intern.Sonstiges
drwx--  5 vmail vmail  4096 Oct  3 07:47 .Daten.Kunden
drwx--  5 vmail vmail  4096 Sep 16 08:29 .Daten.Lieferanten
drwx--  5 vmail vmail  4096 Oct  3 08:28 .Daten.Marketing
drwx--  2 vmail vmail  4096 Oct 10 20:02 new
drwx--  5 vmail vmail  4096 Oct 10 18:00 .Sent
drwx--  5 vmail vmail  4096 Oct 10 18:00 .Spam
drwx--  5 vmail vmail  4096 Oct 10 18:00 .Trash

When changing the separator in my inbox namespace the documentation mentions 
that the filestructur doesn’t change. This means I will get the same problems 
when using shared boxes with email adresses as usernames. I definitly need to 
change to maildir:~/Maildir:LAYOUT=fs
When changing to LAYOUT=fs i need to convert all the mailboxes manually, is 
that correct? Is dsync is the way to go? 
Or is it better to leave the separator and change to a different username 
schema (without dots in it) and advise the clients to change their credentials? 

I know there are people out there who successfully converted this - but I can’f 
find that many information about this subject.

doveconf -n:
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.11 
auth_mechanisms = plain login
auth_verbose = yes
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
listen = *
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c
mail_gid = 5000
mail_location = maildir:~/Maildir
mail_plugins = zlib quota acl
mail_uid = 5000
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date ihave
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Spam {
auto = subscribe
special_use = \Junk
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix = INBOX.
  separator = .
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
plugin {
  acl = vfile
  acl_shared_dict = file:/var/spool/postfix/virtual/shared-mailboxes
  quota = maildir:User quota
  quota_exceeded_message = 4.2.2 Mailbox full
  quota_rule = *:storage=1G
  quota_rule2 = INBOX.Trash:storage=+100M
  quota_rule3 = INBOX.Spam:ignore
  quota_warning = storage=95%% quota-warning 95 %u
  sieve = ~/.dovecot.sieve
  sieve_before = /var/lib/dovecot/sieve/default.sieve
  sieve_dir = ~/sieve
  sieve_max_actions = 32
  sieve_max_redirects = 4
  sieve_max_script_size = 1M
  sieve_quota_max_scripts = 0
  sieve_quota_max_storage = 0
}
protocols = " imap lmtp sieve pop3"
service auth {
  group = dovecot
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-master {
group = vmail
mode = 0660
user = vmail
  }
  user = dovecot
}
service lmtp {
  unix_listener lmtp {
mode = 0666
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  inet_listener sieve_deprecated {
port = 2000
  }
  process_min_avail = 1
  service_count = 1
  vsz_limit = 64 M
}
ssl_cert = http://startssl-onnet.ch/>-chain.crt
ssl_cipher_list = 
ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-RSA-CAMELLIA256-SHA:CAMELLIA128-SHA:CAMELLIA256-SHA:ECDHE-RSA-DES-CBC3-SHA:DES-CBC3-SHA:!SSLv2