Re: cyrus-imapd build dependencies

2019-03-19 Thread Anatoli via Info-cyrus

Ken, Ellie,

Thanks for the information.

Ellie, I see that #2100 has everything to be merged, hasn't it? What's 
blocking it?


Regards,
Anatoli

*From:* Ellie Timoney 
*Sent:* Tuesday, March 19, 2019 03:29
*To:* Info-cyrus 
*Subject:* Re: cyrus-imapd build dependencies

On Tue, Mar 19, 2019, at 3:39 PM, Anatoli via Info-cyrus wrote:
> The Cyrus httpd provides DAV services (which use the HTTP 
protocol).  If you want the Cyrus httpd to support HTTP/2, you will 
need libnghttp2.  Otherwise it will only support HTTP/1.


Always wanted to ask what the nghttp2 dependency was for. From what 
you say I infer that it's only needed for HTTP/2. But what DAV service 
could benefit from this? Are there DAV clients that know HTTP/2?




No idea, but it's there if you want it!  Speculating wildly, it might be 
useful for JMAP?


And speaking about the SNMP agent, are there any plans to complete the 
transfer of its code from the master process to an independent daemon, 
issue #1765 ? 
(It needs to be moved out to implement efficient chroot)


It's more likely to disappear entirely (see 
https://github.com/cyrusimap/cyrus-imapd/pull/2100) in favour of 
Prometheus (which is more powerful, more flexible, more human-readable, 
and is actually used by Fastmail -- and therefore more tested).  But it 
won't disappear from a stable branch, so it won't be a surprise when it 
does.


Cheers,

ellie


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: segfaults with cyrus-imapd 3.0.9 on latest arch linux

2019-03-19 Thread Andreas Piesk

Am 19.03.19 um 22:00 schrieb Patrick Goetz:


Have you tried the 3.0.9 AUR package?

   https://aur.archlinux.org/packages/cyrus-imapd

Once you get the dependencies down, this one compiles and runs.



I noticed the package, it's good to see a recent version in AUR but it has too 
many dependecies for my taste, I need a stripped down version.

Unfortunately the AUR package doesn't work for me either, i build it in a VM 
with a fresh installed arch and it has the same problem:

Starting program: /usr/bin/cyrdump user/test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x77c76205 in re_compile_internal () from /usr/lib/libc.so.6
(gdb) bt
#0  0x77c76205 in re_compile_internal () from /usr/lib/libc.so.6
#1  0x77c77511 in regcomp () from /usr/lib/libc.so.6
#2  0x77e3d980 in glob_init () from /usr/lib/libcyrus.so.0
#3  0x77f38276 in ?? () from /usr/lib/libcyrus_imap.so.0
#4  0x77f3e5b7 in mboxlist_findallmulti () from 
/usr/lib/libcyrus_imap.so.0
#5  0x61aa in ?? ()
#6  0x77bbb223 in __libc_start_main () from /usr/lib/libc.so.6
#7  0x61ee in ?? ()


Best Regards,
-ap



smime.p7s
Description: S/MIME Cryptographic Signature

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: segfaults with cyrus-imapd 3.0.9 on latest arch linux

2019-03-19 Thread Patrick Goetz

Hi Andreas -

Have you tried the 3.0.9 AUR package?

  https://aur.archlinux.org/packages/cyrus-imapd

Once you get the dependencies down, this one compiles and runs.

On 3/19/19 3:38 PM, Andreas Piesk wrote:

Am 19.03.19 um 19:47 schrieb Jason L Tibbitts III:

"AP" == Andreas Piesk  writes:


AP> Hello list, i'm trying to get cyrus-imapd 3.0.9 (testet 3.0.8 too)
AP> running on latest arch linux. Here's the configure summary:

AP> External dependencies: ldap: no openssl: yes zlib: yes pcre: yes

AP> #6 0x7fc4aa385050 re_acquire_state_context (libc.so.6)
AP> #7 0x7fc4aa3907d4 re_compile_internal (libc.so.6)
AP> #8 0x7fc4aa391511 regcomp (libc.so.6)

You have pcre enabled but you are calling glibc regex functions.  You
may wish to double check that you are linking properly.  Fedora went
through a similar issue a while back when --Wl,--as-needed was added to
the default set of compiler flags, which caused subtle variations in the
link order.  The end result was that Fedora picked up a set of pcre
patches similar to what some other distros have to avoid duplicating the
glibc symbol names.


These are the default LDFLAGS Arch Linux uses:

LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"

If I link without '--as-needed' crydump etc. do work without segfaulting.

"configure --disable-pcre" does not work:

lib/glob.h:57:5: error: unknown type name ‘regex_t’

I have no idea how to change the linkage order to put pcre before glibc 
(don't know if and how this is possible, I'm a hardware guy), I'm just 
building with


autoreconf -f
./configure

so I think my only option is to drop '--as-needed' from LDFLAGS and execute

./configure LDFLAGS=${LDFLAGS/,--as-needed/}

Thanks for pointing me in the right direction, highly appreciated.

Best Regards,
-ap



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: segfaults with cyrus-imapd 3.0.9 on latest arch linux

2019-03-19 Thread Andreas Piesk

Am 19.03.19 um 19:47 schrieb Jason L Tibbitts III:

"AP" == Andreas Piesk  writes:


AP> Hello list, i'm trying to get cyrus-imapd 3.0.9 (testet 3.0.8 too)
AP> running on latest arch linux. Here's the configure summary:

AP> External dependencies: ldap: no openssl: yes zlib: yes pcre: yes

AP> #6 0x7fc4aa385050 re_acquire_state_context (libc.so.6)
AP> #7 0x7fc4aa3907d4 re_compile_internal (libc.so.6)
AP> #8 0x7fc4aa391511 regcomp (libc.so.6)

You have pcre enabled but you are calling glibc regex functions.  You
may wish to double check that you are linking properly.  Fedora went
through a similar issue a while back when --Wl,--as-needed was added to
the default set of compiler flags, which caused subtle variations in the
link order.  The end result was that Fedora picked up a set of pcre
patches similar to what some other distros have to avoid duplicating the
glibc symbol names.


These are the default LDFLAGS Arch Linux uses:

LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"

If I link without '--as-needed' crydump etc. do work without segfaulting.

"configure --disable-pcre" does not work:

lib/glob.h:57:5: error: unknown type name ‘regex_t’

