[Dovecot] beta5 builds under RHEL

2010-05-30 Thread Axel Thimm
Hi,

beta4 built under RHEL4, RHEL5 and RHEL6 (the latter being the public
beta). beta5 now builds only for RHEL5, the other two fail with:

strnum.c: In function `str_to_llong':
strnum.c:139: error: `LLONG_MIN' undeclared (first use in this function)
strnum.c:139: error: (Each undeclared identifier is reported only once
strnum.c:139: error: for each function it appears in.)

Thanks!
-- 
Axel.Thimm at ATrpms.net


pgpgURLdHC3es.pgp
Description: PGP signature


Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Pascal Volk
On 05/30/2010 09:05 AM Axel Thimm wrote:
 Hi,
 
 beta4 built under RHEL4, RHEL5 and RHEL6 (the latter being the public
 beta). beta5 now builds only for RHEL5, the other two fail with:
 
 strnum.c: In function `str_to_llong':
 strnum.c:139: error: `LLONG_MIN' undeclared (first use in this function)
 strnum.c:139: error: (Each undeclared identifier is reported only once
 strnum.c:139: error: for each function it appears in.)
 
 Thanks!

LLONG_MIN is defined in /usr/include/limits.h (at least on my systems).
It's provided by the package libc6-dev (on Debian GNU/Linux).

src/lib/strnum.c - includes lib.h
src/lib/lib.h- includes limits.h

Defines your limits.h LLONG_MIN? If not, which libc/version is RHEL 6 using?


Regards,
Pascal
-- 
The trapper recommends today: 5e1f1e55.1015...@localdomain.org


Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Axel Thimm
On Sun, May 30, 2010 at 09:42:38AM +0200, Pascal Volk wrote:
 On 05/30/2010 09:05 AM Axel Thimm wrote:
  beta4 built under RHEL4, RHEL5 and RHEL6 (the latter being the
  public beta). beta5 now builds only for RHEL5, the other two fail
  with:
  
  strnum.c: In function `str_to_llong':
  strnum.c:139: error: `LLONG_MIN' undeclared (first use in this function)
  strnum.c:139: error: (Each undeclared identifier is reported only once
  strnum.c:139: error: for each function it appears in.)
 
 LLONG_MIN is defined in /usr/include/limits.h (at least on my
 systems).  It's provided by the package libc6-dev (on Debian
 GNU/Linux).
 
 src/lib/strnum.c - includes lib.h
 src/lib/lib.h- includes limits.h
 
 Defines your limits.h LLONG_MIN? If not, which libc/version is RHEL 6 using?

LLONG_MIN/LLONG_MAX and some other defines are there, but protected by

#  ifdef __USE_ISOC99

Maybe dovecot's buildsystem should check for and use -std=c99? But
then I wonder why it does build for RHEL5 and all recent Fedoras? I
grepped the logs and found no explicit -std switch in any of the
successful builds.

Thanks!
-- 
Axel.Thimm at ATrpms.net


pgphnfyWmt80e.pgp
Description: PGP signature


Re: [Dovecot] dovecot-2.0-pigeonhole/ManageSieve: wrong service name

2010-05-30 Thread Stephan Bosch

Hi Pascal,

Pascal Volk wrote:

ManageSieve uses the wrong™ service name for the authdb lookup.
With dovecot-1.2-managesieve the service name was changed from
'managesieve' to 'sieve'. So I altered my table layout in order to make
the query SELECT userid AS user, password FROM dovecotpassword('%Ln',
'%Ld') WHERE %Ls work again.

When I try to login on the sieve port 4190/tcp, I find this in my
dovecot.log:

auth: Error: pgsql: Query failed, retrying: ERROR:  column managesieve
does not exist
auth: Error: LINE 1: ..., password FROM dovecotpassword('user',
'example.org') WHERE managesiev...
  
Hmm, you are right. It got changed implicitly by Dovecot v2.0 API 
changes. I cannot fix this by myself however. In Dovecot, 
client_auth_begin (src/login-common/client-common-auth.c) statically 
uses login_binary.protocol as the protocol name for SASL authentication 
(in v1.2 I would call the sasl API directly), so there is no way for me 
to alter this to sieve because the protocol name for Dovecot is 
managesieve. Timo will have to create some means to fix this. As we 
have seen earlier, fully changing the protocol name from managesieve 
to sieve is a bad idea, for one because it causes much confusion.


Timo, can you take a look at this?

Regards,

Stephan.


Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Pascal Volk
On 05/30/2010 09:54 AM Axel Thimm wrote:
 LLONG_MIN/LLONG_MAX and some other defines are there, but protected by
 
 #  ifdef __USE_ISOC99
 
 Maybe dovecot's buildsystem should check for and use -std=c99? But
 then I wonder why it does build for RHEL5 and all recent Fedoras? I
 grepped the logs and found no explicit -std switch in any of the
 successful builds.

Wow, now I'm wondering too:

limits.h:102  #  ifdef __USE_ISOC99
define LLONG_MAX, LLONG_MIN, ULLONG_MAX
limits.h:111  #  endif /* ISO C99 */
limits.h:131  #if defined __USE_ISOC99  defined __GNUC__
ifndef LLONG_MIN, LLONG_MAX, ULLONG_MAX define theme
limits.h:141  #endif

