• Cyrus IMAP autostart problem

    From Andrea Venturoli@ml@netfence.it to muc.lists.freebsd.ports on Tue Oct 20 19:46:35 2026
    From Newsgroup: muc.lists.freebsd.ports

    Hello.

    I've got:
    _ FreeBSD 14.4;
    _ a mail jail;
    _ cyrus-imapd312 installed inside the jail;
    _ a file "/usr/local/etc/rc.conf.d/cyrus_imapd" (inside the jai), with cyrus_imapd_enable="YES" as content.

    With this setup Cyrus IMAP has always started at boot (or when
    restarting the jail).
    Upgrade to 15.1 and it doesn't anymore.

    However, "service imapd start" does its job.
    All the other daemons (mimedefang, rbldnsd, saslauthd, opendkim,
    etc...), set up in the same way, work.

    How do I get around this?
    Or, at least, I do I debug this?

    bye & Thanks
    av.


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Andrea Venturoli@ml@netfence.it to muc.lists.freebsd.ports on Wed Oct 21 10:50:28 2026
    From Newsgroup: muc.lists.freebsd.ports

    On 10/20/26 20:29, Marcin Cieslak wrote:

    Some detailed logs from cyrus?

    Initially nothing.
    Then I put:
    rc_debug="YES"
    rc_startmsgs="YES"

    in /etc/rc.conf and now I see:

    root[59608]: /etc/rc: DEBUG: Sourcing /usr/local/etc/rc.conf.d/cyrus_imapd root[59649]: /etc/rc: DEBUG: checkyesno: cyrus_imapd_enable is set to YES. root[59663]: /etc/rc: DEBUG: checkyesno: cyrus_imapd_svcj is set to NO. root[59679]: /etc/rc: DEBUG: checkyesno: rc_startmsgs is set to YES. root[59707]: /etc/rc: DEBUG: checkyesno: cyrus_imapd_svcj is set to NO. root[59771]: /etc/rc: DEBUG: run_rc_command: doit: limits -C daemon /usr/local/cyrus/libexec/master -d -p /var/run/cyrus-master.pid
    master[59790]: couldn't dup fd 0: Bad file descriptor
    master[59790]: exiting
    root[59843]: /etc/rc: WARNING: failed to start cyrus_imapd

    This is hard to debug, since it doesn't happen if I start it manually
    and I have no idea how to attach gdb/truss/whatever to a process that is
    spawn from boot (although a jail's boot, that can be started with "ezjail-admin start mail").
    If anyone has any suggestion with this goal...



    Maybe it tries to access some of the other services and they are not
    ready yet?

    It shouldn't depend on any other service, AFAICT.
    In any case, from the logs, I see it starts after all the others.



    Does delaying the start of the imapd servie work as a workaround?

    Altough I usually prefer fixes, insted of workarounds, this might be a
    good suggestion.
    How do I do this?



    Overall, I don't know where to go for support next, as I'm not sure if
    this a Cyrus bug, a port bug or FreeBSD.
    (The fact that it works on 14.4, but not on 15.1 doesn't necessarily
    answer the question).



    bye & Thanks
    av.


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=@des@FreeBSD.org to muc.lists.freebsd.ports on Wed Oct 21 13:30:43 2026
    From Newsgroup: muc.lists.freebsd.ports

    Marcin Cieslak <saper@saper.info> writes:
    Did FreeBSD 14 provide stdin to the programs starting in jail and now does not?
    No. This is almost certainly a bug in ezjail.
    DES
    --
    Dag-Erling Sm|+rgrav - des@FreeBSD.org
    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2