I have no idea how to change the linkage order to put pcre before glibc (don't 
know if and how this is possible, I'm a hardware guy), I'm just building with

autoreconf -f
./configure

so I think my only option is to drop '--as-needed' from LDFLAGS and execute

./configure LDFLAGS=${LDFLAGS/,--as-needed/}

Thanks for pointing me in the right direction, highly appreciated.

Best Regards,
-ap



smime.p7s
Description: S/MIME Cryptographic Signature

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: segfaults with cyrus-imapd 3.0.9 on latest arch linux

2019-03-19 Thread Jason L Tibbitts III
> "AP" == Andreas Piesk  writes:

AP> Hello list, i'm trying to get cyrus-imapd 3.0.9 (testet 3.0.8 too)
AP> running on latest arch linux. Here's the configure summary:

AP> External dependencies: ldap: no openssl: yes zlib: yes pcre: yes

AP> #6 0x7fc4aa385050 re_acquire_state_context (libc.so.6)
AP> #7 0x7fc4aa3907d4 re_compile_internal (libc.so.6)
AP> #8 0x7fc4aa391511 regcomp (libc.so.6)

You have pcre enabled but you are calling glibc regex functions.  You
may wish to double check that you are linking properly.  Fedora went
through a similar issue a while back when --Wl,--as-needed was added to
the default set of compiler flags, which caused subtle variations in the
link order.  The end result was that Fedora picked up a set of pcre
patches similar to what some other distros have to avoid duplicating the
glibc symbol names.

 - J<

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


segfaults with cyrus-imapd 3.0.9 on latest arch linux

2019-03-19 Thread Andreas Piesk

Hello list,

i'm trying to get cyrus-imapd 3.0.9 (testet 3.0.8 too) running on latest arch 
linux. Here's the configure summary:

Cyrus Server configured components

event notification: yes
gssapi: yes
autocreate: no
idled:  yes
httpd:  yes
kerberos V4:no
murder: yes
nntpd:  yes
replication:yes
sieve:  yes
calalarmd:  yes
objectstore:no
backup: yes
com_err:

External dependencies:
ldap:   no
openssl:yes
zlib:   yes
pcre:   yes
clamav: no
---
caringo:no
openio: no
---
nghttp2:yes
brotli: no
xml2:   yes
ical:   yes
icu4c:  yes
shapelib:   no

Database support:
mysql:  no
postgresql: no
sqlite: yes
lmdb:   no

Search engine:
squat:  yes
sphinx: no
xapian: no
xapian_flavor:  none

Hardware support:
SSE4.2: yes

Installation directories:
prefix: /usr
sysconfdir: /etc


The software builds succesful but executing commands with cyradm produces core 
dumps like this one:

localhost.localdomain> cm user.test
localhost.localdomain> lm

localhost.localdomain>

cyrus/master[20901]: process type:SERVICE name:imap path:/usr/lib/cyrus/imapd 
age:33.405s pid:20904 signaled to death by signal 6 (Aborted, core dumped)
systemd-coredump[20913]: Process 20904 (imapd) of user 1001 dumped core.

Stack trace of thread 20904:

#0  
0x7fc4aa2e8d7f raise (libc.so.6)
#1  
0x7fc4aa2d3672 abort (libc.so.6)
#2  
0x7fc4aa32b878 __libc_message (libc.so.6)
#3  
0x7fc4aa33218a malloc_printerr (libc.so.6)
#4  
0x7fc4aa3354ac _int_malloc (libc.so.6)
#5  
0x7fc4aa337736 __libc_calloc (libc.so.6)
#6  
0x7fc4aa385050 re_acquire_state_context (libc.so.6)
#7  
0x7fc4aa3907d4 re_compile_internal (libc.so.6)
#8  
0x7fc4aa391511 regcomp (libc.so.6)
#9  
0x7fc4aaaf09a0 glob_init (libcyrus.so.0)
#10 
0x7fc4aabe2c46 mboxlist_do_find (libcyrus_imap.so.0)
#11 
0x7fc4aabe8f87 mboxlist_findallmulti (libcyrus_imap.so.0)
#12 
0x5558cc431ef6 list_data (imapd)
#13 
0x5558cc43e37f cmdloop (imapd)
#14 
0x5558cc44282f service_main (imapd)
#15 
0x5558cc41f823 main (imapd)
#16 
0x7fc4aa2d5223 __libc_start_main (libc.so.6)
#17 
0x5558cc41fe3e _start (imapd)

# cyrdump -v user.test
Segmentation fault

in gdb:

Starting program: /usr/bin/cyrdump user.test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x77c90205 in re_compile_internal () from /usr/lib/libc.so.6
(gdb) bt
#0  0x77c90205 in re_compile_internal () from /usr/lib/libc.so.6
#1  0x77c91511 in regcomp () from /usr/lib/libc.so.6
#2  0x77e549a0 in glob_init (str=, sep=sep@entry=47 '/') 
at lib/glob.c:112
#3  0x77f46c46 in mboxlist_do_find (rock=rock@entry=0x7fffeaf0, 
patterns=patterns@entry=0x55571680) at imap/mboxlist.c:2723
#4  0x77f4cf87 in mboxlist_findallmulti (namespace=, 
patterns=0x55571680, isadmin=, userid=0x0, auth_state=,
 proc=, rock=0x7fffebb4) at imap/mboxlist.c:2942
#5  0x61aa in main (argc=, argv=0x7fffecc8) at 
im

Re: cyrus-imapd build dependencies

2019-03-19 Thread Ken Murchison


On 3/19/19 12:34 AM, Anatoli via Info-cyrus wrote:

Hi Ellie,

> The Cyrus httpd provides DAV services (which use the HTTP 
protocol).  If you want the Cyrus httpd to support HTTP/2, you will 
need libnghttp2.  Otherwise it will only support HTTP/1.


Always wanted to ask what the nghttp2 dependency was for. From what 
you say I infer that it's only needed for HTTP/2. But what DAV service 
could benefit from this? Are there DAV clients that know HTTP/2?



Mozilla Lightning uses HTTP/2 for CalDAV if the server supports it.





And speaking about the SNMP agent, are there any plans to complete the 
transfer of its code from the master process to an independent daemon, 
issue #1765 ? 
(It needs to be moved out to implement efficient chroot)


Regards,
Anatoli

*From:* Ellie Timoney 
*Sent:* Monday, March 18, 2019 21:55
*To:* Info-cyrus 
*Subject:* Re: cyrus-imapd build dependencies

Hi Patrick,

On Mon, Mar 18, 2019, at 11:33 PM, Patrick Goetz wrote:

This page on compiling cyrus-imapd:

https://www.cyrusimap.org/imap/developer/compiling.html

This page is in the developer section, so its context is for people who are 
Cyrus developers (especially for new contributors needing to get rolling 
quickly).  Expect a certain amount of detail to be glossed over on the 
assumption that it's already known and/or reasonably documented elsewhere.