Dovecot used std=gnu99, when possible
configure.in:300# Use std=gnu99 if we have new enough gcc
configure.in:301old_cflags=$CFLAGS
configure.in:302CFLAGS=-std=gnu99

gcc(1)
gnu99
GNU dialect of ISO C99.  When ISO C99 is fully implemented in GCC,
this will become the default. …

Which gcc uses RHEL 6?
It works for me with gcc-4.3 and gcc-4.4.


Regards,
Pascal
-- 
The trapper recommends today: cafebabe.1015...@localdomain.org


Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Axel Thimm
On Sun, May 30, 2010 at 10:41:12AM +0200, Pascal Volk wrote:
 On 05/30/2010 09:54 AM Axel Thimm wrote:
  LLONG_MIN/LLONG_MAX and some other defines are there, but protected by
  
  #  ifdef __USE_ISOC99
  
  Maybe dovecot's buildsystem should check for and use -std=c99? But
  then I wonder why it does build for RHEL5 and all recent Fedoras? I
  grepped the logs and found no explicit -std switch in any of the
  successful builds.
 
 Wow, now I'm wondering too:
 
 limits.h:102  #  ifdef __USE_ISOC99
 define LLONG_MAX, LLONG_MIN, ULLONG_MAX
 limits.h:111  #  endif /* ISO C99 */
 limits.h:131  #if defined __USE_ISOC99  defined __GNUC__
 ifndef LLONG_MIN, LLONG_MAX, ULLONG_MAX define theme
 limits.h:141  #endif
 
 Dovecot used std=gnu99, when possible
 configure.in:300  # Use std=gnu99 if we have new enough gcc
 configure.in:301  old_cflags=$CFLAGS
 configure.in:302  CFLAGS=-std=gnu99
 
 gcc(1)
 gnu99
 GNU dialect of ISO C99.  When ISO C99 is fully implemented in GCC,
 this will become the default. …
 
 Which gcc uses RHEL 6?
 It works for me with gcc-4.3 and gcc-4.4.

The gcc I used are

RHEL4  3.4.6fails
RHEL5  4.1.2builds
F114.4.1builds
F124.4.3builds
RHEL6 (beta1)  4.4.3fails
F134.4.4builds
-- 
Axel.Thimm at ATrpms.net


pgpngv2pczMhX.pgp
Description: PGP signature


Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Axel Thimm
On Sun, May 30, 2010 at 02:32:49AM -0700, Brandon Davidson wrote:
 
 Axel,
 
 On 5/30/10 12:05 AM, Axel Thimm axel.th...@atrpms.net wrote:
  beta4 built under RHEL4, RHEL5 and RHEL6 (the latter being the public
  beta). beta5 now builds only for RHEL5, the other two fail with:
  
  strnum.c: In function `str_to_llong':
  strnum.c:139: error: `LLONG_MIN' undeclared (first use in this function)
  strnum.c:139: error: (Each undeclared identifier is reported only once
  strnum.c:139: error: for each function it appears in.)
 
 FWIW, the build fails with the same error within my CentOS 5 Mock build
 environment. I'm not sure what I've got set up different than you, but I'm
 using a slightly tweaked version of your spec file and a pretty vanilla Mock
 0.6 setup.

Sorry, I mixed things up (RHEL6 beta1 is labeled as el5_89 at ATrpms).

E.g. the broken builds are RHEL4 and RHEL5, and RHEL6 beta builds.
-- 
Axel.Thimm at ATrpms.net


pgpSLQVJURGSm.pgp
Description: PGP signature


Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Axel Thimm
On Sun, May 30, 2010 at 12:30:48PM +0300, Axel Thimm wrote:
 On Sun, May 30, 2010 at 10:41:12AM +0200, Pascal Volk wrote:
  On 05/30/2010 09:54 AM Axel Thimm wrote:
   LLONG_MIN/LLONG_MAX and some other defines are there, but protected by
   
   #  ifdef __USE_ISOC99
   
   Maybe dovecot's buildsystem should check for and use -std=c99? But
   then I wonder why it does build for RHEL5 and all recent Fedoras? I
   grepped the logs and found no explicit -std switch in any of the
   successful builds.

Sorry, as stated in a post just moments ago, the broken build is
RHEL5, and RHEL6 works.

  Which gcc uses RHEL 6?
  It works for me with gcc-4.3 and gcc-4.4.
 
 The gcc I used are [...]

OK, the proper matrix looks like:

RHEL4  3.4.6fails
RHEL5  4.1.2fails
F114.4.1builds
F124.4.3builds
RHEL6 (beta1)  4.4.3builds
F134.4.4builds

Now it is more consistent and looks like a change between 4.1.2 and
4.4.1.

Maybe in the older gcc -std=gnu99 didn't set __USE_ISOC99 and thus the
missing constants were not defined?
-- 
Axel.Thimm at ATrpms.net


pgpn4I7SFRLCS.pgp
Description: PGP signature


Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Timo Sirainen
On 30.5.2010, at 11.39, Axel Thimm wrote:

 RHEL43.4.6fails
 RHEL54.1.2fails
..
 Now it is more consistent and looks like a change between 4.1.2 and
 4.4.1.
 
 Maybe in the older gcc -std=gnu99 didn't set __USE_ISOC99 and thus the
 missing constants were not defined?

Well, it compiles in CentOS 5.4..



Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Pascal Volk
On 05/30/2010 01:01 PM Timo Sirainen wrote:
 
 Well, it compiles in CentOS 5.4..

Also on CentOS release 5.5 (Final)

[r...@vh1 dovecot-2.0]# ./configure  configure.stdout
[r...@vh1 dovecot-2.0]# make  make.stdout
--2010-05-30 14:53:56--
http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
Auflösen des Rechnernamens »www.unicode.org« 69.13.187.182
Verbindungsaufbau mit www.unicode.org[69.13.187.182]:80... verbunden.
HTTP-Anfrage gesendet, warte auf Antwort... 200 OK
Länge: 1239519 (1,2M) [text/plain]
Speichere nach: »UnicodeData.txt«

100%[…=] 1.239.519785K/s   in 1,5s

2010-05-30 14:53:58 (785 KB/s) - »UnicodeData.txt« gespeichert
[1239519/1239519]

mail-host.c: In function »mail_hosts_add_range«:
mail-host.c:65: Warnung: unbenutzter Parameter »list«
[r...@vh1 dovecot-2.0]#


Regards,
Pascal
-- 
The trapper recommends today: c01dcafe.1015...@localdomain.org


Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Timo Sirainen
On 30.5.2010, at 12.03, Brandon Davidson wrote:

 If I '%define optflags -std=gnu99' in the spec it builds just fine, so I
 don't think it's a compiler problem. Maybe a libtool issue?

Oh, the spec file overrides CFLAGS and doesn't contain -std=gnu99?



[Dovecot] Dovecot 1.2 - Quotas - Ignoring Trash folder

2010-05-30 Thread Shayne Jellesma
Hello guys,

 

Firstly I would like to state that I am fairly new to Dovecot. I have played
around with it in the past here and there but mainly with debian packages.
I have compiled this version of Dovecot from source, so please go easy with
me.

 

Ok now down to my questions:
I am having trouble getting Dovecot to 'ignore' the Trash folder when
summing up the used quota for a user. 

 

I am running Dovecot 1.2.11 (with LDA), Postfix 2.5.5, and Postfixadmin 2.3.
I am able to send and receive emails fine. Roundcube displays the quota used
but this quota also counts what is in the users Trash can. Postfix is
configured to hand over delivering of the mail to Dovecot.

I have tried different methods from the documentation on ignoring the Trash
folder, but have not come up with anything that has worked yet.

 

If someone could point me in the right direction, that would be great.

 

I apologise now if I have not included all required information, I did read
the mailing list guidelines and believe I have follow all required steps.

 

 

 

 

charged:/usr/local/etc# dovecot --version

1.2.11

charged:/usr/local/etc#

 

 

charged:/usr/local/etc# dovecot -n

# 1.2.11: /usr/local/etc/dovecot.conf

# OS: Linux 2.6.26-2-686 i686 Debian 5.0.4 ext3

base_dir: /var/run/dovecot/

log_path: /var/log/dovecot12.log

info_log_path: /var/log/dovecot12.log

protocols: imap imaps pop3 pop3s

listen: 118.127.29.214

disable_plaintext_auth: no

login_dir: /var/run/dovecot/login

login_executable(default): /usr/local/libexec/dovecot/imap-login

login_executable(imap): /usr/local/libexec/dovecot/imap-login

login_executable(pop3): /usr/local/libexec/dovecot/pop3-login

first_valid_uid: 5000

last_valid_uid: 5000

first_valid_gid: 5000

last_valid_gid: 5000

mail_privileged_group: vmail

mail_uid: 5000

mail_gid: 5000

mail_location: maildir:/var/vmail/%d/%n/Maildir

mail_executable(default): /usr/local/libexec/dovecot/imap

mail_executable(imap): /usr/local/libexec/dovecot/imap

mail_executable(pop3): /usr/local/libexec/dovecot/pop3

mail_plugins(default): quota imap_quota

mail_plugins(imap): quota imap_quota

mail_plugins(pop3): quota

mail_plugin_dir(default): /usr/local/lib/dovecot/imap

mail_plugin_dir(imap): /usr/local/lib/dovecot/imap

mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3

namespace:

  type: private

  separator: .

  inbox: yes

  list: yes

  subscriptions: yes

lda:

  postmaster_address: postmas...@ignitioncarclub.com

  mail_plugins: quota

  mail_plugin_dir: /usr/local/lib/dovecot/lda

  quota_full_tempfail: no

  auth_socket_path: /var/run/dovecot/auth-master

auth default:

  mechanisms: plain login

  passdb:

driver: sql

args: /usr/local/etc/dovecot-sql.conf

  userdb:

driver: sql

args: /usr/local/etc/dovecot-sql.conf

  socket:

type: listen

client:

  path: /var/spool/postfix/private/auth

  mode: 432

  user: postfix

  group: postfix

master:

  path: /var/run/dovecot/auth-master

  mode: 384

  user: vmail

plugin:

  quota: maildir:ignore=Trash

  trash: /usr/local/etc/dovecot-trash.conf

charged:/usr/local/etc#

 

 

charged:/usr/local/etc# grep -v '^ *\(#.*\)\?$' dovecot-sql.conf

driver = mysql

connect = host=localhost dbname=xxx user=mailuser password=xxx

default_pass_scheme = MD5-CRYPT

user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, CONCAT('*:storage=',
quota, 'B') AS quota_rule FROM mailbox WHERE username = '%u' AND active =
'1'

password_query = SELECT username as user, password, '/var/vmail/%d/%n' as
userdb_home, 'maildir:/var/vmail/%d/%n' as userdb_mail, 5000 as userdb_uid,
5000 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'

charged:/usr/local/etc#

 

 

 

charged:/usr/local/etc# dpkg -l | grep postfix

ii  postfix   2.5.5-1.1
High-performance mail transport agent

ii  postfix-mysql 2.5.5-1.1  MySQL map
support for Postfix

charged:/usr/local/etc#

 

 

 

 

Regards,


Shayne Jellesma
Network Administrator / ICT Support
St Martins Lutheran College

Web:  http://www.stmartins.sa.edu.au http://www.stmartins.sa.edu.au
Phone: (08) 87 251 430

Skype: shayne.jellesma.smlc

 



Re: [Dovecot] delete messages after sa-learn

2010-05-30 Thread Florian Effenberger
Hi Andrzej,

2010/5/28 Andrzej Adam Filip a...@onet.eu:

 does fetching to mbox file bring any advantage? It seems that learning
 out of maildir and rm'ing afterwards works like a charm, so I guess
 fetchmail would bring more overhead?

 It will bring more overhead but some people value portable solutions.
 Some people try to avoid locking THEMSELVES into
 a) specific format of IMAP folder
   As I understand dovecot recommends switching from maildir to dbox
 b) specific software (specific IMAP server)
   I do not plan to change dovecot but I do like to keep my options open.

 Anyway:  instead of scanning all and deleting files in maildir (race
 risk) you may consider moving files to another file directory/folder
 (on the same file-system) and learn from it.
 You may ask Timo How to lock maildir message/file before
 moving it out/deleting it by non dovecot software :-)

Hm, now I'm irritated a bit. :-) If I have a dedicated maildir
directory (IMAP folder) for spam learn, what can happen if I scan and
delete files out of it? The worst thing that can happen is that the
IMAP folder gets corrupt, which is not harm, as it's spam anyway.
However, from what I've heard, Maildir doesn't have any file locking
issues, so there should be no problem?

Florian


[Dovecot] quota and postfix virtual users

2010-05-30 Thread gbotero


hi guys, anyone have a virtual server working with postfix + dovecot +
roundcube + mysql + virtual domain + virtual users and quota working
because the quota is not good, the calculation is wrong i need to delete
the maildirsize file to force recalculate, how can i do? the email send and
receive fine the virtual users and domain users is fine... help


postfix 2.3.3
dovecot 1.2.11
roundcube 0.3
mysql 5.0.7 

i need to solve
this please 

 

Re: [Dovecot] Dovecot 1.2 - Quotas - Ignoring Trash folder

2010-05-30 Thread e-frog
Hello,

On 30.05.2010 13:34, wrote Shayne Jellesma:
 Hello guys,
 
 Firstly I would like to state that I am fairly new to Dovecot. I have played
 around with it in the past here and there but mainly with debian packages.
 I have compiled this version of Dovecot from source, so please go easy with
 me.
 
 Ok now down to my questions:
 I am having trouble getting Dovecot to 'ignore' the Trash folder when
 summing up the used quota for a user. 

[snip]

 plugin:
 
   quota: maildir:ignore=Trash

Change this to

quota = maildir

[snip]

 
 charged:/usr/local/etc# grep -v '^ *\(#.*\)\?$' dovecot-sql.conf
 
 driver = mysql
 
 connect = host=localhost dbname=xxx user=mailuser password=xxx
 
 default_pass_scheme = MD5-CRYPT
 
 user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, CONCAT('*:storage=',
 quota, 'B') AS quota_rule FROM mailbox WHERE username = '%u' AND active =
 '1'

Insert a second quota_rule in your sql query

 'Trash:ignore' AS quota_rule2

See also http://wiki.dovecot.org/Quota/1.1#Quota_rules

Regards,
e-frog



Re: [Dovecot] dovecot2beta5 lmtp

2010-05-30 Thread Pascal Volk
On 05/17/2010 05:00 PM Robert Schetterer wrote:
 … the most interesting thing for me with lmtp
 is that postfix bounces now overquota mails on smtp income stage with
 lmtp, no danger for backscatter anymore ( so far small tsts results ) …

Hm, I hope you mean Postfix rejects the mail, if the user is over quota.
Bouncing mails is bad.
If your Postfix rejects the message, while the sending client is still
connected, I'm interested in your setup. :)

How does Postfix communicate with Dovecot's lmtp, unix or tcp socket?
Any special smtpd_recipient_restrictions?


Regards,
Pascal
-- 
The trapper recommends today: defaced.1015...@localdomain.org


Re: [Dovecot] quota and postfix virtual users

2010-05-30 Thread Simone Caruso

Il 30/05/2010 14:12, gbot...@emailforall.no-ip.org ha scritto:



hi guys, anyone have a virtual server working with postfix + dovecot +
roundcube + mysql + virtual domain + virtual users and quota working
because the quota is not good, the calculation is wrong i need to delete
the maildirsize file to force recalculate, how can i do? the email send and
receive fine the virtual users and domain users is fine... help


postfix 2.3.3
dovecot 1.2.11
roundcube 0.3
mysql 5.0.7

i need to solve
this please



i have a script that parses a recordset from mysql and exec this command for 
each mailbox:
echo x GETQUOTAROOT Inbox | su vmail -c USER=$ROW /usr/sbin/dovecot --exec-mail 
imap 



--
Simone Caruso
IT Consultant
p.iva: 03045250838


Re: [Dovecot] Dovecot 1.2 - Quotas - Ignoring Trash folder

2010-05-30 Thread e-frog
On 30.05.2010 15:28, wrote Shayne Jellesma:
 Hello e-frog,
 
 Thanks for your reply. I have made the changes you suggested and it is still
 not working.
 
 The new updated SQL query is as follows: 
 user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, CONCAT('*:storage=',
 quota, 'B') AS quota_rule, 'Trash:ignore' AS quota_rule2 FROM mailbox WHERE
 username = '%u' AND active = '1'
 

Looks correct and works for me.

You could try and set mail_debug=yes in dovecot.conf

This should log the quota rules dovecot is using once you login. e.g.

May 30 15:36:52 server dovecot: IMAP(xxx): Quota rule: root=user
mailbox=* bytes=1073741824 messages=0
May 30 15:36:52 server dovecot: IMAP(xxx): Quota rule: root=user
mailbox=Trash ignored


 Regards,
 
 Shayne Jellesma
 Network Administrator / ICT Support
 St Martins Lutheran College
 Web: http://www.stmartins.sa.edu.au
 Skype: shayne.jellesma.smlc
 
 -Original Message-
 From: dovecot-bounces+shayne=stmartins.sa.edu...@dovecot.org
 [mailto:dovecot-bounces+shayne=stmartins.sa.edu...@dovecot.org] On Behalf Of
 e-frog
 Sent: Sunday, 30 May 2010 10:09 PM
 To: dovecot@dovecot.org
 Subject: Re: [Dovecot] Dovecot 1.2 - Quotas - Ignoring Trash folder
 
 Hello,
 
 On 30.05.2010 13:34, wrote Shayne Jellesma:
 Hello guys,

 Firstly I would like to state that I am fairly new to Dovecot. I have 
 played around with it in the past here and there but mainly with debian
 packages.
 I have compiled this version of Dovecot from source, so please go easy 
 with me.

 Ok now down to my questions:
 I am having trouble getting Dovecot to 'ignore' the Trash folder when 
 summing up the used quota for a user.
 
 [snip]
 
 plugin:

   quota: maildir:ignore=Trash
 
 Change this to
 
 quota = maildir
 
 [snip]
 

 charged:/usr/local/etc# grep -v '^ *\(#.*\)\?$' dovecot-sql.conf

 driver = mysql

 connect = host=localhost dbname=xxx user=mailuser password=xxx

 default_pass_scheme = MD5-CRYPT

 user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, 
 CONCAT('*:storage=', quota, 'B') AS quota_rule FROM mailbox WHERE 
 username = '%u' AND active = '1'
 
 Insert a second quota_rule in your sql query
 
  'Trash:ignore' AS quota_rule2
 
 See also http://wiki.dovecot.org/Quota/1.1#Quota_rules
 
 Regards,
 e-frog



Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Axel Thimm
Hi,

On Sun, May 30, 2010 at 12:12:17PM +0100, Timo Sirainen wrote:
 On 30.5.2010, at 12.03, Brandon Davidson wrote:
 
  If I '%define optflags -std=gnu99' in the spec it builds just fine, so I
  don't think it's a compiler problem. Maybe a libtool issue?
 
 Oh, the spec file overrides CFLAGS and doesn't contain -std=gnu99?
 

The config.log for RHEL5/x86_64 says:

CFLAGS='-std=gnu99 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic -Wall -W -Wmissing-prototypes -Wmissing-declarations
-Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast
-Wstrict-aliasing=2 -I/usr/kerberos/include   '
-- 
Axel.Thimm at ATrpms.net


pgppdTwRiMoD3.pgp
Description: PGP signature


Re: [Dovecot] delete messages after sa-learn

2010-05-30 Thread Andrzej Adam Filip
Florian Effenberger flo...@gmail.com wrote:
 Hi Andrzej,

 2010/5/28 Andrzej Adam Filip a...@onet.eu:

 does fetching to mbox file bring any advantage? It seems that learning
 out of maildir and rm'ing afterwards works like a charm, so I guess
 fetchmail would bring more overhead?

 It will bring more overhead but some people value portable solutions.
 Some people try to avoid locking THEMSELVES into
 a) specific format of IMAP folder
   As I understand dovecot recommends switching from maildir to dbox
 b) specific software (specific IMAP server)
   I do not plan to change dovecot but I do like to keep my options open.

 Anyway:  instead of scanning all and deleting files in maildir (race
 risk) you may consider moving files to another file directory/folder
 (on the same file-system) and learn from it.
 You may ask Timo How to lock maildir message/file before
 moving it out/deleting it by non dovecot software :-)

 Hm, now I'm irritated a bit. :-) If I have a dedicated maildir
 directory (IMAP folder) for spam learn, what can happen if I scan and
 delete files out of it? The worst thing that can happen is that the
 IMAP folder gets corrupt, which is not harm, as it's spam anyway.
 However, from what I've heard, Maildir doesn't have any file locking
 issues, so there should be no problem?

 Florian

It depends on what you want:
a) dirtyugly but *trivial* hack serving your very specific
   requirement that can make troubles after some change in
   pattern of use 
b) simple solution

-- 
[plen: Andrew] Andrzej Adam Filip : a...@onet.eu
10) there is no 10, but it sounded like a nice number :)
  -- Wichert Akkerman


Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Brandon Davidson
Axel,

On 5/30/10 10:22 AM, Axel Thimm axel.th...@atrpms.net wrote:
 
 Oh, the spec file overrides CFLAGS and doesn't contain -std=gnu99?
 
 
 The config.log for RHEL5/x86_64 says:
 
 CFLAGS='-std=gnu99 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
 -mtune=generic -Wall -W -Wmissing-prototypes -Wmissing-declarations
 -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast
 -Wstrict-aliasing=2 -I/usr/kerberos/include   '

It may be a specfile after all. %configure exports CFLAGS before calling
./configure, which should be sufficient to get any needed options into the
Makefile, merged with whatever configure auto-detects (including
-std=gnu99).

Your spec also calls make CFLAGS=$RPM_OPT_FLAGS which overrides
everything and omits -std=gnu99 unless specifically included by the
packager. If I remove that and just call 'make' it works fine - my %optflags
are merged in with the CFLAGS from configure and the build completes without
error.

-Brad 



Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Axel Thimm
Hi,

On Sun, May 30, 2010 at 12:22:52PM -0700, Brandon Davidson wrote:
 On 5/30/10 10:22 AM, Axel Thimm axel.th...@atrpms.net wrote:
  
  Oh, the spec file overrides CFLAGS and doesn't contain -std=gnu99?
  
  The config.log for RHEL5/x86_64 says:
  
  CFLAGS='-std=gnu99 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
  -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
  -mtune=generic -Wall -W -Wmissing-prototypes -Wmissing-declarations
  -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast
  -Wstrict-aliasing=2 -I/usr/kerberos/include   '
 
 It may be a specfile after all. %configure exports CFLAGS before calling
 ./configure, which should be sufficient to get any needed options into the
 Makefile, merged with whatever configure auto-detects (including
 -std=gnu99).
 
 Your spec also calls make CFLAGS=$RPM_OPT_FLAGS which overrides
 everything and omits -std=gnu99 unless specifically included by the
 packager.

No, that's not quite correct. If you check the above you will find
that the CFLAGS passed on the make argument list is just the starting
value for CFLAGS. The -std=gnu99 is added by configure, there is no
need to have it added by the packager.

 If I remove that and just call 'make' it works fine - my %optflags
 are merged in with the CFLAGS from configure and the build completes without
 error.

How are your %optflags (which is the same as $RPM_OPT_FLAGS) merged
into the build if it is not passed to make? And it would yield the
same CFLAGS as above (merged default optflags with what configure adds
to it).
-- 
Axel.Thimm at ATrpms.net


pgpeZbu7mbE7c.pgp
Description: PGP signature


Re: [Dovecot] Dovecot 1.2 - Quotas - Ignoring Trash folder

2010-05-30 Thread Shayne Jellesma
Hello,

I am getting a slightly different output in my log file with
mail_debug=yes set in my config:

May 31 09:25:51 IMAP(xxx): Info: Quota root: name= backend=maildir args=
May 31 09:25:51 IMAP(xxx): Info: Quota rule: root= mailbox=* bytes=1024
messages=0
May 31 09:25:51 IMAP(xxx): Info: Quota rule: root= mailbox=Trash ignored


Regards,

Shayne Jellesma
Network Administrator / ICT Support
St Martins Lutheran College
Web: http://www.stmartins.sa.edu.au
Phone: (08) 87 251 430
Mobile: 0439 491 590
Skype: shayne.jellesma.smlc


-Original Message-
From: e-frog [mailto:e-f...@gmx.de] 
Sent: Sunday, 30 May 2010 11:28 PM
To: Dovecot List
Cc: Shayne Jellesma
Subject: Re: [Dovecot] Dovecot 1.2 - Quotas - Ignoring Trash folder

On 30.05.2010 15:28, wrote Shayne Jellesma:
 Hello e-frog,
 
 Thanks for your reply. I have made the changes you suggested and it is 
 still not working.
 
 The new updated SQL query is as follows: 
 user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, 
 CONCAT('*:storage=', quota, 'B') AS quota_rule, 'Trash:ignore' AS 
 quota_rule2 FROM mailbox WHERE username = '%u' AND active = '1'
 

Looks correct and works for me.

You could try and set mail_debug=yes in dovecot.conf

This should log the quota rules dovecot is using once you login. e.g.

May 30 15:36:52 server dovecot: IMAP(xxx): Quota rule: root=user
mailbox=* bytes=1073741824 messages=0
May 30 15:36:52 server dovecot: IMAP(xxx): Quota rule: root=user
mailbox=Trash ignored


 Regards,
 
 Shayne Jellesma
 Network Administrator / ICT Support
 St Martins Lutheran College
 Web: http://www.stmartins.sa.edu.au
 Skype: shayne.jellesma.smlc
 
 -Original Message-
 From: dovecot-bounces+shayne=stmartins.sa.edu...@dovecot.org
 [mailto:dovecot-bounces+shayne=stmartins.sa.edu...@dovecot.org] On 
 Behalf Of e-frog
 Sent: Sunday, 30 May 2010 10:09 PM
 To: dovecot@dovecot.org
 Subject: Re: [Dovecot] Dovecot 1.2 - Quotas - Ignoring Trash folder
 
 Hello,
 
 On 30.05.2010 13:34, wrote Shayne Jellesma:
 Hello guys,

 Firstly I would like to state that I am fairly new to Dovecot. I have 
 played around with it in the past here and there but mainly with 
 debian
 packages.
 I have compiled this version of Dovecot from source, so please go 
 easy with me.

 Ok now down to my questions:
 I am having trouble getting Dovecot to 'ignore' the Trash folder when 
 summing up the used quota for a user.
 
 [snip]
 
 plugin:

   quota: maildir:ignore=Trash
 
 Change this to
 
 quota = maildir
 
 [snip]
 

 charged:/usr/local/etc# grep -v '^ *\(#.*\)\?$' dovecot-sql.conf

 driver = mysql

 connect = host=localhost dbname=xxx user=mailuser password=xxx

 default_pass_scheme = MD5-CRYPT

 user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, 
 CONCAT('*:storage=', quota, 'B') AS quota_rule FROM mailbox WHERE 
 username = '%u' AND active = '1'
 
 Insert a second quota_rule in your sql query
 
  'Trash:ignore' AS quota_rule2
 
 See also http://wiki.dovecot.org/Quota/1.1#Quota_rules
 
 Regards,
 e-frog



Re: [Dovecot] quota and postfix virtual users

2010-05-30 Thread gbotero


hi, Simone Caruso, thanks for your answer but i have some questions i
test the script in the console and he works he read the quota pased by
mysql and then quota_rule ok but he update the maildirsize file??? and this
script have to be called from postfix or dovecot?? thanks for all, sorry
for my english ;) 

Guillermo Botero
Leticia, Amazonas -
Colombia
gbosp...@gmail.com

[Dovecot] Dovecot install problem

2010-05-30 Thread David
I am trying to set up a new web and mail server i have postfix now working
but dovecot will not allow me to login and retrieve the emails
so below isa portion of the log file


passwd-file /var/mail/vhosts/.net/shadow: stat() failed: Permission
denied
passwd-file(xx...@.net,:::0.0.0.0): no passwd file:
/var/mail/vhosts/.net/shadow

Dovecot -n output
# 1.0.7: /etc/dovecot.conf
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_location: Maildir:/var/mail/vhosts/%d/%n
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
auth default:
  mechanisms: plain login CRAM-MD5
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
driver: passwd-file
args: /var/mail/vhosts/%d/shadow
  userdb:
driver: passwd-file
args: /var/mail/vhosts/%d/passwd
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: postfix

The passwd shadow file
-rw-r- 1 root  root   210 May 24 21:39 passwd
-rw-r- 1 root  root   327 May 24 21:39 shadow

So who whould own these files?
What should the perrmissions be?



Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Brandon Davidson



On 5/30/10 2:49 PM, Axel Thimm axel.th...@atrpms.net wrote:
 
 How are your %optflags (which is the same as $RPM_OPT_FLAGS) merged
 into the build if it is not passed to make? And it would yield the
 same CFLAGS as above (merged default optflags with what configure adds
 to it).

They're exported by the %configure macro, and configure writes the combined
CFLAGS, CXXFLAGS, and FFLAGS into the Makefile... so it's not necessary (and
possibly detrimental) to both export them before configuring and pass them
explicitly to make, as the command-line CLFAGS option overrides the Makefile
CFLAGS declaration that includes -std=gnu99.

My point is, if I don't inclue CFLAGS=... in my call to make in the spec
file, it builds fine, and *does* include all the necessary optflags. Give it
a try.

-Brad



Re: [Dovecot] beta5 builds under RHEL

2010-05-30 Thread Axel Thimm
Hi,

On Sun, May 30, 2010 at 08:02:03PM -0700, Brandon Davidson wrote:
 On 5/30/10 2:49 PM, Axel Thimm axel.th...@atrpms.net wrote:
  How are your %optflags (which is the same as $RPM_OPT_FLAGS) merged
  into the build [...]
 
 They're exported by the %configure macro, and configure writes the
 combined CFLAGS, CXXFLAGS, and FFLAGS into the Makefile... so it's
 not necessary (and possibly detrimental) to both export them before
 configuring and pass them explicitly to make, as the command-line
 CLFAGS option overrides the Makefile CFLAGS declaration that
 includes -std=gnu99.

True, I wasn't wearing my brain in the last post ;)
Indeed, both configure and make were getting the same CFLAGS, and
while configure was properly altering it, the make invocation was
resetting it again. :/

More interesting is the fact that I introduced the bug with the
dovecot-2.x specfile, so the 1.x builds were unaffected. I wonder how
this did sneak in.

 My point is, if I don't inclue CFLAGS=... in my call to make in the spec
 file, it builds fine, and *does* include all the necessary optflags. Give it
 a try.

Doing so and RHEL5/x86_64 already built w/o an issue, I now quite
positive that the rest including RHEL4 will be as happy!

Thanks for finding the bug!
-- 
Axel.Thimm at ATrpms.net


pgp11nYLxDU2q.pgp
Description: PGP signature


[Dovecot] FW: Dovecot 1.2 - Quotas - Ignoring Trash folder

2010-05-30 Thread Shayne Jellesma
Hello all,

There was a problem with email account. Deleted it and readded and
everything seems to be working.
Thanks e-frog :)

Regards,

Shayne Jellesma
Network Administrator / ICT Support
St Martins Lutheran College
Web: http://www.stmartins.sa.edu.au
Skype: shayne.jellesma.smlc


-Original Message-
From: dovecot-bounces+shayne=stmartins.sa.edu...@dovecot.org
[mailto:dovecot-bounces+shayne=stmartins.sa.edu...@dovecot.org] On Behalf Of
Shayne Jellesma
Sent: Monday, 31 May 2010 9:33 AM
To: 'e-frog'
Cc: dovecot@dovecot.org
Subject: Re: [Dovecot] Dovecot 1.2 - Quotas - Ignoring Trash folder

Hello,

I am getting a slightly different output in my log file with
mail_debug=yes set in my config:

May 31 09:25:51 IMAP(xxx): Info: Quota root: name= backend=maildir args= May
31 09:25:51 IMAP(xxx): Info: Quota rule: root= mailbox=* bytes=1024
messages=0
May 31 09:25:51 IMAP(xxx): Info: Quota rule: root= mailbox=Trash ignored


Regards,

Shayne Jellesma
Network Administrator / ICT Support
St Martins Lutheran College
Web: http://www.stmartins.sa.edu.au
Skype: shayne.jellesma.smlc


-Original Message-
From: e-frog [mailto:e-f...@gmx.de]
Sent: Sunday, 30 May 2010 11:28 PM
To: Dovecot List
Cc: Shayne Jellesma
Subject: Re: [Dovecot] Dovecot 1.2 - Quotas - Ignoring Trash folder

On 30.05.2010 15:28, wrote Shayne Jellesma:
 Hello e-frog,
 
 Thanks for your reply. I have made the changes you suggested and it is 
 still not working.
 
 The new updated SQL query is as follows: 
 user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, 
 CONCAT('*:storage=', quota, 'B') AS quota_rule, 'Trash:ignore' AS
 quota_rule2 FROM mailbox WHERE username = '%u' AND active = '1'
 

Looks correct and works for me.

You could try and set mail_debug=yes in dovecot.conf

This should log the quota rules dovecot is using once you login. e.g.

May 30 15:36:52 server dovecot: IMAP(xxx): Quota rule: root=user
mailbox=* bytes=1073741824 messages=0
May 30 15:36:52 server dovecot: IMAP(xxx): Quota rule: root=user
mailbox=Trash ignored


 Regards,
 
 Shayne Jellesma
 Network Administrator / ICT Support
 St Martins Lutheran College
 Web: http://www.stmartins.sa.edu.au
 Skype: shayne.jellesma.smlc
 
 -Original Message-
 From: dovecot-bounces+shayne=stmartins.sa.edu...@dovecot.org
 [mailto:dovecot-bounces+shayne=stmartins.sa.edu...@dovecot.org] On 
 Behalf Of e-frog
 Sent: Sunday, 30 May 2010 10:09 PM
 To: dovecot@dovecot.org
 Subject: Re: [Dovecot] Dovecot 1.2 - Quotas - Ignoring Trash folder
 
 Hello,
 
 On 30.05.2010 13:34, wrote Shayne Jellesma:
 Hello guys,

 Firstly I would like to state that I am fairly new to Dovecot. I have 
 played around with it in the past here and there but mainly with 
 debian
 packages.
 I have compiled this version of Dovecot from source, so please go 
 easy with me.

 Ok now down to my questions:
 I am having trouble getting Dovecot to 'ignore' the Trash folder when 
 summing up the used quota for a user.
 
 [snip]
 
 plugin:

   quota: maildir:ignore=Trash
 
 Change this to
 
 quota = maildir
 
 [snip]
 

 charged:/usr/local/etc# grep -v '^ *\(#.*\)\?$' dovecot-sql.conf

 driver = mysql

 connect = host=localhost dbname=xxx user=mailuser password=xxx

 default_pass_scheme = MD5-CRYPT

 user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, 
 CONCAT('*:storage=', quota, 'B') AS quota_rule FROM mailbox WHERE 
 username = '%u' AND active = '1'
 
 Insert a second quota_rule in your sql query
 
  'Trash:ignore' AS quota_rule2
 
 See also http://wiki.dovecot.org/Quota/1.1#Quota_rules
 
 Regards,
 e-frog