# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= dovecot VERSION= 2.4.2 KEYWORDS= mail VARIANTS= std SDESC[std]= Secure IMAP and POP3 server HOMEPAGE= https://www.dovecot.org/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= https://dovecot.org/releases/2.4/ DISTFILE[1]= dovecot-2.4.2.tar.gz:main DF_INDEX= 1 SPKGS[std]= set primary dev man docs OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= krb5:dev:std openldap:dev:std BUILDRUN_DEPENDS= krb5:primary:std clucene:single:std openldap:client:std USERS= dovecot dovenull GROUPS= dovecot dovenull USERGROUP_SPKG= primary USES= cpe iconv libtool pkgconfig ssl:openssl30 gmake sqlite lz4 zlib perl:build DISTNAME= dovecot-2.4.2 LICENSE= MIT:primary LGPL21:primary LICENSE_TERMS= primary:{{WRKSRC}}/COPYING LICENSE_FILE= MIT:{{WRKSRC}}/COPYING.MIT LGPL21:{{WRKSRC}}/COPYING.LGPL LICENSE_SCHEME= dual FPC_EQUIVALENT= mail/dovecot MUST_CONFIGURE= gnu CONFIGURE_ARGS= --localstatedir=/var --with-statedir=/var/db/dovecot --with-ssl=openssl --with-gssapi --with-lz4 --with-sqlite --with-lucene --with-ldap --without-libwrap --without-shadow --without-sodium --without-lua --without-vpopmail --without-cdb --without-mysql --without-pgsql --without-icu --without-solr --without-textcat INSTALL_TARGET= install-strip INSTALL_REQ_TOOLCHAIN= yes PLIST_SUB= REQUIRE="LOGIN" RC_SUBR= dovecot:primary SUB_FILES= messages-primary.ucl SUB_LIST= REQUIRE=LOGIN CPPFLAGS= -I{{OPENSSLINC}} LDFLAGS= -L{{OPENSSLLIB}} {{ICONV_LIB}} VAR_OPSYS[netbsd]= CFLAGS=-D_NETBSD_SOURCE VAR_OPSYS[dragonfly]= CONFIGURE_ENV=i_cv_fd_passing=yes post-patch: ${REINPLACE_CMD} \ -e 's|/usr/bin|${LOCALBASE}/bin|g' \ -e 's|/usr/local|${PREFIX}|g' \ ${WRKSRC}/src/plugins/fts/decode2text.sh [FILE:531:descriptions/desc.primary] Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory. Dovecot is high-performing, self-optimizing, self-healing, and easily extensible. It includes IMAP4rev1 and POP3 support. IPv6, SSL and TLS are supported. It supports multiple commonly used IMAP extensions, including SORT, THREAD and IDLE. [FILE:99:distinfo] 2cd62e4d22b9fc1c80bd38649739950f0dbda34fbc3e62624fb6842264e93c6e 7807240 dovecot-2.4.2.tar.gz [FILE:2157:manifests/plist.primary] %%ONLY-LINUX%%libexec/dovecot/imap-hibernate bin/ doveadm doveconf dovecot-sysreport etc/dovecot/dovecot.conf lib/dovecot/ dovecot-config lib01_acl_plugin.so lib02_imap_acl_plugin.so lib02_lazy_expunge_plugin.so lib05_mail_crypt_acl_plugin.so lib05_pop3_migration_plugin.so lib10_last_login_plugin.so lib10_mail_crypt_plugin.so lib10_quota_plugin.so lib11_imap_quota_plugin.so lib11_trash_plugin.so lib15_notify_plugin.so lib20_charset_alias_plugin.so lib20_fts_plugin.so lib20_mail_compress_plugin.so lib20_mail_log_plugin.so lib20_notify_status_plugin.so lib20_push_notification_plugin.so lib20_quota_clone_plugin.so lib20_virtual_plugin.so lib99_welcome_plugin.so libdcrypt_openssl.so libdovecot-compression.so.0 libdovecot-compression.so.0.0.0 libdovecot-dsync.so.0 libdovecot-dsync.so.0.0.0 libdovecot-gssapi.so.0 libdovecot-gssapi.so.0.0.0 libdovecot-language.so.0 libdovecot-language.so.0.0.0 libdovecot-lda.so.0 libdovecot-lda.so.0.0.0 libdovecot-ldap.so.0 libdovecot-ldap.so.0.0.0 libdovecot-login.so.0 libdovecot-login.so.0.0.0 libdovecot-sql.so.0 libdovecot-sql.so.0.0.0 libdovecot-storage.so.0 libdovecot-storage.so.0.0.0 libdovecot.so.0 libdovecot.so.0.0.0 libfs_compress.so libfs_crypt.so libssl_iostream_openssl.so var_expand_crypt.so lib/dovecot/auth/libauthdb_imap.so lib/dovecot/doveadm/ lib10_doveadm_acl_plugin.so lib10_doveadm_quota_plugin.so lib20_doveadm_fts_plugin.so libdoveadm_mail_crypt_plugin.so libexec/dovecot/ anvil auth config decode2text.sh deliver dict dict-expire dns-client doveadm-server dovecot-lda gdbhelper health-check.sh imap imap-login imap-urlauth imap-urlauth-login imap-urlauth-worker indexer indexer-worker lmtp log pop3 pop3-login quota-status rawlog script script-login settings-history.py stats submission submission-login xml2text sbin/dovecot share/dovecot/stopwords/ stopwords_da.txt stopwords_de.txt stopwords_en.txt stopwords_es.txt stopwords_fi.txt stopwords_fr.txt stopwords_it.txt stopwords_nl.txt stopwords_no.txt stopwords_pt.txt stopwords_ro.txt stopwords_ru.txt stopwords_sv.txt stopwords_tr.txt [FILE:12701:manifests/plist.dev] include/dovecot/ acl-api-private.h acl-api.h acl-cache.h acl-global-file.h acl-lookup-dict.h acl-plugin.h acl-rights.h acl-settings.h acl-storage.h anvil-client.h aqueue.h array-decl.h array.h askpass.h auth-cache.h auth-client-connection.h auth-client-interface.h auth-client-private.h auth-client.h auth-common.h auth-digest.h auth-fields.h auth-gs2.h auth-gssapi.h auth-master-connection.h auth-master-private.h auth-master.h auth-penalty.h auth-policy.h auth-proxy.h auth-request-handler-private.h auth-request-handler.h auth-request-var-expand.h auth-request.h auth-sasl-common.h auth-sasl-gssapi.h auth-sasl-oauth2.h auth-sasl.h auth-scram-client.h auth-scram-server.h auth-scram.h auth-settings.h auth-token.h auth-worker-connection.h auth-worker-server.h auth.h backtrace-string.h base32.h base64.h bits.h bsearch-insert-pos.h buffer.h byteorder.h charset-utf8-private.h charset-utf8.h child-wait.h client-common.h compat.h compression.h config-filter.h config-parser-private.h config-parser.h config-request.h config.h connection.h cpu-count.h cpu-limit.h crc32.h data-stack.h db-ldap-sasl.h db-ldap-settings.h db-ldap.h db-oauth2.h db-passwd-file.h db-sql.h dbox-attachment.h dbox-file.h dbox-mail.h dbox-save.h dbox-storage.h dcrypt-iostream.h dcrypt-private.h dcrypt.h dict-client.h dict-private.h dict-transaction-memory.h dict.h dns-client-cache.h dns-lookup.h dns-util.h doc.h doveadm-client.h doveadm-cmd-parse.h doveadm-cmd.h doveadm-dsync.h doveadm-dump.h doveadm-mail-iter.h doveadm-mail.h doveadm-mailbox-list-iter.h doveadm-print-private.h doveadm-print.h doveadm-protocol.h doveadm-settings.h doveadm-util.h doveadm.h dovecot-version.h dregex.h dsasl-client-private.h dsasl-client.h dsync-brain.h dsync-ibc.h eacces-error.h env-util.h event-filter-parser.h event-filter-private.h event-filter.h event-log.h execv-const.h fail-mail-storage.h failures-private.h failures.h fd-util.h fdatasync-path.h fdpass.h file-cache.h file-copy.h file-create-locked.h file-dotlock.h file-lock.h file-set-size.h fs-api-private.h fs-api.h fs-sis-common.h fs-test.h fs-wrapper.h fsync-mode.h fts-api-private.h fts-api.h fts-indexer.h fts-parser.h fts-settings.h fts-storage.h fts-user.h fuzzer.h guid.h hash-decl.h hash-format.h hash-method.h hash.h hash2.h hex-binary.h hex-dec.h hmac-cram-md5.h hmac.h home-expand.h hook-build.h hostpid.h http-auth.h http-client-private.h http-client.h http-common.h http-date.h http-header-parser.h http-header.h http-message-parser.h http-parser.h http-request-parser.h http-request.h http-response-parser.h http-response.h http-server-private.h http-server.h http-transfer.h http-url.h imap-arg.h imap-base-subject.h imap-bodystructure.h imap-client.h imap-commands-util.h imap-commands.h imap-common.h imap-date.h imap-envelope.h imap-expunge.h imap-feature.h imap-fetch.h imap-id.h imap-keepalive.h imap-list.h imap-login-client.h imap-login-commands.h imap-login-settings.h imap-master-client.h imap-match.h imap-metadata.h imap-msgpart-url.h imap-msgpart.h imap-notify.h imap-parser.h imap-quote.h imap-resp-code.h imap-search-args.h imap-search.h imap-seqset.h imap-settings.h imap-state.h imap-stats.h imap-status.h imap-storage-callbacks.h imap-sync-private.h imap-sync.h imap-url.h imap-urlauth-backend.h imap-urlauth-connection.h imap-urlauth-fetch.h imap-urlauth-private.h imap-urlauth.h imap-utf7.h imap-util.h imapc-attribute.h imapc-client-private.h imapc-client.h imapc-connection.h imapc-list.h imapc-mail.h imapc-msgmap.h imapc-search.h imapc-settings.h imapc-storage.h imapc-sync.h imem.h index-attachment.h index-mail.h index-mailbox-size.h index-pop3-uidl.h index-rebuild.h index-search-private.h index-search-result.h index-sort-private.h index-sort.h index-storage.h index-sync-changes.h index-sync-private.h index-thread-private.h ioloop-iolist.h ioloop-notify-fd.h ioloop-private.h ioloop.h iostream-lz4.h iostream-multiplex-private.h iostream-openssl.h iostream-private.h iostream-proxy.h iostream-pump.h iostream-rawlog-private.h iostream-rawlog.h iostream-ssl-private.h iostream-ssl-test.h iostream-ssl.h iostream-temp.h iostream.h ipwd.h iso8601-date.h istream-attachment-connector.h istream-attachment-extractor.h istream-base64.h istream-binary-converter.h istream-callback.h istream-chain.h istream-concat.h istream-crlf.h istream-decrypt.h istream-dot.h istream-failure-at.h istream-file-private.h istream-fs-file.h istream-fs-stats.h istream-hash.h istream-header-filter.h istream-mail.h istream-metawrap.h istream-multiplex.h istream-nonuls.h istream-private.h istream-qp.h istream-raw-mbox.h istream-rawlog.h istream-seekable.h istream-sized.h istream-tee.h istream-timeout.h istream-try.h istream-unix.h istream-zlib.h istream.h json-generator.h json-istream.h json-ostream.h json-parser.h json-syntax.h json-text.h json-tree-io.h json-tree.h json-types.h lang-common.h lang-filter-private.h lang-filter.h lang-icu.h lang-indexer-status.h lang-library.h lang-settings.h lang-tokenizer-common.h lang-tokenizer-generic-private.h lang-tokenizer-private.h lang-tokenizer.h lang-user.h language.h lda-settings.h ldap-client.h ldap-utils.h lib-event-private.h lib-event.h lib-signals.h lib.h llist.h lmtp-client.h lmtp-commands.h lmtp-common.h lmtp-recipient.h lmtp-settings.h log-error-buffer.h log-throttle.h login-client.h login-common.h login-interface.h login-proxy-state.h login-proxy.h login-server-auth.h login-server.h login-settings.h macros.h mail-autoexpunge.h mail-cache-private.h mail-cache.h mail-copy.h mail-deliver.h mail-duplicate.h mail-error.h mail-html2text.h mail-index-alloc-cache.h mail-index-modseq.h mail-index-private.h mail-index-strmap.h mail-index-sync-private.h mail-index-transaction-private.h mail-index-util.h mail-index-view-private.h mail-index.h mail-namespace.h mail-search-build.h mail-search-mime-build.h mail-search-mime-register.h mail-search-mime.h mail-search-parser-private.h mail-search-parser.h mail-search-register.h mail-search.h mail-send.h mail-storage-hooks.h mail-storage-private.h mail-storage-service.h mail-storage-settings.h mail-storage.h mail-thread.h mail-transaction-log-private.h mail-transaction-log-view-private.h mail-transaction-log.h mail-types.h mail-user.h mailbox-attribute-internal.h mailbox-attribute-private.h mailbox-attribute.h mailbox-guid-cache.h mailbox-list-delete.h mailbox-list-fs.h mailbox-list-index-storage.h mailbox-list-index-sync.h mailbox-list-index.h mailbox-list-iter-private.h mailbox-list-iter.h mailbox-list-maildir.h mailbox-list-notify-tree.h mailbox-list-notify.h mailbox-list-private.h mailbox-list-subscriptions.h mailbox-list.h mailbox-log.h mailbox-recent-flags.h mailbox-search-result-private.h mailbox-tree.h mailbox-uidvalidity.h mailbox-watch.h maildir-filename-flags.h maildir-filename.h maildir-keywords.h maildir-mail.h maildir-settings.h maildir-storage.h maildir-sync.h maildir-uidlist.h malloc-overflow.h master-admin-client.h master-instance.h master-interface.h master-service-private.h master-service-settings.h master-service-ssl.h master-service.h mbox-file.h mbox-from.h mbox-lock.h mbox-md5.h mbox-settings.h mbox-storage.h mbox-sync-private.h md4.h md5.h mdbox-file.h mdbox-map-private.h mdbox-map.h mdbox-settings.h mdbox-storage-rebuild.h mdbox-storage.h mdbox-sync.h memarea.h mempool.h message-address.h message-binary-part.h message-date.h message-decoder.h message-header-decode.h message-header-encode.h message-header-hash.h message-header-parser.h message-id.h message-parser.h message-part-data.h message-part-serialize.h message-part.h message-search.h message-size.h message-snippet.h mkdir-parents.h mmap-util.h module-context.h module-dir.h mountpoint.h mycrypt.h net.h nfs-workarounds.h notify-plugin-private.h notify-plugin.h numpack.h oauth2.h ostream-cmp.h ostream-dot.h ostream-encrypt.h ostream-failure-at.h ostream-file-private.h ostream-final-trickle.h ostream-hash.h ostream-metawrap.h ostream-multiplex.h ostream-null.h ostream-private.h ostream-rawlog.h ostream-unix.h ostream-wrapper.h ostream-zlib.h ostream.h passdb-blocking.h passdb-cache.h passdb.h password-scheme.h path-util.h pkcs5.h pop3-capability.h pop3-client.h pop3-commands.h pop3-common.h pop3-protocol.h pop3-settings.h pop3c-client.h pop3c-settings.h pop3c-storage.h pop3c-sync.h primes.h printf-format-fix.h priorityq.h process-stat.h process-title.h program-client.h punycode.h push-notification-drivers.h push-notification-event-flagsclear.h push-notification-event-flagsset.h push-notification-event-mailboxcreate.h push-notification-event-mailboxdelete.h push-notification-event-mailboxrename.h push-notification-event-mailboxsubscribe.h push-notification-event-mailboxunsubscribe.h push-notification-event-message-common.h push-notification-event-messageappend.h push-notification-event-messageexpunge.h push-notification-event-messagenew.h push-notification-event-messageread.h push-notification-event-messagetrash.h push-notification-events-rfc5423.h push-notification-events.h push-notification-plugin.h push-notification-settings.h push-notification-triggers.h push-notification-txn-mbox.h push-notification-txn-msg.h qp-decoder.h qp-encoder.h quota-fs.h quota-plugin.h quota-private.h quota-settings.h quota.h quoted-printable.h randgen.h raw-storage.h raw-sync.h read-full.h restrict-access.h restrict-process-size.h rfc2231-parser.h rfc822-parser.h safe-memset.h safe-mkdir.h safe-mkstemp.h sasl-common.h sasl-oauth2.h sasl-server-gssapi.h sasl-server-mech-scram.h sasl-server-oauth2.h sasl-server-private.h sasl-server-protected.h sasl-server.h sdbox-file.h sdbox-settings.h sdbox-storage.h sdbox-sync.h sendfile-util.h seq-range-array.h seq-set-builder.h service-settings.h settings-history.h settings-parser.h settings.h sha-common.h sha1.h sha2.h sha3.h shared-storage.h sleep.h smtp-address.h smtp-client-command.h smtp-client-connection.h smtp-client-private.h smtp-client-transaction.h smtp-client.h smtp-command-parser.h smtp-command.h smtp-common.h smtp-dovecot.h smtp-params.h smtp-parser.h smtp-reply-parser.h smtp-reply.h smtp-server-private.h smtp-server.h smtp-submit-settings.h smtp-submit.h smtp-syntax.h sort.h sql-api-private.h sql-api.h ssl-settings.h stats-client.h stats-dist.h str-find.h str-parse.h str-sanitize.h str-table.h str.h strescape.h strfuncs.h strnum.h submission-backend-relay.h submission-backend.h submission-client.h submission-commands.h submission-common.h submission-recipient.h submission-settings.h subscription-file.h syslog-util.h test-common.h test-mail-storage-common.h test-subprocess.h time-util.h unichar.h unicode-data-static.h unicode-data-tables.h unicode-data-types.h unicode-data.h unicode-transform.h unix-socket-create.h unlink-directory.h unlink-old-files.h uri-util.h userdb-blocking.h userdb.h utc-mktime.h utc-offset.h var-expand-private.h var-expand.h version.h wildcard-match.h write-full.h lib/dovecot/ lib01_acl_plugin.a lib02_imap_acl_plugin.a lib02_lazy_expunge_plugin.a lib05_mail_crypt_acl_plugin.a lib05_pop3_migration_plugin.a lib10_last_login_plugin.a lib10_mail_crypt_plugin.a lib10_quota_plugin.a lib11_imap_quota_plugin.a lib11_trash_plugin.a lib15_notify_plugin.a lib20_charset_alias_plugin.a lib20_fts_plugin.a lib20_mail_compress_plugin.a lib20_mail_log_plugin.a lib20_notify_status_plugin.a lib20_push_notification_plugin.a lib20_quota_clone_plugin.a lib20_virtual_plugin.a lib99_welcome_plugin.a libdcrypt_openssl.a libdovecot-compression.a libdovecot-compression.so libdovecot-dsync.a libdovecot-dsync.so libdovecot-gssapi.a libdovecot-gssapi.so libdovecot-language.a libdovecot-language.so libdovecot-lda.a libdovecot-lda.so libdovecot-ldap.a libdovecot-ldap.so libdovecot-login.a libdovecot-login.so libdovecot-sql.a libdovecot-sql.so libdovecot-storage.a libdovecot-storage.so libdovecot.a libdovecot.so libfs_compress.a libfs_crypt.a libssl_iostream_openssl.a var_expand_crypt.a lib/dovecot/doveadm/ lib10_doveadm_acl_plugin.a lib10_doveadm_quota_plugin.a lib20_doveadm_fts_plugin.a libdoveadm_mail_crypt_plugin.a share/aclocal/dovecot.m4 [FILE:978:manifests/plist.man] share/man/man1/ deliver.1 doveadm-acl.1 doveadm-altmove.1 doveadm-auth.1 doveadm-backup.1 doveadm-compress-connect.1 doveadm-config.1 doveadm-copy.1 doveadm-deduplicate.1 doveadm-dict.1 doveadm-dump.1 doveadm-exec.1 doveadm-expunge.1 doveadm-fetch.1 doveadm-flags.1 doveadm-force-resync.1 doveadm-fs.1 doveadm-fts.1 doveadm-help.1 doveadm-import.1 doveadm-index.1 doveadm-indexer.1 doveadm-instance.1 doveadm-kick.1 doveadm-log.1 doveadm-mail-dict.1 doveadm-mail-fs.1 doveadm-mailbox-cryptokey.1 doveadm-mailbox.1 doveadm-move.1 doveadm-penalty.1 doveadm-process-status.1 doveadm-proxy.1 doveadm-purge.1 doveadm-pw.1 doveadm-quota.1 doveadm-rebuild.1 doveadm-reload.1 doveadm-save.1 doveadm-search.1 doveadm-service-status.1 doveadm-service-stop.1 doveadm-stats.1 doveadm-stop.1 doveadm-sync.1 doveadm-user.1 doveadm-who.1 doveadm.1 doveconf.1 dovecot-lda.1 dovecot-sysreport.1 dovecot.1 share/man/man7/doveadm-search-query.7 [FILE:164:manifests/plist.docs] share/doc/dovecot/ dovecot-openssl.cnf index.html mkcert.sh solr-config-7.7.0.xml solr-config-9.xml solr-schema-7.7.0.xml solr-schema-9.xml thread-refs.txt [FILE:368:patches/patch-src_lib_lib.h] --- src/lib/lib.h.orig 2025-10-29 06:58:41 UTC +++ src/lib/lib.h @@ -1,7 +1,7 @@ #ifndef LIB_H #define LIB_H -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) # define __BSD_VISIBLE 1 #elif defined(__APPLE__) # define _DARWIN_C_SOURCE 1 [FILE:459:patches/patch-src_master_main.c] --- src/master/main.c.orig 2025-10-29 06:58:41 UTC +++ src/master/main.c @@ -933,6 +933,8 @@ int main(int argc, char *argv[]) if (!i_failure_have_stdout_logs() && dup2(dev_null_fd, STDOUT_FILENO) < 0) i_fatal("dup2(dev_null_fd) failed: %m"); + if (!foreground && dup2(dev_null_fd, STDERR_FILENO) < 0) + i_fatal("dup2(dev_null_fd) failed: %m"); startup_early_errors_flush(); i_get_failure_handlers(&orig_fatal_callback, &orig_error_callback, [FILE:1073:patches/patch-src_plugins_fts_decode2text.sh] /usr gets changed to ${LOCALBASE} in post-patch:, so we cheat and set xpdf's path to /usr/lib. --- src/plugins/fts/decode2text.sh.orig 2025-10-29 06:58:41 UTC +++ src/plugins/fts/decode2text.sh @@ -79,16 +79,20 @@ wait_timeout() { LANG=en_US.UTF-8 export LANG if [ $fmt = "pdf" ]; then - /usr/bin/pdftotext $path - 2>/dev/null& + if [ -x /usr/lib/xpdf/pdftotext ]; then + /usr/lib/xpdf/pdftotext $path - 2>/dev/null& + else + /usr/local/bin/pdftotext $path - 2>/dev/null& + fi wait_timeout 2>/dev/null elif [ $fmt = "doc" ]; then - (/usr/bin/catdoc $path; true) 2>/dev/null& + (/usr/local/bin/catdoc $path; true) 2>/dev/null& wait_timeout 2>/dev/null elif [ $fmt = "ppt" ]; then - (/usr/bin/catppt $path; true) 2>/dev/null& + (/usr/local/bin/catppt $path; true) 2>/dev/null& wait_timeout 2>/dev/null elif [ $fmt = "xls" ]; then - (/usr/bin/xls2csv $path; true) 2>/dev/null& + (/usr/local/bin/xls2csv $path; true) 2>/dev/null& wait_timeout 2>/dev/null elif [ $fmt = "odt" -o $fmt = "ods" -o $fmt = "odp" ]; then xmlunzip "content.xml" [FILE:2204:files/dovecot.in] #!/bin/sh # # PROVIDE: dovecot # REQUIRE: %%REQUIRE%% # BEFORE: mail # KEYWORD: shutdown # dovecot_enable (bool): Set it to YES to enable dovecot # Default: NO # dovecot_config (str): Path to dovecot.conf # Default: %%PREFIX%%/etc/dovecot.conf # Set it to a space-separated list to start # multiple dovecot instances # dovecot_flags (str): Extra flags to pass to dovecot # Default: empty # Define dovecot_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/dovecot . /etc/rc.subr name=dovecot rcvar=dovecot_enable # read configuration and set defaults load_rc_config ${name} : ${dovecot_enable:="NO"} : ${dovecot_config:="%%PREFIX%%/etc/${name}.conf"} command="%%PREFIX%%/sbin/${name}" start_precmd="start_precmd" stop_postcmd="stop_postcmd" restart_cmd="restart_cmd" extra_commands="reload" start_precmd() { # Ensure runtime directory exists with correct permissions /usr/bin/install -o root -g wheel -m 0755 -d ${base_dir} } stop_postcmd() { # Cleanup runtime directory. The dovecot.conf link has to stay. /usr/bin/find ${base_dir} ! -type l -delete } restart_cmd() { # Overriding makes rc.subr run this once for each instance run_rc_command stop run_rc_command start } # To start multiple instances of dovecot set dovecot_config to # a space separated list of configuration files. for config in ${dovecot_config}; do required_files="${config}" command_args="-c ${config}" if [ -s ${config} ]; then ${command} ${command_args} -a 2>&1 >/dev/null if [ $? -ne 0 ]; then echo "==Error==" echo "Configuration file check failed." # Use dovecot to print the config error. ${command} ${command_args} -a exit $? fi base_dir=$(${command} ${command_args} -a 2>/dev/null | /usr/bin/awk -F '= ' '/^base_dir =/ { print $2 }') pidfile="${base_dir}/master.pid" else echo "==Error==" echo "Config file ${config} does not exist. If this is" echo "a new installation, please create the config files as outlined in" echo " # pkg info -D dovecot" fi run_rc_command "$1" done [FILE:1384:files/messages-primary.ucl.in] primary-in: { type: "install" message: <