shows a number of build dependencies; however I was just able to compile
cyrus-imapd without these installed:

 gperf
 libbsd


Are these actually necessary?

Probably depends on which features you enable.  If you run './configure' 
without arguments, a number of large features won't be enabled, so any 
libraries they depend on won't be used.  Some of these features are important 
enough that we (developers) kind of think of them as being 
probably-always-included even if they default to not.


Later in the page, under "Alternate database formats" it shows the
configure flags to use in order to use mysql/mariadb as a backend for
cyrus databases.  I think this is needed if one plans to use virtual
domains, but I couldn't get a confirmation on this.

These are literally just "alternate database formats" -- maybe you already have 
extensive expertise in some other database and would rather use that than one of the 
builtin ones.  It has nothing to do with virtual domains.  Documentation about the 
databases used by Cyrus are 
here:https://www.cyrusimap.org/imap/concepts/deployment/databases.html


In any case, the
configure options are given as
   --with-mysql, --with-mysql-incdir, --with-mysql-libdir

with no clear indication of what each of these does.  For example, is
the --with-mysql all inclusive, or does one need to set all 3?

The canonical source of information on configure options is the output from 
'./configure --help'.  It's kind of assumed that a developer will look there to 
find this information.


Finally a couple of items in the "Other" category are a real head
scratcher.  For example, what is the purpose of net-snmp?

You can click on any of those package names to go to the website for that 
package and get a description of what it does.  For example,


Simple Network Management Protocol (SNMP) is a widely used
protocol for monitoring the health and welfare of network equipment
  (eg. routers), computer equipment and even devices like UPSs.
Net-SNMP is a suite of applications used to implement SNMP v1,
SNMP v2c and SNMP v3 using both IPv4 and IPv6.
  

libnghttp2 is listed as needed for "HTTP/2 support for httpd" -- what's
using httpd?  Is this to faciliate CalDAV/CardDAV?

The Cyrus httpd provides DAV services (which use the HTTP protocol).  If you 
want the Cyrus httpd to support HTTP/2, you will need libnghttp2.  Otherwise it 
will only support HTTP/1.

Hope this helps :)

ellie

Cyrus Home Page:http://www.cyrusimap.org/
List Archives/Info:http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


--
Ken Murchison
Cyrus Development Team
FastMail US LLC

<>
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: script to check quota failed

2019-03-19 Thread Stephane Branchoux

Hello,

My solution was to rename a user sub folder whose length was 240 
caracters ( file name too long).


open("/var/lib/imap/quota/a/user.myuser.Diffusion 2nd 
degr&AOk-.Circulaire relative au d&AOk-tachement de fonctionnaires dans 
les corps enseignants du second degr&AOk-, des personnels 
d'&AOk-ducation et des psychologues de l'&AOk-ducation nationale 
relevant du minist&AOg-re de l'&AOk-ducation nationale", O_RDWR) = -1 
ENAMETOOLONG (File name too long)


And now my script runs without any problem.

Thanks

Le 18/03/2019 à 17:23, Simon Matter via Info-cyrus a écrit :

Hi,

seems that there is a problem with your cyrus quota tree
(/var/lib/cyrus/quota) or at least some of its files.

In the case of RHEL6 this will be /var/lib/imap/quota/.

I suggest to look at the quota files there, they have names like
user. and are text files with two lines. Should be easy to find
the broken file.

Regards,
Simon


Maybe strace command may help you find which files are corrupt:
su - cyrus -c "strace /usr/lib/cyrus-imapd/quota user"

Anthony Prades

On 3/18/19 2:32 PM, Stephane Branchoux wrote:

Hello,

We run cyrus-imapd-2.3.16-6 on a Red Hat Enterprise Linux Server
release 6.10.

2 days ago, a power crash occured in our Datacenter.

After reboot of cyrus imap, all seems ok except our script to check
quota :

su - cyrus -c "/usr/lib/cyrus-imapd/quota user"
failed building quota list for 'user': System I/O error: %m

I tried :

  su - cyrus -c "/usr/lib/cyrus-imapd/quota -f"
failed building quota list for '*': System I/O error: %m

Any idea ?

Many thanks in advance



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


--
Stephane BRANCHOUX
Centre de Ressources Informatiques de l'Université de Perpignan.
Systèmes/Réseaux - RSSI
mailto:stephane.branch...@univ-perp.fr
04 68 66 21 24 / 07 60 73 38 42




smime.p7s
Description: Signature cryptographique S/MIME

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus