├── .clang-format
├── .clang-tidy
├── .clangd
├── .editorconfig
├── .gitignore
├── AUTHORS
├── COPYING
├── COPYING.LGPL
├── COPYING.MIT
├── ChangeLog
├── INSTALL.md
├── Makefile.am
├── NEWS
├── README.md
├── SECURITY.md
├── TODO
├── autogen.sh
├── build-aux
├── .gitkeep
├── git-abi-version-gen
├── git-version-gen
└── run-test.sh.in
├── coccinelle
├── avoid-array_append-1elem.cocci
├── avoid-array_delete-1elem-0idx.cocci
├── avoid-array_delete-1elem-last.cocci
├── avoid-array_idx-0.cocci
├── avoid-array_idx-last.cocci
├── avoid-array_insert-1elem-0idx.cocci
├── avoid-i_stream_read_data-0-threshold.cocci
├── avoid-i_stream_read_data-minus1-threshold.cocci
├── buffer-clear-safe.cocci
├── event-set-forced-false-nop.cocci
├── macros.h
├── null-nop-buffer_free.cocci
├── null-nop-dict_iterate_deinit.cocci
├── null-nop-dict_transaction_rollback.cocci
├── null-nop-file_lock_free.cocci
├── null-nop-fs_deinit.cocci
├── null-nop-fs_file_close.cocci
├── null-nop-fs_file_deinit.cocci
├── null-nop-fs_unref.cocci
├── null-nop-hash_table_destroy.cocci
├── null-nop-http_client_request_abort.cocci
├── null-nop-i_close_fd.cocci
├── null-nop-i_stream_close.cocci
├── null-nop-i_stream_destroy.cocci
├── null-nop-i_stream_unref.cocci
├── null-nop-io_remove.cocci
├── null-nop-io_remove_closed.cocci
├── null-nop-iostream_proxy_unref.cocci
├── null-nop-mail_html2text_deinit.cocci
├── null-nop-mailbox_header_lookup_unref.cocci
├── null-nop-o_stream_close.cocci
├── null-nop-o_stream_destroy.cocci
├── null-nop-o_stream_unref.cocci
├── null-nop-pool_unref.cocci
├── null-nop-ssl_iostream_destroy.cocci
├── null-nop-str_free.cocci
├── null-nop-timeout_remove.cocci
├── random-misuse.cocci
├── str_begins-length-var.cocci
└── str_begins-strlen.cocci
├── configure.ac
├── doc
├── Makefile.am
├── dovecot-initd.sh
├── dovecot-openssl.cnf
├── dovecot.conf.in
├── index.html.in
├── man
│ ├── Makefile.am
│ ├── deliver.1
│ ├── doveadm-config.1
│ ├── doveadm-reload.1
│ └── doveadm-stop.1
├── 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
├── dovecot-config.in.in
├── dovecot.service.in
├── dovecot.socket
├── m4
├── ac_typeof.m4
├── arc4random.m4
├── ax_python_module.m4
├── blockdev.m4
├── crypt.m4
├── crypt_xpg6.m4
├── dbqlk.m4
├── dirent_dtype.m4
├── dovecot.m4
├── dovecot_pro.m4
├── faccessat2.m4
├── fd_passing.m4
├── glibc.m4
├── gmtime_max.m4
├── gmtime_tm_gmtoff.m4
├── ioloop.m4
├── iovec.m4
├── libcap.m4
├── linux_mremap.m4
├── mmap_write.m4
├── mntctl.m4
├── modules.m4
├── notify.m4
├── nsl.m4
├── off_t_max.m4
├── pkg.m4
├── pr_set_dumpable.m4
├── q_quotactl.m4
├── quota.m4
├── random.m4
├── rlimit.m4
├── sched.m4
├── sendfile.m4
├── size_t_signed.m4
├── sockpeercred.m4
├── sql.m4
├── ssl.m4
├── st_tim.m4
├── test_with.m4
├── time_t.m4
├── typeof.m4
├── uoff_t_max.m4
├── vararg.m4
├── want_apparmor.m4
├── want_bsdauth.m4
├── want_bzlib.m4
├── want_cassandra.m4
├── want_cdb.m4
├── want_flatcurve.m4
├── want_gssapi.m4
├── want_icu.m4
├── want_ldap.m4
├── want_lua.m4
├── want_lz4.m4
├── want_mysql.m4
├── want_pam.m4
├── want_passwd.m4
├── want_pgsql.m4
├── want_prefetch.m4
├── want_sodium.m4
├── want_solr.m4
├── want_sqlite.m4
├── want_stemmer.m4
├── want_systemd.m4
├── want_textcat.m4
├── want_unwind.m4
├── want_zstd.m4
└── zlib.m4
├── pyproject.toml
├── run-test-valgrind.supp
├── src
├── Makefile.am
├── anvil
│ ├── Makefile.am
│ ├── admin-client-pool.c
│ ├── admin-client-pool.h
│ ├── admin-client.c
│ ├── admin-client.h
│ ├── anvil-connection.c
│ ├── anvil-connection.h
│ ├── anvil-settings.c
│ ├── common.h
│ ├── connect-limit.c
│ ├── connect-limit.h
│ ├── main.c
│ ├── penalty.c
│ ├── penalty.h
│ ├── test-connect-limit.c
│ └── test-penalty.c
├── auth
│ ├── Makefile.am
│ ├── auth-cache.c
│ ├── auth-cache.h
│ ├── auth-client-connection.c
│ ├── auth-client-connection.h
│ ├── auth-common.h
│ ├── auth-fields.c
│ ├── auth-fields.h
│ ├── auth-master-connection.c
│ ├── auth-master-connection.h
│ ├── auth-penalty.c
│ ├── auth-penalty.h
│ ├── auth-policy.c
│ ├── auth-policy.h
│ ├── auth-request-fields.c
│ ├── auth-request-handler-private.h
│ ├── auth-request-handler.c
│ ├── auth-request-handler.h
│ ├── auth-request-var-expand.c
│ ├── auth-request-var-expand.h
│ ├── auth-request.c
│ ├── auth-request.h
│ ├── auth-settings.c
│ ├── auth-settings.h
│ ├── auth-token.c
│ ├── auth-token.h
│ ├── auth-worker-connection.c
│ ├── auth-worker-connection.h
│ ├── auth-worker-server.c
│ ├── auth-worker-server.h
│ ├── auth.c
│ ├── auth.h
│ ├── db-ldap-settings.c
│ ├── db-ldap-settings.h
│ ├── db-ldap.c
│ ├── db-ldap.h
│ ├── db-lua.c
│ ├── db-lua.h
│ ├── db-oauth2.c
│ ├── db-oauth2.h
│ ├── db-passwd-file.c
│ ├── db-passwd-file.h
│ ├── db-sql.c
│ ├── db-sql.h
│ ├── main.c
│ ├── mech-anonymous.c
│ ├── mech-apop.c
│ ├── mech-cram-md5.c
│ ├── mech-digest-md5-private.h
│ ├── mech-digest-md5.c
│ ├── mech-dovecot-token.c
│ ├── mech-external.c
│ ├── mech-gssapi.c
│ ├── mech-login.c
│ ├── mech-oauth2.c
│ ├── mech-otp-common.c
│ ├── mech-otp-common.h
│ ├── mech-otp.c
│ ├── mech-plain-common.c
│ ├── mech-plain-common.h
│ ├── mech-plain.c
│ ├── mech-scram.c
│ ├── mech-scram.h
│ ├── mech-winbind.c
│ ├── mech.c
│ ├── mech.h
│ ├── passdb-blocking.c
│ ├── passdb-blocking.h
│ ├── passdb-bsdauth.c
│ ├── passdb-cache.c
│ ├── passdb-cache.h
│ ├── passdb-imap.c
│ ├── passdb-ldap.c
│ ├── passdb-lua.c
│ ├── passdb-oauth2.c
│ ├── passdb-pam.c
│ ├── passdb-passwd-file.c
│ ├── passdb-passwd.c
│ ├── passdb-sql.c
│ ├── passdb-static.c
│ ├── passdb.c
│ ├── passdb.h
│ ├── test-auth-cache.c
│ ├── test-auth-client.c
│ ├── test-auth-master-server.c
│ ├── test-auth-master.c
│ ├── test-auth-master.h
│ ├── test-auth-request-fields.c
│ ├── test-auth-request-var-expand.c
│ ├── test-auth.c
│ ├── test-auth.h
│ ├── test-lua.c
│ ├── test-main.c
│ ├── test-mech.c
│ ├── test-mock.c
│ ├── test-username-filter.c
│ ├── userdb-blocking.c
│ ├── userdb-blocking.h
│ ├── userdb-ldap.c
│ ├── userdb-lua.c
│ ├── userdb-passwd-file.c
│ ├── userdb-passwd.c
│ ├── userdb-prefetch.c
│ ├── userdb-sql.c
│ ├── userdb-static.c
│ ├── userdb.c
│ └── userdb.h
├── config
│ ├── Makefile.am
│ ├── all-settings.h
│ ├── config-connection.c
│ ├── config-connection.h
│ ├── config-dump-full.c
│ ├── config-dump-full.h
│ ├── config-filter.c
│ ├── config-filter.h
│ ├── config-parser-private.h
│ ├── config-parser.c
│ ├── config-parser.h
│ ├── config-request.c
│ ├── config-request.h
│ ├── config-settings.c
│ ├── default-settings-import.h
│ ├── doveconf.c
│ ├── main.c
│ ├── old-set-parser.c
│ ├── old-set-parser.h
│ ├── settings-get.pl
│ ├── sysinfo-get.c
│ ├── sysinfo-get.h
│ └── test-config-parser.c
├── dict
│ ├── Makefile.am
│ ├── dict-commands.c
│ ├── dict-commands.h
│ ├── dict-connection.c
│ ├── dict-connection.h
│ ├── dict-expire.c
│ ├── dict-init-cache.c
│ ├── dict-init-cache.h
│ ├── dict-settings.c
│ ├── dict-settings.h
│ ├── main.c
│ └── main.h
├── dns
│ ├── Makefile.am
│ ├── dns-client-settings.c
│ └── dns-client.c
├── doveadm
│ ├── Makefile.am
│ ├── client-connection-http.c
│ ├── client-connection-private.h
│ ├── client-connection-tcp.c
│ ├── client-connection.c
│ ├── client-connection.h
│ ├── doveadm-auth-server.c
│ ├── doveadm-auth.c
│ ├── doveadm-cmd-parse.c
│ ├── doveadm-cmd-parse.h
│ ├── doveadm-cmd.c
│ ├── doveadm-cmd.h
│ ├── doveadm-compress.c
│ ├── doveadm-dict.c
│ ├── doveadm-dict.h
│ ├── doveadm-dsync.c
│ ├── doveadm-dsync.h
│ ├── doveadm-dump-dbox.c
│ ├── doveadm-dump-dcrypt-file.c
│ ├── doveadm-dump-dcrypt-key.c
│ ├── doveadm-dump-index.c
│ ├── doveadm-dump-log.c
│ ├── doveadm-dump-mailboxlog.c
│ ├── doveadm-dump-thread.c
│ ├── doveadm-dump.c
│ ├── doveadm-dump.h
│ ├── doveadm-fs.c
│ ├── doveadm-fs.h
│ ├── doveadm-indexer.c
│ ├── doveadm-instance.c
│ ├── doveadm-kick.c
│ ├── doveadm-log.c
│ ├── doveadm-mail-altmove.c
│ ├── doveadm-mail-copymove.c
│ ├── doveadm-mail-deduplicate.c
│ ├── doveadm-mail-dict.c
│ ├── doveadm-mail-expunge.c
│ ├── doveadm-mail-fetch.c
│ ├── doveadm-mail-flags.c
│ ├── doveadm-mail-fs.c
│ ├── doveadm-mail-import.c
│ ├── doveadm-mail-index.c
│ ├── doveadm-mail-iter.c
│ ├── doveadm-mail-iter.h
│ ├── doveadm-mail-mailbox-cache.c
│ ├── doveadm-mail-mailbox-metadata.c
│ ├── doveadm-mail-mailbox-status.c
│ ├── doveadm-mail-mailbox.c
│ ├── doveadm-mail-rebuild.c
│ ├── doveadm-mail-save.c
│ ├── doveadm-mail-search.c
│ ├── doveadm-mail-server.c
│ ├── doveadm-mail.c
│ ├── doveadm-mail.h
│ ├── doveadm-mailbox-list-iter.c
│ ├── doveadm-mailbox-list-iter.h
│ ├── doveadm-master.c
│ ├── doveadm-mutf7.c
│ ├── doveadm-penalty.c
│ ├── doveadm-print-flow.c
│ ├── doveadm-print-formatted.c
│ ├── doveadm-print-json.c
│ ├── doveadm-print-pager.c
│ ├── doveadm-print-private.h
│ ├── doveadm-print-server.c
│ ├── doveadm-print-tab.c
│ ├── doveadm-print-table.c
│ ├── doveadm-print.c
│ ├── doveadm-print.h
│ ├── doveadm-pw.c
│ ├── doveadm-settings.c
│ ├── doveadm-settings.h
│ ├── doveadm-sis.c
│ ├── doveadm-stats.c
│ ├── doveadm-util.c
│ ├── doveadm-util.h
│ ├── doveadm-who.c
│ ├── doveadm-who.h
│ ├── doveadm.c
│ ├── doveadm.h
│ ├── dsync
│ │ ├── Makefile.am
│ │ ├── dsync-brain-mailbox-tree-sync.c
│ │ ├── dsync-brain-mailbox-tree.c
│ │ ├── dsync-brain-mailbox.c
│ │ ├── dsync-brain-mails.c
│ │ ├── dsync-brain-private.h
│ │ ├── dsync-brain.c
│ │ ├── dsync-brain.h
│ │ ├── dsync-deserializer.c
│ │ ├── dsync-deserializer.h
│ │ ├── dsync-ibc-pipe.c
│ │ ├── dsync-ibc-private.h
│ │ ├── dsync-ibc-stream.c
│ │ ├── dsync-ibc.c
│ │ ├── dsync-ibc.h
│ │ ├── dsync-mail.c
│ │ ├── dsync-mail.h
│ │ ├── dsync-mailbox-export.c
│ │ ├── dsync-mailbox-export.h
│ │ ├── dsync-mailbox-import.c
│ │ ├── dsync-mailbox-import.h
│ │ ├── dsync-mailbox-state.c
│ │ ├── dsync-mailbox-state.h
│ │ ├── dsync-mailbox-tree-fill.c
│ │ ├── dsync-mailbox-tree-private.h
│ │ ├── dsync-mailbox-tree-sync.c
│ │ ├── dsync-mailbox-tree.c
│ │ ├── dsync-mailbox-tree.h
│ │ ├── dsync-mailbox.c
│ │ ├── dsync-mailbox.h
│ │ ├── dsync-serializer.c
│ │ ├── dsync-serializer.h
│ │ ├── dsync-transaction-log-scan.c
│ │ ├── dsync-transaction-log-scan.h
│ │ └── test-dsync-mailbox-tree-sync.c
│ ├── main.c
│ ├── test-doveadm-cmd-parse.c
│ └── test-doveadm-util.c
├── imap-hibernate
│ ├── Makefile.am
│ ├── imap-client.c
│ ├── imap-client.h
│ ├── imap-hibernate-client.c
│ ├── imap-hibernate-client.h
│ ├── imap-hibernate-settings.c
│ ├── imap-master-connection.c
│ ├── imap-master-connection.h
│ └── main.c
├── imap-login
│ ├── Makefile.am
│ ├── client-authenticate.c
│ ├── client-authenticate.h
│ ├── imap-login-client.c
│ ├── imap-login-client.h
│ ├── imap-login-cmd-id.c
│ ├── imap-login-commands.c
│ ├── imap-login-commands.h
│ ├── imap-login-settings.c
│ ├── imap-login-settings.h
│ ├── imap-proxy.c
│ └── imap-proxy.h
├── imap-urlauth-login
│ ├── Makefile.am
│ ├── imap-urlauth-login-settings.c
│ └── imap-urlauth-login.c
├── imap-urlauth
│ ├── Makefile.am
│ ├── imap-urlauth-client.c
│ ├── imap-urlauth-client.h
│ ├── imap-urlauth-common.h
│ ├── imap-urlauth-settings.c
│ ├── imap-urlauth-settings.h
│ ├── imap-urlauth-worker-client.c
│ ├── imap-urlauth-worker-client.h
│ ├── imap-urlauth-worker-common.h
│ ├── imap-urlauth-worker-settings.c
│ ├── imap-urlauth-worker-settings.h
│ ├── imap-urlauth-worker.c
│ └── imap-urlauth.c
├── imap
│ ├── Makefile.am
│ ├── cmd-append.c
│ ├── cmd-cancelupdate.c
│ ├── cmd-capability.c
│ ├── cmd-check.c
│ ├── cmd-close.c
│ ├── cmd-compress.c
│ ├── cmd-copy.c
│ ├── cmd-create.c
│ ├── cmd-delete.c
│ ├── cmd-enable.c
│ ├── cmd-examine.c
│ ├── cmd-expunge.c
│ ├── cmd-fetch.c
│ ├── cmd-genurlauth.c
│ ├── cmd-getmetadata.c
│ ├── cmd-id.c
│ ├── cmd-idle.c
│ ├── cmd-list.c
│ ├── cmd-logout.c
│ ├── cmd-lsub.c
│ ├── cmd-namespace.c
│ ├── cmd-noop.c
│ ├── cmd-notify.c
│ ├── cmd-rename.c
│ ├── cmd-resetkey.c
│ ├── cmd-search.c
│ ├── cmd-select.c
│ ├── cmd-setmetadata.c
│ ├── cmd-sort.c
│ ├── cmd-status.c
│ ├── cmd-store.c
│ ├── cmd-subscribe.c
│ ├── cmd-thread.c
│ ├── cmd-unselect.c
│ ├── cmd-unsubscribe.c
│ ├── cmd-urlfetch.c
│ ├── imap-client-hibernate.c
│ ├── imap-client.c
│ ├── imap-client.h
│ ├── imap-commands-util.c
│ ├── imap-commands-util.h
│ ├── imap-commands.c
│ ├── imap-commands.h
│ ├── imap-common.h
│ ├── imap-expunge.c
│ ├── imap-expunge.h
│ ├── imap-feature.c
│ ├── imap-feature.h
│ ├── imap-fetch-body.c
│ ├── imap-fetch.c
│ ├── imap-fetch.h
│ ├── imap-list.c
│ ├── imap-list.h
│ ├── imap-master-client.c
│ ├── imap-master-client.h
│ ├── imap-notify.c
│ ├── imap-notify.h
│ ├── imap-search-args.c
│ ├── imap-search-args.h
│ ├── imap-search.c
│ ├── imap-search.h
│ ├── imap-settings.c
│ ├── imap-settings.h
│ ├── imap-state.c
│ ├── imap-state.h
│ ├── imap-status.c
│ ├── imap-status.h
│ ├── imap-storage-callbacks.c
│ ├── imap-storage-callbacks.h
│ ├── imap-sync-private.h
│ ├── imap-sync.c
│ ├── imap-sync.h
│ ├── main.c
│ ├── test-imap-client-hibernate.c
│ └── test-imap-storage-callbacks.c
├── indexer
│ ├── Makefile.am
│ ├── indexer-client.c
│ ├── indexer-client.h
│ ├── indexer-queue.c
│ ├── indexer-queue.h
│ ├── indexer-settings.c
│ ├── indexer-worker-settings.c
│ ├── indexer-worker.c
│ ├── indexer.c
│ ├── indexer.h
│ ├── master-connection.c
│ ├── master-connection.h
│ ├── test-indexer-queue.c
│ ├── worker-connection.c
│ ├── worker-connection.h
│ └── worker-pool.h
├── lda
│ ├── Makefile.am
│ └── main.c
├── lib-auth-client
│ ├── Makefile.am
│ ├── auth-client-connection.c
│ ├── auth-client-interface.h
│ ├── auth-client-private.h
│ ├── auth-client-request.c
│ ├── auth-client.c
│ ├── auth-client.h
│ ├── auth-master.c
│ ├── auth-master.h
│ ├── auth-proxy.c
│ ├── auth-proxy.h
│ ├── test-auth-client.c
│ └── test-auth-master.c
├── lib-auth
│ ├── Makefile.am
│ ├── auth-scram-client.c
│ ├── auth-scram-client.h
│ ├── auth-scram-server.c
│ ├── auth-scram-server.h
│ ├── auth-scram.c
│ ├── auth-scram.h
│ ├── crypt-blowfish.c
│ ├── crypt-blowfish.h
│ ├── mycrypt.c
│ ├── mycrypt.h
│ ├── password-scheme-crypt.c
│ ├── password-scheme-md5crypt.c
│ ├── password-scheme-otp.c
│ ├── password-scheme-pbkdf2.c
│ ├── password-scheme-private.h
│ ├── password-scheme-scram.c
│ ├── password-scheme-sodium.c
│ ├── password-scheme.c
│ ├── password-scheme.h
│ ├── test-auth-scram.c
│ └── test-password-scheme.c
├── lib-charset
│ ├── Makefile.am
│ ├── charset-iconv.c
│ ├── charset-utf8-private.h
│ ├── charset-utf8.c
│ ├── charset-utf8.h
│ └── test-charset.c
├── lib-compression
│ ├── Makefile.am
│ ├── bench-compression.c
│ ├── compression.c
│ ├── compression.h
│ ├── iostream-lz4.h
│ ├── iostream-zstd-private.h
│ ├── istream-bzlib.c
│ ├── istream-decompress.c
│ ├── istream-lz4.c
│ ├── istream-zlib.c
│ ├── istream-zlib.h
│ ├── istream-zstd.c
│ ├── ostream-bzlib.c
│ ├── ostream-lz4.c
│ ├── ostream-zlib.c
│ ├── ostream-zlib.h
│ ├── ostream-zstd.c
│ └── test-compression.c
├── lib-dcrypt
│ ├── Makefile.am
│ ├── dcrypt-iostream.h
│ ├── dcrypt-openssl1.c
│ ├── dcrypt-openssl3.c
│ ├── dcrypt-private.h
│ ├── dcrypt.c
│ ├── dcrypt.h
│ ├── istream-decrypt.c
│ ├── istream-decrypt.h
│ ├── ostream-encrypt.c
│ ├── ostream-encrypt.h
│ ├── sample-v1.asc
│ ├── sample-v1_short.asc
│ ├── sample-v2.asc
│ ├── test-crypto.c
│ └── test-stream.c
├── lib-dict-backend
│ ├── Makefile.am
│ ├── dict-cdb.c
│ ├── dict-ldap-settings.c
│ ├── dict-ldap-settings.h
│ ├── dict-ldap.c
│ ├── dict-sql-private.h
│ ├── dict-sql-settings.c
│ ├── dict-sql-settings.h
│ ├── dict-sql.c
│ ├── dict-sql.h
│ └── test-dict-sql.c
├── lib-dict-extra
│ ├── Makefile.am
│ ├── dict-client.c
│ ├── dict-client.h
│ ├── dict-fs.c
│ ├── dict-register.c
│ └── test-dict-fs.c
├── lib-dict
│ ├── Makefile.am
│ ├── dict-fail.c
│ ├── dict-file.c
│ ├── dict-iter-lua.c
│ ├── dict-lua-private.h
│ ├── dict-lua.c
│ ├── dict-lua.h
│ ├── dict-private.h
│ ├── dict-redis.c
│ ├── dict-transaction-memory.c
│ ├── dict-transaction-memory.h
│ ├── dict-txn-lua.c
│ ├── dict.c
│ ├── dict.h
│ └── test-dict.c
├── lib-dns-client
│ ├── Makefile.am
│ ├── dns-client-cache.c
│ ├── dns-client-cache.h
│ ├── dns-client-settings.c
│ ├── dns-lookup.c
│ ├── dns-lookup.h
│ ├── dns-lua.c
│ ├── dns-lua.h
│ └── test-dns-lookup.c
├── lib-dns
│ ├── Makefile.am
│ ├── dns-util.c
│ ├── dns-util.h
│ └── test-dns-util.c
├── lib-doveadm
│ ├── Makefile.am
│ ├── doveadm-client-lua.c
│ ├── doveadm-client-lua.h
│ ├── doveadm-client.c
│ ├── doveadm-client.h
│ ├── doveadm-protocol.c
│ └── doveadm-protocol.h
├── lib-dovecot
│ └── Makefile.am
├── lib-fs
│ ├── Makefile.am
│ ├── fs-api-private.h
│ ├── fs-api.c
│ ├── fs-api.h
│ ├── fs-dict.c
│ ├── fs-metawrap.c
│ ├── fs-posix.c
│ ├── fs-randomfail.c
│ ├── fs-sis-common.c
│ ├── fs-sis-common.h
│ ├── fs-sis-queue.c
│ ├── fs-sis.c
│ ├── fs-test-async.c
│ ├── fs-test.c
│ ├── fs-test.h
│ ├── fs-wrapper.c
│ ├── fs-wrapper.h
│ ├── istream-fs-file.c
│ ├── istream-fs-file.h
│ ├── istream-fs-stats.c
│ ├── istream-fs-stats.h
│ ├── istream-metawrap.c
│ ├── istream-metawrap.h
│ ├── ostream-cmp.c
│ ├── ostream-cmp.h
│ ├── ostream-metawrap.c
│ ├── ostream-metawrap.h
│ ├── test-fs-metawrap.c
│ └── test-fs-posix.c
├── lib-http
│ ├── Makefile.am
│ ├── http-auth.c
│ ├── http-auth.h
│ ├── http-client-connection.c
│ ├── http-client-host.c
│ ├── http-client-peer.c
│ ├── http-client-private.h
│ ├── http-client-queue.c
│ ├── http-client-request.c
│ ├── http-client-settings.c
│ ├── http-client.c
│ ├── http-client.h
│ ├── http-common.h
│ ├── http-date.c
│ ├── http-date.h
│ ├── http-header-parser.c
│ ├── http-header-parser.h
│ ├── http-header.c
│ ├── http-header.h
│ ├── http-message-parser.c
│ ├── http-message-parser.h
│ ├── http-parser.c
│ ├── http-parser.h
│ ├── http-request-parser.c
│ ├── http-request-parser.h
│ ├── http-request.c
│ ├── http-request.h
│ ├── http-response-parser.c
│ ├── http-response-parser.h
│ ├── http-response.c
│ ├── http-response.h
│ ├── http-server-connection.c
│ ├── http-server-ostream.c
│ ├── http-server-private.h
│ ├── http-server-request.c
│ ├── http-server-resource.c
│ ├── http-server-response.c
│ ├── http-server-settings.c
│ ├── http-server.c
│ ├── http-server.h
│ ├── http-transfer-chunked.c
│ ├── http-transfer.h
│ ├── http-url.c
│ ├── http-url.h
│ ├── test-http-auth.c
│ ├── test-http-client-errors.c
│ ├── test-http-client-request.c
│ ├── test-http-client.c
│ ├── test-http-date.c
│ ├── test-http-header-parser.c
│ ├── test-http-payload.c
│ ├── test-http-request-parser.c
│ ├── test-http-response-parser.c
│ ├── test-http-server-errors.c
│ ├── test-http-server.c
│ ├── test-http-transfer.c
│ └── test-http-url.c
├── lib-imap-client
│ ├── Makefile.am
│ ├── imapc-client-private.h
│ ├── imapc-client.c
│ ├── imapc-client.h
│ ├── imapc-connection.c
│ ├── imapc-connection.h
│ ├── imapc-msgmap.c
│ ├── imapc-msgmap.h
│ ├── imapc-settings.c
│ ├── imapc-settings.h
│ └── test-imapc-client.c
├── lib-imap-storage
│ ├── Makefile.am
│ ├── imap-metadata.c
│ ├── imap-metadata.h
│ ├── imap-msgpart-url.c
│ ├── imap-msgpart-url.h
│ ├── imap-msgpart.c
│ └── imap-msgpart.h
├── lib-imap-urlauth
│ ├── Makefile.am
│ ├── imap-urlauth-backend.c
│ ├── imap-urlauth-backend.h
│ ├── imap-urlauth-connection.c
│ ├── imap-urlauth-connection.h
│ ├── imap-urlauth-fetch.c
│ ├── imap-urlauth-fetch.h
│ ├── imap-urlauth-private.h
│ ├── imap-urlauth.c
│ └── imap-urlauth.h
├── lib-imap
│ ├── Makefile.am
│ ├── fuzz-imap-bodystructure.c
│ ├── fuzz-imap-utf7.c
│ ├── imap-arg.c
│ ├── imap-arg.h
│ ├── imap-base-subject.c
│ ├── imap-base-subject.h
│ ├── imap-bodystructure.c
│ ├── imap-bodystructure.h
│ ├── imap-date.c
│ ├── imap-date.h
│ ├── imap-envelope.c
│ ├── imap-envelope.h
│ ├── imap-id.c
│ ├── imap-id.h
│ ├── imap-keepalive.c
│ ├── imap-keepalive.h
│ ├── imap-match.c
│ ├── imap-match.h
│ ├── imap-parser.c
│ ├── imap-parser.h
│ ├── imap-quote.c
│ ├── imap-quote.h
│ ├── imap-resp-code.h
│ ├── imap-seqset.c
│ ├── imap-seqset.h
│ ├── imap-stats.h
│ ├── imap-url.c
│ ├── imap-url.h
│ ├── imap-utf7.c
│ ├── imap-utf7.h
│ ├── imap-util.c
│ ├── imap-util.h
│ ├── test-imap-bodystructure.c
│ ├── test-imap-date.c
│ ├── test-imap-envelope.c
│ ├── test-imap-match.c
│ ├── test-imap-parser.c
│ ├── test-imap-quote.c
│ ├── test-imap-url.c
│ ├── test-imap-utf7.c
│ └── test-imap-util.c
├── lib-index
│ ├── Makefile.am
│ ├── mail-cache-decisions.c
│ ├── mail-cache-fields.c
│ ├── mail-cache-lookup.c
│ ├── mail-cache-private.h
│ ├── mail-cache-purge.c
│ ├── mail-cache-sync-update.c
│ ├── mail-cache-transaction.c
│ ├── mail-cache.c
│ ├── mail-cache.h
│ ├── mail-index-alloc-cache.c
│ ├── mail-index-alloc-cache.h
│ ├── mail-index-dummy-view.c
│ ├── mail-index-fsck.c
│ ├── mail-index-lock.c
│ ├── mail-index-map-hdr.c
│ ├── mail-index-map-read.c
│ ├── mail-index-map.c
│ ├── mail-index-modseq.c
│ ├── mail-index-modseq.h
│ ├── mail-index-private.h
│ ├── mail-index-strmap.c
│ ├── mail-index-strmap.h
│ ├── mail-index-sync-ext.c
│ ├── mail-index-sync-keywords.c
│ ├── mail-index-sync-private.h
│ ├── mail-index-sync-update.c
│ ├── mail-index-sync.c
│ ├── mail-index-transaction-export.c
│ ├── mail-index-transaction-finish.c
│ ├── mail-index-transaction-private.h
│ ├── mail-index-transaction-sort-appends.c
│ ├── mail-index-transaction-update.c
│ ├── mail-index-transaction-view.c
│ ├── mail-index-transaction.c
│ ├── mail-index-util.c
│ ├── mail-index-util.h
│ ├── mail-index-view-private.h
│ ├── mail-index-view-sync.c
│ ├── mail-index-view.c
│ ├── mail-index-write.c
│ ├── mail-index.c
│ ├── mail-index.h
│ ├── mail-transaction-log-append.c
│ ├── mail-transaction-log-file.c
│ ├── mail-transaction-log-modseq.c
│ ├── mail-transaction-log-private.h
│ ├── mail-transaction-log-view-private.h
│ ├── mail-transaction-log-view.c
│ ├── mail-transaction-log.c
│ ├── mail-transaction-log.h
│ ├── mailbox-log.c
│ ├── mailbox-log.h
│ ├── test-mail-cache-common.c
│ ├── test-mail-cache-fields.c
│ ├── test-mail-cache-purge.c
│ ├── test-mail-cache.c
│ ├── test-mail-cache.h
│ ├── test-mail-index-map.c
│ ├── test-mail-index-modseq.c
│ ├── test-mail-index-sync-ext.c
│ ├── test-mail-index-transaction-finish.c
│ ├── test-mail-index-transaction-update.c
│ ├── test-mail-index-write.c
│ ├── test-mail-index.c
│ ├── test-mail-index.h
│ ├── test-mail-transaction-log-append.c
│ ├── test-mail-transaction-log-file.c
│ └── test-mail-transaction-log-view.c
├── lib-json
│ ├── Makefile.am
│ ├── fuzz-json-istream.c
│ ├── json-format.c
│ ├── json-generator.c
│ ├── json-generator.h
│ ├── json-istream.c
│ ├── json-istream.h
│ ├── json-ostream.c
│ ├── json-ostream.h
│ ├── json-parser.c
│ ├── json-parser.h
│ ├── json-syntax.c
│ ├── json-syntax.h
│ ├── json-text.c
│ ├── json-text.h
│ ├── json-tree-io.c
│ ├── json-tree-io.h
│ ├── json-tree.c
│ ├── json-tree.h
│ ├── json-types.c
│ ├── json-types.h
│ ├── test-json-generator.c
│ ├── test-json-io.c
│ ├── test-json-istream.c
│ ├── test-json-ostream.c
│ ├── test-json-parser.c
│ ├── test-json-tree-io.c
│ └── test-json-tree.c
├── lib-language
│ ├── Makefile.am
│ ├── lang-common.h
│ ├── lang-filter-contractions.c
│ ├── lang-filter-english-possessive.c
│ ├── lang-filter-lowercase.c
│ ├── lang-filter-normalizer-icu.c
│ ├── lang-filter-private.h
│ ├── lang-filter-stemmer-snowball.c
│ ├── lang-filter-stopwords.c
│ ├── lang-filter.c
│ ├── lang-filter.h
│ ├── lang-icu.c
│ ├── lang-icu.h
│ ├── lang-indexer-status.h
│ ├── lang-library.c
│ ├── lang-library.h
│ ├── lang-settings.c
│ ├── lang-settings.h
│ ├── lang-tokenizer-address.c
│ ├── lang-tokenizer-common.c
│ ├── lang-tokenizer-common.h
│ ├── lang-tokenizer-generic-private.h
│ ├── lang-tokenizer-generic.c
│ ├── lang-tokenizer-private.h
│ ├── lang-tokenizer.c
│ ├── lang-tokenizer.h
│ ├── language.c
│ ├── language.h
│ ├── stopwords
│ │ ├── stopwords_da.txt
│ │ ├── stopwords_de.txt
│ │ ├── stopwords_en.txt
│ │ ├── stopwords_es.txt
│ │ ├── stopwords_fi.txt
│ │ ├── stopwords_fr.txt
│ │ ├── stopwords_it.txt
│ │ ├── stopwords_malformed.txt
│ │ ├── stopwords_nl.txt
│ │ ├── stopwords_no.txt
│ │ ├── stopwords_pt.txt
│ │ ├── stopwords_ro.txt
│ │ ├── stopwords_ru.txt
│ │ ├── stopwords_sv.txt
│ │ └── stopwords_tr.txt
│ ├── test-lang-filter.c
│ ├── test-lang-icu.c
│ ├── test-lang-tokenizer.c
│ ├── test-language.c
│ ├── udhr_fra.txt
│ └── word-properties.pl
├── lib-lda
│ ├── Makefile.am
│ ├── lda-settings.c
│ ├── lda-settings.h
│ ├── mail-deliver.c
│ ├── mail-deliver.h
│ ├── mail-send.c
│ └── mail-send.h
├── lib-ldap
│ ├── Makefile.am
│ ├── ldap-client.c
│ ├── ldap-client.h
│ ├── ldap-compare.c
│ ├── ldap-connection-pool.c
│ ├── ldap-connection-pool.h
│ ├── ldap-connection.c
│ ├── ldap-entry.c
│ ├── ldap-iterator.c
│ ├── ldap-private.h
│ ├── ldap-search.c
│ ├── ldap-settings-parse.h
│ ├── ldap-settings.c
│ ├── ldap-settings.h
│ ├── ldap-utils.c
│ └── ldap-utils.h
├── lib-login
│ ├── Makefile.am
│ ├── login-client.c
│ ├── login-client.h
│ ├── login-interface.h
│ ├── login-server-auth.c
│ ├── login-server-auth.h
│ ├── login-server.c
│ ├── login-server.h
│ └── test-login-server-auth.c
├── lib-lua
│ ├── Makefile.am
│ ├── dlua-compat.c
│ ├── dlua-compat.h
│ ├── dlua-dovecot-http.c
│ ├── dlua-dovecot.c
│ ├── dlua-error.c
│ ├── dlua-iostream.c
│ ├── dlua-pushstring.c
│ ├── dlua-resume.c
│ ├── dlua-script-private.h
│ ├── dlua-script.c
│ ├── dlua-script.h
│ ├── dlua-table.c
│ ├── dlua-thread.c
│ ├── dlua-wrapper.h
│ ├── test-dict-lua.c
│ ├── test-dns-lua.c
│ ├── test-io-lua.c
│ ├── test-io-lua.lua
│ ├── test-lua-base64.lua
│ ├── test-lua-http-client.c
│ ├── test-lua-http-client.lua
│ └── test-lua.c
├── lib-mail
│ ├── Makefile.am
│ ├── fuzz-message-parser.c
│ ├── html-entities.h
│ ├── istream-attachment-connector.c
│ ├── istream-attachment-connector.h
│ ├── istream-attachment-extractor.c
│ ├── istream-attachment-extractor.h
│ ├── istream-binary-converter.c
│ ├── istream-binary-converter.h
│ ├── istream-dot.c
│ ├── istream-dot.h
│ ├── istream-header-filter.c
│ ├── istream-header-filter.h
│ ├── istream-qp-decoder.c
│ ├── istream-qp-encoder.c
│ ├── istream-qp.h
│ ├── mail-html2text.c
│ ├── mail-html2text.h
│ ├── mail-types.h
│ ├── mbox-from.c
│ ├── mbox-from.h
│ ├── message-address.c
│ ├── message-address.h
│ ├── message-binary-part.c
│ ├── message-binary-part.h
│ ├── message-date.c
│ ├── message-date.h
│ ├── message-decoder.c
│ ├── message-decoder.h
│ ├── message-header-decode.c
│ ├── message-header-decode.h
│ ├── message-header-encode.c
│ ├── message-header-encode.h
│ ├── message-header-hash.c
│ ├── message-header-hash.h
│ ├── message-header-parser.c
│ ├── message-header-parser.h
│ ├── message-id.c
│ ├── message-id.h
│ ├── message-parser-from-parts.c
│ ├── message-parser-private.h
│ ├── message-parser.c
│ ├── message-parser.h
│ ├── message-part-data.c
│ ├── message-part-data.h
│ ├── message-part-serialize.c
│ ├── message-part-serialize.h
│ ├── message-part.c
│ ├── message-part.h
│ ├── message-search.c
│ ├── message-search.h
│ ├── message-size.c
│ ├── message-size.h
│ ├── message-snippet.c
│ ├── message-snippet.h
│ ├── ostream-dot.c
│ ├── ostream-dot.h
│ ├── qp-decoder.c
│ ├── qp-decoder.h
│ ├── qp-encoder.c
│ ├── qp-encoder.h
│ ├── quoted-printable.c
│ ├── quoted-printable.h
│ ├── rfc2231-parser.c
│ ├── rfc2231-parser.h
│ ├── rfc822-parser.c
│ ├── rfc822-parser.h
│ ├── test-istream-attachment.c
│ ├── test-istream-binary-converter.c
│ ├── test-istream-dot.c
│ ├── test-istream-header-filter.c
│ ├── test-istream-qp-decoder.c
│ ├── test-istream-qp-encoder.c
│ ├── test-mail-html2text.c
│ ├── test-mbox-from.c
│ ├── test-message-address.c
│ ├── test-message-date.c
│ ├── test-message-decoder.c
│ ├── test-message-header-decode.c
│ ├── test-message-header-encode.c
│ ├── test-message-header-hash.c
│ ├── test-message-header-parser.c
│ ├── test-message-id.c
│ ├── test-message-parser.c
│ ├── test-message-part-data.c
│ ├── test-message-part-serialize.c
│ ├── test-message-part.c
│ ├── test-message-search.c
│ ├── test-message-size.c
│ ├── test-message-snippet.c
│ ├── test-ostream-dot.c
│ ├── test-qp-decoder.c
│ ├── test-qp-encoder.c
│ ├── test-quoted-printable.c
│ ├── test-rfc2231-parser.c
│ └── test-rfc822-parser.c
├── lib-master
│ ├── .gitignore
│ ├── Makefile.am
│ ├── anvil-client.c
│ ├── anvil-client.h
│ ├── log-error-buffer.c
│ ├── log-error-buffer.h
│ ├── master-admin-client.c
│ ├── master-admin-client.h
│ ├── master-instance.c
│ ├── master-instance.h
│ ├── master-interface.h
│ ├── master-service-haproxy.c
│ ├── master-service-private.h
│ ├── master-service-settings.c
│ ├── master-service-settings.h
│ ├── master-service-ssl.c
│ ├── master-service-ssl.h
│ ├── master-service.c
│ ├── master-service.h
│ ├── service-settings.h
│ ├── stats-client.c
│ ├── stats-client.h
│ ├── syslog-util.c
│ ├── syslog-util.h
│ ├── test-event-stats.c
│ ├── test-master-service-settings.c
│ └── test-master-service.c
├── lib-oauth2
│ ├── Makefile.am
│ ├── oauth2-jwt.c
│ ├── oauth2-key-cache.c
│ ├── oauth2-private.h
│ ├── oauth2-request.c
│ ├── oauth2.c
│ ├── oauth2.h
│ ├── test-oauth2-json.c
│ └── test-oauth2-jwt.c
├── lib-otp
│ ├── Makefile.am
│ ├── otp-dictionary.c
│ ├── otp-dictionary.h
│ ├── otp-hash.c
│ ├── otp-hash.h
│ ├── otp-parity.c
│ ├── otp-parity.h
│ ├── otp-parse.c
│ ├── otp-parse.h
│ └── otp.h
├── lib-pop3
│ ├── Makefile.am
│ ├── pop3-capability.h
│ └── pop3-protocol.h
├── lib-program-client
│ ├── Makefile.am
│ ├── program-client-local.c
│ ├── program-client-private.h
│ ├── program-client-remote.c
│ ├── program-client.c
│ ├── program-client.h
│ ├── test-program-client-local.c
│ ├── test-program-client-net.c
│ └── test-program-client-unix.c
├── lib-sasl
│ ├── Makefile.am
│ ├── dsasl-client-private.h
│ ├── dsasl-client.c
│ ├── dsasl-client.h
│ ├── mech-anonymous.c
│ ├── mech-external.c
│ ├── mech-login.c
│ ├── mech-oauthbearer.c
│ ├── mech-plain.c
│ ├── mech-scram.c
│ └── test-sasl-client.c
├── lib-settings
│ ├── Makefile.am
│ ├── settings-history-core.txt
│ ├── settings-history.c
│ ├── settings-history.h
│ ├── settings-history.py
│ ├── settings-parser.c
│ ├── settings-parser.h
│ ├── settings.c
│ ├── settings.h
│ ├── test-settings-parser.c
│ └── test-settings.c
├── lib-smtp
│ ├── Makefile.am
│ ├── fuzz-smtp-server.c
│ ├── smtp-address.c
│ ├── smtp-address.h
│ ├── smtp-client-command.c
│ ├── smtp-client-command.h
│ ├── smtp-client-connection.c
│ ├── smtp-client-connection.h
│ ├── smtp-client-private.h
│ ├── smtp-client-transaction.c
│ ├── smtp-client-transaction.h
│ ├── smtp-client.c
│ ├── smtp-client.h
│ ├── smtp-command-parser.c
│ ├── smtp-command-parser.h
│ ├── smtp-command.h
│ ├── smtp-common.c
│ ├── smtp-common.h
│ ├── smtp-dovecot.c
│ ├── smtp-dovecot.h
│ ├── smtp-params.c
│ ├── smtp-params.h
│ ├── smtp-parser.c
│ ├── smtp-parser.h
│ ├── smtp-reply-parser.c
│ ├── smtp-reply-parser.h
│ ├── smtp-reply.c
│ ├── smtp-reply.h
│ ├── smtp-server-cmd-auth.c
│ ├── smtp-server-cmd-data.c
│ ├── smtp-server-cmd-helo.c
│ ├── smtp-server-cmd-mail.c
│ ├── smtp-server-cmd-noop.c
│ ├── smtp-server-cmd-quit.c
│ ├── smtp-server-cmd-rcpt.c
│ ├── smtp-server-cmd-rset.c
│ ├── smtp-server-cmd-starttls.c
│ ├── smtp-server-cmd-vrfy.c
│ ├── smtp-server-cmd-xclient.c
│ ├── smtp-server-command.c
│ ├── smtp-server-connection.c
│ ├── smtp-server-private.h
│ ├── smtp-server-recipient.c
│ ├── smtp-server-reply.c
│ ├── smtp-server-transaction.c
│ ├── smtp-server.c
│ ├── smtp-server.h
│ ├── smtp-submit-settings.c
│ ├── smtp-submit-settings.h
│ ├── smtp-submit.c
│ ├── smtp-submit.h
│ ├── smtp-syntax.c
│ ├── smtp-syntax.h
│ ├── test-bin
│ │ ├── sendmail-exit-1.sh
│ │ └── sendmail-success.sh
│ ├── test-smtp-address.c
│ ├── test-smtp-client-errors.c
│ ├── test-smtp-command-parser.c
│ ├── test-smtp-params.c
│ ├── test-smtp-payload.c
│ ├── test-smtp-reply.c
│ ├── test-smtp-server-errors.c
│ ├── test-smtp-submit.c
│ └── test-smtp-syntax.c
├── lib-sql
│ ├── Makefile.am
│ ├── driver-cassandra.c
│ ├── driver-mysql.c
│ ├── driver-pgsql.c
│ ├── driver-sqlite.c
│ ├── driver-sqlpool.c
│ ├── driver-test.c
│ ├── driver-test.h
│ ├── sql-api-private.h
│ ├── sql-api.c
│ ├── sql-api.h
│ ├── test-sql-sqlite.c
│ └── test-sql.c
├── lib-ssl-iostream
│ ├── Makefile.am
│ ├── dovecot-openssl-common.c
│ ├── dovecot-openssl-common.h
│ ├── iostream-openssl-common.c
│ ├── iostream-openssl-context.c
│ ├── iostream-openssl.c
│ ├── iostream-openssl.h
│ ├── iostream-ssl-context-cache.c
│ ├── iostream-ssl-private.h
│ ├── iostream-ssl-test.c
│ ├── iostream-ssl-test.h
│ ├── iostream-ssl.c
│ ├── iostream-ssl.h
│ ├── istream-openssl.c
│ ├── ostream-openssl.c
│ ├── ssl-settings.c
│ ├── ssl-settings.h
│ └── test-iostream-ssl.c
├── lib-storage
│ ├── Makefile.am
│ ├── fail-mail-storage.c
│ ├── fail-mail-storage.h
│ ├── fail-mail.c
│ ├── fail-mailbox.c
│ ├── index
│ │ ├── Makefile.am
│ │ ├── dbox-common
│ │ │ ├── Makefile.am
│ │ │ ├── dbox-attachment.c
│ │ │ ├── dbox-attachment.h
│ │ │ ├── dbox-file-fix.c
│ │ │ ├── dbox-file.c
│ │ │ ├── dbox-file.h
│ │ │ ├── dbox-mail.c
│ │ │ ├── dbox-mail.h
│ │ │ ├── dbox-save.c
│ │ │ ├── dbox-save.h
│ │ │ ├── dbox-storage.c
│ │ │ └── dbox-storage.h
│ │ ├── dbox-multi
│ │ │ ├── Makefile.am
│ │ │ ├── mdbox-deleted-storage.c
│ │ │ ├── mdbox-file.c
│ │ │ ├── mdbox-file.h
│ │ │ ├── mdbox-mail.c
│ │ │ ├── mdbox-map-private.h
│ │ │ ├── mdbox-map.c
│ │ │ ├── mdbox-map.h
│ │ │ ├── mdbox-purge.c
│ │ │ ├── mdbox-save.c
│ │ │ ├── mdbox-settings.c
│ │ │ ├── mdbox-settings.h
│ │ │ ├── mdbox-storage-rebuild.c
│ │ │ ├── mdbox-storage-rebuild.h
│ │ │ ├── mdbox-storage.c
│ │ │ ├── mdbox-storage.h
│ │ │ ├── mdbox-sync.c
│ │ │ └── mdbox-sync.h
│ │ ├── dbox-single
│ │ │ ├── Makefile.am
│ │ │ ├── sdbox-copy.c
│ │ │ ├── sdbox-file.c
│ │ │ ├── sdbox-file.h
│ │ │ ├── sdbox-mail.c
│ │ │ ├── sdbox-save.c
│ │ │ ├── sdbox-settings.c
│ │ │ ├── sdbox-settings.h
│ │ │ ├── sdbox-storage.c
│ │ │ ├── sdbox-storage.h
│ │ │ ├── sdbox-sync-rebuild.c
│ │ │ ├── sdbox-sync.c
│ │ │ └── sdbox-sync.h
│ │ ├── imapc
│ │ │ ├── Makefile.am
│ │ │ ├── imapc-attribute.c
│ │ │ ├── imapc-attribute.h
│ │ │ ├── imapc-list.c
│ │ │ ├── imapc-list.h
│ │ │ ├── imapc-mail-fetch.c
│ │ │ ├── imapc-mail.c
│ │ │ ├── imapc-mail.h
│ │ │ ├── imapc-mailbox.c
│ │ │ ├── imapc-save.c
│ │ │ ├── imapc-search.c
│ │ │ ├── imapc-search.h
│ │ │ ├── imapc-storage.c
│ │ │ ├── imapc-storage.h
│ │ │ ├── imapc-sync.c
│ │ │ └── imapc-sync.h
│ │ ├── index-attachment.c
│ │ ├── index-attachment.h
│ │ ├── index-attribute.c
│ │ ├── index-mail-binary.c
│ │ ├── index-mail-headers.c
│ │ ├── index-mail.c
│ │ ├── index-mail.h
│ │ ├── index-mailbox-size.c
│ │ ├── index-mailbox-size.h
│ │ ├── index-pop3-uidl.c
│ │ ├── index-pop3-uidl.h
│ │ ├── index-rebuild.c
│ │ ├── index-rebuild.h
│ │ ├── index-search-mime.c
│ │ ├── index-search-private.h
│ │ ├── index-search-result.c
│ │ ├── index-search-result.h
│ │ ├── index-search.c
│ │ ├── index-sort-private.h
│ │ ├── index-sort-string.c
│ │ ├── index-sort.c
│ │ ├── index-sort.h
│ │ ├── index-status.c
│ │ ├── index-storage.c
│ │ ├── index-storage.h
│ │ ├── index-sync-changes.c
│ │ ├── index-sync-changes.h
│ │ ├── index-sync-private.h
│ │ ├── index-sync-pvt.c
│ │ ├── index-sync-search.c
│ │ ├── index-sync.c
│ │ ├── index-thread-finish.c
│ │ ├── index-thread-links.c
│ │ ├── index-thread-private.h
│ │ ├── index-thread.c
│ │ ├── index-transaction.c
│ │ ├── istream-mail.c
│ │ ├── istream-mail.h
│ │ ├── maildir
│ │ │ ├── Makefile.am
│ │ │ ├── maildir-copy.c
│ │ │ ├── maildir-filename-flags.c
│ │ │ ├── maildir-filename-flags.h
│ │ │ ├── maildir-filename.c
│ │ │ ├── maildir-filename.h
│ │ │ ├── maildir-keywords.c
│ │ │ ├── maildir-keywords.h
│ │ │ ├── maildir-mail.c
│ │ │ ├── maildir-save.c
│ │ │ ├── maildir-settings.c
│ │ │ ├── maildir-settings.h
│ │ │ ├── maildir-storage.c
│ │ │ ├── maildir-storage.h
│ │ │ ├── maildir-sync-index.c
│ │ │ ├── maildir-sync.c
│ │ │ ├── maildir-sync.h
│ │ │ ├── maildir-uidlist.c
│ │ │ ├── maildir-uidlist.h
│ │ │ └── maildir-util.c
│ │ ├── mbox
│ │ │ ├── Makefile.am
│ │ │ ├── istream-raw-mbox.c
│ │ │ ├── istream-raw-mbox.h
│ │ │ ├── mbox-file.c
│ │ │ ├── mbox-file.h
│ │ │ ├── mbox-lock.c
│ │ │ ├── mbox-lock.h
│ │ │ ├── mbox-mail.c
│ │ │ ├── mbox-md5-all.c
│ │ │ ├── mbox-md5-apop3d.c
│ │ │ ├── mbox-md5.h
│ │ │ ├── mbox-save.c
│ │ │ ├── mbox-settings.c
│ │ │ ├── mbox-settings.h
│ │ │ ├── mbox-storage.c
│ │ │ ├── mbox-storage.h
│ │ │ ├── mbox-sync-list-index.c
│ │ │ ├── mbox-sync-parse.c
│ │ │ ├── mbox-sync-private.h
│ │ │ ├── mbox-sync-rewrite.c
│ │ │ ├── mbox-sync-update.c
│ │ │ └── mbox-sync.c
│ │ ├── pop3c
│ │ │ ├── Makefile.am
│ │ │ ├── pop3c-client.c
│ │ │ ├── pop3c-client.h
│ │ │ ├── pop3c-mail.c
│ │ │ ├── pop3c-settings.c
│ │ │ ├── pop3c-settings.h
│ │ │ ├── pop3c-storage.c
│ │ │ ├── pop3c-storage.h
│ │ │ ├── pop3c-sync.c
│ │ │ └── pop3c-sync.h
│ │ ├── raw
│ │ │ ├── Makefile.am
│ │ │ ├── raw-mail.c
│ │ │ ├── raw-storage.c
│ │ │ ├── raw-storage.h
│ │ │ ├── raw-sync.c
│ │ │ └── raw-sync.h
│ │ └── shared
│ │ │ ├── Makefile.am
│ │ │ ├── shared-list.c
│ │ │ ├── shared-storage.c
│ │ │ └── shared-storage.h
│ ├── lang-user.c
│ ├── lang-user.h
│ ├── list
│ │ ├── Makefile.am
│ │ ├── mail-storage-list-index-rebuild.c
│ │ ├── mailbox-list-delete.c
│ │ ├── mailbox-list-delete.h
│ │ ├── mailbox-list-fs-flags.c
│ │ ├── mailbox-list-fs-iter.c
│ │ ├── mailbox-list-fs.c
│ │ ├── mailbox-list-fs.h
│ │ ├── mailbox-list-index-backend.c
│ │ ├── mailbox-list-index-iter.c
│ │ ├── mailbox-list-index-notify.c
│ │ ├── mailbox-list-index-status.c
│ │ ├── mailbox-list-index-storage.h
│ │ ├── mailbox-list-index-sync.c
│ │ ├── mailbox-list-index-sync.h
│ │ ├── mailbox-list-index.c
│ │ ├── mailbox-list-index.h
│ │ ├── mailbox-list-iter-private.h
│ │ ├── mailbox-list-iter.c
│ │ ├── mailbox-list-maildir-iter.c
│ │ ├── mailbox-list-maildir.c
│ │ ├── mailbox-list-maildir.h
│ │ ├── mailbox-list-none.c
│ │ ├── mailbox-list-notify-tree.c
│ │ ├── mailbox-list-notify-tree.h
│ │ ├── mailbox-list-subscriptions.c
│ │ ├── mailbox-list-subscriptions.h
│ │ ├── subscription-file.c
│ │ └── subscription-file.h
│ ├── mail-autoexpunge.c
│ ├── mail-autoexpunge.h
│ ├── mail-copy.c
│ ├── mail-copy.h
│ ├── mail-duplicate.c
│ ├── mail-duplicate.h
│ ├── mail-error.c
│ ├── mail-error.h
│ ├── mail-lua.c
│ ├── mail-namespace.c
│ ├── mail-namespace.h
│ ├── mail-search-args-cmdline.c
│ ├── mail-search-args-imap.c
│ ├── mail-search-args-simplify.c
│ ├── mail-search-build.c
│ ├── mail-search-build.h
│ ├── mail-search-mime-build.c
│ ├── mail-search-mime-build.h
│ ├── mail-search-mime-register.c
│ ├── mail-search-mime-register.h
│ ├── mail-search-mime.c
│ ├── mail-search-mime.h
│ ├── mail-search-parser-cmdline.c
│ ├── mail-search-parser-imap.c
│ ├── mail-search-parser-private.h
│ ├── mail-search-parser.c
│ ├── mail-search-parser.h
│ ├── mail-search-register-human.c
│ ├── mail-search-register-imap.c
│ ├── mail-search-register.c
│ ├── mail-search-register.h
│ ├── mail-search.c
│ ├── mail-search.h
│ ├── mail-storage-hooks.c
│ ├── mail-storage-hooks.h
│ ├── mail-storage-lua-private.h
│ ├── mail-storage-lua.c
│ ├── mail-storage-lua.h
│ ├── mail-storage-private.h
│ ├── mail-storage-register.c
│ ├── mail-storage-service.c
│ ├── mail-storage-service.h
│ ├── mail-storage-settings.c
│ ├── mail-storage-settings.h
│ ├── mail-storage.c
│ ├── mail-storage.h
│ ├── mail-thread.c
│ ├── mail-thread.h
│ ├── mail-user-lua.c
│ ├── mail-user.c
│ ├── mail-user.h
│ ├── mail.c
│ ├── mailbox-attribute-internal.c
│ ├── mailbox-attribute-internal.h
│ ├── mailbox-attribute-lua.c
│ ├── mailbox-attribute-private.h
│ ├── mailbox-attribute.c
│ ├── mailbox-attribute.h
│ ├── mailbox-get.c
│ ├── mailbox-guid-cache.c
│ ├── mailbox-guid-cache.h
│ ├── mailbox-header.c
│ ├── mailbox-keywords.c
│ ├── mailbox-list-iter.h
│ ├── mailbox-list-notify.c
│ ├── mailbox-list-notify.h
│ ├── mailbox-list-private.h
│ ├── mailbox-list-register.c
│ ├── mailbox-list.c
│ ├── mailbox-list.h
│ ├── mailbox-lua.c
│ ├── mailbox-recent-flags.c
│ ├── mailbox-recent-flags.h
│ ├── mailbox-search-result-private.h
│ ├── mailbox-search-result.c
│ ├── mailbox-tree.c
│ ├── mailbox-tree.h
│ ├── mailbox-uidvalidity.c
│ ├── mailbox-uidvalidity.h
│ ├── mailbox-watch.c
│ ├── mailbox-watch.h
│ ├── test-mail-search-args-imap.c
│ ├── test-mail-search-args-simplify.c
│ ├── test-mail-storage-common.c
│ ├── test-mail-storage-common.h
│ ├── test-mail-storage.c
│ ├── test-mail.c
│ ├── test-mailbox-get.c
│ └── test-mailbox-list.c
├── lib-test
│ ├── Makefile.am
│ ├── fuzzer.c
│ ├── fuzzer.h
│ ├── ostream-final-trickle.c
│ ├── ostream-final-trickle.h
│ ├── test-common.c
│ ├── test-common.h
│ ├── test-istream.c
│ ├── test-ostream.c
│ ├── test-subprocess.c
│ └── test-subprocess.h
├── lib-var-expand-crypt
│ ├── Makefile.am
│ ├── test-var-expand-crypt.c
│ └── var-expand-crypt.c
├── lib-var-expand
│ ├── Makefile.am
│ ├── expansion-filter-crypt.c
│ ├── expansion-filter-if.c
│ ├── expansion-filter.c
│ ├── expansion-parameter.c
│ ├── expansion-program.c
│ ├── expansion-statement.c
│ ├── expansion.h
│ ├── test-var-expand.c
│ ├── var-expand-lexer.l
│ ├── var-expand-parser-private.h
│ ├── var-expand-parser.y
│ ├── var-expand-private.h
│ ├── var-expand.c
│ └── var-expand.h
├── lib
│ ├── Makefile.am
│ ├── aqueue.c
│ ├── aqueue.h
│ ├── array-decl.h
│ ├── array.c
│ ├── array.h
│ ├── askpass.c
│ ├── askpass.h
│ ├── backtrace-string.c
│ ├── backtrace-string.h
│ ├── base32.c
│ ├── base32.h
│ ├── base64.c
│ ├── base64.h
│ ├── bits.c
│ ├── bits.h
│ ├── bsearch-insert-pos.c
│ ├── bsearch-insert-pos.h
│ ├── buffer-istream.c
│ ├── buffer.c
│ ├── buffer.h
│ ├── byteorder.h
│ ├── child-wait.c
│ ├── child-wait.h
│ ├── compat.h
│ ├── connection.c
│ ├── connection.h
│ ├── cpu-count.c
│ ├── cpu-count.h
│ ├── cpu-limit.c
│ ├── cpu-limit.h
│ ├── crc32.c
│ ├── crc32.h
│ ├── data-stack.c
│ ├── data-stack.h
│ ├── doc.h
│ ├── eacces-error.c
│ ├── eacces-error.h
│ ├── env-util.c
│ ├── env-util.h
│ ├── event-filter-lexer.l
│ ├── event-filter-parser.y
│ ├── event-filter-private.h
│ ├── event-filter.c
│ ├── event-filter.h
│ ├── event-log.c
│ ├── event-log.h
│ ├── execv-const.c
│ ├── execv-const.h
│ ├── failures-private.h
│ ├── failures.c
│ ├── failures.h
│ ├── fd-util.c
│ ├── fd-util.h
│ ├── fdatasync-path.c
│ ├── fdatasync-path.h
│ ├── fdpass.c
│ ├── fdpass.h
│ ├── file-cache.c
│ ├── file-cache.h
│ ├── file-copy.c
│ ├── file-copy.h
│ ├── file-create-locked.c
│ ├── file-create-locked.h
│ ├── file-dotlock.c
│ ├── file-dotlock.h
│ ├── file-lock.c
│ ├── file-lock.h
│ ├── file-set-size.c
│ ├── file-set-size.h
│ ├── fsync-mode.h
│ ├── guid.c
│ ├── guid.h
│ ├── hash-decl.h
│ ├── hash-format.c
│ ├── hash-format.h
│ ├── hash-method.c
│ ├── hash-method.h
│ ├── hash.c
│ ├── hash.h
│ ├── hash2.c
│ ├── hash2.h
│ ├── hex-binary.c
│ ├── hex-binary.h
│ ├── hex-dec.c
│ ├── hex-dec.h
│ ├── hmac-cram-md5.c
│ ├── hmac-cram-md5.h
│ ├── hmac.c
│ ├── hmac.h
│ ├── home-expand.c
│ ├── home-expand.h
│ ├── hook-build.c
│ ├── hook-build.h
│ ├── hostpid.c
│ ├── hostpid.h
│ ├── imem.c
│ ├── imem.h
│ ├── ioloop-epoll.c
│ ├── ioloop-iolist.c
│ ├── ioloop-iolist.h
│ ├── ioloop-kqueue.c
│ ├── ioloop-notify-fd.c
│ ├── ioloop-notify-fd.h
│ ├── ioloop-notify-inotify.c
│ ├── ioloop-notify-kqueue.c
│ ├── ioloop-notify-none.c
│ ├── ioloop-poll.c
│ ├── ioloop-private.h
│ ├── ioloop-select.c
│ ├── ioloop.c
│ ├── ioloop.h
│ ├── iostream-multiplex-private.h
│ ├── iostream-private.h
│ ├── iostream-proxy.c
│ ├── iostream-proxy.h
│ ├── iostream-pump.c
│ ├── iostream-pump.h
│ ├── iostream-rawlog-private.h
│ ├── iostream-rawlog.c
│ ├── iostream-rawlog.h
│ ├── iostream-temp.c
│ ├── iostream-temp.h
│ ├── iostream.c
│ ├── iostream.h
│ ├── ipwd.c
│ ├── ipwd.h
│ ├── iso8601-date.c
│ ├── iso8601-date.h
│ ├── istream-base64-decoder.c
│ ├── istream-base64-encoder.c
│ ├── istream-base64.h
│ ├── istream-callback.c
│ ├── istream-callback.h
│ ├── istream-chain.c
│ ├── istream-chain.h
│ ├── istream-concat.c
│ ├── istream-concat.h
│ ├── istream-crlf.c
│ ├── istream-crlf.h
│ ├── istream-data.c
│ ├── istream-failure-at.c
│ ├── istream-failure-at.h
│ ├── istream-file-private.h
│ ├── istream-file.c
│ ├── istream-hash.c
│ ├── istream-hash.h
│ ├── istream-limit.c
│ ├── istream-multiplex.c
│ ├── istream-multiplex.h
│ ├── istream-nonuls.c
│ ├── istream-nonuls.h
│ ├── istream-noop.c
│ ├── istream-private.h
│ ├── istream-rawlog.c
│ ├── istream-rawlog.h
│ ├── istream-seekable.c
│ ├── istream-seekable.h
│ ├── istream-sized.c
│ ├── istream-sized.h
│ ├── istream-tee.c
│ ├── istream-tee.h
│ ├── istream-timeout.c
│ ├── istream-timeout.h
│ ├── istream-try.c
│ ├── istream-try.h
│ ├── istream-unix.c
│ ├── istream-unix.h
│ ├── istream.c
│ ├── istream.h
│ ├── lib-event-private.h
│ ├── lib-event.c
│ ├── lib-event.h
│ ├── lib-signals.c
│ ├── lib-signals.h
│ ├── lib.c
│ ├── lib.h
│ ├── llist.h
│ ├── log-throttle.c
│ ├── log-throttle.h
│ ├── macros.h
│ ├── malloc-overflow.h
│ ├── md4.c
│ ├── md4.h
│ ├── md5.c
│ ├── md5.h
│ ├── memarea.c
│ ├── memarea.h
│ ├── mempool-allocfree.c
│ ├── mempool-alloconly.c
│ ├── mempool-datastack.c
│ ├── mempool-null.c
│ ├── mempool-system.c
│ ├── mempool-unsafe-datastack.c
│ ├── mempool.c
│ ├── mempool.h
│ ├── mkdir-parents.c
│ ├── mkdir-parents.h
│ ├── mmap-anon.c
│ ├── mmap-util.c
│ ├── mmap-util.h
│ ├── module-context.h
│ ├── module-dir.c
│ ├── module-dir.h
│ ├── mountpoint.c
│ ├── mountpoint.h
│ ├── net.c
│ ├── net.h
│ ├── nfs-workarounds.c
│ ├── nfs-workarounds.h
│ ├── numpack.c
│ ├── numpack.h
│ ├── ostream-buffer.c
│ ├── ostream-failure-at.c
│ ├── ostream-failure-at.h
│ ├── ostream-file-private.h
│ ├── ostream-file.c
│ ├── ostream-hash.c
│ ├── ostream-hash.h
│ ├── ostream-multiplex.c
│ ├── ostream-multiplex.h
│ ├── ostream-null.c
│ ├── ostream-null.h
│ ├── ostream-private.h
│ ├── ostream-rawlog.c
│ ├── ostream-rawlog.h
│ ├── ostream-unix.c
│ ├── ostream-unix.h
│ ├── ostream-wrapper.c
│ ├── ostream-wrapper.h
│ ├── ostream.c
│ ├── ostream.h
│ ├── path-util.c
│ ├── path-util.h
│ ├── pkcs5.c
│ ├── pkcs5.h
│ ├── primes.c
│ ├── primes.h
│ ├── printf-format-fix.c
│ ├── printf-format-fix.h
│ ├── priorityq.c
│ ├── priorityq.h
│ ├── process-stat.c
│ ├── process-stat.h
│ ├── process-title.c
│ ├── process-title.h
│ ├── punycode.c
│ ├── punycode.h
│ ├── rand.c
│ ├── randgen.c
│ ├── randgen.h
│ ├── read-full.c
│ ├── read-full.h
│ ├── restrict-access.c
│ ├── restrict-access.h
│ ├── restrict-process-size.c
│ ├── restrict-process-size.h
│ ├── safe-memset.c
│ ├── safe-memset.h
│ ├── safe-mkdir.c
│ ├── safe-mkdir.h
│ ├── safe-mkstemp.c
│ ├── safe-mkstemp.h
│ ├── sendfile-util.c
│ ├── sendfile-util.h
│ ├── seq-range-array.c
│ ├── seq-range-array.h
│ ├── seq-set-builder.c
│ ├── seq-set-builder.h
│ ├── sha-common.h
│ ├── sha1.c
│ ├── sha1.h
│ ├── sha2.c
│ ├── sha2.h
│ ├── sha3.c
│ ├── sha3.h
│ ├── sleep.c
│ ├── sleep.h
│ ├── sort.c
│ ├── sort.h
│ ├── stats-dist.c
│ ├── stats-dist.h
│ ├── str-find.c
│ ├── str-find.h
│ ├── str-parse.c
│ ├── str-parse.h
│ ├── str-sanitize.c
│ ├── str-sanitize.h
│ ├── str-table.c
│ ├── str-table.h
│ ├── str.c
│ ├── str.h
│ ├── strescape.c
│ ├── strescape.h
│ ├── strfuncs.c
│ ├── strfuncs.h
│ ├── strnum.c
│ ├── strnum.h
│ ├── test-aqueue.c
│ ├── test-array.c
│ ├── test-backtrace.c
│ ├── test-base32.c
│ ├── test-base64.c
│ ├── test-bits.c
│ ├── test-bsearch-insert-pos.c
│ ├── test-buffer-istream.c
│ ├── test-buffer.c
│ ├── test-byteorder.c
│ ├── test-connection.c
│ ├── test-cpu-limit.c
│ ├── test-crc32.c
│ ├── test-data-stack.c
│ ├── test-env-util.c
│ ├── test-event-category-register.c
│ ├── test-event-filter-expr.c
│ ├── test-event-filter-merge.c
│ ├── test-event-filter-parser.c
│ ├── test-event-filter.c
│ ├── test-event-flatten.c
│ ├── test-event-log.c
│ ├── test-failures.c
│ ├── test-fd-util.c
│ ├── test-file-cache.c
│ ├── test-file-create-locked.c
│ ├── test-guid.c
│ ├── test-hash-format.c
│ ├── test-hash-method.c
│ ├── test-hash.c
│ ├── test-hex-binary.c
│ ├── test-hmac.c
│ ├── test-imem.c
│ ├── test-ioloop.c
│ ├── test-iostream-proxy.c
│ ├── test-iostream-pump.c
│ ├── test-iostream-temp.c
│ ├── test-iso8601-date.c
│ ├── test-istream-base64-decoder.c
│ ├── test-istream-base64-encoder.c
│ ├── test-istream-chain.c
│ ├── test-istream-concat.c
│ ├── test-istream-crlf.c
│ ├── test-istream-failure-at.c
│ ├── test-istream-multiplex.c
│ ├── test-istream-noop.c
│ ├── test-istream-seekable.c
│ ├── test-istream-sized.c
│ ├── test-istream-tee.c
│ ├── test-istream-try.c
│ ├── test-istream-unix.c
│ ├── test-istream.c
│ ├── test-lib-event.c
│ ├── test-lib-signals.c
│ ├── test-lib.c
│ ├── test-lib.h
│ ├── test-lib.inc
│ ├── test-llist.c
│ ├── test-log-throttle.c
│ ├── test-macros.c
│ ├── test-malloc-overflow.c
│ ├── test-memarea.c
│ ├── test-mempool-allocfree.c
│ ├── test-mempool-alloconly.c
│ ├── test-mempool.c
│ ├── test-multiplex.c
│ ├── test-net.c
│ ├── test-numpack.c
│ ├── test-ostream-buffer.c
│ ├── test-ostream-failure-at.c
│ ├── test-ostream-file.c
│ ├── test-ostream-multiplex.c
│ ├── test-path-util.c
│ ├── test-pkcs5.c
│ ├── test-primes.c
│ ├── test-printf-format-fix.c
│ ├── test-priorityq.c
│ ├── test-punycode.c
│ ├── test-random.c
│ ├── test-seq-range-array.c
│ ├── test-seq-set-builder.c
│ ├── test-stats-dist.c
│ ├── test-str-find.c
│ ├── test-str-parse.c
│ ├── test-str-sanitize.c
│ ├── test-str-table.c
│ ├── test-str.c
│ ├── test-strescape.c
│ ├── test-strfuncs.c
│ ├── test-strnum.c
│ ├── test-time-util.c
│ ├── test-unichar.c
│ ├── test-uri.c
│ ├── test-utc-mktime.c
│ ├── test-wildcard-match.c
│ ├── time-util.c
│ ├── time-util.h
│ ├── unichar.c
│ ├── unichar.h
│ ├── unicodemap.pl
│ ├── unix-socket-create.c
│ ├── unix-socket-create.h
│ ├── unlink-directory.c
│ ├── unlink-directory.h
│ ├── unlink-old-files.c
│ ├── unlink-old-files.h
│ ├── uri-util.c
│ ├── uri-util.h
│ ├── utc-mktime.c
│ ├── utc-mktime.h
│ ├── utc-offset.c
│ ├── utc-offset.h
│ ├── wildcard-match.c
│ ├── wildcard-match.h
│ ├── write-full.c
│ └── write-full.h
├── lmtp
│ ├── Makefile.am
│ ├── lmtp-client.c
│ ├── lmtp-client.h
│ ├── lmtp-commands.c
│ ├── lmtp-commands.h
│ ├── lmtp-common.h
│ ├── lmtp-local.c
│ ├── lmtp-local.h
│ ├── lmtp-proxy.c
│ ├── lmtp-proxy.h
│ ├── lmtp-recipient.c
│ ├── lmtp-recipient.h
│ ├── lmtp-settings.c
│ ├── lmtp-settings.h
│ └── main.c
├── log
│ ├── Makefile.am
│ ├── doveadm-connection.c
│ ├── doveadm-connection.h
│ ├── log-connection.c
│ ├── log-connection.h
│ ├── log-settings.c
│ └── main.c
├── login-common
│ ├── Makefile.am
│ ├── client-common-auth.c
│ ├── client-common.c
│ ├── client-common.h
│ ├── login-common.h
│ ├── login-proxy-state.c
│ ├── login-proxy-state.h
│ ├── login-proxy.c
│ ├── login-proxy.h
│ ├── login-settings.c
│ ├── login-settings.h
│ ├── main.c
│ ├── sasl-server.c
│ └── sasl-server.h
├── master
│ ├── Makefile.am
│ ├── capabilities-posix.c
│ ├── capabilities.h
│ ├── common.h
│ ├── dup2-array.c
│ ├── dup2-array.h
│ ├── main.c
│ ├── master-client.c
│ ├── master-client.h
│ ├── master-settings.c
│ ├── master-settings.h
│ ├── service-anvil.c
│ ├── service-anvil.h
│ ├── service-listen.c
│ ├── service-listen.h
│ ├── service-log.c
│ ├── service-log.h
│ ├── service-monitor.c
│ ├── service-monitor.h
│ ├── service-process-notify.c
│ ├── service-process-notify.h
│ ├── service-process.c
│ ├── service-process.h
│ ├── service.c
│ └── service.h
├── plugins
│ ├── Makefile.am
│ ├── acl
│ │ ├── Makefile.am
│ │ ├── acl-api-private.h
│ │ ├── acl-api.c
│ │ ├── acl-api.h
│ │ ├── acl-attributes.c
│ │ ├── acl-backend-vfile-acllist.c
│ │ ├── acl-backend-vfile-update.c
│ │ ├── acl-backend-vfile.c
│ │ ├── acl-backend-vfile.h
│ │ ├── acl-backend.c
│ │ ├── acl-cache.c
│ │ ├── acl-cache.h
│ │ ├── acl-global-file.c
│ │ ├── acl-global-file.h
│ │ ├── acl-lookup-dict.c
│ │ ├── acl-lookup-dict.h
│ │ ├── acl-mailbox-list.c
│ │ ├── acl-mailbox.c
│ │ ├── acl-plugin.c
│ │ ├── acl-plugin.h
│ │ ├── acl-rights.c
│ │ ├── acl-rights.h
│ │ ├── acl-settings.c
│ │ ├── acl-settings.h
│ │ ├── acl-shared-storage.c
│ │ ├── acl-shared-storage.h
│ │ ├── acl-storage.c
│ │ ├── acl-storage.h
│ │ ├── doveadm-acl.c
│ │ └── test-acl.c
│ ├── apparmor
│ │ ├── Makefile.am
│ │ └── apparmor-plugin.c
│ ├── charset-alias
│ │ ├── Makefile.am
│ │ ├── charset-alias-plugin.c
│ │ └── charset-alias-plugin.h
│ ├── fs-compress
│ │ ├── Makefile.am
│ │ └── fs-compress.c
│ ├── fts-flatcurve
│ │ ├── Makefile.am
│ │ ├── doveadm-dump-flatcurve.c
│ │ ├── doveadm-dump-flatcurve.h
│ │ ├── doveadm-fts-flatcurve.c
│ │ ├── fts-backend-flatcurve-xapian.cc
│ │ ├── fts-backend-flatcurve-xapian.h
│ │ ├── fts-backend-flatcurve.c
│ │ ├── fts-backend-flatcurve.h
│ │ ├── fts-flatcurve-plugin.c
│ │ ├── fts-flatcurve-plugin.h
│ │ ├── fts-flatcurve-settings.c
│ │ └── fts-flatcurve-settings.h
│ ├── fts-solr
│ │ ├── Makefile.am
│ │ ├── fts-backend-solr.c
│ │ ├── fts-solr-plugin.c
│ │ ├── fts-solr-plugin.h
│ │ ├── fts-solr-settings.c
│ │ ├── fts-solr-settings.h
│ │ ├── solr-connection.c
│ │ ├── solr-connection.h
│ │ ├── solr-response.c
│ │ ├── solr-response.h
│ │ └── test-solr-response.c
│ ├── fts
│ │ ├── Makefile.am
│ │ ├── decode2text.sh
│ │ ├── doveadm-fts.c
│ │ ├── doveadm-fts.h
│ │ ├── fts-api-private.h
│ │ ├── fts-api.c
│ │ ├── fts-api.h
│ │ ├── fts-build-mail.c
│ │ ├── fts-build-mail.h
│ │ ├── fts-build-private.h
│ │ ├── fts-indexer.c
│ │ ├── fts-indexer.h
│ │ ├── fts-parser-html.c
│ │ ├── fts-parser-script.c
│ │ ├── fts-parser-tika.c
│ │ ├── fts-parser.c
│ │ ├── fts-parser.h
│ │ ├── fts-plugin.c
│ │ ├── fts-plugin.h
│ │ ├── fts-search-args.c
│ │ ├── fts-search-args.h
│ │ ├── fts-search-serialize.c
│ │ ├── fts-search-serialize.h
│ │ ├── fts-search.c
│ │ ├── fts-settings.c
│ │ ├── fts-settings.h
│ │ ├── fts-storage.c
│ │ ├── fts-storage.h
│ │ ├── fts-user.c
│ │ ├── fts-user.h
│ │ └── xml2text.c
│ ├── imap-acl
│ │ ├── Makefile.am
│ │ ├── imap-acl-plugin.c
│ │ └── imap-acl-plugin.h
│ ├── imap-quota
│ │ ├── Makefile.am
│ │ ├── imap-quota-plugin.c
│ │ └── imap-quota-plugin.h
│ ├── last-login
│ │ ├── Makefile.am
│ │ ├── last-login-plugin.c
│ │ └── last-login-plugin.h
│ ├── lazy-expunge
│ │ ├── Makefile.am
│ │ ├── lazy-expunge-plugin.c
│ │ ├── lazy-expunge-plugin.h
│ │ └── lazy-expunge-settings.c
│ ├── mail-compress
│ │ ├── Makefile.am
│ │ ├── mail-compress-plugin.c
│ │ └── mail-compress-plugin.h
│ ├── mail-crypt
│ │ ├── Makefile.am
│ │ ├── crypt-settings.c
│ │ ├── crypt-settings.h
│ │ ├── doveadm-mail-crypt.c
│ │ ├── fs-crypt.c
│ │ ├── mail-crypt-acl-plugin.c
│ │ ├── mail-crypt-common.h
│ │ ├── mail-crypt-global-key.c
│ │ ├── mail-crypt-global-key.h
│ │ ├── mail-crypt-key.c
│ │ ├── mail-crypt-key.h
│ │ ├── mail-crypt-plugin.c
│ │ ├── mail-crypt-plugin.h
│ │ ├── test-fs-crypt.c
│ │ ├── test-mail-global-key.c
│ │ └── test-mail-key.c
│ ├── mail-log
│ │ ├── Makefile.am
│ │ ├── mail-log-plugin.c
│ │ └── mail-log-plugin.h
│ ├── mail-lua
│ │ ├── Makefile.am
│ │ ├── mail-lua-plugin.c
│ │ ├── mail-lua-plugin.h
│ │ ├── mail-lua-settings.c
│ │ └── mail-lua-settings.h
│ ├── notify-status
│ │ ├── Makefile.am
│ │ └── notify-status-plugin.c
│ ├── notify
│ │ ├── Makefile.am
│ │ ├── notify-plugin-private.h
│ │ ├── notify-plugin.c
│ │ ├── notify-plugin.h
│ │ └── notify-storage.c
│ ├── pop3-migration
│ │ ├── Makefile.am
│ │ ├── pop3-migration-plugin.c
│ │ ├── pop3-migration-plugin.h
│ │ └── test-pop3-migration-plugin.c
│ ├── push-notification
│ │ ├── Makefile.am
│ │ ├── push-notification-driver-dlog.c
│ │ ├── push-notification-driver-lua.c
│ │ ├── push-notification-driver-ox.c
│ │ ├── push-notification-drivers.c
│ │ ├── push-notification-drivers.h
│ │ ├── push-notification-event-flagsclear.c
│ │ ├── push-notification-event-flagsclear.h
│ │ ├── push-notification-event-flagsset.c
│ │ ├── push-notification-event-flagsset.h
│ │ ├── push-notification-event-mailboxcreate.c
│ │ ├── push-notification-event-mailboxcreate.h
│ │ ├── push-notification-event-mailboxdelete.c
│ │ ├── push-notification-event-mailboxdelete.h
│ │ ├── push-notification-event-mailboxrename.c
│ │ ├── push-notification-event-mailboxrename.h
│ │ ├── push-notification-event-mailboxsubscribe.c
│ │ ├── push-notification-event-mailboxsubscribe.h
│ │ ├── push-notification-event-mailboxunsubscribe.c
│ │ ├── push-notification-event-mailboxunsubscribe.h
│ │ ├── push-notification-event-message-common.c
│ │ ├── push-notification-event-message-common.h
│ │ ├── push-notification-event-messageappend.c
│ │ ├── push-notification-event-messageappend.h
│ │ ├── push-notification-event-messageexpunge.c
│ │ ├── push-notification-event-messageexpunge.h
│ │ ├── push-notification-event-messagenew.c
│ │ ├── push-notification-event-messagenew.h
│ │ ├── push-notification-event-messageread.c
│ │ ├── push-notification-event-messageread.h
│ │ ├── push-notification-event-messagetrash.c
│ │ ├── push-notification-event-messagetrash.h
│ │ ├── push-notification-events-rfc5423.c
│ │ ├── push-notification-events-rfc5423.h
│ │ ├── push-notification-events.c
│ │ ├── push-notification-events.h
│ │ ├── push-notification-plugin.c
│ │ ├── push-notification-plugin.h
│ │ ├── push-notification-settings.c
│ │ ├── push-notification-settings.h
│ │ ├── push-notification-triggers.c
│ │ ├── push-notification-triggers.h
│ │ ├── push-notification-txn-mbox.c
│ │ ├── push-notification-txn-mbox.h
│ │ ├── push-notification-txn-msg.c
│ │ └── push-notification-txn-msg.h
│ ├── quota-clone
│ │ ├── Makefile.am
│ │ ├── quota-clone-plugin.c
│ │ ├── quota-clone-plugin.h
│ │ ├── quota-clone-settings.c
│ │ └── quota-clone-settings.h
│ ├── quota
│ │ ├── Makefile.am
│ │ ├── doveadm-quota.c
│ │ ├── quota-count.c
│ │ ├── quota-fs.c
│ │ ├── quota-fs.h
│ │ ├── quota-imapc.c
│ │ ├── quota-maildir.c
│ │ ├── quota-plugin.c
│ │ ├── quota-plugin.h
│ │ ├── quota-private.h
│ │ ├── quota-settings.c
│ │ ├── quota-settings.h
│ │ ├── quota-status-settings.c
│ │ ├── quota-status-settings.h
│ │ ├── quota-status.c
│ │ ├── quota-storage.c
│ │ ├── quota-util.c
│ │ ├── quota.c
│ │ ├── quota.h
│ │ ├── rquota.x
│ │ └── test-quota-util.c
│ ├── trash
│ │ ├── Makefile.am
│ │ ├── trash-plugin.c
│ │ └── trash-plugin.h
│ ├── virtual
│ │ ├── Makefile.am
│ │ ├── virtual-config.c
│ │ ├── virtual-list.c
│ │ ├── virtual-mail.c
│ │ ├── virtual-plugin.c
│ │ ├── virtual-plugin.h
│ │ ├── virtual-save.c
│ │ ├── virtual-search.c
│ │ ├── virtual-settings.c
│ │ ├── virtual-settings.h
│ │ ├── virtual-storage.c
│ │ ├── virtual-storage.h
│ │ ├── virtual-sync.c
│ │ ├── virtual-transaction.c
│ │ └── virtual-transaction.h
│ └── welcome
│ │ ├── Makefile.am
│ │ └── welcome-plugin.c
├── pop3-login
│ ├── Makefile.am
│ ├── client-authenticate.c
│ ├── client-authenticate.h
│ ├── client.c
│ ├── client.h
│ ├── pop3-login-settings.c
│ ├── pop3-proxy.c
│ └── pop3-proxy.h
├── pop3
│ ├── Makefile.am
│ ├── main.c
│ ├── pop3-client.c
│ ├── pop3-client.h
│ ├── pop3-commands.c
│ ├── pop3-commands.h
│ ├── pop3-common.h
│ ├── pop3-settings.c
│ └── pop3-settings.h
├── stats
│ ├── Makefile.am
│ ├── client-http.c
│ ├── client-http.h
│ ├── client-reader.c
│ ├── client-reader.h
│ ├── client-writer.c
│ ├── client-writer.h
│ ├── event-exporter-fmt-json.c
│ ├── event-exporter-fmt-none.c
│ ├── event-exporter-fmt-tab-text.c
│ ├── event-exporter-fmt.c
│ ├── event-exporter-transport-drop.c
│ ├── event-exporter-transport-file.c
│ ├── event-exporter-transport-http-post.c
│ ├── event-exporter-transport-log.c
│ ├── event-exporter.c
│ ├── event-exporter.h
│ ├── main.c
│ ├── stats-common.h
│ ├── stats-event-category.c
│ ├── stats-event-category.h
│ ├── stats-metrics.c
│ ├── stats-metrics.h
│ ├── stats-service-openmetrics.c
│ ├── stats-service-private.h
│ ├── stats-service.c
│ ├── stats-service.h
│ ├── stats-settings.c
│ ├── stats-settings.h
│ ├── test-client-reader.c
│ ├── test-client-writer.c
│ ├── test-stats-common.c
│ ├── test-stats-common.h
│ └── test-stats-metrics.c
├── submission-login
│ ├── Makefile.am
│ ├── client-authenticate.c
│ ├── client-authenticate.h
│ ├── client.c
│ ├── client.h
│ ├── submission-login-settings.c
│ ├── submission-login-settings.h
│ ├── submission-proxy.c
│ └── submission-proxy.h
├── submission
│ ├── Makefile.am
│ ├── main.c
│ ├── submission-backend-relay.c
│ ├── submission-backend-relay.h
│ ├── submission-backend.c
│ ├── submission-backend.h
│ ├── submission-client.c
│ ├── submission-client.h
│ ├── submission-commands.c
│ ├── submission-commands.h
│ ├── submission-common.h
│ ├── submission-recipient.c
│ ├── submission-recipient.h
│ ├── submission-settings.c
│ └── submission-settings.h
└── util
│ ├── Makefile.am
│ ├── dovecot-sysreport
│ ├── gdbhelper.c
│ ├── health-check-settings.c
│ ├── health-check.sh
│ ├── rawlog.c
│ ├── script-login.c
│ ├── script.c
│ └── test-fs.c
├── stamp.h.in
└── update-version.sh
/.clangd:
--------------------------------------------------------------------------------
1 | ---
2 | Index:
3 | StandardLibrary: true
4 | Diagnostics:
5 | UnusedIncludes: Strict
6 | ClangTidy:
7 | FastCheckFilter: None
8 | Completion:
9 | AllScopes: true
10 | InlayHints:
11 | Enabled: true
12 | BlockEnd: true
13 | DeducedTypes: true
14 | Designators: true
15 | ParameterNames: true
16 | TypeNameLimit: 24
17 | Hover:
18 | ShowAKA: true
19 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | tab_width = 8
7 | end_of_line = lf
8 | insert_final_newline = true
9 | charset = utf-8
10 | trim_trailing_whitespace = true
11 |
12 | [{*.pl,**/*.pl}]
13 | indent_style = space
14 | indent_size = 2
15 |
16 | [{*.lua,**/*.lua}]
17 | indent_style = tab
18 | indent_size = 8
19 |
20 | [{*.c,*.h,**/*.c,**/*.h,**/*.cc,**/*.hh,**/*.y,**/*.l}]
21 | indent_style = tab
22 | indent_size = 8
23 |
24 | [{Makefile,Makefile.*,**/Makefile,**/Makefile.*,NEWS}]
25 | indent_style = tab
26 | indent_size = 8
27 |
--------------------------------------------------------------------------------
/ChangeLog:
--------------------------------------------------------------------------------
1 | Please see https://github.com/dovecot/core/commits/ for history
2 |
3 | NEWS file has curated changes.
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Installation
2 | ============
3 |
4 | See [INSTALL.md](INSTALL.md) file.
5 |
6 |
7 | Configuration
8 | =============
9 |
10 | See [https://doc.dovecot.org](https://doc.dovecot.org).
11 |
12 |
13 | RFCs Implemented
14 | ================
15 |
16 | See [RFCs](https://doc.dovecot.org/latest/core/rfc.html).
17 |
18 | Contact Info
19 | ============
20 |
21 | [https://www.dovecot.org/](https://www.dovecot.org/)
22 |
23 | Please use the Dovecot mailing list dovecot@dovecot.org for questions about Dovecot. You can post to the list without subscribing, the mail then waits in a moderator queue for a while. See [https://www.dovecot.org/mailing-lists](https://www.dovecot.org/mailing-lists)
24 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | For community, we support only the latest released version. Please see https://www.dovecot.org/download for latest version.
6 |
7 | ## Reporting a Vulnerability or security issue
8 |
9 | To report vulnerabilities and other security issues, please use https://yeswehack.com/programs/dovecot or email us at [security@dovecot.org](mailto:security@dovecot.org).
10 | Please read the program scope carefully.
11 |
--------------------------------------------------------------------------------
/autogen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | autoreconf -vif
4 |
--------------------------------------------------------------------------------
/build-aux/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dovecot/core/7ed88b8e0318aa9153a38bddd038388ac5a36022/build-aux/.gitkeep
--------------------------------------------------------------------------------
/build-aux/git-version-gen:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # serial 2
4 |
5 | if test "${VERSION}" != ""; then
6 | VN="${VERSION}"
7 | elif test -s version; then
8 | VN=`cat version`
9 | elif test -e .git; then
10 | VN="0.0.0-`git rev-list --count HEAD`+`git describe --always`"
11 | git update-index -q --refresh >/dev/null 2>&1
12 | test x = x"`git diff-index --name-only HEAD --`" || VN="${VN}-dirty"
13 | else
14 | echo "Cannot determine version number">&2
15 | exit 1
16 | fi
17 |
18 | echo $VN
19 |
--------------------------------------------------------------------------------
/coccinelle/avoid-array_append-1elem.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression A,I;
3 | @@
4 |
5 | - array_append(A, I, 1)
6 | + array_push_back(A, I)
7 |
--------------------------------------------------------------------------------
/coccinelle/avoid-array_delete-1elem-0idx.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression A;
3 | @@
4 |
5 | - array_delete(A, 0, 1)
6 | + array_pop_front(A)
7 |
--------------------------------------------------------------------------------
/coccinelle/avoid-array_delete-1elem-last.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression A;
3 | @@
4 |
5 | - array_delete(A, array_count(A)-1, 1)
6 | + array_pop_back(A)
7 |
--------------------------------------------------------------------------------
/coccinelle/avoid-array_idx-0.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression A;
3 | @@
4 |
5 | - array_idx(A, 0)
6 | + array_front(A)
7 |
8 | @@
9 | expression A;
10 | @@
11 |
12 | - array_idx_modifiable(A, 0)
13 | + array_front_modifiable(A)
14 |
--------------------------------------------------------------------------------
/coccinelle/avoid-array_idx-last.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - array_idx(E, array_count(E) - 1)
6 | + array_back(E)
7 |
8 | @@
9 | expression E;
10 | @@
11 |
12 | - array_idx_modifiable(E, array_count(E) - 1)
13 | + array_back_modifiable(E)
14 |
--------------------------------------------------------------------------------
/coccinelle/avoid-array_insert-1elem-0idx.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression A,I;
3 | @@
4 |
5 | - array_insert(A, 0, I, 1)
6 | + array_push_front(A, I)
7 |
--------------------------------------------------------------------------------
/coccinelle/avoid-i_stream_read_data-0-threshold.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression e1, e2, e3;
3 | @@
4 |
5 | - i_stream_read_data(e1, e2, e3, 0)
6 | + i_stream_read_more(e1, e2, e3)
7 |
--------------------------------------------------------------------------------
/coccinelle/avoid-i_stream_read_data-minus1-threshold.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression e1, e2, e3, e4;
3 | @@
4 |
5 | - i_stream_read_data(e1, e2, e3, e4 - 1)
6 | + i_stream_read_bytes(e1, e2, e3, e4)
7 |
--------------------------------------------------------------------------------
/coccinelle/buffer-clear-safe.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | -safe_memset(buffer_get_modifiable_data(E, NULL), 0, E->used);
6 | -buffer_set_used_size(E, 0);
7 | +buffer_clear_safe(E);
8 |
--------------------------------------------------------------------------------
/coccinelle/event-set-forced-false-nop.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression event;
3 | expression cond;
4 | @@
5 |
6 | - if (cond) {
7 | - event_set_forced_debug(event,
8 | (
9 | - TRUE
10 | |
11 | - cond
12 | )
13 | - );
14 | - }
15 | + event_set_forced_debug(event, cond);
16 |
--------------------------------------------------------------------------------
/coccinelle/macros.h:
--------------------------------------------------------------------------------
1 | #define T_BEGIN
2 | #define T_END
3 | #define ARRAY_DEFINE_TYPE(x, y)
4 | #define ARRAY_TYPE(x)
5 | #define ARRAY(x)
6 | #define ATTR_NULL(x)
7 | #define ATTR_FORMAT(x, y)
8 | #define ATTR_PURE
9 | #define TRUE 1
10 | #define FALSE 0
11 | #define MODULE_CONTEXT_DEFINE(x, y)
12 | #define MODULE_CONTEXT_REQUIRE(x, y)
13 | #define MODULE_CONTEXT(x, y)
14 | #define DICT_PATH_SHARED
15 | #define HASH_TABLE(x, y)
16 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-buffer_free.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - buffer_free(&E);
7 | - }
8 | + buffer_free(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-dict_iterate_deinit.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - dict_iterate_deinit(&E);
7 | - }
8 | + dict_iterate_deinit(&E);
9 |
10 | @@
11 | expression E, error;
12 | @@
13 | - if (E != NULL) {
14 | - if (dict_iterate_deinit(&E, error) < 0) {
15 | + if (dict_iterate_deinit(&E, error) < 0) {
16 | ...
17 | - }
18 | - }
19 | + }
20 |
21 | @@
22 | expression E, error;
23 | expression block;
24 | @@
25 | - if (E != NULL) {
26 | - if (dict_iterate_deinit(&E, error) < 0)
27 | - block;
28 | - }
29 | + if (dict_iterate_deinit(&E, error) < 0)
30 | + block;
31 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-dict_transaction_rollback.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - dict_transaction_rollback(&E);
7 | - }
8 | + dict_transaction_rollback(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-file_lock_free.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - file_lock_free(&E);
7 | - }
8 | + file_lock_free(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-fs_deinit.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - fs_deinit(&E);
7 | - }
8 | + fs_deinit(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-fs_file_close.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - fs_file_close(E);
7 | - }
8 | + fs_file_close(E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-fs_file_deinit.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - fs_file_deinit(&E);
7 | - }
8 | + fs_file_deinit(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-fs_unref.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - fs_unref(&E);
7 | - }
8 | + fs_unref(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-hash_table_destroy.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (hash_table_is_created(E)) {
6 | - hash_table_destroy(&E);
7 | - }
8 | + hash_table_destroy(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-http_client_request_abort.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - http_client_request_abort(&E);
7 | - }
8 | + http_client_request_abort(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-i_close_fd.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != -1)
6 | - i_close_fd(&E);
7 | + i_close_fd(&E);
8 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-i_stream_close.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - i_stream_close(E);
7 | - }
8 | + i_stream_close(E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-i_stream_destroy.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - i_stream_destroy(&E);
7 | - }
8 | + i_stream_destroy(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-i_stream_unref.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - i_stream_unref(&E);
7 | - }
8 | + i_stream_unref(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-io_remove.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - io_remove(&E);
7 | - }
8 | + io_remove(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-io_remove_closed.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - io_remove_closed(&E);
7 | - }
8 | + io_remove_closed(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-iostream_proxy_unref.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - iostream_proxy_unref(&E);
7 | - }
8 | + iostream_proxy_unref(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-mail_html2text_deinit.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - mail_html2text_deinit(&E);
7 | - }
8 | + mail_html2text_deinit(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-mailbox_header_lookup_unref.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - mailbox_header_lookup_unref(&E);
7 | - }
8 | + mailbox_header_lookup_unref(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-o_stream_close.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - o_stream_close(E);
7 | - }
8 | + o_stream_close(E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-o_stream_destroy.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - o_stream_destroy(&E);
7 | - }
8 | + o_stream_destroy(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-o_stream_unref.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - o_stream_unref(&E);
7 | - }
8 | + o_stream_unref(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-pool_unref.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - pool_unref(&E);
7 | - }
8 | + pool_unref(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-ssl_iostream_destroy.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - ssl_iostream_destroy(&E);
7 | - }
8 | + ssl_iostream_destroy(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-str_free.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - str_free(&E);
7 | - }
8 | + str_free(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/null-nop-timeout_remove.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | - if (E != NULL) {
6 | - timeout_remove(&E);
7 | - }
8 | + timeout_remove(&E);
9 |
--------------------------------------------------------------------------------
/coccinelle/random-misuse.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression E;
3 | @@
4 |
5 | -i_rand() % (E)
6 | +i_rand_limit(E)
7 |
8 | @@
9 | expression E;
10 | @@
11 |
12 | -i_rand() % E
13 | +i_rand_limit(E)
14 |
--------------------------------------------------------------------------------
/coccinelle/str_begins-length-var.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression e1, e2;
3 | identifier i2;
4 | @@
5 |
6 | i2 = strlen(e2)
7 | ...
8 | - strncmp(e1, e2, i2) == 0
9 | + str_begins(e1, e2)
10 |
11 | @@
12 | expression e1, e2;
13 | identifier i2;
14 | @@
15 |
16 | i2 = strlen(e2)
17 | ...
18 | - strncmp(e1, e2, i2) != 0
19 | + !str_begins(e1, e2)
20 |
21 | @@
22 | expression e1, e2;
23 | identifier i1;
24 | @@
25 |
26 | i1 = strlen(e1)
27 | ...
28 | - strncmp(e1, e2, i1) == 0
29 | + str_begins(e2, e1)
30 |
31 | @@
32 | expression e1, e2;
33 | identifier i1;
34 | @@
35 |
36 | i1 = strlen(e1)
37 | ...
38 | - strncmp(e1, e2, i1) != 0
39 | + !str_begins(e2, e1)
40 |
--------------------------------------------------------------------------------
/coccinelle/str_begins-strlen.cocci:
--------------------------------------------------------------------------------
1 | @@
2 | expression e1, e2;
3 | @@
4 |
5 | - strncmp(e1, e2, strlen(e2)) == 0
6 | + str_begins(e1, e2)
7 |
8 | @@
9 | expression e1, e2;
10 | @@
11 |
12 | - strncmp(e1, e2, strlen(e2)) != 0
13 | + !str_begins(e1, e2)
14 |
15 | @@
16 | expression e1, e2;
17 | @@
18 |
19 | - strncmp(e1, e2, strlen(e1)) == 0
20 | + str_begins(e2, e1)
21 |
22 | @@
23 | expression e1, e2;
24 | @@
25 |
26 | - strncmp(e1, e2, strlen(e1)) != 0
27 | + !str_begins(e2, e1)
28 |
--------------------------------------------------------------------------------
/doc/dovecot-openssl.cnf:
--------------------------------------------------------------------------------
1 | [ req ]
2 | default_bits = 2048
3 | encrypt_key = yes
4 | distinguished_name = req_dn
5 | x509_extensions = cert_type
6 | prompt = no
7 |
8 | [ req_dn ]
9 | # country (2 letter code)
10 | #C=FI
11 |
12 | # State or Province Name (full name)
13 | #ST=
14 |
15 | # Locality Name (eg. city)
16 | #L=Helsinki
17 |
18 | # Organization (eg. company)
19 | #O=Dovecot
20 |
21 | # Organizational Unit Name (eg. section)
22 | OU=IMAP server
23 |
24 | # Common Name (*.example.com is also possible)
25 | CN=imap.example.com
26 |
27 | # E-mail contact
28 | emailAddress=postmaster@example.com
29 |
30 | [ cert_type ]
31 | nsCertType = server
32 |
--------------------------------------------------------------------------------
/doc/index.html.in:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Dovecot Documentation
12 |
13 | Redirecting to https://@DOVECOT_ASSET_URL@/latest/...
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/doc/man/Makefile.am:
--------------------------------------------------------------------------------
1 | static_mans = \
2 | deliver.1 \
3 | doveadm-backup.1 \
4 | doveadm-config.1 \
5 | doveadm-copy.1 \
6 | doveadm-reload.1 \
7 | doveadm-stop.1
8 |
9 | dist_man1_MANS := $(wildcard *.1)
10 | dist_man7_MANS := $(wildcard *.7)
11 |
12 | distclean-local:
13 | for page in *.1 *.7; do \
14 | if ! echo "$(static_mans)" | grep -qF "$$page"; then \
15 | rm -f $$page; \
16 | fi \
17 | done
18 |
--------------------------------------------------------------------------------
/doc/man/deliver.1:
--------------------------------------------------------------------------------
1 | .so man1/dovecot-lda.1
--------------------------------------------------------------------------------
/doc/man/doveadm-config.1:
--------------------------------------------------------------------------------
1 | .so man1/doveconf.1
--------------------------------------------------------------------------------
/doc/man/doveadm-reload.1:
--------------------------------------------------------------------------------
1 | .so man1/doveadm.1
--------------------------------------------------------------------------------
/doc/man/doveadm-stop.1:
--------------------------------------------------------------------------------
1 | .so man1/doveadm.1
--------------------------------------------------------------------------------
/dovecot.socket:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Dovecot IMAP/POP3 email server activation socket
3 |
4 | [Socket]
5 | #dovecot expects separate IPv4 and IPv6 sockets
6 | BindIPv6Only=ipv6-only
7 | ListenStream=0.0.0.0:143
8 | ListenStream=[::]:143
9 | ListenStream=0.0.0.0:993
10 | ListenStream=[::]:993
11 | KeepAlive=true
12 |
13 | [Install]
14 | WantedBy=sockets.target
15 |
16 |
--------------------------------------------------------------------------------
/m4/arc4random.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_ARC4RANDOM], [
2 | AC_ARG_WITH([libbsd], AS_HELP_STRING(
3 | [--with-libbsd],
4 | [Use libbsd (default is no)]
5 | ), [want_libbsd=$withval], [want_libbsd=no])
6 | AC_CHECK_FUNC([arc4random_buf], AC_DEFINE([HAVE_ARC4RANDOM], [1], [Define this if you have arc4random_buf()]), [
7 | AS_IF([test "$want_libbsd" = yes], [
8 | AC_CHECK_LIB([bsd], [arc4random_buf], [
9 | LIBS="$LIBS -lbsd"
10 | AC_DEFINE([HAVE_ARC4RANDOM], [1], [Define this if you have arc4random_buf()])
11 | AC_DEFINE([HAVE_LIBBSD], [1], [Define this if you have libbsd])
12 | ])
13 | ])
14 | ])
15 | ])
16 |
--------------------------------------------------------------------------------
/m4/crypt.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_CRYPT], [
2 | AC_CHECK_FUNC(crypt,, [
3 | AC_CHECK_LIB(crypt, crypt, [
4 | AUTH_LIBS="-lcrypt $AUTH_LIBS"
5 | CRYPT_LIBS="-lcrypt"
6 | ], [
7 | AC_MSG_ERROR([crypt() wasn't found])
8 | ])
9 | ])
10 | AC_SUBST(CRYPT_LIBS)
11 | ])
12 |
--------------------------------------------------------------------------------
/m4/dirent_dtype.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_DIRENT_DTYPE], [
2 | dnl * Do we have struct dirent->d_type
3 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4 | #include
5 | ]], [[
6 | struct dirent d;
7 | d.d_type = DT_DIR;
8 | ]])],[
9 | AC_DEFINE(HAVE_DIRENT_D_TYPE,, [Define if you have struct dirent->d_type])
10 | ],[])
11 | ])
12 |
--------------------------------------------------------------------------------
/m4/dovecot_pro.m4:
--------------------------------------------------------------------------------
1 | dnl Sets defines for the pro edition
2 |
3 | AC_DEFUN([SET_PRO_DEFINES], [
4 | AC_DEFINE_UNQUOTED(DOVECOT_NAME, "$PACKAGE_NAME Pro", [Dovecot name])
5 | AC_DEFINE_UNQUOTED(DOVECOT_EDITION, "Pro", [Dovecot edition])
6 |
7 | AC_DEFINE([DOVECOT_PRO_EDITION],, [Define this if you want Dovecot Pro defaults])
8 | ])
9 |
--------------------------------------------------------------------------------
/m4/faccessat2.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_FACCESSAT2], [
2 | dnl * Do we have the syscall faccessat2
3 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4 | #include
5 | ]], [[
6 | int syscall = __NR_faccessat2;
7 | ]])],[
8 | AC_DEFINE(HAVE_FACCESSAT2,, [Define if we have syscall faccessat2])
9 | ],[])
10 | ])
11 |
--------------------------------------------------------------------------------
/m4/gmtime_tm_gmtoff.m4:
--------------------------------------------------------------------------------
1 | dnl * do we have tm_gmtoff
2 | AC_DEFUN([DOVECOT_TM_GMTOFF], [
3 | AC_MSG_CHECKING([for tm_gmtoff])
4 | AC_CACHE_VAL(i_cv_field_tm_gmtoff,
5 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
6 | #include ]],
7 | [[struct tm *tm; return tm->tm_gmtoff;]])],
8 | [i_cv_field_tm_gmtoff=yes],
9 | [i_cv_field_tm_gmtoff=no])])
10 | AS_IF([test $i_cv_field_tm_gmtoff = yes], [
11 | AC_DEFINE(HAVE_TM_GMTOFF,, [Define if you have struct tm->tm_gmtoff])
12 | ])
13 | AC_MSG_RESULT($i_cv_field_tm_gmtoff)
14 | ])
15 |
--------------------------------------------------------------------------------
/m4/iovec.m4:
--------------------------------------------------------------------------------
1 | dnl * do we have struct iovec
2 | AC_DEFUN([DOVECOT_IOVEC], [
3 | AC_CACHE_CHECK([for struct iovec], i_cv_struct_iovec,
4 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5 | #include
6 | #include
7 | #include ]],
8 | [[struct iovec *iovec;]])],
9 | [i_cv_struct_iovec=yes],
10 | [i_cv_struct_iovec=no])])
11 |
12 | AS_IF([test $i_cv_struct_iovec = yes], [
13 | AC_DEFINE(HAVE_STRUCT_IOVEC,, [Define if you have struct iovec])
14 | ])
15 | ])
16 |
--------------------------------------------------------------------------------
/m4/libcap.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_LIBCAP],[
2 | AS_IF([test $want_libcap != no], [
3 | AC_CHECK_LIB(cap, cap_init, [
4 | AC_DEFINE(HAVE_LIBCAP,, [libcap is installed for cap_init()])
5 | LIBCAP="-lcap"
6 | AC_SUBST(LIBCAP)
7 | ], [
8 | AS_IF([test "$want_libcap" = "yes"], [
9 | AC_MSG_ERROR(cannot build with libcap support: libcap not found)
10 | ])
11 | ])
12 | ])
13 | ])
14 |
--------------------------------------------------------------------------------
/m4/linux_mremap.m4:
--------------------------------------------------------------------------------
1 | dnl * Linux compatible mremap()
2 | AC_DEFUN([DOVECOT_LINUX_MREMAP], [
3 | AC_CACHE_CHECK([Linux compatible mremap()],i_cv_have_linux_mremap,[
4 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[
5 | #include
6 | #define __USE_GNU
7 | #include
8 | ]], [[
9 | mremap(0, 0, 0, MREMAP_MAYMOVE);
10 | ]])],[
11 | i_cv_have_linux_mremap=yes
12 | ], [
13 | i_cv_have_linux_mremap=no
14 | ])
15 | ])
16 | AS_IF([test $i_cv_have_linux_mremap = yes], [
17 | AC_DEFINE(HAVE_LINUX_MREMAP,, [Define if you have Linux-compatible mremap()])
18 | ])
19 | ])
20 |
--------------------------------------------------------------------------------
/m4/modules.m4:
--------------------------------------------------------------------------------
1 | dnl * dynamic modules?
2 | AC_DEFUN([DOVECOT_MODULES], [
3 | AC_CHECK_FUNC(dlopen, [
4 | MODULE_LIBS="-export-dynamic"
5 | ], [
6 | AC_CHECK_LIB(dl, dlopen, [
7 | MODULE_LIBS="-export-dynamic -ldl"
8 | DLLIB=-ldl
9 | ], [
10 | AC_MSG_ERROR([dlopen() is missing - can't build without dynamic modules])
11 | ])
12 | ])
13 | AC_SUBST(MODULE_LIBS)
14 | AC_SUBST(DLLIB)
15 |
16 | dnl shrext_cmds comes from libtool.m4
17 | module=yes eval MODULE_SUFFIX=$shrext_cmds
18 | if test "$MODULE_SUFFIX" = ""; then
19 | # too old libtool?
20 | MODULE_SUFFIX=.so
21 | fi
22 | AC_DEFINE_UNQUOTED(MODULE_SUFFIX,"$MODULE_SUFFIX", [Dynamic module suffix])
23 | AC_SUBST(MODULE_SUFFIX)
24 | ])
25 |
--------------------------------------------------------------------------------
/m4/nsl.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_NSL], [
2 | AC_SEARCH_LIBS([inet_aton], [resolv])
3 | AC_SEARCH_LIBS([gethostbyname], [nsl])
4 | AC_SEARCH_LIBS([socket], [socket])
5 | AC_SEARCH_LIBS([gethostent], [nsl])
6 | ])
7 |
--------------------------------------------------------------------------------
/m4/off_t_max.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_OFF_T_MAX], [
2 | dnl * Do we have OFF_T_MAX?
3 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4 | #include
5 | #include
6 | ]], [[
7 | off_t i = OFF_T_MAX;
8 | ]])],[
9 | :
10 | ],[
11 | AC_DEFINE_UNQUOTED(OFF_T_MAX, $offt_max, [Maximum value of off_t])
12 | ])
13 | ])
14 |
--------------------------------------------------------------------------------
/m4/pr_set_dumpable.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_PR_SET_DUMPABLE], [
2 | AC_CACHE_CHECK([whether PR_SET_DUMPABLE exists],i_cv_have_pr_set_dumpable,[
3 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[
4 | #include
5 | ]], [[
6 | prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
7 | ]])],[
8 | i_cv_have_pr_set_dumpable=yes
9 | ], [
10 | i_cv_have_pr_set_dumpable=no
11 | ])
12 | ])
13 | AS_IF([test $i_cv_have_pr_set_dumpable = yes], [
14 | AC_DEFINE(HAVE_PR_SET_DUMPABLE,, [Define if you have prctl(PR_SET_DUMPABLE)])
15 | ])
16 | ])
17 |
--------------------------------------------------------------------------------
/m4/q_quotactl.m4:
--------------------------------------------------------------------------------
1 | dnl * Check if we have Q_QUOTACTL ioctl (Solaris)
2 | AC_DEFUN([DOVECOT_Q_QUOTACTL], [
3 | AC_CACHE_CHECK([if Q_QUOTACTL ioctl exists],i_cv_have_ioctl_q_quotactl,[
4 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
5 | #include
6 | #include
7 | ]], [[
8 | struct quotctl ctl;
9 | ioctl(0, Q_QUOTACTL, &ctl);
10 | ]])],[
11 | i_cv_have_ioctl_q_quotactl=yes
12 | ], [
13 | i_cv_have_ioctl_q_quotactl=no
14 | ])
15 | ])
16 |
17 | AS_IF([test $i_cv_have_ioctl_q_quotactl = yes], [
18 | AC_DEFINE(HAVE_Q_QUOTACTL,, [Define if Q_QUOTACTL exists])
19 | ])
20 | ])
21 |
--------------------------------------------------------------------------------
/m4/random.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_RANDOM],[
2 | AC_CHECK_HEADER([sys/random.h], [
3 | AC_CHECK_FUNCS([getrandom])
4 | AC_CHECK_DECLS([getrandom], [], [], [[#include ]])
5 | ])
6 | ])
7 |
--------------------------------------------------------------------------------
/m4/sched.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_SCHED], [
2 | AC_CHECK_HEADERS([sys/cpuset.h sched.h])
3 | AC_CHECK_FUNCS([sched_getaffinity cpuset_getaffinity])
4 | ])
5 |
--------------------------------------------------------------------------------
/m4/sockpeercred.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_SOCKPEERCRED], [
2 | AC_CHECK_TYPES([struct sockpeercred],,,[
3 | #include
4 | #include
5 | ])
6 | ])
7 |
--------------------------------------------------------------------------------
/m4/test_with.m4:
--------------------------------------------------------------------------------
1 | dnl TEST_WITH(name, value, [plugin])
2 | AC_DEFUN([TEST_WITH], [
3 | want=want_`echo $1| $SED s/-/_/g`
4 | AS_IF([test "$2" = yes || test "$2" = no || test "$2" = auto], [
5 | eval $want=$2
6 | ], [test "$2" = plugin], [
7 | AS_IF([test "$3" = "plugin"], [
8 | eval $want=plugin
9 | ], [
10 | AC_MSG_ERROR(--with-$1=plugin not supported)
11 | ])
12 | ], [test "$(echo $2 | $GREP -c '^/' 2>/dev/null)" -gt 0], [
13 | AC_MSG_ERROR(--with-$1=path not supported. You may want to use instead:
14 | CPPFLAGS=-I$2/include LDFLAGS=-L$2/lib ./configure --with-$1)
15 | ], [
16 | AC_MSG_ERROR(--with-$1: Unknown value: $2)
17 | ])
18 | ])
19 |
--------------------------------------------------------------------------------
/m4/typeof.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_TYPEOF],[
2 | AC_CACHE_CHECK([for typeof],i_cv_have_typeof,[
3 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4 | ]], [[
5 | int foo;
6 | typeof(foo) bar;
7 | ]])],[
8 | i_cv_have_typeof=yes
9 | ], [
10 | i_cv_have_typeof=no
11 | ])
12 | ])
13 | AS_IF([test $i_cv_have_typeof = yes], [
14 | AC_DEFINE(HAVE_TYPEOF,, [Define if you have typeof()])
15 | ])
16 | ])
17 |
--------------------------------------------------------------------------------
/m4/uoff_t_max.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_UOFF_T_MAX], [
2 | dnl * Do we have UOFF_T_MAX?
3 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4 | #include
5 | #include
6 | ]], [[
7 | uoff_t i = UOFF_T_MAX;
8 | ]])],[
9 | :
10 | ],[
11 | AC_DEFINE_UNQUOTED(UOFF_T_MAX, $uofft_max, [Maximum value of uoff_t])
12 | ])
13 | ])
14 |
--------------------------------------------------------------------------------
/m4/want_apparmor.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_APPARMOR], [
2 | want_apparmor=auto
3 | AC_ARG_WITH([apparmor],
4 | [AS_HELP_STRING([--with-apparmor], [enable apparmor plugin (default=auto)])],
5 | [want_apparmor=$withval])
6 |
7 | have_apparmor=no
8 | if test $want_apparmor != no; then
9 | AC_CHECK_HEADER([sys/apparmor.h], [
10 | AC_CHECK_LIB([apparmor], [aa_change_hat], [
11 | have_apparmor=yes
12 | AC_SUBST([APPARMOR_LIBS], [-lapparmor])
13 | ])
14 | ])
15 | fi
16 |
17 | if test $want_apparmor = yes; then
18 | if test $have_apparmor = no; then
19 | AC_MSG_FAILURE([apparmor was not found])
20 | fi
21 | fi
22 |
23 | AM_CONDITIONAL(HAVE_APPARMOR, test "$have_apparmor" = "yes")
24 | ])
25 |
--------------------------------------------------------------------------------
/m4/want_bsdauth.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_BSDAUTH], [
2 | have_bsdauth=no
3 |
4 | AS_IF([test "$want_bsdauth" != "no"], [
5 | AC_CHECK_FUNC(auth_userokay, [
6 | AC_DEFINE(PASSDB_BSDAUTH,, [Build with BSD authentication support])
7 | have_bsdauth=yes
8 | ], [
9 | AS_IF([test "$want_bsdauth" = "yes"], [
10 | AC_MSG_ERROR(cannot build with BSD authentication support: auth_userokay() not found)
11 | ])
12 | ])
13 | ])
14 | AS_IF([test "$have_bsdauth" = "no"], [
15 | not_passdb="$not_passdb bsdauth"
16 | ], [
17 | passdb="$passdb bsdauth"
18 | ])
19 | ])
20 |
--------------------------------------------------------------------------------
/m4/want_bzlib.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_BZLIB], [
2 | AS_IF([test "$want_bzlib" != "no"], [
3 | AC_CHECK_HEADER(bzlib.h, [
4 | AC_CHECK_LIB(bz2, BZ2_bzdopen, [
5 | have_bzlib=yes
6 | have_compress_lib=yes
7 | AC_DEFINE(HAVE_BZLIB,, [Define if you have bzlib library])
8 | COMPRESS_LIBS="$COMPRESS_LIBS -lbz2"
9 | ], [
10 | AS_IF([test "$want_bzlib" = "yes"], [
11 | AC_MSG_ERROR(cannot build with bzlib support: libbz2 not found)
12 | ])
13 | ])
14 | ], [
15 | AS_IF([test "$want_bzlib" = "yes"], [
16 | AC_MSG_ERROR(cannot build with bzlib support: bzlib.h not found)
17 | ])
18 | ])
19 | ])
20 | ])
21 |
--------------------------------------------------------------------------------
/m4/want_cdb.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_CDB], [
2 | AS_IF([test "$want_cdb" != "no"], [
3 | AC_CHECK_LIB(cdb, cdb_init, [
4 | AC_CHECK_HEADER(cdb.h, [
5 | DICT_LIBS="$DICT_LIBS -lcdb"
6 | dict_drivers="$dict_drivers cdb"
7 | AC_DEFINE(BUILD_CDB,, [Build with CDB support])
8 | ], [
9 | AS_IF([test "$want_cdb" = "yes"], [
10 | AC_MSG_ERROR(cannot build with CDB support: cdb.h not found)
11 | ])
12 | ])
13 | ], [
14 | AS_IF([test "$want_cdb" = "yes"], [
15 | AC_MSG_ERROR(cannot build with CDB support: libcdb not found)
16 | ])
17 | ])
18 | ])
19 | ])
20 |
--------------------------------------------------------------------------------
/m4/want_flatcurve.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_FLATCURVE], [
2 | have_flatcurve=no
3 | AS_IF([test "$want_flatcurve" != "no"], [
4 | PKG_CHECK_MODULES(XAPIAN, xapian-core >= 1.4, [
5 | AC_DEFINE([HAVE_XAPIAN], 1, [Xapian is available])
6 | PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES xapian-core"
7 | have_flatcurve=yes
8 | fts="$fts flatcurve"
9 | ],[
10 | AS_IF([test $want_flatcurve = yes], [
11 | AC_MSG_ERROR(cannot build with Flatcurve FTS: $XAPIAN_PKG_ERRORS)
12 | ])
13 | ])
14 | ])
15 | AM_CONDITIONAL(BUILD_FLATCURVE, test "$have_flatcurve" = "yes")
16 | ])
17 |
--------------------------------------------------------------------------------
/m4/want_icu.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_ICU], [
2 | have_icu=no
3 |
4 | AS_IF([test "$want_icu" != "no"], [
5 | PKG_CHECK_MODULES([LIBICU], [icu-i18n icu-uc], [have_icu=yes], [
6 | have_icu=no
7 |
8 | AS_IF([test "$want_icu" = "yes"], [
9 | AC_MSG_ERROR(cannot build with icu support: icu library (icu-i18n) not found)
10 | ])
11 | ])
12 | ])
13 |
14 | AS_IF([test "$have_icu" != "no"], [
15 | AC_DEFINE(HAVE_LIBICU,, [Define if you want ICU normalization support for lib-language])
16 | ])
17 |
18 | AM_CONDITIONAL(BUILD_LIBICU, test "$have_icu" = "yes")
19 | ])
20 |
--------------------------------------------------------------------------------
/m4/want_lz4.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_LZ4], [
2 | have_lz4=no
3 |
4 | AS_IF([test "$want_lz4" != "no"], [
5 | PKG_CHECK_MODULES([LZ4], [liblz4], [have_lz4=yes], [
6 | have_lz4=no
7 |
8 | AS_IF([test "$want_lz4" = "yes"], [
9 | AC_MSG_ERROR([cannot build with LZ4 support: lz4 library (liblz4) not found])
10 | ])
11 | ])
12 | ])
13 |
14 | AS_IF([test "$have_lz4" != "no"], [
15 | have_compress_lib=yes
16 | COMPRESS_LIBS="$COMPRESS_LIBS $LZ4_LIBS"
17 | AC_DEFINE(HAVE_LZ4,, [Define if you have lz4 library])
18 |
19 | AC_CHECK_LIB(lz4, LZ4_compress_default, [
20 | AC_DEFINE(HAVE_LZ4_COMPRESS_DEFAULT,, [
21 | Define if you have LZ4_compress_default
22 | ])
23 | ],, $LZ4_LIBS)
24 | ])
25 | ])
26 |
--------------------------------------------------------------------------------
/m4/want_prefetch.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_PREFETCH], [
2 | AS_IF([test "$want_prefetch_userdb" != "no"], [
3 | AC_DEFINE(USERDB_PREFETCH,, [Build with prefetch userdb support])
4 | userdb="$userdb prefetch"
5 | ], [
6 | not_userdb="$not_userdb prefetch"
7 | ])
8 | ])
9 |
--------------------------------------------------------------------------------
/m4/want_sodium.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_SODIUM], [
2 | AS_IF([test "$want_sodium" != "no"], [
3 | PKG_CHECK_MODULES(LIBSODIUM, libsodium, [
4 | OLD_LIBS="$LIBS"
5 | LIBS="$LIBS $LIBSODIUM_LIBS"
6 | AC_CHECK_FUNC([crypto_pwhash_str_verify], [
7 | have_sodium=yes
8 | AUTH_LIBS="$AUTH_LIBS $LIBSODIUM_LIBS"
9 | AC_DEFINE(HAVE_LIBSODIUM, [1], [Define if you have libsodium])
10 | ])
11 | LIBS="$OLD_LIBS"
12 | ], [have_sodium=no])
13 | AS_IF([test "$want_sodium" = "yes" && test "$have_sodium" != "yes"] , [
14 | AC_MSG_ERROR(cannot build with libsodium: not found)
15 | ])
16 | ])
17 | AM_CONDITIONAL(BUILD_LIBSODIUM, test "$have_sodium" = "yes")
18 | ])
19 |
--------------------------------------------------------------------------------
/m4/want_solr.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_SOLR], [
2 | have_expat=no
3 | have_solr=no
4 |
5 | AS_IF([test "$want_solr" != "no"], [
6 | PKG_CHECK_MODULES([EXPAT], [expat], [have_expat=yes], [
7 | have_expat=no
8 |
9 | AS_IF([test "$want_solr" = "yes"], [
10 | AC_MSG_ERROR([cannot build with Solr support: expat library not found])
11 | ])
12 | ])
13 | ])
14 |
15 | AS_IF([test "$have_expat" != "no"], [
16 | have_solr=yes
17 | fts="$fts solr"
18 | ])
19 |
20 | AM_CONDITIONAL(BUILD_SOLR, test "$have_solr" = "yes")
21 | ])
22 |
--------------------------------------------------------------------------------
/m4/want_sqlite.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_SQLITE], [
2 | have_sqlite=no
3 |
4 | AS_IF([test "$want_sqlite" != "no"], [
5 | PKG_CHECK_MODULES([SQLITE], [sqlite3], [have_sqlite=yes], [
6 | have_sqlite=no
7 |
8 | AS_IF([test "$want_sqlite" = "yes"], [
9 | AC_MSG_ERROR([cannot build with SQLite support: sqlite3 library not found])
10 | ])
11 | ])
12 | ])
13 |
14 | AS_IF([test "$have_sqlite" != "no"], [
15 | found_sql_drivers="$found_sql_drivers sqlite"
16 | AC_DEFINE(HAVE_SQLITE,, [Build with SQLite3 support])
17 | ])
18 | ])
19 |
--------------------------------------------------------------------------------
/m4/want_stemmer.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_STEMMER], [
2 | AS_IF([test "$want_stemmer" != "no"], [
3 | AC_CHECK_LIB(stemmer, sb_stemmer_new, [
4 | have_fts_stemmer=yes
5 | AC_DEFINE(HAVE_LANG_STEMMER,, [Define if you want stemming support for lib-language])
6 | ], [
7 | AS_IF([test "$want_stemmer" = "yes"], [
8 | AC_MSG_ERROR(cannot build with stemmer support: libstemmer not found)
9 | ])
10 | ])
11 | ])
12 |
13 | AM_CONDITIONAL([BUILD_LANG_STEMMER], [test "$have_fts_stemmer" = "yes"])
14 | ])
15 |
--------------------------------------------------------------------------------
/m4/want_unwind.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_WANT_UNWIND], [
2 | have_libunwind=no
3 |
4 | AS_IF([test "$want_libunwind" != "no"], [
5 | PKG_CHECK_MODULES([LIBUNWIND], [libunwind-generic], [have_libunwind=yes], [
6 | have_libunwind=no
7 |
8 | AS_IF([test "$want_libunwind" = "yes"], [
9 | AC_MSG_ERROR([cannot build with libuwind support: unwind library (libunwind-generic) not found])
10 | ])
11 | ])
12 | ])
13 |
14 | AS_IF([test "$have_libunwind" != "no"], [
15 | AC_DEFINE([HAVE_LIBUNWIND],, [Define this if you have libunwind])
16 | ])
17 | ])
18 |
--------------------------------------------------------------------------------
/m4/zlib.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([DOVECOT_ZLIB], [
2 | PKG_CHECK_MODULES([ZLIB], [zlib], [
3 | have_compress_lib=yes
4 | COMPRESS_LIBS="$COMPRESS_LIBS $ZLIB_LIBS"
5 | ], [
6 | AC_MSG_ERROR([cannot build with zlib support: zlib library not found])
7 | ])
8 | ])
9 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.black]
2 | line-length = 89
3 | target-version = ['py39']
4 |
5 | [tool.isort]
6 | profile = "black"
7 |
--------------------------------------------------------------------------------
/src/anvil/admin-client-pool.h:
--------------------------------------------------------------------------------
1 | #ifndef ADMIN_CLIENT_POOL_H
2 | #define ADMIN_CLIENT_POOL_H
3 |
4 | #include "admin-client.h"
5 |
6 | struct admin_client_pool *
7 | admin_client_pool_init(const char *base_dir, unsigned int max_connections);
8 | void admin_client_pool_deinit(struct admin_client_pool **pool);
9 |
10 | void admin_client_pool_send_cmd(struct admin_client_pool *pool,
11 | const char *service, pid_t pid, const char *cmd,
12 | admin_client_callback_t *callback,
13 | void *context);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/auth/auth-common.h:
--------------------------------------------------------------------------------
1 | #ifndef AUTH_COMMON_H
2 | #define AUTH_COMMON_H
3 |
4 | #include "lib.h"
5 | #include "auth.h"
6 | #include "connection.h"
7 |
8 | extern bool worker, worker_restart_request;
9 | extern time_t process_start_time;
10 | extern struct auth_penalty *auth_penalty;
11 | extern struct event_category event_category_auth;
12 | extern struct event *auth_event;
13 |
14 | void auth_refresh_proctitle(void);
15 | void auth_worker_refresh_proctitle(const char *state);
16 | void auth_module_load(const char *name);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/auth/auth-policy.h:
--------------------------------------------------------------------------------
1 | #ifndef AUTH_POLICY_H
2 | #define AUTH_POLICY_H
3 |
4 | typedef void (*auth_policy_callback_t)(int, void *);
5 |
6 | void auth_policy_check(struct auth_request *request, const char *password,
7 | auth_policy_callback_t cb, void *context);
8 | void auth_policy_report(struct auth_request *request);
9 | void auth_policy_init(void);
10 | void auth_policy_deinit(void);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/auth/auth-token.h:
--------------------------------------------------------------------------------
1 | #ifndef AUTH_TOKEN_H
2 | #define AUTH_TOKEN_H
3 |
4 | void auth_token_init(void);
5 | void auth_token_deinit(void);
6 |
7 | const char *auth_token_get(const char *service, const char *session_pid,
8 | const char *username, const char *session_id);
9 |
10 | #endif
11 |
12 |
--------------------------------------------------------------------------------
/src/auth/auth-worker-connection.h:
--------------------------------------------------------------------------------
1 | #ifndef AUTH_WORKER_CONNECTION_H
2 | #define AUTH_WORKER_CONNECTION_H
3 |
4 | struct auth_request;
5 | struct auth_stream_reply;
6 | struct auth_worker_connection;
7 |
8 | typedef bool auth_worker_callback_t(struct auth_worker_connection *conn,
9 | const char *const *args, void *context);
10 |
11 | void auth_worker_call(pool_t pool, const char *username, const char *data,
12 | auth_worker_callback_t *callback, void *context);
13 | void auth_worker_connection_resume_input(struct auth_worker_connection *conn);
14 |
15 | void auth_worker_connection_init(void);
16 | void auth_worker_connection_deinit(void);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/auth/db-sql.h:
--------------------------------------------------------------------------------
1 | #ifndef DB_SQL_H
2 | #define DB_SQL_H
3 |
4 | #include "sql-api.h"
5 |
6 | void db_sql_connect(struct sql_db *db);
7 | void db_sql_success(void);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/auth/mech-otp-common.h:
--------------------------------------------------------------------------------
1 | #ifndef MECH_OTP_COMMON_H
2 | #define MECH_OTP_COMMON_H
3 |
4 | struct otp_auth_request {
5 | struct auth_request auth_request;
6 |
7 | pool_t pool;
8 |
9 | bool lock;
10 |
11 | struct otp_state state;
12 | };
13 |
14 | void otp_lock_init(void);
15 | bool otp_try_lock(struct auth_request *auth_request);
16 | void otp_unlock(struct auth_request *auth_request);
17 |
18 | void otp_set_credentials_callback(bool success,
19 | struct auth_request *auth_request);
20 | void mech_otp_auth_free(struct auth_request *auth_request);
21 | void mech_otp_deinit(void);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/src/auth/mech-plain-common.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2009-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "auth-common.h"
4 | #include "mech.h"
5 | #include "passdb.h"
6 | #include "mech-plain-common.h"
7 |
8 | void plain_verify_callback(enum passdb_result result,
9 | struct auth_request *request)
10 | {
11 | switch (result) {
12 | case PASSDB_RESULT_OK:
13 | auth_request_success(request, "", 0);
14 | break;
15 | case PASSDB_RESULT_INTERNAL_FAILURE:
16 | auth_request_internal_failure(request);
17 | break;
18 | default:
19 | auth_request_fail(request);
20 | break;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/auth/mech-plain-common.h:
--------------------------------------------------------------------------------
1 | #ifndef MECH_PLAIN_COMMON_H
2 | #define MECH_PLAIN_COMMON_H
3 |
4 | void plain_verify_callback(enum passdb_result result,
5 | struct auth_request *request);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/auth/mech-scram.h:
--------------------------------------------------------------------------------
1 | #ifndef MECH_SCRAM_H
2 | #define MECH_SCRAM_H
3 |
4 | struct auth_request *
5 | mech_scram_auth_new(const struct hash_method *hash_method,
6 | const char *password_scheme);
7 | void mech_scram_auth_continue(struct auth_request *auth_request,
8 | const unsigned char *data, size_t data_size);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/auth/passdb-blocking.h:
--------------------------------------------------------------------------------
1 | #ifndef PASSDB_BLOCKING_H
2 | #define PASSDB_BLOCKING_H
3 |
4 | enum passdb_result
5 | passdb_blocking_auth_worker_reply_parse(struct auth_request *request,
6 | const char *const *args);
7 | void passdb_blocking_verify_plain(struct auth_request *request);
8 | void passdb_blocking_lookup_credentials(struct auth_request *request);
9 | void passdb_blocking_set_credentials(struct auth_request *request,
10 | const char *new_credentials);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/auth/passdb-cache.h:
--------------------------------------------------------------------------------
1 | #ifndef PASSDB_CACHE_H
2 | #define PASSDB_CACHE_H
3 |
4 | #include "auth-cache.h"
5 | #include "passdb.h"
6 |
7 | extern struct auth_cache *passdb_cache;
8 |
9 | bool passdb_cache_verify_plain(struct auth_request *request, const char *key,
10 | const char *password,
11 | enum passdb_result *result_r, bool use_expired);
12 | bool passdb_cache_lookup_credentials(struct auth_request *request,
13 | const char *key, const char **password_r,
14 | const char **scheme_r,
15 | enum passdb_result *result_r,
16 | bool use_expired);
17 |
18 | void passdb_cache_init(const struct auth_settings *set);
19 | void passdb_cache_deinit(void);
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/src/auth/test-auth-master-server.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2024 Dovecot authors, see the included COPYING file */
2 |
3 | #include "lib.h"
4 | #include "net.h"
5 | #include "auth-common.h"
6 | #include "auth-master-connection.h"
7 | #include "test-auth-master.h"
8 |
9 | #include
10 |
11 | void auth_master_server_connected(int *server_fd, const char *socket)
12 | {
13 | struct stat st;
14 | i_zero(&st);
15 | struct auth *auth = auth_default_protocol();
16 | int fd = net_accept(*server_fd, NULL, NULL);
17 | i_assert(fd > 0);
18 | auth_master_connection_create(auth, fd, socket, &st, FALSE);
19 | }
20 |
21 | void auth_master_server_deinit(void)
22 | {
23 | auth_master_connections_destroy_all();
24 | }
25 |
--------------------------------------------------------------------------------
/src/auth/test-auth-master.h:
--------------------------------------------------------------------------------
1 | #ifndef TEST_AUTH_MASTER_H
2 | #define TEST_AUTH_MASTER_H 1
3 |
4 | void auth_master_server_connected(int *server_fd, const char *socket);
5 | void auth_master_server_deinit(void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/auth/test-auth.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef TEST_AUTH_H
4 | #define TEST_AUTH_H 1
5 |
6 | #define AUTH_REQUEST_FIELDS_CONST
7 |
8 | #include "lib.h"
9 | #include "test-common.h"
10 |
11 | struct auth_passdb;
12 |
13 | void test_auth_request_var_expand(void);
14 | void test_auth_request_fields(void);
15 | void test_db_dict_parse_cache_key(void);
16 | void test_username_filter(void);
17 | void test_db_lua(void);
18 | struct auth_passdb *passdb_mock(void);
19 | void passdb_mock_mod_init(void);
20 | void passdb_mock_mod_deinit(void);
21 |
22 | void test_auth_init(void);
23 | void test_auth_deinit(void);
24 |
25 | #endif
26 |
27 |
--------------------------------------------------------------------------------
/src/auth/userdb-blocking.h:
--------------------------------------------------------------------------------
1 | #ifndef USERDB_BLOCKING_H
2 | #define USERDB_BLOCKING_H
3 |
4 | void userdb_blocking_lookup(struct auth_request *request);
5 |
6 | struct userdb_iterate_context *
7 | userdb_blocking_iter_init(struct auth_request *request,
8 | userdb_iter_callback_t *callback, void *context);
9 | void userdb_blocking_iter_next(struct userdb_iterate_context *ctx);
10 | int userdb_blocking_iter_deinit(struct userdb_iterate_context **ctx);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/config/all-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef ALL_SETTINGS_H
2 | #define ALL_SETTINGS_H
3 |
4 | extern const struct setting_parser_info *const *all_infos;
5 | extern const struct setting_parser_info *all_default_infos[];
6 | extern const struct config_service *config_all_services;
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/config/config-connection.h:
--------------------------------------------------------------------------------
1 | #ifndef CONFIG_CONNECTION_H
2 | #define CONFIG_CONNECTION_H
3 |
4 | struct config_connection *config_connection_create(int fd);
5 | void config_connection_destroy(struct config_connection *conn);
6 |
7 | void config_connections_init(void);
8 | void config_connections_destroy_all(void);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/config/config-dump-full.h:
--------------------------------------------------------------------------------
1 | #ifndef CONFIG_DUMP_FULL
2 | #define CONFIG_DUMP_FULL
3 |
4 | #include "config-request.h"
5 |
6 | enum config_dump_full_dest {
7 | CONFIG_DUMP_FULL_DEST_RUNDIR,
8 | CONFIG_DUMP_FULL_DEST_TEMPDIR,
9 | CONFIG_DUMP_FULL_DEST_STDOUT,
10 | };
11 |
12 | int config_dump_full(struct config_parsed *config,
13 | enum config_dump_full_dest dest,
14 | enum config_dump_flags flags,
15 | const char **import_environment_r);
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/src/config/old-set-parser.h:
--------------------------------------------------------------------------------
1 | #ifndef OLD_SET_PARSER_H
2 | #define OLD_SET_PARSER_H
3 |
4 | #include "config-parser-private.h"
5 |
6 | struct config_parser_context;
7 |
8 | void old_settings_handle(struct config_parser_context *ctx,
9 | struct config_line *line);
10 | bool old_settings_default(const char *dovecot_config_version,
11 | const char *key, const char *key_with_path,
12 | const char **old_default_r);
13 | unsigned int
14 | old_settings_default_changes_count(const char *dovecot_config_version);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/config/sysinfo-get.h:
--------------------------------------------------------------------------------
1 | #ifndef SYSINFO_GET_H
2 | #define SYSINFO_GET_H
3 |
4 | const char *sysinfo_get(const char *mail_path);
5 |
6 | #endif
7 |
--------------------------------------------------------------------------------
/src/dict/dict-commands.h:
--------------------------------------------------------------------------------
1 | #ifndef DICT_COMMANDS_H
2 | #define DICT_COMMANDS_H
3 |
4 | struct dict_connection;
5 |
6 | struct dict_command_stats {
7 | struct stats_dist *lookups;
8 | struct stats_dist *iterations;
9 | struct stats_dist *commits;
10 | };
11 |
12 | extern struct dict_command_stats cmd_stats;
13 |
14 | int dict_command_input(struct dict_connection *conn, const char *line);
15 |
16 | void dict_connection_cmds_output_more(struct dict_connection *conn);
17 |
18 | void dict_commands_init(void);
19 | void dict_commands_deinit(void);
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/src/dict/dict-init-cache.h:
--------------------------------------------------------------------------------
1 | #ifndef DICT_INIT_CACHE_H
2 | #define DICT_INIT_CACHE_H
3 |
4 | int dict_init_cache_get(struct event *event, const char *dict_name,
5 | struct dict **dict_r, const char **error_r);
6 | void dict_init_cache_unref(struct dict **dict);
7 |
8 | void dict_init_cache_wait_all(void);
9 | void dict_init_cache_destroy_all(void);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/src/dict/dict-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef DICT_SETTINGS_H
2 | #define DICT_SETTINGS_H
3 |
4 | struct dict_server_settings {
5 | pool_t pool;
6 | const char *base_dir;
7 | bool verbose_proctitle;
8 | };
9 |
10 | extern const struct setting_parser_info dict_server_setting_parser_info;
11 | extern const struct dict_server_settings *server_settings;
12 | extern const struct dict_settings *dict_settings;
13 |
14 | extern struct event_category dict_server_event_category;
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/dict/main.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIN_H
2 | #define MAIN_H
3 |
4 | void dict_proctitle_update_later(void);
5 |
6 | #endif
7 |
--------------------------------------------------------------------------------
/src/dns/Makefile.am:
--------------------------------------------------------------------------------
1 | pkglibexecdir = $(libexecdir)/dovecot
2 |
3 | pkglibexec_PROGRAMS = dns-client
4 |
5 | AM_CPPFLAGS = \
6 | -I$(top_srcdir)/src/lib \
7 | -I$(top_srcdir)/src/lib-master \
8 | -I$(top_srcdir)/src/lib-settings \
9 | -I$(top_srcdir)/src/lib-var-expand \
10 | $(BINARY_CFLAGS)
11 |
12 | dns_client_LDADD = $(LIBDOVECOT) \
13 | $(BINARY_LDFLAGS)
14 |
15 | dns_client_DEPENDENCIES = $(LIBDOVECOT_DEPS)
16 | dns_client_SOURCES = \
17 | dns-client.c \
18 | dns-client-settings.c
19 |
--------------------------------------------------------------------------------
/src/doveadm/client-connection-private.h:
--------------------------------------------------------------------------------
1 | #ifndef CLIENT_CONNECTION_PRIVATE_H
2 | #define CLIENT_CONNECTION_PRIVATE_H
3 |
4 | #include "client-connection.h"
5 |
6 | bool doveadm_client_is_allowed_command(const struct doveadm_settings *set,
7 | const char *cmd_name);
8 |
9 | int client_connection_init(struct client_connection *conn,
10 | enum doveadm_client_type type, pool_t pool, int fd);
11 | void client_connection_destroy(struct client_connection **_conn);
12 |
13 | void client_connection_set_proctitle(struct client_connection *conn,
14 | const char *text);
15 |
16 | void doveadm_server_deinit(void);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/doveadm/doveadm-dict.h:
--------------------------------------------------------------------------------
1 | #ifndef DOVEADM_DICT_H
2 | #define DOVEADM_DICT_H
3 |
4 | void doveadm_dict_get(struct doveadm_cmd_context *cctx, const char *key);
5 | void doveadm_dict_set(struct doveadm_cmd_context *cctx, const char *key,
6 | const char *value);
7 | void doveadm_dict_unset(struct doveadm_cmd_context *cctx, const char *key);
8 | void doveadm_dict_inc(struct doveadm_cmd_context *cctx, const char *key,
9 | int64_t diff);
10 | void doveadm_dict_iter(struct doveadm_cmd_context *cctx,
11 | enum dict_iterate_flags iter_flags, const char *prefix);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/doveadm/doveadm-dsync.h:
--------------------------------------------------------------------------------
1 | #ifndef DOVEADM_DSYNC_H
2 | #define DOVEADM_DSYNC_H
3 |
4 | extern struct doveadm_cmd_ver2 doveadm_cmd_dsync_mirror;
5 | extern struct doveadm_cmd_ver2 doveadm_cmd_dsync_backup;
6 | extern struct doveadm_cmd_ver2 doveadm_cmd_dsync_server;
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/doveadm/doveadm.h:
--------------------------------------------------------------------------------
1 | #ifndef DOVEADM_H
2 | #define DOVEADM_H
3 |
4 | #include
5 | #include "doveadm-protocol.h"
6 | #include "doveadm-util.h"
7 | #include "doveadm-settings.h"
8 |
9 | #define USAGE_CMDNAME_FMT " %-12s"
10 |
11 | enum doveadm_client_type {
12 | DOVEADM_CONNECTION_TYPE_CLI = 0,
13 | DOVEADM_CONNECTION_TYPE_TCP,
14 | DOVEADM_CONNECTION_TYPE_HTTP,
15 | };
16 |
17 | #include "doveadm-cmd.h"
18 |
19 | extern int doveadm_exit_code;
20 |
21 | void usage(void) ATTR_NORETURN;
22 | void help_ver2(const struct doveadm_cmd_ver2 *cmd) ATTR_NORETURN;
23 | void doveadm_master_send_signal(int signo, struct event *event);
24 | int master_service_send_cmd(const char *cmd, struct istream **input_r,
25 | const char **error_r);
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/src/doveadm/dsync/dsync-serializer.h:
--------------------------------------------------------------------------------
1 | #ifndef DSYNC_SERIALIZER_H
2 | #define DSYNC_SERIALIZER_H
3 |
4 | #define NULL_CHR '\002'
5 |
6 | struct dsync_serializer *dsync_serializer_init(const char *const keys[]);
7 | void dsync_serializer_deinit(struct dsync_serializer **serializer);
8 |
9 | const char *
10 | dsync_serializer_encode_header_line(struct dsync_serializer *serializer);
11 | struct dsync_serializer_encoder *
12 | dsync_serializer_encode_begin(struct dsync_serializer *serializer);
13 | void dsync_serializer_encode_add(struct dsync_serializer_encoder *encoder,
14 | const char *key, const char *value);
15 | void dsync_serializer_encode_finish(struct dsync_serializer_encoder **encoder,
16 | string_t *output);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/imap-hibernate/Makefile.am:
--------------------------------------------------------------------------------
1 | pkglibexecdir = $(libexecdir)/dovecot
2 |
3 | pkglibexec_PROGRAMS = imap-hibernate
4 |
5 | AM_CPPFLAGS = \
6 | -I$(top_srcdir)/src/lib \
7 | -I$(top_srcdir)/src/lib-settings \
8 | -I$(top_srcdir)/src/lib-master \
9 | -I$(top_srcdir)/src/lib-imap \
10 | -I$(top_srcdir)/src/lib-var-expand \
11 | $(BINARY_CFLAGS)
12 |
13 | imap_hibernate_LDADD = $(LIBDOVECOT) \
14 | $(BINARY_LDFLAGS)
15 |
16 | imap_hibernate_DEPENDENCIES = $(LIBDOVECOT_DEPS)
17 |
18 | imap_hibernate_SOURCES = \
19 | imap-client.c \
20 | imap-hibernate-client.c \
21 | imap-hibernate-settings.c \
22 | imap-master-connection.c \
23 | main.c
24 |
25 | noinst_HEADERS = \
26 | imap-client.h \
27 | imap-hibernate-client.h \
28 | imap-master-connection.h
29 |
--------------------------------------------------------------------------------
/src/imap-hibernate/imap-hibernate-client.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_HIBERNATE_CLIENT_H
2 | #define IMAP_HIBERNATE_CLIENT_H
3 |
4 | void imap_hibernate_client_create(int fd, bool debug);
5 |
6 | void imap_hibernate_clients_init(void);
7 | void imap_hibernate_clients_deinit(void);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/imap-login/client-authenticate.h:
--------------------------------------------------------------------------------
1 | #ifndef CLIENT_AUTHENTICATE_H
2 | #define CLIENT_AUTHENTICATE_H
3 |
4 | struct imap_arg;
5 |
6 | void client_authenticate_get_capabilities(struct client *client, string_t *str);
7 |
8 | void imap_client_auth_result(struct client *client,
9 | enum client_auth_result result,
10 | const struct client_auth_reply *reply,
11 | const char *text);
12 |
13 | int cmd_login(struct imap_client *client, const struct imap_arg *args);
14 | int cmd_authenticate(struct imap_client *imap_client, bool *parsed_r);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/imap-login/imap-login-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_LOGIN_SETTINGS_H
2 | #define IMAP_LOGIN_SETTINGS_H
3 |
4 | struct imap_login_settings {
5 | pool_t pool;
6 | ARRAY_TYPE(const_string) imap_capability;
7 | ARRAY_TYPE(const_string) imap_id_send;
8 | bool imap_literal_minus;
9 | bool imap_id_retain;
10 | bool imap4rev2_enable;
11 | };
12 |
13 | extern const struct setting_parser_info imap_login_setting_parser_info;
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/imap-login/imap-proxy.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_PROXY_H
2 | #define IMAP_PROXY_H
3 |
4 | void imap_proxy_reset(struct client *client);
5 | int imap_proxy_parse_line(struct client *client, const char *line);
6 |
7 | int imap_proxy_side_channel_input(struct client *client,
8 | const char *const *args,
9 | const char **error_r);
10 | void imap_proxy_failed(struct client *client,
11 | enum login_proxy_failure_type type,
12 | const char *reason, bool reconnecting);
13 | const char *imap_proxy_get_state(struct client *client);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/imap-urlauth/imap-urlauth-common.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_URLAUTH_COMMON_H
2 | #define IMAP_URLAUTH_COMMON_H
3 |
4 | #include "lib.h"
5 | #include "imap-urlauth-client.h"
6 | #include "imap-urlauth-settings.h"
7 |
8 | #define IMAP_URLAUTH_SOCKET "imap-urlauth"
9 |
10 | #define IMAP_URLAUTH_PROTOCOL_MAJOR_VERSION 1
11 | #define IMAP_URLAUTH_PROTOCOL_MINOR_VERSION 0
12 |
13 | extern bool verbose_proctitle;
14 | extern struct mail_storage_service_ctx *storage_service;
15 |
16 | void imap_urlauth_refresh_proctitle(void);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/imap-urlauth/imap-urlauth-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_URLAUTH_SETTINGS_H
2 | #define IMAP_URLAUTH_SETTINGS_H
3 |
4 | struct mail_user_settings;
5 |
6 | struct imap_urlauth_settings {
7 | pool_t pool;
8 | const char *base_dir;
9 |
10 | bool mail_debug;
11 |
12 | bool verbose_proctitle;
13 |
14 | /* imap_urlauth: */
15 | const char *imap_urlauth_logout_format;
16 |
17 | const char *imap_urlauth_submit_user;
18 | const char *imap_urlauth_stream_user;
19 | };
20 |
21 | extern const struct imap_urlauth_settings imap_urlauth_default_settings;
22 |
23 | extern const struct setting_parser_info imap_urlauth_setting_parser_info;
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/src/imap-urlauth/imap-urlauth-worker-client.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_URLAUTH_WORKER_CLIENT_H
2 | #define IMAP_URLAUTH_WORKER_CLIENT_H
3 |
4 | #include "imap-urlauth-worker-common.h"
5 |
6 | struct imap_urlauth_worker_client *
7 | imap_urlauth_worker_client_init(struct client *client);
8 | void imap_urlauth_worker_client_deinit(
9 | struct imap_urlauth_worker_client **_wclient);
10 |
11 | int imap_urlauth_worker_client_connect(
12 | struct imap_urlauth_worker_client *wclient);
13 | void imap_urlauth_worker_client_disconnect(
14 | struct imap_urlauth_worker_client *wclient);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/imap-urlauth/imap-urlauth-worker-common.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_URLAUTH_WORKER_COMMON_H
2 | #define IMAP_URLAUTH_WORKER_COMMON_H
3 |
4 | #define IMAP_URLAUTH_WORKER_SOCKET "imap-urlauth-worker"
5 |
6 | #define IMAP_URLAUTH_WORKER_PROTOCOL_MAJOR_VERSION 2
7 | #define IMAP_URLAUTH_WORKER_PROTOCOL_MINOR_VERSION 0
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/imap-urlauth/imap-urlauth-worker-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_URLAUTH_SETTINGS_H
2 | #define IMAP_URLAUTH_SETTINGS_H
3 |
4 | struct mail_user_settings;
5 |
6 | struct imap_urlauth_worker_settings {
7 | pool_t pool;
8 | bool verbose_proctitle;
9 |
10 | /* imap_urlauth: */
11 | const char *imap_urlauth_host;
12 | in_port_t imap_urlauth_port;
13 | };
14 |
15 | extern const struct imap_urlauth_worker_settings imap_urlauth_worker_default_settings;
16 |
17 | extern const struct setting_parser_info imap_urlauth_worker_setting_parser_info;
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/imap/cmd-capability.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "imap-common.h"
4 | #include "imap-commands.h"
5 | #include "str.h"
6 |
7 | bool cmd_capability(struct client_command_context *cmd)
8 | {
9 | client_send_line(cmd->client, t_strconcat(
10 | "* CAPABILITY ", str_c(cmd->client->capability_string), NULL));
11 |
12 | client_send_tagline(cmd, "OK Capability completed.");
13 | return TRUE;
14 | }
15 |
--------------------------------------------------------------------------------
/src/imap/cmd-check.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "imap-common.h"
4 | #include "imap-commands.h"
5 |
6 | bool cmd_check(struct client_command_context *cmd)
7 | {
8 | if (!client_verify_open_mailbox(cmd))
9 | return TRUE;
10 |
11 | return cmd_sync(cmd, MAILBOX_SYNC_FLAG_FULL_READ, IMAP_SYNC_FLAG_SAFE,
12 | "OK Check completed.");
13 | }
14 |
--------------------------------------------------------------------------------
/src/imap/cmd-examine.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "imap-common.h"
4 | #include "imap-commands.h"
5 |
6 | bool cmd_examine(struct client_command_context *cmd)
7 | {
8 | return cmd_select_full(cmd, TRUE);
9 | }
10 |
--------------------------------------------------------------------------------
/src/imap/cmd-lsub.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "imap-common.h"
4 | #include "imap-commands.h"
5 |
6 | bool cmd_lsub(struct client_command_context *cmd)
7 | {
8 | return cmd_list_full(cmd, TRUE);
9 | }
10 |
--------------------------------------------------------------------------------
/src/imap/cmd-noop.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "imap-common.h"
4 | #include "imap-notify.h"
5 | #include "imap-commands.h"
6 |
7 | bool cmd_noop(struct client_command_context *cmd)
8 | {
9 | if (cmd->client->notify_ctx != NULL) {
10 | /* flush any delayed notifications now. this is mainly useful
11 | for testing. */
12 | imap_notify_flush(cmd->client->notify_ctx);
13 | }
14 | return cmd_sync(cmd, 0, IMAP_SYNC_FLAG_SAFE, "OK NOOP completed.");
15 | }
16 |
--------------------------------------------------------------------------------
/src/imap/cmd-unselect.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "imap-common.h"
4 | #include "imap-commands.h"
5 |
6 | bool cmd_unselect(struct client_command_context *cmd)
7 | {
8 | struct client *client = cmd->client;
9 |
10 | if (!client_verify_open_mailbox(cmd))
11 | return TRUE;
12 |
13 | i_assert(client->mailbox_change_lock == NULL);
14 |
15 | imap_client_close_mailbox(client);
16 | client_send_tagline(cmd, "OK Unselect completed.");
17 | return TRUE;
18 | }
19 |
--------------------------------------------------------------------------------
/src/imap/cmd-unsubscribe.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "imap-common.h"
4 | #include "imap-commands.h"
5 |
6 | bool cmd_unsubscribe(struct client_command_context *cmd)
7 | {
8 | return cmd_subscribe_full(cmd, FALSE);
9 | }
10 |
--------------------------------------------------------------------------------
/src/imap/imap-expunge.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_EXPUNGE_H
2 | #define IMAP_EXPUNGE_H
3 |
4 | struct mail_search_arg;
5 |
6 | int imap_expunge(struct mailbox *box, struct mail_search_arg *next_search_arg,
7 | unsigned int *expunged_count)
8 | ATTR_NULL(2);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/imap/imap-master-client.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_MASTER_CLIENT_H
2 | #define IMAP_MASTER_CLIENT_H
3 |
4 | void imap_master_client_create(int fd);
5 | bool imap_master_clients_refresh_proctitle(void);
6 |
7 | void imap_master_clients_init(void);
8 | void imap_master_clients_deinit(void);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/imap/imap-storage-callbacks.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_STORAGE_CALLBACKS_H
2 | #define IMAP_STORAGE_CALLBACKS_H
3 |
4 | #include "imap-client.h"
5 |
6 | const char *
7 | imap_storage_callback_line(const struct mail_storage_progress_details *dtl,
8 | const char *tag);
9 |
10 | int imap_notify_progress(const struct mail_storage_progress_details *dtl,
11 | struct client *client);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/indexer/indexer-client.h:
--------------------------------------------------------------------------------
1 | #ifndef INDEXER_CLIENT_H
2 | #define INDEXER_CLIENT_H
3 |
4 | struct indexer_status;
5 | struct indexer_queue;
6 |
7 | void indexer_client_create(struct master_service_connection *conn,
8 | struct indexer_queue *queue);
9 | void indexer_client_status_callback(const struct indexer_status *status,
10 | void *context);
11 |
12 | unsigned int indexer_clients_get_count(void);
13 | void indexer_clients_destroy_all(void);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/indexer/indexer.h:
--------------------------------------------------------------------------------
1 | #ifndef INDEXER_H
2 | #define INDEXER_H
3 |
4 | #include "lang-indexer-status.h"
5 |
6 | struct indexer_request;
7 |
8 | typedef void
9 | indexer_status_callback_t(const struct indexer_status *status,
10 | struct indexer_request *request);
11 |
12 | void indexer_refresh_proctitle(void);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/indexer/master-connection.h:
--------------------------------------------------------------------------------
1 | #ifndef MASTER_CONNECTION_H
2 | #define MASTER_CONNECTION_H
3 |
4 | bool master_connection_create(struct master_service_connection *conn,
5 | struct mail_storage_service_ctx *storage_service);
6 | void master_connections_destroy(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/indexer/worker-pool.h:
--------------------------------------------------------------------------------
1 | #ifndef WORKER_POOL_H
2 | #define WORKER_POOL_H
3 |
4 | #include "indexer.h"
5 | #include "worker-connection.h"
6 |
7 | struct connection;
8 |
9 | struct worker_pool *
10 | worker_pool_init(const char *socket_path, indexer_status_callback_t *callback,
11 | worker_available_callback_t *avail_callback);
12 | void worker_pool_deinit(struct worker_pool **pool);
13 |
14 | bool worker_pool_have_connections(struct worker_pool *pool);
15 |
16 | bool worker_pool_get_connection(struct worker_pool *pool,
17 | struct connection **conn_r);
18 |
19 | struct connection *
20 | worker_pool_find_username_connection(struct worker_pool *pool,
21 | const char *username);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/src/lib-auth/mycrypt.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifdef HAVE_CONFIG_H
4 | # include "config.h"
5 | #endif
6 |
7 | #define _XOPEN_SOURCE 4
8 | #define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */
9 | #ifndef _AIX
10 | # define _XOPEN_VERSION 4 /* breaks AIX */
11 | #endif
12 | #define _XPG4_2
13 | #ifdef CRYPT_USE_XPG6
14 | # define _XPG6 /* Some Solaris versions require this, some break with this */
15 | #endif
16 | #include
17 | #ifdef HAVE_CRYPT_H
18 | # include
19 | #endif
20 |
21 | #include "mycrypt.h"
22 |
23 | char *mycrypt(const char *key, const char *salt)
24 | {
25 | return crypt(key, salt);
26 | }
27 |
--------------------------------------------------------------------------------
/src/lib-auth/mycrypt.h:
--------------------------------------------------------------------------------
1 | #ifndef MYCRYPT_H
2 | #define MYCRYPT_H
3 |
4 | /* A simple wrapper to crypt(). Problem with it is that it requires
5 | _XOPEN_SOURCE define which breaks other things. */
6 | char *mycrypt(const char *key, const char *salt);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib-auth/password-scheme-private.h:
--------------------------------------------------------------------------------
1 | #ifndef PASSWORD_SCHEME_PRIVATE
2 | #define PASSWORD_SCHEME_PRIVATE 1
3 |
4 | bool password_schemes_weak_allowed(void);
5 |
6 | #endif
7 |
--------------------------------------------------------------------------------
/src/lib-charset/charset-utf8-private.h:
--------------------------------------------------------------------------------
1 | #ifndef CHARSET_UTF8_PRIVATE_H
2 | #define CHARSET_UTF8_PRIVATE_H
3 |
4 | #include "unichar.h"
5 | #include "charset-utf8.h"
6 |
7 | struct charset_utf8_vfuncs {
8 | int (*to_utf8_begin)(const char *charset, normalizer_func_t *normalizer,
9 | struct charset_translation **t_r);
10 | void (*to_utf8_end)(struct charset_translation *t);
11 | void (*to_utf8_reset)(struct charset_translation *t);
12 |
13 | enum charset_result (*to_utf8)(struct charset_translation *t,
14 | const unsigned char *src,
15 | size_t *src_size, buffer_t *dest);
16 | };
17 |
18 | extern const struct charset_utf8_vfuncs charset_utf8only;
19 | extern const struct charset_utf8_vfuncs charset_iconv;
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/src/lib-compression/istream-zlib.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_ZLIB_H
2 | #define ISTREAM_ZLIB_H
3 |
4 | struct istream *i_stream_create_gz(struct istream *input);
5 | struct istream *i_stream_create_deflate(struct istream *input);
6 | struct istream *i_stream_create_bz2(struct istream *input);
7 | struct istream *i_stream_create_lz4(struct istream *input);
8 | struct istream *i_stream_create_zstd(struct istream *input);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/lib-compression/ostream-zlib.h:
--------------------------------------------------------------------------------
1 | #ifndef OSTREAM_ZLIB_H
2 | #define OSTREAM_ZLIB_H
3 |
4 | struct ostream *o_stream_create_gz_auto(struct ostream *output, struct event *event);
5 | struct ostream *o_stream_create_deflate_auto(struct ostream *output, struct event *event);
6 | struct ostream *o_stream_create_bz2_auto(struct ostream *output, struct event *event);
7 | struct ostream *o_stream_create_lz4_auto(struct ostream *output, struct event *event);
8 | struct ostream *o_stream_create_zstd_auto(struct ostream *output, struct event *event);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/lib-dcrypt/dcrypt-iostream.h:
--------------------------------------------------------------------------------
1 | #ifndef DCRYPT_IOSTREAM_H
2 | #define DCRYPT_IOSTREAM_H 1
3 |
4 | static const unsigned char IOSTREAM_CRYPT_MAGIC[] =
5 | {'C','R','Y','P','T','E','D','\x03','\x07'};
6 | #define IOSTREAM_CRYPT_VERSION 2
7 | #define IOSTREAM_TAG_SIZE 16
8 |
9 | enum io_stream_encrypt_flags {
10 | IO_STREAM_ENC_INTEGRITY_HMAC = 0x1,
11 | IO_STREAM_ENC_INTEGRITY_AEAD = 0x2,
12 | IO_STREAM_ENC_INTEGRITY_NONE = 0x4,
13 | IO_STREAM_ENC_VERSION_1 = 0x8,
14 | IO_STREAM_ENC_SAME_CALG = 0x10,
15 | };
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/src/lib-dcrypt/sample-v1_short.asc:
--------------------------------------------------------------------------------
1 | Q1JZUFRFRAMHAQCtAEMDAA+5INzRNr5OAicv3XI4jh//ufjZN9yYr7mElHKNGY+D
2 | D2ziqHhPKVra6JzBzZvfySntDnDvdLAomafpDVlESMlkACB8mhA56i5P7XPoHdP/
3 | w/oi6kooNSk5rd57+OqFiwD6TwAgu4C6eZWV+Spojlk8eOAw784ySgMHK8gDrXhA
4 | Jwg34GcAIPX4RmqXh+7QTAQWtGNHQvjqSygBxSUYkQ3KfPLMymKvAACMLy6/
5 |
--------------------------------------------------------------------------------
/src/lib-dict-backend/dict-sql-private.h:
--------------------------------------------------------------------------------
1 | #ifndef DICT_SQL_PRIVATE_H
2 | #define DICT_SQL_PRIVATE_H 1
3 |
4 | struct sql_dict {
5 | struct dict dict;
6 |
7 | pool_t pool;
8 | struct sql_db *db;
9 | struct dict_sql_map_settings *set;
10 | };
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/lib-dict-backend/dict-sql.h:
--------------------------------------------------------------------------------
1 | #ifndef DICT_SQL_H
2 | #define DICT_SQL_H
3 |
4 | void dict_sql_register(void);
5 | void dict_sql_unregister(void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/lib-dict/dict-lua-private.h:
--------------------------------------------------------------------------------
1 | #ifndef DICT_LUA_PRIVATE_H
2 | #define DICT_LUA_PRIVATE_H
3 |
4 | #include "dict-lua.h"
5 |
6 | int lua_dict_iterate(lua_State *l);
7 | int lua_dict_transaction_begin(lua_State *l);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib-dict/dict-lua.h:
--------------------------------------------------------------------------------
1 | #ifndef DICT_LUA_H
2 | #define DICT_LUA_H
3 |
4 | struct dict;
5 |
6 | #ifdef DLUA_WITH_YIELDS
7 | /*
8 | * Internally, the dict methods yield via lua_yieldk() as implemented in Lua
9 | * 5.3 and newer.
10 | */
11 |
12 | void lua_dict_check_key_prefix(lua_State *L, const char *key,
13 | const char *username);
14 |
15 | void dlua_push_dict(lua_State *L, struct dict *dict);
16 | struct dict *dlua_check_dict(lua_State *L, int idx);
17 |
18 | void dlua_dovecot_dict_register(struct dlua_script *script);
19 |
20 | #endif
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/lib-dns-client/dns-lua.h:
--------------------------------------------------------------------------------
1 | #ifndef DNS_LUA_H
2 | #define DNS_LUA_H
3 |
4 | struct dns_client;
5 |
6 | #ifdef DLUA_WITH_YIELDS
7 | /* Internally, the dns methods yield via lua_yieldk() as implemented in Lua
8 | 5.3 and newer. */
9 |
10 | void dlua_push_dns_client(lua_State *L, struct dns_client *cliet);
11 | struct dns_client *dlua_check_dns_client(lua_State *L, int idx);
12 |
13 | #endif
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/lib-dns/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_LTLIBRARIES = libdns.la
2 |
3 | AM_CPPFLAGS = \
4 | -I$(top_srcdir)/src/lib \
5 | -I$(top_srcdir)/src/lib-test
6 |
7 | libdns_la_SOURCES = \
8 | dns-util.c
9 |
10 | headers = \
11 | dns-util.h
12 |
13 | test_programs = \
14 | test-dns-util
15 |
16 | noinst_PROGRAMS = $(test_programs)
17 |
18 | test_libs = \
19 | libdns.la \
20 | ../lib-test/libtest.la \
21 | ../lib/liblib.la
22 |
23 | test_dns_util_SOURCES = test-dns-util.c
24 | test_dns_util_LDADD = $(test_libs)
25 |
26 | check-local:
27 | for bin in $(test_programs); do \
28 | if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \
29 | done
30 |
31 |
32 | pkginc_libdir=$(pkgincludedir)
33 | pkginc_lib_HEADERS = $(headers)
34 |
--------------------------------------------------------------------------------
/src/lib-doveadm/doveadm-client-lua.h:
--------------------------------------------------------------------------------
1 | #ifndef DOVEADM_CLIENT_LUA_H
2 | #define DOVEADM_CLIENT_LUA_H
3 |
4 | struct doveadm_client;
5 |
6 | #ifdef DLUA_WITH_YIELDS
7 | /*
8 | * Internally, the doveadm_client methods yield via lua_yieldk() as implemented
9 | * in Lua 5.3 and newer.
10 | */
11 |
12 | void dlua_push_doveadm_client(lua_State *L, struct doveadm_client *client);
13 | struct doveadm_client *dlua_check_doveadm_client(lua_State *L, int idx);
14 |
15 | void dlua_dovecot_doveadm_client_register(struct dlua_script *script);
16 |
17 | #endif
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/lib-dovecot/Makefile.am:
--------------------------------------------------------------------------------
1 | pkglib_LTLIBRARIES = libdovecot.la
2 |
3 | libdovecot_la_SOURCES =
4 |
5 | libdovecot_la_LIBADD = \
6 | $(LIBDOVECOT_LA_LIBS) \
7 | $(MODULE_LIBS) \
8 | $(RELRO_LDFLAGS)
9 |
10 | libdovecot_la_DEPENDENCIES = $(LIBDOVECOT_LA_LIBS)
11 | libdovecot_la_LDFLAGS = -export-dynamic
12 |
--------------------------------------------------------------------------------
/src/lib-fs/fs-sis-common.h:
--------------------------------------------------------------------------------
1 | #ifndef FS_SIS_COMMON_H
2 | #define FS_SIS_COMMON_H
3 |
4 | #include "fs-api-private.h"
5 |
6 | #define HASH_DIR_NAME "hashes"
7 |
8 | int fs_sis_path_parse(struct fs_file *file, const char *path,
9 | const char **dir_r, const char **hash_r);
10 | void fs_sis_try_unlink_hash_file(struct fs_file *sis_file,
11 | struct fs_file *super_file);
12 |
13 | #endif
14 |
15 |
--------------------------------------------------------------------------------
/src/lib-fs/istream-fs-file.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_FS_FILE_H
2 | #define ISTREAM_FS_FILE_H
3 |
4 | struct fs_file;
5 |
6 | /* Open the given file only when something is actually tried to be read from
7 | the stream. The file is automatically deinitialized when the stream is
8 | destroyed (which is why it's also set to NULL so it's not accidentally
9 | double-freed). */
10 | struct istream *
11 | i_stream_create_fs_file(struct fs_file **file, size_t max_buffer_size);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/lib-fs/istream-fs-stats.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_FS_STATS_H
2 | #define ISTREAM_FS_STATS_H
3 |
4 | struct fs_file;
5 |
6 | struct istream *
7 | i_stream_create_fs_stats(struct istream *input, struct fs_file *file);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib-fs/istream-metawrap.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_METAWRAP_H
2 | #define ISTREAM_METAWRAP_H
3 |
4 | typedef void
5 | metawrap_callback_t(const char *key, const char *value, void *context);
6 |
7 | /* Input stream is in format "key:value\nkey2:value2\n...\n\ncontents.
8 | The given callback is called for each key/value metadata pair, and the
9 | returned stream will skip over the metadata and return only the contents. */
10 | struct istream *
11 | i_stream_create_metawrap(struct istream *input,
12 | metawrap_callback_t *callback, void *context);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib-fs/ostream-cmp.h:
--------------------------------------------------------------------------------
1 | #ifndef OSTREAM_CMP_H
2 | #define OSTREAM_CMP_H
3 |
4 | /* Compare given input stream to output being written to output stream. */
5 | struct ostream *
6 | o_stream_create_cmp(struct ostream *output, struct istream *input);
7 | /* Returns TRUE if input and output are equal so far. If the caller needs to
8 | know if the files are entirely equal, it should check also if input stream
9 | is at EOF. */
10 | bool o_stream_cmp_equals(struct ostream *output);
11 |
12 | bool stream_cmp_block(struct istream *input,
13 | const unsigned char *data, size_t size);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/lib-fs/ostream-metawrap.h:
--------------------------------------------------------------------------------
1 | #ifndef OSTREAM_METAWRAP_H
2 | #define OSTREAM_METAWRAP_H
3 |
4 | struct ostream *
5 | o_stream_create_metawrap(struct ostream *output,
6 | void (*write_callback)(void *), void *context);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib-http/http-common.h:
--------------------------------------------------------------------------------
1 | #ifndef HTTP_COMMON_H
2 | #define HTTP_COMMON_H
3 |
4 | #define HTTP_DEFAULT_PORT 80
5 | #define HTTPS_DEFAULT_PORT 443
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/lib-http/http-date.h:
--------------------------------------------------------------------------------
1 | #ifndef HTTP_DATE_H
2 | #define HTTP_DATE_H
3 |
4 | /* Parses HTTP-date string into time_t timestamp. */
5 | bool http_date_parse(const unsigned char *data, size_t size,
6 | time_t *timestamp_r);
7 | /* Equal to http_date_parse, but writes uncompensated timestamp to tm_r. */
8 | bool http_date_parse_tm(const unsigned char *data, size_t size,
9 | struct tm *tm_r);
10 |
11 | /* Create HTTP-date string from given time struct. */
12 | const char *http_date_create_tm(struct tm *tm);
13 |
14 | /* Create HTTP-date string from given time. */
15 | const char *http_date_create(time_t timestamp);
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/src/lib-http/http-transfer.h:
--------------------------------------------------------------------------------
1 | #ifndef HTTP_TRANSFER_H
2 | #define HTTP_TRANSFER_H
3 |
4 | struct http_transfer_param {
5 | const char *attribute;
6 | const char *value;
7 | };
8 | ARRAY_DEFINE_TYPE(http_transfer_param, struct http_transfer_param);
9 |
10 | struct http_transfer_coding {
11 | const char *name;
12 | ARRAY_TYPE(http_transfer_param) parameters;
13 |
14 | };
15 | ARRAY_DEFINE_TYPE(http_transfer_coding, struct http_transfer_coding);
16 |
17 |
18 | // FIXME: we currently lack a means to get error strings from the input stream
19 |
20 | struct istream *
21 | http_transfer_chunked_istream_create(struct istream *input, uoff_t max_size);
22 | struct ostream *
23 | http_transfer_chunked_ostream_create(struct ostream *output);
24 |
25 | #endif
26 |
27 |
--------------------------------------------------------------------------------
/src/lib-imap-client/imapc-msgmap.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAPC_MSGMAP_H
2 | #define IMAPC_MSGMAP_H
3 |
4 | struct imapc_msgmap *imapc_msgmap_init(void);
5 | void imapc_msgmap_deinit(struct imapc_msgmap **msgmap);
6 |
7 | uint32_t imapc_msgmap_count(struct imapc_msgmap *msgmap);
8 | uint32_t imapc_msgmap_uidnext(struct imapc_msgmap *msgmap);
9 | uint32_t imapc_msgmap_rseq_to_uid(struct imapc_msgmap *msgmap, uint32_t rseq);
10 | bool imapc_msgmap_uid_to_rseq(struct imapc_msgmap *msgmap,
11 | uint32_t uid, uint32_t *rseq_r);
12 |
13 | void imapc_msgmap_append(struct imapc_msgmap *msgmap,
14 | uint32_t rseq, uint32_t uid);
15 | void imapc_msgmap_expunge(struct imapc_msgmap *msgmap, uint32_t rseq);
16 | void imapc_msgmap_reset(struct imapc_msgmap *msgmap);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/lib-imap-storage/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_LTLIBRARIES = libimap-storage.la
2 |
3 | AM_CPPFLAGS = \
4 | -I$(top_srcdir)/src/lib \
5 | -I$(top_srcdir)/src/lib-test \
6 | -I$(top_srcdir)/src/lib-charset \
7 | -I$(top_srcdir)/src/lib-mail \
8 | -I$(top_srcdir)/src/lib-index \
9 | -I$(top_srcdir)/src/lib-storage \
10 | -I$(top_srcdir)/src/lib-imap
11 |
12 | libimap_storage_la_SOURCES = \
13 | imap-msgpart.c \
14 | imap-msgpart-url.c \
15 | imap-metadata.c
16 |
17 | headers = \
18 | imap-msgpart.h \
19 | imap-msgpart-url.h \
20 | imap-metadata.h
21 |
22 | pkginc_libdir=$(pkgincludedir)
23 | pkginc_lib_HEADERS = $(headers)
24 |
25 |
--------------------------------------------------------------------------------
/src/lib-imap-urlauth/imap-urlauth-backend.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_URLAUTH_BACKEND_H
2 | #define IMAP_URLAUTH_BACKEND_H
3 |
4 | #define IMAP_URLAUTH_KEY_LEN 64
5 |
6 | struct imap_urlauth_backend;
7 |
8 | int imap_urlauth_backend_get_mailbox_key(struct mailbox *box, bool create,
9 | unsigned char mailbox_key_r[IMAP_URLAUTH_KEY_LEN],
10 | const char **client_error_r,
11 | enum mail_error *error_code_r);
12 | int imap_urlauth_backend_reset_mailbox_key(struct mailbox *box);
13 | int imap_urlauth_backend_reset_all_keys(struct mail_user *user);
14 |
15 | #endif
16 |
17 |
--------------------------------------------------------------------------------
/src/lib-imap-urlauth/imap-urlauth-private.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_URLAUTH_PRIVATE_H
2 | #define IMAP_URLAUTH_PRIVATE_H
3 |
4 | #include "imap-urlauth.h"
5 |
6 | struct imap_urlauth_context {
7 | struct mail_user *user;
8 | struct imap_urlauth_connection *conn;
9 |
10 | char *url_host;
11 | in_port_t url_port;
12 |
13 | char *access_user;
14 | char *access_service;
15 | const char **access_applications;
16 |
17 | bool access_anonymous:1;
18 | };
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/src/lib-imap/fuzz-imap-utf7.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2020 Dovecot authors, see the included COPYING file */
2 |
3 | #include "lib.h"
4 | #include "str.h"
5 | #include "fuzzer.h"
6 | #include "imap-utf7.h"
7 |
8 | FUZZ_BEGIN_STR(const char *str)
9 | {
10 | string_t *dest = t_str_new(32);
11 |
12 | imap_utf8_to_utf7(str, dest);
13 | imap_utf7_to_utf8(str, dest);
14 | }
15 | FUZZ_END
16 |
--------------------------------------------------------------------------------
/src/lib-imap/imap-base-subject.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_BASE_SUBJECT_H
2 | #define IMAP_BASE_SUBJECT_H
3 |
4 | /* Returns the base subject of the given string, according to
5 | draft-ietf-imapext-sort-10. String is returned so that it's suitable for
6 | strcmp() comparing with another base subject.
7 |
8 | is_reply_or_forward is set to TRUE if message looks like reply or forward,
9 | according to draft-ietf-imapext-thread-12 rules. */
10 | const char *imap_get_base_subject_cased(pool_t pool, const char *subject,
11 | bool *is_reply_or_forward_r);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/lib-imap/imap-envelope.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_ENVELOPE_H
2 | #define IMAP_ENVELOPE_H
3 |
4 | struct imap_arg;
5 | struct message_part_envelope;
6 |
7 | /* Write envelope to given string */
8 | void imap_envelope_write(struct message_part_envelope *data,
9 | string_t *str);
10 |
11 | /* Parse envelope from arguments */
12 | bool imap_envelope_parse_args(const struct imap_arg *args,
13 | pool_t pool, struct message_part_envelope **envlp_r,
14 | const char **error_r);
15 | /* Parse envelope from string */
16 | bool imap_envelope_parse(const char *envelope,
17 | pool_t pool, struct message_part_envelope **envlp_r,
18 | const char **error_r);
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/src/lib-imap/imap-seqset.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_SEQSET_H
2 | #define IMAP_SEQSET_H
3 |
4 | #include "seq-range-array.h"
5 |
6 | /* Parse IMAP sequence-set and store the result in dest. '*' is stored as
7 | (uint32_t)-1. Returns 0 if successful, -1 if input is invalid. */
8 | int imap_seq_set_parse(const char *str, ARRAY_TYPE(seq_range) *dest);
9 | /* Like imap_seq_set_parse(), but fail if '*' is used. */
10 | int imap_seq_set_nostar_parse(const char *str, ARRAY_TYPE(seq_range) *dest);
11 |
12 | /* Parse IMAP seq-number / seq-range. */
13 | int imap_seq_range_parse(const char *str, uint32_t *seq1_r, uint32_t *seq2_r);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/lib-imap/imap-stats.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_STATS_H
2 | #define IMAP_STATS_H
3 |
4 | /* Statistics that are used in the imap_logout_format message. */
5 | struct imap_logout_stats {
6 | unsigned int fetch_hdr_count, fetch_body_count;
7 | uint64_t fetch_hdr_bytes, fetch_body_bytes;
8 | unsigned int deleted_count, expunged_count, trashed_count;
9 | unsigned int autoexpunged_count, append_count;
10 | uoff_t input_bytes_extra, output_bytes_extra;
11 | };
12 |
13 | #endif /* IMAP_STATS_H */
14 |
--------------------------------------------------------------------------------
/src/lib-language/lang-indexer-status.h:
--------------------------------------------------------------------------------
1 | #ifndef LANG_INDEXER_STATUS_H
2 | #define LANG_INDEXER_STATUS_H
3 |
4 | enum indexer_state {
5 | INDEXER_STATE_PROCESSING = 0,
6 | INDEXER_STATE_COMPLETED = 1,
7 | INDEXER_STATE_FAILED = -1,
8 | };
9 |
10 | struct indexer_status {
11 | enum indexer_state state;
12 | unsigned int progress;
13 | unsigned int total;
14 | };
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/lib-language/lang-library.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "lib.h"
4 | #include "language.h"
5 | #include "lang-tokenizer.h"
6 | #include "lang-filter.h"
7 | #include "lang-library.h"
8 |
9 | void lang_library_init(void)
10 | {
11 | languages_init();
12 | lang_tokenizers_init();
13 | lang_filters_init();
14 | }
15 |
16 | void lang_library_deinit(void)
17 | {
18 | languages_deinit();
19 | lang_tokenizers_deinit();
20 | lang_filters_deinit();
21 | }
22 |
--------------------------------------------------------------------------------
/src/lib-language/lang-library.h:
--------------------------------------------------------------------------------
1 | #ifndef LANG_LIBRARY_H
2 | #define LANG_LIBRARY_H
3 |
4 | void lang_library_init(void);
5 | void lang_library_deinit(void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/lib-language/lang-tokenizer-common.h:
--------------------------------------------------------------------------------
1 | #ifndef LANG_TOKENIZER_COMMON_H
2 | #define LANG_TOKENIZER_COMMON_H
3 | void
4 | lang_tokenizer_delete_trailing_partial_char(const unsigned char *data,
5 | size_t *len);
6 | void
7 | lang_tokenizer_delete_trailing_invalid_char(const unsigned char *data,
8 | size_t *len);
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib-lda/lda-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef LDA_SETTINGS_H
2 | #define LDA_SETTINGS_H
3 |
4 | struct mail_user_settings;
5 |
6 | struct lda_settings {
7 | pool_t pool;
8 | const char *hostname;
9 | const char *rejection_subject;
10 | const char *rejection_reason;
11 | const char *deliver_log_format;
12 | const char *recipient_delimiter;
13 | const char *lda_original_recipient_header;
14 |
15 | bool quota_full_tempfail;
16 | bool lda_mailbox_autocreate;
17 | bool lda_mailbox_autosubscribe;
18 |
19 | /* generated */
20 | bool parsed_want_storage_id;
21 | };
22 |
23 | extern const struct setting_parser_info lda_setting_parser_info;
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/src/lib-lda/mail-send.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIL_SEND_H
2 | #define MAIL_SEND_H
3 |
4 | struct mail;
5 | struct mail_deliver_context;
6 |
7 | int mail_send_rejection(struct mail_deliver_context *ctx,
8 | const struct smtp_address *recipient,
9 | const char *reason);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/src/lib-ldap/ldap-settings-parse.h:
--------------------------------------------------------------------------------
1 | #ifndef LDAP_SETTINGS_PARSE_H
2 | #define LDAP_SETTINGS_PARSE_H
3 |
4 | #include
5 |
6 | static inline int ldap_parse_scope(const char *str, int *scope_r)
7 | {
8 | if (strcasecmp(str, "base") == 0)
9 | *scope_r = LDAP_SCOPE_BASE;
10 | else if (strcasecmp(str, "onelevel") == 0)
11 | *scope_r = LDAP_SCOPE_ONELEVEL;
12 | else if (strcasecmp(str, "subtree") == 0)
13 | *scope_r = LDAP_SCOPE_SUBTREE;
14 | else
15 | return -1;
16 | return 0;
17 | }
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/lib-ldap/ldap-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef LDAP_SETTINGS_H
2 | #define LDAP_SETTINGS_H
3 |
4 | struct ssl_settings;
5 |
6 | struct ldap_client_settings {
7 | pool_t pool;
8 |
9 | const char *uris;
10 | const char *auth_dn;
11 | const char *auth_dn_password;
12 |
13 | unsigned int timeout_secs;
14 | unsigned int max_idle_time_secs;
15 | unsigned int debug_level;
16 | bool starttls;
17 | };
18 |
19 | extern const struct setting_parser_info ldap_client_setting_parser_info;
20 |
21 | int ldap_client_settings_get(struct event *event,
22 | const struct ldap_client_settings **set_r,
23 | const struct ssl_settings **ssl_set_r,
24 | const char **error_r);
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/src/lib-ldap/ldap-utils.h:
--------------------------------------------------------------------------------
1 | #ifndef LDAP_UTILS_H
2 | #define LDAP_UTILS_H
3 |
4 | #include
5 |
6 | struct ssl_settings;
7 |
8 | int ldap_set_opt(LDAP *ld, int opt, const void *value,
9 | const char *optname, const char *value_str,
10 | const char **error_r);
11 |
12 | int ldap_set_opt_str(LDAP *ld, int opt, const char *value,
13 | const char *optname, const char **error_r);
14 |
15 | int ldap_set_tls_options(LDAP *ld, bool starttls, const char *uris,
16 | const struct ssl_settings *ssl_set,
17 | const char **error_r);
18 |
19 | int ldap_set_tls_validate(const struct ssl_settings *set, const char **error_r);
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/src/lib-lua/dlua-error.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2021 Dovecot authors, see the included COPYING file */
2 |
3 | #include "lib.h"
4 | #include "dlua-script-private.h"
5 |
6 | int dluaL_error(lua_State *L, const char *fmt, ...)
7 | {
8 | va_list argp;
9 | va_start(argp, fmt);
10 | (void)dlua_push_vfstring(L, fmt, argp);
11 | va_end(argp);
12 | return lua_error(L);
13 | }
14 |
--------------------------------------------------------------------------------
/src/lib-lua/dlua-pushstring.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2021 Dovecot authors, see the included COPYING file */
2 |
3 | #include "lib.h"
4 | #include "str.h"
5 | #include "dlua-script-private.h"
6 |
7 | const char *dlua_push_vfstring(lua_State *L, const char *fmt, va_list argp)
8 | {
9 | const char *str;
10 | T_BEGIN {
11 | str = t_strdup_vprintf(fmt, argp);
12 | (void)lua_pushstring(L, str);
13 | str = lua_tostring(L, -1);
14 | } T_END;
15 | return str;
16 | }
17 |
18 | const char *dlua_push_fstring(lua_State *L, const char *fmt, ...)
19 | {
20 | const char *str;
21 | va_list argp;
22 | va_start(argp, fmt);
23 | str = dlua_push_vfstring(L, fmt, argp);
24 | va_end(argp);
25 | return str;
26 | }
27 |
--------------------------------------------------------------------------------
/src/lib-lua/test-lua-base64.lua:
--------------------------------------------------------------------------------
1 | function test_base64()
2 | local input = "test value"
3 | local result = "dGVzdCB2YWx1ZQ=="
4 |
5 | local encoded = dovecot.base64.encode(input)
6 | test_assert("encoded = \" .. result .. \"", encoded == result)
7 | local output = dovecot.base64.decode(encoded)
8 | test_assert("output = \" .. input .. \"", output == input)
9 | end
10 |
--------------------------------------------------------------------------------
/src/lib-mail/istream-binary-converter.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_BINARY_CONVERTER_H
2 | #define ISTREAM_BINARY_CONVERTER_H
3 |
4 | struct istream *i_stream_create_binary_converter(struct istream *input);
5 |
6 | #endif
7 |
--------------------------------------------------------------------------------
/src/lib-mail/istream-qp.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_QP_H
2 | #define ISTREAM_QP_H
3 |
4 | #include "qp-encoder.h"
5 |
6 | #define ISTREAM_QP_ENCODER_MAX_LINE_LENGTH 75
7 |
8 | struct istream *i_stream_create_qp_decoder(struct istream *input);
9 | struct istream *i_stream_create_qp_encoder(struct istream *input,
10 | enum qp_encoder_flag flags);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/lib-mail/mail-html2text.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIL_HTML2TEXT_H
2 | #define MAIL_HTML2TEXT_H
3 |
4 | enum mail_html2text_flags {
5 | MAIL_HTML2TEXT_FLAG_SKIP_QUOTED = 0x01
6 | };
7 |
8 | struct mail_html2text *
9 | mail_html2text_init(enum mail_html2text_flags flags);
10 | void mail_html2text_more(struct mail_html2text *ht,
11 | const unsigned char *data, size_t size,
12 | buffer_t *output);
13 | void mail_html2text_deinit(struct mail_html2text **ht);
14 |
15 | static inline bool
16 | mail_html2text_content_type_match(const char *content_type)
17 | {
18 | return strcasecmp(content_type, "text/html") == 0 ||
19 | strcasecmp(content_type, "application/xhtml+xml") == 0;
20 | }
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/lib-mail/mail-types.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIL_TYPES_H
2 | #define MAIL_TYPES_H
3 |
4 | enum mail_flags {
5 | MAIL_ANSWERED = 0x01,
6 | MAIL_FLAGGED = 0x02,
7 | MAIL_DELETED = 0x04,
8 | MAIL_SEEN = 0x08,
9 | MAIL_DRAFT = 0x10,
10 | MAIL_RECENT = 0x20,
11 |
12 | MAIL_FLAGS_MASK = 0x3f,
13 | MAIL_FLAGS_NONRECENT = (MAIL_FLAGS_MASK ^ MAIL_RECENT)
14 | };
15 |
16 | enum modify_type {
17 | MODIFY_ADD,
18 | MODIFY_REMOVE,
19 | MODIFY_REPLACE
20 | };
21 |
22 | ARRAY_DEFINE_TYPE(keywords, const char *);
23 | ARRAY_DEFINE_TYPE(keyword_indexes, unsigned int);
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/src/lib-mail/mbox-from.h:
--------------------------------------------------------------------------------
1 | #ifndef MBOX_FROM_H
2 | #define MBOX_FROM_H
3 |
4 | /* Parse time and sender from mbox-compatible From_-line. msg points to the
5 | data after "From ". */
6 | int mbox_from_parse(const unsigned char *msg, size_t size,
7 | time_t *time_r, int *tz_offset_r, char **sender_r);
8 | /* Return a mbox-compatible From_-line using given sender and time.
9 | The returned string begins with "From ". */
10 | const char *mbox_from_create(const char *sender, time_t timestamp);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/lib-mail/message-date.h:
--------------------------------------------------------------------------------
1 | #ifndef MESSAGE_DATE_H
2 | #define MESSAGE_DATE_H
3 |
4 | /* Parses RFC2822 date/time string. timezone_offset is filled with the
5 | timezone's difference to UTC in minutes. */
6 | bool message_date_parse(const unsigned char *data, size_t size,
7 | time_t *timestamp_r, int *timezone_offset_r);
8 |
9 | /* Create RFC2822 date/time string from given time in local timezone. */
10 | const char *message_date_create(time_t timestamp);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/lib-mail/message-header-hash.h:
--------------------------------------------------------------------------------
1 | #ifndef MESSAGE_HEADER_HASH_H
2 | #define MESSAGE_HEADER_HASH_H
3 |
4 | #define MESSAGE_HEADER_HASH_MAX_VERSION 4
5 |
6 | struct hash_method;
7 |
8 | struct message_header_hash_context {
9 | bool prev_was_questionmark;
10 | };
11 |
12 | /* Initialize ctx with zeros. */
13 | void message_header_hash_more(struct message_header_hash_context *ctx,
14 | const struct hash_method *method, void *context,
15 | unsigned int version,
16 | const unsigned char *data, size_t size);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/lib-mail/message-id.h:
--------------------------------------------------------------------------------
1 | #ifndef MESSAGE_ID_H
2 | #define MESSAGE_ID_H
3 |
4 | /* Returns the next valid message ID from a given Message-ID header.
5 | The return value is allocated from data stack. */
6 | const char *message_id_get_next(const char **msgid_p);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib-mail/message-part-serialize.h:
--------------------------------------------------------------------------------
1 | #ifndef MESSAGE_PART_SERIALIZE_H
2 | #define MESSAGE_PART_SERIALIZE_H
3 |
4 | struct message_part;
5 | struct message_size;
6 |
7 | /* Serialize message part. */
8 | void message_part_serialize(struct message_part *part, buffer_t *dest);
9 |
10 | /* Generate struct message_part from serialized data. Returns NULL and sets
11 | error if any problems are detected. */
12 | struct message_part *
13 | message_part_deserialize(pool_t pool, const void *data, size_t size,
14 | const char **error_r);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/lib-mail/message-snippet.h:
--------------------------------------------------------------------------------
1 | #ifndef MESSAGE_SNIPPET_H
2 | #define MESSAGE_SNIPPET_H
3 |
4 | /* Generate UTF-8 text snippet from the beginning of the given mail input
5 | stream. The stream is expected to start at the MIME part's headers whose
6 | snippet is being generated. Returns 0 if ok, -1 if I/O error.
7 |
8 | Currently only Content-Type: text/ is supported, others will result in an
9 | empty string. */
10 | int message_snippet_generate(struct istream *input,
11 | unsigned int max_snippet_chars,
12 | string_t *snippet);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib-mail/ostream-dot.h:
--------------------------------------------------------------------------------
1 | #ifndef OSTREAM_DOT_H
2 | #define OSTREAM_DOT_H
3 |
4 | /* Create output stream for writing SMTP DATA style message: Add additional "."
5 | to lines that start with ".". Write a line that contains only "." upon
6 | o_stream_flush(). (This is also called at close(), but it shouldn't be
7 | relied on since it could fail due to output buffer being full.)
8 |
9 | If output ends with CRLF, force_extra_crlf controls whether additional CRLF
10 | is written before the "." line. This parameter should match
11 | i_stream_create_dot()'s send_last_lf parameter (reversed). */
12 | struct ostream *o_stream_create_dot(struct ostream *output,
13 | bool force_extra_crlf);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/lib-mail/quoted-printable.h:
--------------------------------------------------------------------------------
1 | #ifndef QUOTED_PRINTABLE_H
2 | #define QUOTED_PRINTABLE_H
3 |
4 | /* Decode MIME "Q" encoding. */
5 | int quoted_printable_q_decode(const unsigned char *src, size_t src_size,
6 | buffer_t *dest);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib-mail/rfc2231-parser.h:
--------------------------------------------------------------------------------
1 | #ifndef RFC2231_PARSER_H
2 | #define RFC2231_PARSER_H
3 |
4 | /* Parse all content parameters using rfc822_parse_content_param() and return
5 | them as a NULL-terminated [key, value] array. RFC 2231-style continuations
6 | are merged to a single key. NULs are converted into unicode replacement
7 | character (U+FFFD). Returns -1 if some of the input was invalid (but valid
8 | key/value pairs are still returned), 0 if everything looked ok. */
9 | int ATTR_NOWARN_UNUSED_RESULT
10 | rfc2231_parse(struct rfc822_parser_context *ctx,
11 | const char *const **result_r);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/lib-master/.gitignore:
--------------------------------------------------------------------------------
1 | .test-temp-*
2 |
--------------------------------------------------------------------------------
/src/lib-master/master-service-ssl.h:
--------------------------------------------------------------------------------
1 | #ifndef MASTER_SERVICE_SSL_H
2 | #define MASTER_SERVICE_SSL_H
3 |
4 | bool master_service_ssl_is_enabled(struct master_service *service);
5 |
6 | void master_service_ssl_ctx_init(struct master_service *service);
7 | void master_service_ssl_ctx_deinit(struct master_service *service);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib-master/stats-client.h:
--------------------------------------------------------------------------------
1 | #ifndef STATS_CLIENT_H
2 | #define STATS_CLIENT_H
3 |
4 | struct stats_client *stats_client_init(const char *path, bool silent_errors);
5 | void stats_client_deinit(struct stats_client **client);
6 |
7 | struct stats_client *
8 | stats_client_init_unittest(buffer_t *buf, const char *filter);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/lib-master/syslog-util.h:
--------------------------------------------------------------------------------
1 | #ifndef SYSLOG_UTIL_H
2 | #define SYSLOG_UTIL_H
3 |
4 | struct syslog_facility_list {
5 | const char *name;
6 | int facility;
7 | };
8 |
9 | extern struct syslog_facility_list syslog_facilities[];
10 |
11 | /* Returns TRUE if found. */
12 | bool syslog_facility_find(const char *name, int *facility_r);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib-oauth2/oauth2.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "lib.h"
4 | #include "buffer.h"
5 | #include "istream.h"
6 | #include "json-istream.h"
7 | #include "json-tree-io.h"
8 | #include "oauth2.h"
9 | #include "oauth2-private.h"
10 |
11 | int oauth2_json_tree_build(const buffer_t *json, struct json_tree **jtree_r,
12 | const char **error_r)
13 | {
14 | return json_tree_read_buffer(json, 0, jtree_r, error_r);
15 | }
16 |
17 | bool oauth2_valid_token(const char *token)
18 | {
19 | if (token == NULL || *token == '\0' || strpbrk(token, "\r\n") != NULL)
20 | return FALSE;
21 | return TRUE;
22 | }
23 |
--------------------------------------------------------------------------------
/src/lib-otp/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_LTLIBRARIES = libotp.la
2 |
3 | AM_CPPFLAGS = \
4 | -I$(top_srcdir)/src/lib
5 |
6 | libotp_la_SOURCES = \
7 | otp-dictionary.c \
8 | otp-hash.c \
9 | otp-parity.c \
10 | otp-parse.c
11 |
12 | noinst_HEADERS = \
13 | otp.h \
14 | otp-dictionary.h \
15 | otp-hash.h \
16 | otp-parity.h \
17 | otp-parse.h
18 |
--------------------------------------------------------------------------------
/src/lib-otp/otp-dictionary.h:
--------------------------------------------------------------------------------
1 | #ifndef OTP_DICTIONARY_H
2 | #define OTP_DICTIONARY_H
3 |
4 | int otp_lookup_word(const char *word);
5 |
6 | #endif
7 |
--------------------------------------------------------------------------------
/src/lib-otp/otp-parity.h:
--------------------------------------------------------------------------------
1 | #ifndef OTP_PARITY_H
2 | #define OTP_PARITY_H
3 |
4 | extern const unsigned char parity_table[256];
5 |
6 | static inline unsigned int otp_parity(unsigned char *data)
7 | {
8 | unsigned int i, parity = 0;
9 |
10 | for (i = 0; i < OTP_HASH_SIZE; i++)
11 | parity += parity_table[*data++];
12 |
13 | return parity & 3;
14 | }
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/lib-otp/otp-parse.h:
--------------------------------------------------------------------------------
1 | #ifndef OTP_PARSE_H
2 | #define OTP_PARSE_H
3 |
4 | int otp_read_hex(const char *data, const char **endptr, unsigned char *hash);
5 | int otp_read_words(const char *data, const char **endptr, unsigned char *hash);
6 | int otp_read_new_params(const char *data, const char **endptr,
7 | struct otp_state *state);
8 |
9 | int otp_parse_response(const char *data, unsigned char *hash, bool hex);
10 | int otp_parse_init_response(const char *data, struct otp_state *new_state,
11 | unsigned char *hash, bool hex, const char **error);
12 |
13 | int otp_parse_dbentry(const char *text, struct otp_state *state);
14 | const char *otp_print_dbentry(const struct otp_state *state);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/lib-otp/otp.h:
--------------------------------------------------------------------------------
1 | #ifndef OTP_H
2 | #define OTP_H
3 |
4 | #define OTP_MAX_SEED_LEN 16
5 | #define OTP_MAX_WORD_LEN 4
6 | #define OTP_WORDS_NUMBER 6
7 |
8 | #define OTP_HASH_SIZE 8
9 |
10 | struct otp_state {
11 | unsigned int algo;
12 | int seq;
13 | unsigned char hash[OTP_HASH_SIZE];
14 | char seed[OTP_MAX_SEED_LEN + 1];
15 | };
16 |
17 | #include "otp-hash.h"
18 | #include "otp-dictionary.h"
19 | #include "otp-parity.h"
20 | #include "otp-parse.h"
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/lib-pop3/Makefile.am:
--------------------------------------------------------------------------------
1 | headers = \
2 | pop3-capability.h \
3 | pop3-protocol.h
4 |
5 | pkginc_libdir=$(pkgincludedir)
6 | pkginc_lib_HEADERS = $(headers)
7 |
--------------------------------------------------------------------------------
/src/lib-pop3/pop3-capability.h:
--------------------------------------------------------------------------------
1 | #ifndef POP3_CAPABILITY_H
2 | #define POP3_CAPABILITY_H
3 |
4 | #define POP3_CAPABILITY_REPLY \
5 | "CAPA\r\n" \
6 | "TOP\r\n" \
7 | "UIDL\r\n" \
8 | "RESP-CODES\r\n" \
9 | "PIPELINING\r\n" \
10 | "AUTH-RESP-CODE\r\n"
11 |
12 | /* + SASL */
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib-pop3/pop3-protocol.h:
--------------------------------------------------------------------------------
1 | #ifndef POP3_PROTOCOL_H
2 | #define POP3_PROTOCOL_H
3 |
4 | #define POP3_DEFAULT_PORT 110
5 | #define POP3S_DEFAULT_PORT 995
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/lib-settings/settings-history-core.txt:
--------------------------------------------------------------------------------
1 | default service/anvil/unix_listener/anvil/unix_listener_mode 0600 2.4.2 -
2 | default service/anvil/unix_listener/anvil/unix_listener_group 2.4.2 -
3 | default service/lmtp/service_restart_request_count unlimited 2.4.1 -
4 | default service/auth/unix_listener/auth-userdb/unix_listener_group 2.4.1 -
5 | default mail_cache_fields flags 2.4.1 -
6 | default lmtp_user_concurrency_limit 0 2.4.1 -
7 |
--------------------------------------------------------------------------------
/src/lib-smtp/smtp-submit-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef SMTP_SUBMIT_SETTINGS_H
2 | #define SMTP_SUBMIT_SETTINGS_H
3 |
4 | struct smtp_submit_settings {
5 | pool_t pool;
6 | const char *hostname;
7 | bool mail_debug;
8 |
9 | const char *submission_host;
10 | const char *sendmail_path;
11 | unsigned int submission_timeout;
12 |
13 | const char *submission_ssl;
14 | };
15 |
16 | extern const struct setting_parser_info smtp_submit_setting_parser_info;
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/lib-smtp/test-bin/sendmail-exit-1.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | cat > /dev/null
4 | exit 1;
5 |
--------------------------------------------------------------------------------
/src/lib-smtp/test-bin/sendmail-success.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | cat > $1
4 | exit 0;
5 |
--------------------------------------------------------------------------------
/src/lib-ssl-iostream/dovecot-openssl-common.h:
--------------------------------------------------------------------------------
1 | #ifndef DOVECOT_OPENSSL_COMMON_H
2 | #define DOVECOT_OPENSSL_COMMON_H
3 |
4 | /* Initialize OpenSSL if this is the first instance.
5 | Increase initialization reference count. */
6 | void dovecot_openssl_common_global_ref(void);
7 | /* Deinitialize OpenSSL if this is the last instance. Returns TRUE if there
8 | are more instances left. */
9 | bool dovecot_openssl_common_global_unref(void);
10 |
11 | /* Set OpenSSL engine if it's not already set. Returns 1 on success, 0 if engine
12 | is unknown, -1 on other error. error_r is set on 0/-1. */
13 | int dovecot_openssl_common_global_set_engine(const char *engine,
14 | const char **error_r);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/lib-ssl-iostream/iostream-ssl-test.h:
--------------------------------------------------------------------------------
1 | #ifndef IOSTREAM_SSL_TEST_H
2 | #define IOSTREAM_SSL_TEST_H
3 |
4 | struct ssl_iostream_settings;
5 |
6 | void ssl_iostream_test_settings_server(struct ssl_iostream_settings *test_set);
7 | void ssl_iostream_test_settings_client(struct ssl_iostream_settings *test_set);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib-storage/fail-mail-storage.h:
--------------------------------------------------------------------------------
1 | #ifndef FAIL_MAIL_STORAGE_H
2 | #define FAIL_MAIL_STORAGE_H
3 |
4 | extern struct mail_storage fail_storage;
5 | extern struct mailbox fail_mailbox;
6 | extern struct mail_vfuncs fail_mail_vfuncs;
7 |
8 | struct mail_storage *fail_mail_storage_create(void);
9 |
10 | struct mailbox *
11 | fail_mailbox_alloc(struct mail_storage *storage, struct mailbox_list *list,
12 | const char *vname, enum mailbox_flags flags);
13 |
14 | struct mail *
15 | fail_mailbox_mail_alloc(struct mailbox_transaction_context *t,
16 | enum mail_fetch_field wanted_fields,
17 | struct mailbox_header_lookup_ctx *wanted_headers);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/lib-storage/index/dbox-common/dbox-attachment.h:
--------------------------------------------------------------------------------
1 | #ifndef DBOX_ATTACHMENT_H
2 | #define DBOX_ATTACHMENT_H
3 |
4 | #include "index-attachment.h"
5 |
6 | struct dbox_file;
7 |
8 | void dbox_attachment_save_write_metadata(struct mail_save_context *ctx,
9 | string_t *str);
10 |
11 | /* Build a single message body stream out of the current message and all of its
12 | attachments. */
13 | int dbox_attachment_file_get_stream(struct dbox_file *file,
14 | struct istream **stream);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/lib-storage/index/dbox-multi/mdbox-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef MDBOX_SETTINGS_H
2 | #define MDBOX_SETTINGS_H
3 |
4 | struct mdbox_settings {
5 | pool_t pool;
6 | bool mdbox_preallocate_space;
7 | uoff_t mdbox_rotate_size;
8 | unsigned int mdbox_rotate_interval;
9 | };
10 |
11 | extern const struct setting_parser_info mdbox_setting_parser_info;
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.h:
--------------------------------------------------------------------------------
1 | #ifndef MDBOX_STORAGE_REBUILD_H
2 | #define MDBOX_STORAGE_REBUILD_H
3 |
4 | enum mdbox_rebuild_reason {
5 | /* Storage was marked as corrupted earlier */
6 | MDBOX_REBUILD_REASON_CORRUPTED = BIT(0),
7 | /* Mailbox index was marked fsck'd */
8 | MDBOX_REBUILD_REASON_MAILBOX_FSCKD = BIT(1),
9 | /* dovecot.map.index was marked fsck'd */
10 | MDBOX_REBUILD_REASON_MAP_FSCKD = BIT(2),
11 | /* Forced rebuild (e.g. doveadm force-resync) */
12 | MDBOX_REBUILD_REASON_FORCED = BIT(3),
13 | };
14 |
15 | int mdbox_storage_rebuild(struct mdbox_storage *storage,
16 | struct mailbox *fsckd_box,
17 | enum mdbox_rebuild_reason reason);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/lib-storage/index/dbox-single/sdbox-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef SDBOX_SETTINGS_H
2 | #define SDBOX_SETTINGS_H
3 |
4 | struct sdbox_settings {
5 | pool_t pool;
6 | };
7 |
8 | extern const struct setting_parser_info sdbox_setting_parser_info;
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/lib-storage/index/imapc/imapc-search.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAPC_SEARCH_H
2 | #define IMAPC_SEARCH_H
3 |
4 | struct mail_search_context *
5 | imapc_search_init(struct mailbox_transaction_context *t,
6 | struct mail_search_args *args,
7 | const enum mail_sort_type *sort_program,
8 | enum mail_fetch_field wanted_fields,
9 | struct mailbox_header_lookup_ctx *wanted_headers);
10 | bool imapc_search_next_update_seq(struct mail_search_context *ctx);
11 | int imapc_search_deinit(struct mail_search_context *ctx);
12 |
13 | void imapc_search_reply_search(const struct imap_arg *args,
14 | struct imapc_mailbox *mbox);
15 | void imapc_search_reply_esearch(const struct imap_arg *args,
16 | struct imapc_mailbox *mbox);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/lib-storage/index/index-pop3-uidl.h:
--------------------------------------------------------------------------------
1 | #ifndef INDEX_POP3_H
2 | #define INDEX_POP3_H
3 |
4 | struct mail_index_transaction;
5 | struct mail;
6 | struct mailbox;
7 | struct mailbox_transaction_context;
8 |
9 | void index_pop3_uidl_set_max_uid(struct mailbox *box,
10 | struct mail_index_transaction *trans,
11 | uint32_t uid);
12 | bool index_pop3_uidl_can_exist(struct mail *mail);
13 | void index_pop3_uidl_update_exists(struct mail *mail, bool exists);
14 | void index_pop3_uidl_update_exists_finish(struct mailbox_transaction_context *trans);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/lib-storage/index/index-search-result.h:
--------------------------------------------------------------------------------
1 | #ifndef INDEX_SEARCH_RESULT_H
2 | #define INDEX_SEARCH_RESULT_H
3 |
4 | int index_search_result_update_flags(struct mail_search_result *result,
5 | const ARRAY_TYPE(seq_range) *uids);
6 | int index_search_result_update_appends(struct mail_search_result *result,
7 | unsigned int old_messages_count);
8 | void index_search_results_update_expunges(struct mailbox *box,
9 | const ARRAY_TYPE(seq_range) *expunges);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/src/lib-storage/index/index-sort.h:
--------------------------------------------------------------------------------
1 | #ifndef INDEX_SORT_H
2 | #define INDEX_SORT_H
3 |
4 | struct mail_search_sort_program;
5 |
6 | struct mail_search_sort_program *
7 | index_sort_program_init(struct mailbox_transaction_context *t,
8 | const enum mail_sort_type *sort_program);
9 | int index_sort_program_deinit(struct mail_search_sort_program **program);
10 |
11 | void index_sort_list_add(struct mail_search_sort_program *program,
12 | struct mail *mail);
13 | void index_sort_list_finish(struct mail_search_sort_program *program);
14 |
15 | bool index_sort_list_next(struct mail_search_sort_program *program,
16 | uint32_t *seq_r);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/lib-storage/index/istream-mail.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_MAIL_H
2 | #define ISTREAM_MAIL_H
3 |
4 | struct istream *i_stream_create_mail(struct mail *mail, struct istream *input,
5 | bool input_has_body);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/lib-storage/index/maildir/maildir-filename-flags.h:
--------------------------------------------------------------------------------
1 | #ifndef MAILDIR_FILENAME_FLAGS_H
2 | #define MAILDIR_FILENAME_FLAGS_H
3 |
4 | void maildir_filename_flags_get(struct maildir_keywords_sync_ctx *ctx,
5 | const char *fname, enum mail_flags *flags_r,
6 | ARRAY_TYPE(keyword_indexes) *keywords_r);
7 |
8 | const char *maildir_filename_flags_set(const char *fname, enum mail_flags flags);
9 | const char *maildir_filename_flags_kw_set(struct maildir_keywords_sync_ctx *ctx,
10 | const char *fname, enum mail_flags flags,
11 | ARRAY_TYPE(keyword_indexes) *keywords);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/lib-storage/index/maildir/maildir-filename.h:
--------------------------------------------------------------------------------
1 | #ifndef MAILDIR_FILENAME_H
2 | #define MAILDIR_FILENAME_H
3 |
4 | struct maildir_keywords_sync_ctx;
5 |
6 | const char *maildir_filename_generate(void);
7 |
8 | bool maildir_filename_get_size(const char *fname, char type, uoff_t *size_r);
9 |
10 | unsigned int maildir_filename_base_hash(const char *fname);
11 | int maildir_filename_base_cmp(const char *fname1, const char *fname2);
12 | int maildir_filename_sort_cmp(const char *fname1, const char *fname2);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib-storage/index/maildir/maildir-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef MAILDIR_SETTINGS_H
2 | #define MAILDIR_SETTINGS_H
3 |
4 | struct maildir_settings {
5 | pool_t pool;
6 | bool maildir_copy_with_hardlinks;
7 | bool maildir_very_dirty_syncs;
8 | bool maildir_broken_filename_sizes;
9 | bool maildir_empty_new;
10 | };
11 |
12 | extern const struct setting_parser_info maildir_setting_parser_info;
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib-storage/index/mbox/mbox-file.h:
--------------------------------------------------------------------------------
1 | #ifndef MBOX_FILE_H
2 | #define MBOX_FILE_H
3 |
4 | int mbox_file_open(struct mbox_mailbox *mbox);
5 | void mbox_file_close(struct mbox_mailbox *mbox);
6 |
7 | int mbox_file_open_stream(struct mbox_mailbox *mbox);
8 | void mbox_file_close_stream(struct mbox_mailbox *mbox);
9 |
10 | int mbox_file_lookup_offset(struct mbox_mailbox *mbox,
11 | struct mail_index_view *view,
12 | uint32_t seq, uoff_t *offset_r);
13 | int mbox_file_seek(struct mbox_mailbox *mbox, struct mail_index_view *view,
14 | uint32_t seq, bool *deleted_r);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/lib-storage/index/mbox/mbox-lock.h:
--------------------------------------------------------------------------------
1 | #ifndef MBOX_LOCK_H
2 | #define MBOX_LOCK_H
3 |
4 | /* NOTE: if mbox file is not open, it's opened. if it is open but file has
5 | been overwritten (ie. inode has changed), it's reopened. */
6 | int mbox_lock(struct mbox_mailbox *mbox, int lock_type,
7 | unsigned int *lock_id_r);
8 | int ATTR_NOWARN_UNUSED_RESULT
9 | mbox_unlock(struct mbox_mailbox *mbox, unsigned int lock_id);
10 |
11 | unsigned int mbox_get_cur_lock_id(struct mbox_mailbox *mbox);
12 |
13 | void mbox_dotlock_touch(struct mbox_mailbox *mbox);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/lib-storage/index/mbox/mbox-md5.h:
--------------------------------------------------------------------------------
1 | #ifndef MBOX_MD5_H
2 | #define MBOX_MD5_H
3 |
4 | struct message_header_line;
5 |
6 | struct mbox_md5_vfuncs {
7 | struct mbox_md5_context *(*init)(void);
8 | void (*more)(struct mbox_md5_context *ctx,
9 | struct message_header_line *hdr);
10 | void (*finish)(struct mbox_md5_context *ctx,
11 | unsigned char result[STATIC_ARRAY 16]);
12 | };
13 |
14 | extern struct mbox_md5_vfuncs mbox_md5_apop3d;
15 | extern struct mbox_md5_vfuncs mbox_md5_all;
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/src/lib-storage/index/mbox/mbox-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef MBOX_SETTINGS_H
2 | #define MBOX_SETTINGS_H
3 |
4 | struct mbox_settings {
5 | pool_t pool;
6 | ARRAY_TYPE(const_string) mbox_read_locks;
7 | ARRAY_TYPE(const_string) mbox_write_locks;
8 | unsigned int mbox_lock_timeout;
9 | unsigned int mbox_dotlock_change_timeout;
10 | uoff_t mbox_min_index_size;
11 | bool mbox_dirty_syncs;
12 | bool mbox_very_dirty_syncs;
13 | bool mbox_lazy_writes;
14 | const char *mbox_md5;
15 | };
16 |
17 | extern const struct setting_parser_info mbox_setting_parser_info;
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/lib-storage/index/pop3c/pop3c-sync.h:
--------------------------------------------------------------------------------
1 | #ifndef POP3C_SYNC_H
2 | #define POP3C_SYNC_H
3 |
4 | struct mailbox;
5 | struct pop3c_mailbox;
6 |
7 | struct mailbox_sync_context *
8 | pop3c_storage_sync_init(struct mailbox *box, enum mailbox_sync_flags flags);
9 | int pop3c_sync(struct pop3c_mailbox *mbox);
10 |
11 | int pop3c_sync_get_sizes(struct pop3c_mailbox *mbox);
12 | int pop3c_sync_get_uidls(struct pop3c_mailbox *mbox);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib-storage/index/raw/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_LTLIBRARIES = libstorage_raw.la
2 |
3 | AM_CPPFLAGS = \
4 | -I$(top_srcdir)/src/lib \
5 | -I$(top_srcdir)/src/lib-settings \
6 | -I$(top_srcdir)/src/lib-master \
7 | -I$(top_srcdir)/src/lib-mail \
8 | -I$(top_srcdir)/src/lib-imap \
9 | -I$(top_srcdir)/src/lib-index \
10 | -I$(top_srcdir)/src/lib-storage \
11 | -I$(top_srcdir)/src/lib-storage/index \
12 | -I$(top_srcdir)/src/lib-var-expand
13 |
14 | libstorage_raw_la_SOURCES = \
15 | raw-mail.c \
16 | raw-sync.c \
17 | raw-storage.c
18 |
19 | headers = \
20 | raw-storage.h \
21 | raw-sync.h
22 |
23 | pkginc_libdir=$(pkgincludedir)
24 | pkginc_lib_HEADERS = $(headers)
25 |
--------------------------------------------------------------------------------
/src/lib-storage/index/raw/raw-sync.h:
--------------------------------------------------------------------------------
1 | #ifndef RAW_SYNC_H
2 | #define RAW_SYNC_H
3 |
4 | struct mailbox;
5 |
6 | struct mailbox_sync_context *
7 | raw_storage_sync_init(struct mailbox *box, enum mailbox_sync_flags flags);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib-storage/index/shared/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_LTLIBRARIES = libstorage_shared.la
2 |
3 | AM_CPPFLAGS = \
4 | -I$(top_srcdir)/src/lib \
5 | -I$(top_srcdir)/src/lib-settings \
6 | -I$(top_srcdir)/src/lib-mail \
7 | -I$(top_srcdir)/src/lib-imap \
8 | -I$(top_srcdir)/src/lib-index \
9 | -I$(top_srcdir)/src/lib-storage \
10 | -I$(top_srcdir)/src/lib-storage/index \
11 | -I$(top_srcdir)/src/lib-var-expand
12 |
13 | libstorage_shared_la_SOURCES = \
14 | shared-list.c \
15 | shared-storage.c
16 |
17 | headers = \
18 | shared-storage.h
19 |
20 | pkginc_libdir=$(pkgincludedir)
21 | pkginc_lib_HEADERS = $(headers)
22 |
--------------------------------------------------------------------------------
/src/lib-storage/index/shared/shared-storage.h:
--------------------------------------------------------------------------------
1 | #ifndef SHARED_STORAGE_H
2 | #define SHARED_STORAGE_H
3 |
4 | struct shared_storage {
5 | struct mail_storage storage;
6 | union mailbox_list_module_context list_module_ctx;
7 |
8 | const char *ns_prefix_pattern;
9 | const char *storage_class_name;
10 | };
11 |
12 | #define SHARED_STORAGE(s) container_of(s, struct shared_storage, storage)
13 |
14 | struct mailbox_list *shared_mailbox_list_alloc(void);
15 |
16 | /* Returns -1 = error, 0 = user doesn't exist, 1 = ok */
17 | int shared_storage_get_namespace(struct mail_namespace **_ns,
18 | const char **_name);
19 |
20 | void shared_storage_ns_prefix_expand(struct shared_storage *storage,
21 | string_t *dest, const char *user);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/src/lib-storage/list/mailbox-list-index-storage.h:
--------------------------------------------------------------------------------
1 | #ifndef MAILBOX_LIST_INDEX_STORAGE_H
2 | #define MAILBOX_LIST_INDEX_STORAGE_H
3 |
4 | #include "mail-storage-private.h"
5 |
6 | #define INDEX_LIST_STORAGE_CONTEXT(obj) \
7 | MODULE_CONTEXT_REQUIRE(obj, index_list_storage_module)
8 |
9 | struct index_list_mailbox {
10 | union mailbox_module_context module_ctx;
11 |
12 | uint32_t pre_sync_log_file_seq;
13 | uoff_t pre_sync_log_file_head_offset;
14 |
15 | bool have_backend:1;
16 | };
17 |
18 | extern MODULE_CONTEXT_DEFINE(index_list_storage_module,
19 | &mail_storage_module_register);
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/src/lib-storage/list/mailbox-list-notify-tree.h:
--------------------------------------------------------------------------------
1 | #ifndef MAILBOX_LIST_NOTIFY_TREE_H
2 | #define MAILBOX_LIST_NOTIFY_TREE_H
3 |
4 | #include "mailbox-tree.h"
5 |
6 | struct mailbox_notify_node {
7 | struct mailbox_node node;
8 |
9 | guid_128_t guid;
10 | uint32_t index_uid;
11 |
12 | uint32_t uidvalidity;
13 | uint32_t uidnext;
14 | uint32_t messages;
15 | uint32_t unseen;
16 | uint64_t highest_modseq;
17 | };
18 |
19 | struct mailbox_list_notify_tree *
20 | mailbox_list_notify_tree_init(struct mailbox_list *list);
21 | void mailbox_list_notify_tree_deinit(struct mailbox_list_notify_tree **tree);
22 |
23 | struct mailbox_notify_node *
24 | mailbox_list_notify_tree_lookup(struct mailbox_list_notify_tree *tree,
25 | const char *storage_name);
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/src/lib-storage/mail-autoexpunge.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIL_AUTOEXPUNGE_H
2 | #define MAIL_AUTOEXPUNGE_H
3 |
4 | /* Perform autoexpunging for all the user's mailboxes that have autoexpunging
5 | configured. Returns number of mails that were autoexpunged. */
6 | unsigned int mail_user_autoexpunge(struct mail_user *user);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib-storage/mail-copy.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIL_COPY_H
2 | #define MAIL_COPY_H
3 |
4 | struct mail;
5 | struct mail_save_context;
6 | struct mailbox;
7 |
8 | int mail_storage_copy(struct mail_save_context *ctx, struct mail *mail);
9 |
10 | /* If save context already doesn't have some metadata fields set, copy them
11 | from the given mail (e.g. received date, from envelope, guid). */
12 | int mail_save_copy_default_metadata(struct mail_save_context *ctx,
13 | struct mail *mail);
14 |
15 | /* Returns TRUE if mail can be copied using hard linking from src to dest.
16 | (Assuming the storage itself supports this.) */
17 | bool mail_storage_copy_can_use_hardlink(struct mailbox *src,
18 | struct mailbox *dest);
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/src/lib-storage/mail-search-parser-private.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIL_SEARCH_PARSER_PRIVATE_H
2 | #define MAIL_SEARCH_PARSER_PRIVATE_H
3 |
4 | #include "mail-search-parser.h"
5 |
6 | struct mail_search_parser_vfuncs {
7 | int (*parse_key)(struct mail_search_parser *parser, const char **key_r);
8 | int (*parse_string)(struct mail_search_parser *parser,
9 | const char **value_r);
10 | bool (*parse_skip_next)(struct mail_search_parser *parser,
11 | const char *str);
12 | };
13 |
14 | struct mail_search_parser {
15 | struct mail_search_parser_vfuncs v;
16 |
17 | pool_t pool;
18 | const char *cur_key;
19 | const char *error;
20 | };
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/lib-storage/mail-storage-lua.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIL_STORAGE_LUA_H
2 | #define MAIL_STORAGE_LUA_H 1
3 |
4 | #include "dlua-script.h"
5 | #include "dlua-script-private.h"
6 |
7 | struct mail_user;
8 | struct mailbox;
9 | struct mail;
10 | struct dlua_script;
11 |
12 | void dlua_register_mail_storage(struct dlua_script *script);
13 | void dlua_push_mail_user(lua_State *L, struct mail_user *user);
14 | void dlua_push_mailbox(lua_State *L, struct mailbox *box);
15 | void dlua_push_mail(lua_State *L, struct mail *mail);
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/src/lib-storage/mailbox-attribute-internal.h:
--------------------------------------------------------------------------------
1 | #ifndef MAILBOX_ATTRIBUTE_INTERNAL_H
2 | #define MAILBOX_ATTRIBUTE_INTERNAL_H
3 |
4 | /* RFC 5464, Section 3.2.1.2: Mailbox entries */
5 | #define MAILBOX_ATTRIBUTE_COMMENT "comment"
6 | /* RFC 6154, Section 4: IMAP METADATA Entry for Special-Use Attributes */
7 | #define MAILBOX_ATTRIBUTE_SPECIALUSE "specialuse"
8 | /* RFC 5464, Section 3.2.1.1: Server entries */
9 | #define MAIL_SERVER_ATTRIBUTE_COMMENT "comment"
10 | #define MAIL_SERVER_ATTRIBUTE_ADMIN "admin"
11 |
12 | void mailbox_attributes_internal_init(void);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib-storage/mailbox-attribute-private.h:
--------------------------------------------------------------------------------
1 | #ifndef MAILBOX_ATTRIBUTE_PRIVATE_H
2 | #define MAILBOX_ATTRIBUTE_PRIVATE_H
3 |
4 | struct mailbox_attribute_iter {
5 | struct mailbox *box;
6 | };
7 |
8 | void mailbox_attributes_init(void);
9 | void mailbox_attributes_deinit(void);
10 |
11 | int mailbox_attribute_value_to_string(struct mail_storage *storage,
12 | const struct mail_attribute_value *value,
13 | const char **str_r);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/lib-storage/mailbox-guid-cache.h:
--------------------------------------------------------------------------------
1 | #ifndef MAILBOX_GUID_CACHE_H
2 | #define MAILBOX_GUID_CACHE_H
3 |
4 | int mailbox_guid_cache_find(struct mailbox_list *list, const guid_128_t guid,
5 | const char **vname_r);
6 | void mailbox_guid_cache_refresh(struct mailbox_list *list);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib-storage/mailbox-uidvalidity.h:
--------------------------------------------------------------------------------
1 | #ifndef MAILBOX_UIDVALIDITY_H
2 | #define MAILBOX_UIDVALIDITY_H
3 |
4 | struct mailbox_list;
5 |
6 | uint32_t mailbox_uidvalidity_next(struct mailbox_list *list, const char *path);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib-storage/mailbox-watch.h:
--------------------------------------------------------------------------------
1 | #ifndef MAILBOX_WATCH_H
2 | #define MAILBOX_WATCH_H
3 |
4 | void mailbox_watch_add(struct mailbox *box, const char *path);
5 | void mailbox_watch_remove_all(struct mailbox *box);
6 |
7 | /* Create a new temporary ioloop, add all the watches back and call
8 | io_loop_extract_notify_fd() on it. Returns fd on success, -1 on error. */
9 | int mailbox_watch_extract_notify_fd(struct mailbox *box, const char **reason_r);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/src/lib-test/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_LTLIBRARIES = libtest.la
2 |
3 | AM_CPPFLAGS = \
4 | -I$(top_srcdir)/src/lib \
5 | -I$(top_srcdir)/src/lib-charset
6 |
7 | libtest_la_SOURCES = \
8 | fuzzer.c \
9 | ostream-final-trickle.c \
10 | test-common.c \
11 | test-istream.c \
12 | test-ostream.c \
13 | test-subprocess.c
14 |
15 | headers = \
16 | fuzzer.h \
17 | ostream-final-trickle.h \
18 | test-common.h \
19 | test-subprocess.h
20 |
21 | pkginc_libdir=$(pkgincludedir)
22 | pkginc_lib_HEADERS = $(headers)
23 |
--------------------------------------------------------------------------------
/src/lib-test/ostream-final-trickle.h:
--------------------------------------------------------------------------------
1 | #ifndef OSTREAM_FINAL_TRICKLE_H
2 | #define OSTREAM_FINAL_TRICKLE_H
3 |
4 | /* Creates a wrapper istream that delays sending the final byte until the next
5 | ioloop run. This can catch bugs where caller doesn't expect the final bytes
6 | to be delayed. */
7 | struct ostream *o_stream_create_final_trickle(struct ostream *output);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib/askpass.h:
--------------------------------------------------------------------------------
1 | #ifndef ASKPASS_H
2 | #define ASKPASS_H
3 |
4 | void askpass(const char *prompt, char *buf, size_t buf_size);
5 | const char *t_askpass(const char *prompt);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/lib/backtrace-string.h:
--------------------------------------------------------------------------------
1 | #ifndef BACKTRACE_STRING_H
2 | #define BACKTRACE_STRING_H
3 |
4 | /* Returns 0 if ok, -1 if failure. */
5 | int backtrace_append(string_t *str, const char **error_r);
6 | int backtrace_get(const char **backtrace_r, const char **error_r);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib/cpu-count.h:
--------------------------------------------------------------------------------
1 | #ifndef CPU_COUNT_H
2 | #define CPU_COUNT_H
3 |
4 | /* Determines number of CPUs in the system and places it in
5 | * cpu_count_r. On success 0 is returned, on failure, -1
6 | * is returned and error placed in error_r. */
7 | int cpu_count_get(int *cpu_count_r, const char **error_r);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib/crc32.h:
--------------------------------------------------------------------------------
1 | #ifndef CRC32_H
2 | #define CRC32_H
3 |
4 | uint32_t crc32_data(const void *data, size_t size) ATTR_PURE;
5 | uint32_t crc32_str(const char *str) ATTR_PURE;
6 |
7 | uint32_t crc32_data_more(uint32_t crc, const void *data, size_t size) ATTR_PURE;
8 | uint32_t crc32_str_more(uint32_t crc, const char *str) ATTR_PURE;
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/lib/doc.h:
--------------------------------------------------------------------------------
1 | #ifndef DOC_H
2 | #define DOC_H
3 |
4 | #ifdef HAVE_CONFIG_H
5 | # include "config.h"
6 | #endif
7 |
8 | #define DOC_LINK(page) DOVECOT_DOC_URL "latest/" page
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/lib/eacces-error.h:
--------------------------------------------------------------------------------
1 | #ifndef EACCES_ERROR_H
2 | #define EACCES_ERROR_H
3 |
4 | /* Return a user-friendly error message for EACCES failures. */
5 | const char *eacces_error_get(const char *func, const char *path);
6 | const char *eacces_error_get_creating(const char *func, const char *path);
7 | /* Return a user-friendly error message for fchown() or chown() EPERM
8 | failures when only the group is being changed. gid_origin specifies why
9 | exactly this group is being used. */
10 | const char *eperm_error_get_chgrp(const char *func, const char *path,
11 | gid_t gid, const char *gid_origin)
12 | ATTR_NULL(4);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib/execv-const.h:
--------------------------------------------------------------------------------
1 | #ifndef EXECV_CONST_H
2 | #define EXECV_CONST_H
3 |
4 | /* Just like execv() and execvp(), except argv points to const strings.
5 | Also if calling execv*() fails, these functions call i_fatal(). */
6 | void execv_const(const char *path, const char *const argv[]) ATTR_NORETURN;
7 | void execvp_const(const char *file, const char *const argv[]) ATTR_NORETURN;
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib/failures-private.h:
--------------------------------------------------------------------------------
1 | #ifndef FAILURES_PRIVATE_H
2 | #define FAILURES_PRIVATE_H
3 |
4 | typedef int
5 | failure_write_to_file_t(const struct failure_context *ctx,
6 | const char *format, va_list args);
7 | typedef void failure_on_handler_failure_t(const struct failure_context *ctx);
8 | typedef void failure_post_handler_t(const struct failure_context *ctx);
9 |
10 | struct failure_handler_vfuncs {
11 | failure_write_to_file_t *write;
12 | failure_on_handler_failure_t *on_handler_failure;
13 | };
14 |
15 | struct failure_handler_config {
16 | int fatal_err_reset;
17 | struct failure_handler_vfuncs *v;
18 | };
19 |
20 | extern struct failure_handler_config failure_handler;
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/lib/fdatasync-path.h:
--------------------------------------------------------------------------------
1 | #ifndef FDATASYNC_PATH_H
2 | #define FDATASYNC_PATH_H
3 |
4 | /* Open and fdatasync() the path. Works for files and directories. */
5 | int fdatasync_path(const char *path);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/lib/fdpass.h:
--------------------------------------------------------------------------------
1 | #ifndef FDPASS_H
2 | #define FDPASS_H
3 |
4 | /* Send data and send_fd (unless it's -1) via sendmsg(). Returns number of
5 | bytes sent, or -1 on error. If at least 1 byte was sent, the send_fd was
6 | also sent. */
7 | ssize_t fd_send(int handle, int send_fd, const void *data, size_t size);
8 |
9 | /* Receive data and fd via recvmsg(). Returns number of bytes read, 0 on
10 | disconnection, or -1 on error. If at least 1 byte was read, the fd is also
11 | returned (if it had been sent). If there was no fd received, it's set to
12 | -1. See test-istream-unix.c for different test cases. */
13 | ssize_t fd_read(int handle, void *data, size_t size, int *fd_r);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/lib/file-copy.h:
--------------------------------------------------------------------------------
1 | #ifndef FILE_COPY_H
2 | #define FILE_COPY_H
3 |
4 | /* Copy file atomically. First try hardlinking, then fallback to creating
5 | a temporary file (destpath.tmp) and rename()ing it over srcpath.
6 | If the destination file already exists, it may or may not be overwritten,
7 | so that shouldn't be relied on.
8 |
9 | Returns -1 = error, 0 = source file not found, 1 = ok */
10 | int file_copy(const char *srcpath, const char *destpath, bool try_hardlink);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/lib/file-set-size.h:
--------------------------------------------------------------------------------
1 | #ifndef FILE_SET_SIZE_H
2 | #define FILE_SET_SIZE_H
3 |
4 | /* Shrink/grow file. If file is grown, the new data is guaranteed to
5 | be zeros. The file offset may be anywhere after this call.
6 | Returns -1 if failed, 0 if successful. */
7 | int file_set_size(int fd, off_t size);
8 | /* Preallocate file to given size, without actually changing the size
9 | reported by stat(). Returns 1 if ok, 0 if not supported by this filesystem,
10 | -1 if error. */
11 | int file_preallocate(int fd, off_t size);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/lib/fsync-mode.h:
--------------------------------------------------------------------------------
1 | #ifndef FSYNC_MODE_H
2 | #define FSYNC_MODE_H
3 |
4 | enum fsync_mode {
5 | /* fsync when it's necessary for data safety. */
6 | FSYNC_MODE_OPTIMIZED = 0,
7 | /* never fsync (in case of a crash can lose data) */
8 | FSYNC_MODE_NEVER,
9 | /* fsync after all writes. this is necessary with NFS to avoid
10 | write failures being delayed until file is close(). */
11 | FSYNC_MODE_ALWAYS
12 | };
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib/hash-decl.h:
--------------------------------------------------------------------------------
1 | #ifndef HASH_DECL_H
2 | #define HASH_DECL_H
3 |
4 | #define HASH_TABLE_UNION(key_type, value_type) { \
5 | struct hash_table *_table; \
6 | key_type _key; \
7 | key_type *_keyp; \
8 | const key_type _const_key; \
9 | value_type _value; \
10 | value_type *_valuep; \
11 | }
12 |
13 | #define HASH_TABLE_DEFINE_TYPE(name, key_type, value_type) \
14 | union hash ## __ ## name HASH_TABLE_UNION(key_type, value_type)
15 | #define HASH_TABLE(key_type, value_type) \
16 | union HASH_TABLE_UNION(key_type, value_type)
17 | #define HASH_TABLE_TYPE(name) \
18 | union hash ## __ ## name
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/src/lib/hex-binary.h:
--------------------------------------------------------------------------------
1 | #ifndef HEX_BINARY_H
2 | #define HEX_BINARY_H
3 |
4 | /* Convert binary to hex digits allocating return value from data stack */
5 | const char *binary_to_hex(const unsigned char *data, size_t size);
6 | const char *binary_to_hex_ucase(const unsigned char *data, size_t size);
7 |
8 | void binary_to_hex_append(string_t *dest, const unsigned char *data,
9 | size_t size);
10 |
11 | /* Convert hex to binary. data and dest may point to same value.
12 | Returns 0 if all ok, -1 if data is invalid. */
13 | int hex_to_binary(const char *data, buffer_t *dest);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/lib/hex-dec.h:
--------------------------------------------------------------------------------
1 | #ifndef HEX_DEC_H
2 | #define HEX_DEC_H
3 |
4 | #define DEC2HEX(hexstr, str) \
5 | dec2hex(hexstr, str, sizeof(hexstr))
6 |
7 | /* Decimal -> hex string translation. The result isn't NUL-terminated. */
8 | void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size);
9 | /* Parses hex string and returns its decimal value, or 0 in case of errors */
10 | uintmax_t hex2dec(const unsigned char *data, unsigned int len) ATTR_PURE;
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/lib/hmac-cram-md5.h:
--------------------------------------------------------------------------------
1 | #ifndef HMAC_CRAM_MD5_H
2 | #define HMAC_CRAM_MD5_H
3 |
4 | #include "hmac.h"
5 |
6 | #define CRAM_MD5_CONTEXTLEN 32
7 |
8 | void hmac_md5_get_cram_context(struct hmac_context *ctx,
9 | unsigned char context_digest[CRAM_MD5_CONTEXTLEN]);
10 | void hmac_md5_set_cram_context(struct hmac_context *ctx,
11 | const unsigned char context_digest[CRAM_MD5_CONTEXTLEN]);
12 |
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib/home-expand.h:
--------------------------------------------------------------------------------
1 | #ifndef HOME_EXPAND_H
2 | #define HOME_EXPAND_H
3 |
4 | /* expand ~/ or ~user/ in beginning of path. If user is unknown, the original
5 | path is returned without modification. */
6 | const char *home_expand(const char *path);
7 | /* Returns 0 if ok, -1 if user wasn't found. */
8 | int home_try_expand(const char **path);
9 | /* Expand ~/ in the beginning of the path with the give home directory. */
10 | const char *home_expand_tilde(const char *path, const char *home);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/lib/hook-build.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */
2 | #ifndef HOOK_BUILD_H
3 | #define HOOK_BUILD_H 1
4 |
5 | struct hook_build_context;
6 | struct hook_stack;
7 |
8 | /* Initialize new hook building context, vfuncs should point to
9 | the functions table that is being manipulated, and size should be
10 | the size of this table. */
11 | struct hook_build_context *hook_build_init(void (**vfuncs)(), size_t size);
12 |
13 | /* This is called after a hook may have updated vfuncs */
14 | void hook_build_update(struct hook_build_context *ctx, void *_vlast);
15 |
16 | /* Free memory used by build context */
17 | void hook_build_deinit(struct hook_build_context **_ctx);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/lib/hostpid.h:
--------------------------------------------------------------------------------
1 | #ifndef HOSTPID_H
2 | #define HOSTPID_H
3 |
4 | /* These environments override the hostname/hostdomain if they're set.
5 | Master process normally sets these to child processes. */
6 | #define MY_HOSTNAME_ENV "DOVECOT_HOSTNAME"
7 | #define MY_HOSTDOMAIN_ENV "DOVECOT_HOSTDOMAIN"
8 |
9 | extern const char *my_hostname;
10 | extern const char *my_pid;
11 |
12 | /* Initializes my_hostname and my_pid. */
13 | void hostpid_init(void);
14 | void hostpid_deinit(void);
15 |
16 | /* Returns the current host+domain, or if it fails fallback to returning
17 | hostname. */
18 | const char *my_hostdomain(void);
19 |
20 | #endif
21 |
22 |
--------------------------------------------------------------------------------
/src/lib/ioloop-iolist.h:
--------------------------------------------------------------------------------
1 | #ifndef IOLOOP_IOLIST_H
2 | #define IOLOOP_IOLIST_H
3 |
4 | enum {
5 | IOLOOP_IOLIST_INPUT,
6 | IOLOOP_IOLIST_OUTPUT,
7 | IOLOOP_IOLIST_ERROR,
8 |
9 | IOLOOP_IOLIST_IOS_PER_FD
10 | };
11 |
12 | struct io_list {
13 | struct io_file *ios[IOLOOP_IOLIST_IOS_PER_FD];
14 | };
15 |
16 | bool ioloop_iolist_add(struct io_list *list, struct io_file *io);
17 | bool ioloop_iolist_del(struct io_list *list, struct io_file *io);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/lib/iostream-multiplex-private.h:
--------------------------------------------------------------------------------
1 | #ifndef IOSTREAM_MULTIPLEX_PRIVATE_H
2 | #define IOSTREAM_MULTIPLEX_PRIVATE_H
3 |
4 | #define IOSTREAM_MULTIPLEX_CHANNEL_SWITCH_PREFIX "\x03\xFE"
5 | #define IOSTREAM_MULTIPLEX_CHANNEL_SWITCH_PREFIX_LEN 2
6 |
7 | #define IOSTREAM_MULTIPLEX_HEADER_SIZE \
8 | (7 + IOSTREAM_MULTIPLEX_CHANNEL_SWITCH_PREFIX_LEN)
9 |
10 | enum multiplex_istream_switch_type {
11 | MULTIPLEX_ISTREAM_SWITCH_TYPE_CHANNEL_ID = 0,
12 | MULTIPLEX_ISTREAM_SWITCH_TYPE_PREFIX_CHAR1 = 1,
13 | };
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/lib/iostream-rawlog-private.h:
--------------------------------------------------------------------------------
1 | #ifndef IOSTREAM_RAWLOG_PRIVATE_H
2 | #define IOSTREAM_RAWLOG_PRIVATE_H
3 |
4 | #include "iostream-rawlog.h"
5 |
6 | struct rawlog_iostream {
7 | struct iostream_private *iostream;
8 | enum iostream_rawlog_flags flags;
9 |
10 | struct ostream *rawlog_output;
11 | buffer_t *buffer;
12 |
13 | bool input;
14 | bool line_continued;
15 | };
16 |
17 | void iostream_rawlog_init(struct rawlog_iostream *rstream,
18 | enum iostream_rawlog_flags flags, bool input);
19 | void iostream_rawlog_write(struct rawlog_iostream *rstream,
20 | const unsigned char *data, size_t size);
21 | void iostream_rawlog_flush(struct rawlog_iostream *rstream);
22 | void iostream_rawlog_close(struct rawlog_iostream *rstream);
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/src/lib/iostream.h:
--------------------------------------------------------------------------------
1 | #ifndef IOSTREAM_H
2 | #define IOSTREAM_H
3 |
4 | /* Returns human-readable reason for why iostream was disconnected.
5 | The output is either "Connection closed" for clean disconnections or
6 | "Connection closed: " for unclean disconnections. */
7 | const char *io_stream_get_disconnect_reason(struct istream *input,
8 | struct ostream *output);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/lib/ipwd.h:
--------------------------------------------------------------------------------
1 | #ifndef IPWD_H
2 | #define IPWD_H
3 |
4 | #include
5 | #include
6 |
7 | /* Replacements for standard getpw/gr*(), fixing their ability to report errors
8 | properly. As with standard getpw/gr*(), second call overwrites data used
9 | by the first one.
10 |
11 | Functions return 1 if user/group is found, 0 if not or
12 | -1 if error (with errno set). */
13 |
14 | int i_getpwnam(const char *name, struct passwd *pwd_r);
15 | int i_getpwuid(uid_t uid, struct passwd *pwd_r);
16 |
17 | int i_getgrnam(const char *name, struct group *grp_r);
18 | int i_getgrgid(gid_t gid, struct group *grp_r);
19 |
20 | /* Free memory used by above functions. */
21 | void ipwd_deinit(void);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/src/lib/istream-base64.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_BASE64_H
2 | #define ISTREAM_BASE64_H
3 |
4 | struct istream *
5 | i_stream_create_base64_encoder(struct istream *input,
6 | unsigned int chars_per_line, bool crlf);
7 | struct istream *
8 | i_stream_create_base64url_encoder(struct istream *input,
9 | unsigned int chars_per_line, bool crlf);
10 |
11 | struct istream *
12 | i_stream_create_base64_decoder(struct istream *input);
13 | struct istream *
14 | i_stream_create_base64url_decoder(struct istream *input);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/lib/istream-concat.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_CONCAT_H
2 | #define ISTREAM_CONCAT_H
3 |
4 | /* Concatenate input streams into a single stream. */
5 | struct istream *i_stream_create_concat(struct istream *input[]);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/lib/istream-crlf.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_CRLF_H
2 | #define ISTREAM_CRLF_H
3 |
4 | /* Read all linefeeds as CRLF */
5 | struct istream *i_stream_create_crlf(struct istream *input);
6 | /* Read all linefeeds as LF */
7 | struct istream *i_stream_create_lf(struct istream *input);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib/istream-failure-at.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_FAILURE_AT_H
2 | #define ISTREAM_FAILURE_AT_H
3 |
4 | struct istream *
5 | i_stream_create_failure_at(struct istream *input, uoff_t failure_offset,
6 | int stream_errno, const char *error_string);
7 | struct istream *
8 | i_stream_create_failure_at_eof(struct istream *input, int stream_errno,
9 | const char *error_string);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/src/lib/istream-file-private.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_FILE_PRIVATE_H
2 | #define ISTREAM_FILE_PRIVATE_H
3 |
4 | #include "istream-private.h"
5 |
6 | struct file_istream {
7 | struct istream_private istream;
8 |
9 | uoff_t skip_left;
10 |
11 | bool file:1;
12 | bool autoclose_fd:1;
13 | bool seen_eof:1;
14 | };
15 |
16 | struct istream *
17 | i_stream_create_file_common(struct file_istream *fstream,
18 | int fd, const char *path,
19 | size_t max_buffer_size, bool autoclose_fd);
20 | ssize_t i_stream_file_read(struct istream_private *stream);
21 | void i_stream_file_close(struct iostream_private *stream, bool close_parent);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/src/lib/istream-hash.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_HASH_H
2 | #define ISTREAM_HASH_H
3 |
4 | struct hash_method;
5 |
6 | /* hash_context must be allocated and initialized by caller. This istream will
7 | simply call method->loop() for all the data going through the istream. */
8 | struct istream *
9 | i_stream_create_hash(struct istream *input, const struct hash_method *method,
10 | void *hash_context);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/lib/istream-multiplex.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_MULTIPLEX
2 | #define ISTREAM_MULTIPLEX 1
3 |
4 | struct istream *i_stream_create_multiplex(struct istream *parent, size_t bufsize);
5 | struct istream *i_stream_multiplex_add_channel(struct istream *stream, uint8_t cid);
6 | uint8_t i_stream_multiplex_get_channel_id(struct istream *stream);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib/istream-nonuls.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_NONULS_H
2 | #define ISTREAM_NONULS_H
3 |
4 | /* Translate all NUL characters to the specified replace_chr. */
5 | struct istream *i_stream_create_nonuls(struct istream *input, char replace_chr);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/lib/istream-rawlog.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_RAWLOG_H
2 | #define ISTREAM_RAWLOG_H
3 |
4 | #include "iostream-rawlog.h"
5 |
6 | struct istream *
7 | i_stream_create_rawlog(struct istream *input, const char *rawlog_path,
8 | int rawlog_fd, enum iostream_rawlog_flags flags);
9 | struct istream *
10 | i_stream_create_rawlog_from_stream(struct istream *input,
11 | struct ostream *rawlog_output,
12 | enum iostream_rawlog_flags flags);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib/istream-timeout.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_TIMEOUT_H
2 | #define ISTREAM_TIMEOUT_H
3 |
4 | /* Return ETIMEDOUT error if read() doesn't return anything for timeout_msecs.
5 | If timeout_msecs=0, there is no timeout. */
6 | struct istream *
7 | i_stream_create_timeout(struct istream *input, unsigned int timeout_msecs);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib/istream-unix.h:
--------------------------------------------------------------------------------
1 | #ifndef ISTREAM_UNIX_H
2 | #define ISTREAM_UNIX_H
3 |
4 | struct istream *i_stream_create_unix(int fd, size_t max_buffer_size);
5 | /* Start trying to read a file descriptor from the UNIX socket. */
6 | void i_stream_unix_set_read_fd(struct istream *input);
7 | /* Stop trying to read a file descriptor from the UNIX socket. */
8 | void i_stream_unix_unset_read_fd(struct istream *input);
9 | /* Returns the fd that the last i_stream_read() received, or -1 if no fd
10 | was received. This function must be called before
11 | i_stream_unix_set_read_fd() is called again after successfully receiving
12 | a file descriptor. */
13 | int i_stream_unix_get_read_fd(struct istream *input);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/lib/numpack.h:
--------------------------------------------------------------------------------
1 | #ifndef NUMPACK_H
2 | #define NUMPACK_H
3 |
4 | /* Numbers are stored by 7 bits at a time. The highest bit specifies if the
5 | number continues to next byte. */
6 |
7 | void numpack_encode(buffer_t *buf, uint64_t num);
8 | int numpack_decode(const uint8_t **p, const uint8_t *end, uint64_t *num_r);
9 | int numpack_decode32(const uint8_t **p, const uint8_t *end, uint32_t *num_r);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/src/lib/ostream-failure-at.h:
--------------------------------------------------------------------------------
1 | #ifndef OSTREAM_FAILURE_AT_H
2 | #define OSTREAM_FAILURE_AT_H
3 |
4 | struct ostream *
5 | o_stream_create_failure_at(struct ostream *output, uoff_t failure_offset,
6 | const char *error_string);
7 | struct ostream *
8 | o_stream_create_failure_at_flush(struct ostream *output, const char *error_string);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/lib/ostream-hash.h:
--------------------------------------------------------------------------------
1 | #ifndef OSTREAM_HASH_H
2 | #define OSTREAM_HASH_H
3 |
4 | struct hash_method;
5 |
6 | /* hash_context must be allocated and initialized by caller. This ostream will
7 | simply call method->loop() for all the data going through the ostream. */
8 | struct ostream *
9 | o_stream_create_hash(struct ostream *output, const struct hash_method *method,
10 | void *hash_context);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/lib/ostream-multiplex.h:
--------------------------------------------------------------------------------
1 | #ifndef OSTREAM_MULTIPLEX
2 | #define OSTREAM_MULTIPLEX 1
3 |
4 | enum ostream_multiplex_format {
5 | OSTREAM_MULTIPLEX_FORMAT_PACKET,
6 | /* Start a new multiplex ostream */
7 | OSTREAM_MULTIPLEX_FORMAT_STREAM,
8 | /* Continue an existing multiplex ostream. No header is sent. */
9 | OSTREAM_MULTIPLEX_FORMAT_STREAM_CONTINUE,
10 | };
11 |
12 | struct ostream *o_stream_create_multiplex(struct ostream *parent, size_t bufsize,
13 | enum ostream_multiplex_format format);
14 | struct ostream *o_stream_multiplex_add_channel(struct ostream *stream, uint8_t cid);
15 | uint8_t o_stream_multiplex_get_channel_id(struct ostream *stream);
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/src/lib/ostream-null.h:
--------------------------------------------------------------------------------
1 | #ifndef OSTREAM_NULL_H
2 | #define OSTREAM_NULL_H
3 |
4 | /* Create an output stream that ignores all the writes. */
5 | struct ostream *o_stream_create_null(void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/lib/ostream-rawlog.h:
--------------------------------------------------------------------------------
1 | #ifndef OSTREAM_RAWLOG_H
2 | #define OSTREAM_RAWLOG_H
3 |
4 | #include "iostream-rawlog.h"
5 |
6 | struct ostream *
7 | o_stream_create_rawlog(struct ostream *output, const char *rawlog_path,
8 | int rawlog_fd, enum iostream_rawlog_flags flags);
9 | struct ostream *
10 | o_stream_create_rawlog_from_stream(struct ostream *output,
11 | struct ostream *rawlog_output,
12 | enum iostream_rawlog_flags flags);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/lib/ostream-unix.h:
--------------------------------------------------------------------------------
1 | #ifndef OSTREAM_UNIX_H
2 | #define OSTREAM_UNIX_H
3 |
4 | struct ostream *o_stream_create_unix(int fd, size_t max_buffer_size);
5 | /* Write fd to UNIX socket along with the next outgoing data block.
6 | Returns TRUE if fd is accepted, and FALSE if a previous fd still
7 | needs to be sent. */
8 | bool o_stream_unix_write_fd(struct ostream *output, int fd);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/lib/primes.h:
--------------------------------------------------------------------------------
1 | #ifndef PRIMES_H
2 | #define PRIMES_H
3 |
4 | /* Returns a prime close to specified number, or the number itself if it's
5 | a prime. Note that the returned value may be smaller than requested! */
6 | unsigned int primes_closest(unsigned int num) ATTR_CONST;
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib/process-stat.h:
--------------------------------------------------------------------------------
1 | #ifndef PROCESS_STAT_H
2 | #define PROCESS_STAT_H
3 |
4 | struct process_stat {
5 | uint64_t utime;
6 | uint64_t stime;
7 | uint64_t minor_faults;
8 | uint64_t major_faults;
9 | uint64_t vol_cs;
10 | uint64_t invol_cs;
11 | uint64_t rss;
12 | uint64_t vsz;
13 | uint64_t rchar;
14 | uint64_t wchar;
15 | uint64_t syscr;
16 | uint64_t syscw;
17 | bool proc_io_failed:1;
18 | bool rusage_failed:1;
19 | bool proc_stat_failed:1;
20 | bool proc_status_failed:1;
21 | };
22 |
23 | void process_stat_read_start(struct process_stat *stat_r, struct event *event);
24 | void process_stat_read_finish(struct process_stat *stat, struct event *event);
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/src/lib/punycode.h:
--------------------------------------------------------------------------------
1 | #ifndef PUNYCODE_H
2 | #define PUNYCODE_H
3 |
4 | /* Parse input as a punycode-encoded string and append it to
5 | output. Returns 0 on success and -1 on failure. */
6 | int punycode_decode(const char *input, size_t len, string_t *output);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib/read-full.h:
--------------------------------------------------------------------------------
1 | #ifndef READ_FULL_H
2 | #define READ_FULL_H
3 |
4 | /* Read data from file. Returns -1 if error occurred, or 0 if EOF came before
5 | everything was read, or 1 if all was ok. */
6 | int read_full(int fd, void *data, size_t size);
7 | int pread_full(int fd, void *data, size_t size, off_t offset);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib/safe-memset.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "lib.h"
4 | #include "safe-memset.h"
5 |
6 | void safe_memset(void *data, int c, size_t size)
7 | {
8 | volatile unsigned int volatile_zero_idx = 0;
9 | volatile unsigned char *p = data;
10 |
11 | if (size == 0)
12 | return;
13 |
14 | do {
15 | memset(data, c, size);
16 | } while (p[volatile_zero_idx] != c);
17 | }
18 |
--------------------------------------------------------------------------------
/src/lib/safe-memset.h:
--------------------------------------------------------------------------------
1 | #ifndef SAFE_MEMSET_H
2 | #define SAFE_MEMSET_H
3 |
4 | /* memset() guaranteed not to get optimized away by compiler.
5 | Should be used instead of memset() when clearing any sensitive data. */
6 | void safe_memset(void *data, int c, size_t size);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/lib/safe-mkdir.h:
--------------------------------------------------------------------------------
1 | #ifndef SAFE_MKDIR_H
2 | #define SAFE_MKDIR_H
3 |
4 | /* Either create a directory or make sure that it already exists with given
5 | permissions. If anything fails, the i_fatal() is called. Returns 1 if
6 | directory was created, 2 if it already existed with correct permissions,
7 | 0 if we changed permissions. */
8 | int safe_mkdir(const char *dir, mode_t mode, uid_t uid, gid_t gid);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/lib/safe-mkstemp.h:
--------------------------------------------------------------------------------
1 | #ifndef SAFE_MKSTEMP_H
2 | #define SAFE_MKSTEMP_H
3 |
4 | /* Create a new file with a given prefix. The string is updated to contain the
5 | created filename. uid and gid can be (uid_t)-1 and (gid_t)-1 to use the
6 | defaults. */
7 | int safe_mkstemp(string_t *prefix, mode_t mode, uid_t uid, gid_t gid);
8 | int safe_mkstemp_group(string_t *prefix, mode_t mode,
9 | gid_t gid, const char *gid_origin);
10 | /* Append host and PID to the prefix. */
11 | int safe_mkstemp_hostpid(string_t *prefix, mode_t mode, uid_t uid, gid_t gid);
12 | int safe_mkstemp_hostpid_group(string_t *prefix, mode_t mode,
13 | gid_t gid, const char *gid_origin);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/lib/sendfile-util.h:
--------------------------------------------------------------------------------
1 | #ifndef SENDFILE_UTIL_H
2 | #define SENDFILE_UTIL_H
3 |
4 | /* Wrapper for various sendfile()-like calls. Read a maximum of count bytes
5 | from the given offset in in_fd and write them to out_fd. The offset is
6 | updated after the call. Note the call assert-crashes if count is 0.
7 |
8 | Returns:
9 | >0 number of bytes successfully written (maybe less than count)
10 | 0 if offset points to the input's EOF or past it
11 | -1, errno=EINVAL if it isn't supported for some reason (out_fd isn't a
12 | socket or there simply is no sendfile()).
13 | -1, errno=EAGAIN if non-blocking write couldn't send anything */
14 | ssize_t safe_sendfile(int out_fd, int in_fd, uoff_t *offset, size_t count);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/lib/sha-common.h:
--------------------------------------------------------------------------------
1 | #ifndef SHA_COMMON
2 |
3 | #define SHA256_RESULTLEN (256 / 8)
4 | #define SHA256_BLOCK_SIZE (512 / 8)
5 |
6 | #define SHA384_RESULTLEN (384 / 8)
7 | #define SHA384_BLOCK_SIZE (1024 / 8)
8 |
9 | #define SHA512_RESULTLEN (512 / 8)
10 | #define SHA512_BLOCK_SIZE (1024 / 8)
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/lib/sort.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2016-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "lib.h"
4 | #include "sort.h"
5 |
6 | #include
7 | #include
8 |
9 | int search_strcmp(const char *key, const char *const *member)
10 | {
11 | return strcmp(key, *member);
12 | }
13 |
14 | int search_strcasecmp(const char *key, const char *const *member)
15 | {
16 | return strcasecmp(key, *member);
17 | }
18 |
--------------------------------------------------------------------------------
/src/lib/str-table.h:
--------------------------------------------------------------------------------
1 | #ifndef STR_TABLE_H
2 | #define STR_TABLE_H
3 |
4 | /* Hash table containing string -> refcount. */
5 |
6 | struct str_table *str_table_init(void);
7 | void str_table_deinit(struct str_table **table);
8 |
9 | /* Returns TRUE if there are no referenced strings in the table. */
10 | bool str_table_is_empty(struct str_table *table);
11 |
12 | /* Return string allocated from the strtable and increase its reference
13 | count. */
14 | const char *str_table_ref(struct str_table *table, const char *str);
15 | /* Decrease string's reference count, freeing it if it reaches zero.
16 | The str pointer must have been returned by the str_table_ref(). */
17 | void str_table_unref(struct str_table *table, const char **str);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/lib/test-crc32.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2010-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "test-lib.h"
4 | #include "crc32.h"
5 |
6 | void test_crc32(void)
7 | {
8 | const char str[] = "foo\0bar";
9 |
10 | test_begin("crc32");
11 | test_assert(crc32_str(str) == 0x8c736521);
12 | test_assert(crc32_data(str, sizeof(str)) == 0x32c9723d);
13 | test_end();
14 | }
15 |
--------------------------------------------------------------------------------
/src/lib/test-fd-util.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2019 Dovecot authors, see the included COPYING file */
2 |
3 | #include "test-lib.h"
4 | #include "fd-util.h"
5 |
6 | enum fatal_test_state fatal_i_close(unsigned int stage)
7 | {
8 | if (stage == 0) {
9 | test_begin("fatal i_close");
10 | } else {
11 | test_end();
12 | return FATAL_TEST_FINISHED;
13 | }
14 |
15 | int fd = 0;
16 | const char *fatal_string = t_strdup_printf(
17 | "%s: close((&fd)) @ %s:%d attempted with fd=%d",
18 | __func__, __FILE__, __LINE__ + 2, fd);
19 | test_expect_fatal_string(fatal_string);
20 | i_close_fd(&fd);
21 |
22 | /* This cannot be reached. */
23 | return FATAL_TEST_ABORT;
24 | }
25 |
--------------------------------------------------------------------------------
/src/lib/test-lib.h:
--------------------------------------------------------------------------------
1 | #ifndef TEST_LIB
2 | #define TEST_LIB
3 |
4 | #include "lib.h"
5 | #include "test-common.h"
6 |
7 | #define TEST(x) TEST_DECL(x)
8 | #define FATAL(x) FATAL_DECL(x)
9 | #include "test-lib.inc"
10 | #undef TEST
11 | #undef FATAL
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/lib/test-primes.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2007-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #include "test-lib.h"
4 | #include "primes.h"
5 |
6 | void test_primes(void)
7 | {
8 | unsigned int i, j, num;
9 | bool success;
10 |
11 | success = primes_closest(0) > 0;
12 | for (num = 1; num < 1024; num++) {
13 | if (primes_closest(num) < num)
14 | success = FALSE;
15 | }
16 | for (i = 10; i < 32; i++) {
17 | num = (1U << i) - 100;
18 | for (j = 0; j < 200; j++, num++) {
19 | if (primes_closest(num) < num)
20 | success = FALSE;
21 | }
22 | }
23 | test_out("primes_closest()", success);
24 | }
25 |
--------------------------------------------------------------------------------
/src/lib/unix-socket-create.h:
--------------------------------------------------------------------------------
1 | #ifndef UNIX_SOCKET_CREATE_H
2 | #define UNIX_SOCKET_CREATE_H
3 |
4 | int unix_socket_create(const char *path, int mode,
5 | uid_t uid, gid_t gid, int backlog);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/lib/unlink-old-files.h:
--------------------------------------------------------------------------------
1 | #ifndef UNLINK_OLD_FILES_H
2 | #define UNLINK_OLD_FILES_H
3 |
4 | /* Unlink all files from directory beginning with given prefix and having
5 | ctime older than min_time. Makes sure that the directory's atime is updated.
6 | Returns -1 if there were some errors. */
7 | int unlink_old_files(const char *dir, const char *prefix, time_t min_time);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib/utc-mktime.h:
--------------------------------------------------------------------------------
1 | #ifndef UTC_MKTIME_H
2 | #define UTC_MKTIME_H
3 |
4 | #include
5 |
6 | /* Like mktime(), but assume that tm is in UTC. Unlike mktime(), values in
7 | tm fields must be in valid range. Leap second is accepted any time though
8 | since utc_mktime is often used before applying the time zone offset. */
9 | time_t utc_mktime(const struct tm *tm);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/src/lib/utc-offset.h:
--------------------------------------------------------------------------------
1 | #ifndef UTC_OFFSET_H
2 | #define UTC_OFFSET_H
3 |
4 | #include
5 |
6 | /* Returns given time's offset to UTC in minutes. */
7 | int utc_offset(struct tm *tm, time_t t);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/lib/write-full.h:
--------------------------------------------------------------------------------
1 | #ifndef WRITE_FULL_H
2 | #define WRITE_FULL_H
3 |
4 | /* Write data into file. Returns -1 if error occurred, or 0 if all was ok.
5 | If there's not enough space in device, -1 with ENOSPC is returned, and
6 | it's unspecified how much data was actually written. */
7 | int write_full(int fd, const void *data, size_t size);
8 | int pwrite_full(int fd, const void *data, size_t size, off_t offset);
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/log/Makefile.am:
--------------------------------------------------------------------------------
1 | pkglibexecdir = $(libexecdir)/dovecot
2 |
3 | pkglibexec_PROGRAMS = log
4 |
5 | AM_CPPFLAGS = \
6 | -I$(top_srcdir)/src/lib \
7 | -I$(top_srcdir)/src/lib-settings \
8 | -I$(top_srcdir)/src/lib-master \
9 | -I$(top_srcdir)/src/lib-var-expand \
10 | $(BINARY_CFLAGS)
11 |
12 | log_LDADD = $(LIBDOVECOT) \
13 | $(BINARY_LDFLAGS)
14 |
15 | log_DEPENDENCIES = $(LIBDOVECOT_DEPS)
16 |
17 | log_SOURCES = \
18 | doveadm-connection.c \
19 | log-connection.c \
20 | log-settings.c \
21 | main.c
22 |
23 | noinst_HEADERS = \
24 | doveadm-connection.h \
25 | log-connection.h
26 |
--------------------------------------------------------------------------------
/src/log/doveadm-connection.h:
--------------------------------------------------------------------------------
1 | #ifndef DOVEADM_CONNECTION_H
2 | #define DOVEADM_CONNECTION_H
3 |
4 | void doveadm_connection_create(struct log_error_buffer *errorbuf, int fd);
5 |
6 | #endif
7 |
--------------------------------------------------------------------------------
/src/log/log-connection.h:
--------------------------------------------------------------------------------
1 | #ifndef LOG_CONNECTION_H
2 | #define LOG_CONNECTION_H
3 |
4 | struct log_connection;
5 |
6 | extern bool verbose_proctitle;
7 | extern char *global_log_prefix;
8 |
9 | void log_connection_create(struct log_error_buffer *errorbuf,
10 | int fd, int listen_fd);
11 |
12 | void log_connections_init(void);
13 | void log_connections_deinit(void);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/master/capabilities.h:
--------------------------------------------------------------------------------
1 | #ifndef CAPABILITIES_H
2 | #define CAPABILITIES_H
3 |
4 | #if defined(HAVE_LIBCAP)
5 |
6 | void drop_capabilities(void);
7 |
8 | #else
9 |
10 | static inline void drop_capabilities(void) {}
11 |
12 | #endif
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/master/dup2-array.h:
--------------------------------------------------------------------------------
1 | #ifndef DUP2_ARRAY_H
2 | #define DUP2_ARRAY_H
3 |
4 | struct dup2 {
5 | int fd_src, fd_dest;
6 | };
7 | ARRAY_DEFINE_TYPE(dup2, struct dup2);
8 |
9 | void dup2_append(ARRAY_TYPE(dup2) *dups, int fd_src, int fd_dest);
10 |
11 | int dup2_array(ARRAY_TYPE(dup2) *dups);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/master/master-client.h:
--------------------------------------------------------------------------------
1 | #ifndef MASTER_CLIENT_H
2 | #define MASTER_CLIENT_H
3 |
4 | void master_client_connected(struct service_list *service_list);
5 |
6 | void master_clients_init(void);
7 | void master_clients_deinit(void);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/master/service-log.h:
--------------------------------------------------------------------------------
1 | #ifndef SERVICE_LOG_H
2 | #define SERVICE_LOG_H
3 |
4 | #include "dup2-array.h"
5 |
6 | int services_log_init(struct service_list *service_list);
7 | void services_log_deinit(struct service_list *service_list);
8 |
9 | void services_log_dup2(ARRAY_TYPE(dup2) *dups,
10 | struct service_list *service_list,
11 | unsigned int first_fd, unsigned int *fd_count);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/master/service-monitor.h:
--------------------------------------------------------------------------------
1 | #ifndef SERVICE_MONITOR_H
2 | #define SERVICE_MONITOR_H
3 |
4 | /* Start listening and monitoring services. */
5 | void services_monitor_start(struct service_list *service_list);
6 |
7 | /* Stop services. */
8 | void services_monitor_stop(struct service_list *service_list, bool wait);
9 |
10 | /* Call after SIGCHLD has been detected */
11 | void services_monitor_reap_children(void);
12 |
13 | void service_monitor_stop(struct service *service);
14 | void service_monitor_stop_close(struct service *service);
15 | void service_monitor_listen_start(struct service *service);
16 | void service_monitor_listen_stop(struct service *service);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/master/service-process-notify.h:
--------------------------------------------------------------------------------
1 | #ifndef SERVICE_PROCESS_NOTIFY_H
2 | #define SERVICE_PROCESS_NOTIFY_H
3 |
4 | typedef int
5 | service_process_notify_callback_t(int fd, struct service_process *process);
6 |
7 | struct service_process_notify *
8 | service_process_notify_init(int fd,
9 | service_process_notify_callback_t *write_callback);
10 | void service_process_notify_deinit(struct service_process_notify **notify);
11 |
12 | void service_process_notify_add(struct service_process_notify *notify,
13 | struct service_process *process);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/plugins/Makefile.am:
--------------------------------------------------------------------------------
1 | if BUILD_SOLR
2 | FTS_SOLR = fts-solr
3 | endif
4 |
5 | if BUILD_FLATCURVE
6 | FTS_FLATCURVE = fts-flatcurve
7 | endif
8 |
9 | if HAVE_APPARMOR
10 | APPARMOR = apparmor
11 | endif
12 |
13 | if HAVE_LUA
14 | MAIL_LUA = mail-lua
15 | endif
16 |
17 | SUBDIRS = \
18 | acl \
19 | imap-acl \
20 | fts \
21 | last-login \
22 | lazy-expunge \
23 | notify \
24 | notify-status \
25 | push-notification \
26 | mail-log \
27 | $(MAIL_LUA) \
28 | quota \
29 | quota-clone \
30 | imap-quota \
31 | pop3-migration \
32 | mail-compress \
33 | mail-crypt \
34 | trash \
35 | virtual \
36 | welcome \
37 | $(FTS_SOLR) \
38 | $(FTS_FLATCURVE) \
39 | $(DICT_LDAP) \
40 | $(APPARMOR) \
41 | fs-compress \
42 | charset-alias
43 |
--------------------------------------------------------------------------------
/src/plugins/acl/acl-shared-storage.h:
--------------------------------------------------------------------------------
1 | #ifndef ACL_SHARED_STORAGE_H
2 | #define ACL_SHARED_STORAGE_H
3 |
4 | int acl_shared_namespaces_add(struct mail_namespace *ns);
5 |
6 | #endif
7 |
--------------------------------------------------------------------------------
/src/plugins/apparmor/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = \
2 | -I$(top_srcdir)/src/lib \
3 | -I$(top_srcdir)/src/lib-settings \
4 | -I$(top_srcdir)/src/lib-mail \
5 | -I$(top_srcdir)/src/lib-index \
6 | -I$(top_srcdir)/src/lib-storage \
7 | -I$(top_srcdir)/src/lib-var-expand
8 |
9 | NOPLUGIN_LDFLAGS =
10 | lib01_apparmor_plugin_la_LDFLAGS = -module -avoid-version
11 | lib01_apparmor_plugin_la_LIBADD = $(APPARMOR_LIBS)
12 | lib01_apparmor_plugin_la_SOURCES = \
13 | apparmor-plugin.c
14 |
15 | module_LTLIBRARIES = \
16 | lib01_apparmor_plugin.la
17 |
--------------------------------------------------------------------------------
/src/plugins/charset-alias/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = \
2 | -I$(top_srcdir)/src/lib \
3 | -I$(top_srcdir)/src/lib-settings \
4 | -I$(top_srcdir)/src/lib-master \
5 | -I$(top_srcdir)/src/lib-mail \
6 | -I$(top_srcdir)/src/lib-charset \
7 | -I$(top_srcdir)/src/lib-index \
8 | -I$(top_srcdir)/src/lib-var-expand \
9 | -I$(top_srcdir)/src/lib-storage
10 |
11 | NOPLUGIN_LDFLAGS =
12 | lib20_charset_alias_plugin_la_LDFLAGS = -module -avoid-version
13 |
14 | module_LTLIBRARIES = \
15 | lib20_charset_alias_plugin.la
16 |
17 | lib20_charset_alias_plugin_la_SOURCES = \
18 | charset-alias-plugin.c
19 |
20 | noinst_HEADERS = \
21 | charset-alias-plugin.h
22 |
--------------------------------------------------------------------------------
/src/plugins/charset-alias/charset-alias-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef CHARSET_ALIAS_PLUGIN_H
2 | #define CHARSET_ALIAS_PLUGIN_H
3 |
4 | void charset_alias_plugin_init(struct module *module);
5 | void charset_alias_plugin_deinit(void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/plugins/fs-compress/Makefile.am:
--------------------------------------------------------------------------------
1 | fs_moduledir = $(moduledir)
2 | fs_module_LTLIBRARIES = \
3 | libfs_compress.la
4 |
5 | AM_CPPFLAGS = \
6 | -I$(top_srcdir)/src/lib \
7 | -I$(top_srcdir)/src/lib-settings \
8 | -I$(top_srcdir)/src/lib-compression \
9 | -I$(top_srcdir)/src/lib-fs \
10 | -I$(top_srcdir)/src/lib-var-expand
11 |
12 | NOPLUGIN_LDFLAGS =
13 | libfs_compress_la_SOURCES = fs-compress.c
14 | libfs_compress_la_LIBADD = ../../lib-compression/libdovecot-compression.la
15 | libfs_compress_la_DEPENDENCIES = ../../lib-compression/libdovecot-compression.la
16 | libfs_compress_la_LDFLAGS = -module -avoid-version
17 |
--------------------------------------------------------------------------------
/src/plugins/fts-flatcurve/doveadm-dump-flatcurve.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) the Dovecot authors, based on code by Michael Slusarz.
2 | * See the included COPYING file */
3 |
4 | #ifndef DOVEADM_DUMP_FLATCURVE_H
5 | #define DOVEADM_DUMP_FLATCURVE_H
6 |
7 | void doveadm_dump_flatcurve_init(void);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/plugins/fts-flatcurve/fts-flatcurve-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef FTS_FLATCURVE_SETTINGS_H
2 | #define FTS_FLATCURVE_SETTINGS_H
3 |
4 | /* */
5 | #define FTS_FLATCURVE_FILTER "fts_flatcurve"
6 | /* */
7 |
8 | struct fts_flatcurve_settings {
9 | pool_t pool;
10 | unsigned int commit_limit;
11 | unsigned int min_term_size;
12 | unsigned int optimize_limit;
13 | unsigned int rotate_count;
14 | unsigned int rotate_time;
15 | bool substring_search;
16 | };
17 |
18 | extern const struct setting_parser_info fts_flatcurve_setting_parser_info;
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/src/plugins/fts-solr/fts-solr-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef FTS_SOLR_SETTINGS_H
2 | #define FTS_SOLR_SETTINGS_H
3 |
4 | /* */
5 | #define FTS_SOLR_FILTER "fts_solr"
6 | /* */
7 |
8 | struct fts_solr_settings {
9 | pool_t pool;
10 | const char *url;
11 | unsigned int batch_size;
12 | bool soft_commit;
13 | };
14 |
15 | extern const struct setting_parser_info fts_solr_setting_parser_info;
16 | int fts_solr_settings_get(struct event *event,
17 | const struct setting_parser_info *info,
18 | const struct fts_solr_settings **set,
19 | const char **error_r);
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/src/plugins/fts-solr/solr-response.h:
--------------------------------------------------------------------------------
1 | #ifndef SOLR_RESPONSE_H
2 | #define SOLR_RESPONSE_H
3 |
4 | #include "seq-range-array.h"
5 | #include "fts-api.h"
6 |
7 | struct solr_response_parser;
8 |
9 | struct solr_result {
10 | const char *box_id;
11 |
12 | ARRAY_TYPE(seq_range) uids;
13 | ARRAY_TYPE(fts_score_map) scores;
14 | };
15 |
16 | struct solr_response_parser *
17 | solr_response_parser_init(pool_t result_pool, struct event *event,
18 | struct istream *input);
19 | void solr_response_parser_deinit(struct solr_response_parser **_parser);
20 |
21 | int solr_response_parse(struct solr_response_parser *parser,
22 | struct solr_result ***box_results_r);
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/src/plugins/fts/doveadm-fts.h:
--------------------------------------------------------------------------------
1 | #ifndef DOVEADM_FTS_H
2 | #define DOVEADM_FTS_H
3 |
4 | struct module;
5 |
6 | void doveadm_fts_plugin_init(struct module *module);
7 | void doveadm_fts_plugin_deinit(void);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/plugins/fts/fts-build-mail.h:
--------------------------------------------------------------------------------
1 | #ifndef FTS_BUILD_MAIL_H
2 | #define FTS_BUILD_MAIL_H
3 |
4 | /* Build indexes for the given mail.
5 | Returns -1 on error, The error is set to mail's storage.
6 | Returns 0 on ignored error (retry limit reached and mail not built,
7 | see comments in function implementation)
8 | Returns 1 on success */
9 | int fts_build_mail(struct fts_backend_update_context *update_ctx,
10 | struct mail *mail);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/plugins/fts/fts-build-private.h:
--------------------------------------------------------------------------------
1 | #ifndef FTS_BUILD_PRIVATE_H
2 | #define FTS_BUILD_PRIVATE_H
3 |
4 | #include "fts-build.h"
5 |
6 | struct fts_storage_build_context;
7 |
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/plugins/fts/fts-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef FTS_PLUGIN_H
2 | #define FTS_PLUGIN_H
3 |
4 | void fts_plugin_init(struct module *module);
5 | void fts_plugin_deinit(void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/plugins/fts/fts-search-args.h:
--------------------------------------------------------------------------------
1 | #ifndef FTS_SEARCH_ARGS_H
2 | #define FTS_SEARCH_ARGS_H
3 |
4 | int fts_search_args_expand(struct fts_backend *backend,
5 | struct mail_search_args *args);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/plugins/fts/fts-search-serialize.h:
--------------------------------------------------------------------------------
1 | #ifndef FTS_SEARCH_SERIALIZE_H
2 | #define FTS_SEARCH_SERIALIZE_H
3 |
4 | /* serialize [non]match_always fields (clearing buffer) */
5 | void fts_search_serialize(buffer_t *buf, const struct mail_search_arg *args);
6 | /* add/remove [non]match_always fields in search args */
7 | void fts_search_deserialize(struct mail_search_arg *args,
8 | const buffer_t *buf);
9 | /* add match_always=TRUE fields to search args */
10 | void fts_search_deserialize_add_matches(struct mail_search_arg *args,
11 | const buffer_t *buf);
12 | /* add nonmatch_always=TRUE fields to search args */
13 | void fts_search_deserialize_add_nonmatches(struct mail_search_arg *args,
14 | const buffer_t *buf);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/plugins/fts/fts-user.h:
--------------------------------------------------------------------------------
1 | #ifndef FTS_USER_H
2 | #define FTS_USER_H
3 |
4 | #include "fts-settings.h"
5 |
6 | const struct fts_settings *fts_user_get_settings(struct mail_user *user);
7 |
8 | size_t fts_mail_user_message_max_size(struct mail_user *user);
9 |
10 | int fts_mail_user_init(struct mail_user *user, struct event *event,
11 | bool initialize_libfts, const char **error_r);
12 | void fts_mail_user_created(struct mail_user *user);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/plugins/imap-acl/imap-acl-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_ACL_PLUGIN_H
2 | #define IMAP_ACL_PLUGIN_H
3 |
4 | extern const char *imap_acl_plugin_dependencies[];
5 | extern const char imap_acl_plugin_binary_dependency[];
6 |
7 | extern MODULE_CONTEXT_DEFINE(imap_acl_storage_module, &mail_storage_module_register);
8 |
9 | void imap_acl_plugin_init(struct module *module);
10 | void imap_acl_plugin_deinit(void);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/plugins/imap-quota/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = \
2 | -I$(top_srcdir)/src/lib \
3 | -I$(top_srcdir)/src/lib-mail \
4 | -I$(top_srcdir)/src/lib-imap \
5 | -I$(top_srcdir)/src/lib-index \
6 | -I$(top_srcdir)/src/lib-storage \
7 | -I$(top_srcdir)/src/imap \
8 | -I$(top_srcdir)/src/plugins/quota
9 |
10 | imap_moduledir = $(moduledir)
11 |
12 | NOPLUGIN_LDFLAGS =
13 | lib11_imap_quota_plugin_la_LDFLAGS = -module -avoid-version
14 |
15 | imap_module_LTLIBRARIES = \
16 | lib11_imap_quota_plugin.la
17 |
18 | if DOVECOT_PLUGIN_DEPS
19 | lib11_imap_quota_plugin_la_LIBADD = \
20 | ../quota/lib10_quota_plugin.la
21 | endif
22 |
23 | lib11_imap_quota_plugin_la_SOURCES = \
24 | imap-quota-plugin.c
25 |
26 | noinst_HEADERS = \
27 | imap-quota-plugin.h
28 |
--------------------------------------------------------------------------------
/src/plugins/imap-quota/imap-quota-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef IMAP_QUOTA_PLUGIN_H
2 | #define IMAP_QUOTA_PLUGIN_H
3 |
4 | struct module;
5 |
6 | extern const char *imap_quota_plugin_dependencies[];
7 | extern const char imap_quota_plugin_binary_dependency[];
8 |
9 | void imap_quota_plugin_init(struct module *module);
10 | void imap_quota_plugin_deinit(void);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/plugins/last-login/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = \
2 | -I$(top_srcdir)/src/lib \
3 | -I$(top_srcdir)/src/lib-settings \
4 | -I$(top_srcdir)/src/lib-dict \
5 | -I$(top_srcdir)/src/lib-mail \
6 | -I$(top_srcdir)/src/lib-imap \
7 | -I$(top_srcdir)/src/lib-index \
8 | -I$(top_srcdir)/src/lib-storage \
9 | -I$(top_srcdir)/src/lib-var-expand
10 |
11 | NOPLUGIN_LDFLAGS =
12 | lib10_last_login_plugin_la_LDFLAGS = -module -avoid-version
13 |
14 | module_LTLIBRARIES = \
15 | lib10_last_login_plugin.la
16 |
17 | lib10_last_login_plugin_la_SOURCES = \
18 | last-login-plugin.c
19 |
20 | noinst_HEADERS = \
21 | last-login-plugin.h
22 |
--------------------------------------------------------------------------------
/src/plugins/last-login/last-login-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef LAST_LOGIN_PLUGIN_H
2 | #define LAST_LOGIN_PLUGIN_H
3 |
4 | void last_login_plugin_init(struct module *module);
5 | void last_login_plugin_deinit(void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/plugins/lazy-expunge/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = \
2 | -I$(top_srcdir)/src/lib \
3 | -I$(top_srcdir)/src/lib-settings \
4 | -I$(top_srcdir)/src/lib-mail \
5 | -I$(top_srcdir)/src/lib-index \
6 | -I$(top_srcdir)/src/lib-storage \
7 | -I$(top_srcdir)/src/lib-storage/index \
8 | -I$(top_srcdir)/src/lib-storage/index/maildir \
9 | -I$(top_srcdir)/src/lib-imap \
10 | -I$(top_srcdir)/src/lib-var-expand \
11 | -I$(top_srcdir)/src/plugins/quota
12 |
13 | NOPLUGIN_LDFLAGS =
14 | lib02_lazy_expunge_plugin_la_LDFLAGS = -module -avoid-version
15 |
16 | module_LTLIBRARIES = \
17 | lib02_lazy_expunge_plugin.la
18 |
19 | lib02_lazy_expunge_plugin_la_SOURCES = \
20 | lazy-expunge-plugin.c \
21 | lazy-expunge-settings.c
22 |
23 | noinst_HEADERS = \
24 | lazy-expunge-plugin.h
25 |
--------------------------------------------------------------------------------
/src/plugins/lazy-expunge/lazy-expunge-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef LAZY_EXPUNGE_PLUGIN_H
2 | #define LAZY_EXPUNGE_PLUGIN_H
3 |
4 | struct module;
5 |
6 | struct lazy_expunge_settings {
7 | pool_t pool;
8 |
9 | bool lazy_expunge_only_last_instance;
10 | const char *lazy_expunge_mailbox;
11 | };
12 |
13 | extern const struct setting_parser_info lazy_expunge_setting_parser_info;
14 |
15 | void lazy_expunge_plugin_init(struct module *module);
16 | void lazy_expunge_plugin_deinit(void);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/plugins/mail-compress/mail-compress-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIL_COMPRESS_PLUGIN_H
2 | #define MAIL_COMPRESS_PLUGIN_H
3 |
4 | struct mail_compress_settings {
5 | pool_t pool;
6 | const char *mail_compress_write_method;
7 | };
8 |
9 | extern const struct setting_parser_info mail_compress_setting_parser_info;
10 |
11 | void mail_compress_plugin_init(struct module *module);
12 | void mail_compress_plugin_deinit(void);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/plugins/mail-log/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = \
2 | -I$(top_srcdir)/src/lib \
3 | -I$(top_srcdir)/src/lib-settings \
4 | -I$(top_srcdir)/src/lib-mail \
5 | -I$(top_srcdir)/src/lib-imap \
6 | -I$(top_srcdir)/src/lib-index \
7 | -I$(top_srcdir)/src/lib-storage \
8 | -I$(top_srcdir)/src/lib-var-expand \
9 | -I$(top_srcdir)/src/plugins/notify
10 |
11 | NOPLUGIN_LDFLAGS =
12 | lib20_mail_log_plugin_la_LDFLAGS = -module -avoid-version
13 |
14 | module_LTLIBRARIES = \
15 | lib20_mail_log_plugin.la
16 |
17 | if DOVECOT_PLUGIN_DEPS
18 | lib20_mail_log_plugin_la_LIBADD = \
19 | ../notify/lib15_notify_plugin.la
20 | endif
21 |
22 | lib20_mail_log_plugin_la_SOURCES = \
23 | mail-log-plugin.c
24 |
25 | noinst_HEADERS = \
26 | mail-log-plugin.h
27 |
--------------------------------------------------------------------------------
/src/plugins/mail-log/mail-log-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIL_LOG_PLUGIN_H
2 | #define MAIL_LOG_PLUGIN_H
3 |
4 | extern const char *mail_log_plugin_dependencies[];
5 |
6 | void mail_log_plugin_init(struct module *module);
7 | void mail_log_plugin_deinit(void);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/plugins/mail-lua/mail-lua-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIL_LUA_PLUGIN_H
2 | #define MAIL_LUA_PLUGIN_H 1
3 |
4 | struct dlua_script;
5 | struct mail_user;
6 | struct module;
7 |
8 | void mail_lua_plugin_init(struct module *module);
9 | void mail_lua_plugin_deinit(void);
10 |
11 | bool mail_lua_plugin_get_script(struct mail_user *user,
12 | struct dlua_script **script_r);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/plugins/mail-lua/mail-lua-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef MAIL_LUA_SETTINGS_H
2 | #define MAIL_LUA_SETTINGS_H
3 |
4 | /* */
5 | #define MAIL_LUA_FILTER "mail_lua"
6 | /* */
7 |
8 | struct mail_lua_settings {
9 | pool_t pool;
10 | };
11 |
12 | extern const struct setting_parser_info mail_lua_setting_parser_info;
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/plugins/notify-status/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = \
2 | -I$(top_srcdir)/src/lib \
3 | -I$(top_srcdir)/src/lib-json \
4 | -I$(top_srcdir)/src/lib-imap \
5 | -I$(top_srcdir)/src/lib-mail \
6 | -I$(top_srcdir)/src/lib-index \
7 | -I$(top_srcdir)/src/lib-storage \
8 | -I$(top_srcdir)/src/lib-dict \
9 | -I$(top_srcdir)/src/lib-settings \
10 | -I$(top_srcdir)/src/lib-var-expand \
11 | -I$(top_srcdir)/src/plugins/notify
12 |
13 | NOPLUGIN_LDFLAGS =
14 | lib20_notify_status_plugin_la_LDFLAGS = -module -avoid-version
15 |
16 | module_LTLIBRARIES = \
17 | lib20_notify_status_plugin.la
18 |
19 | lib20_notify_status_plugin_la_SOURCES = \
20 | notify-status-plugin.c
21 |
--------------------------------------------------------------------------------
/src/plugins/notify/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = \
2 | -I$(top_srcdir)/src/lib \
3 | -I$(top_srcdir)/src/lib-mail \
4 | -I$(top_srcdir)/src/lib-imap \
5 | -I$(top_srcdir)/src/lib-index \
6 | -I$(top_srcdir)/src/lib-storage \
7 | -I$(top_srcdir)/src/lib-storage/index \
8 | -I$(top_srcdir)/src/lib-storage/index/maildir
9 |
10 | NOPLUGIN_LDFLAGS =
11 | lib15_notify_plugin_la_LDFLAGS = -module -avoid-version
12 |
13 | module_LTLIBRARIES = \
14 | lib15_notify_plugin.la
15 |
16 | lib15_notify_plugin_la_SOURCES = \
17 | notify-plugin.c \
18 | notify-storage.c
19 |
20 | headers = \
21 | notify-plugin.h \
22 | notify-plugin-private.h
23 |
24 | pkginc_libdir=$(pkgincludedir)
25 | pkginc_lib_HEADERS = $(headers)
26 |
--------------------------------------------------------------------------------
/src/plugins/pop3-migration/pop3-migration-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef POP3_MIGRATION_PLUGIN_H
2 | #define POP3_MIGRATION_PLUGIN_H
3 |
4 | struct module;
5 |
6 | void pop3_migration_plugin_init(struct module *module);
7 | void pop3_migration_plugin_deinit(void);
8 |
9 | int pop3_migration_get_hdr_sha1(uint32_t mail_seq, struct istream *input,
10 | unsigned char sha1_r[STATIC_ARRAY SHA1_RESULTLEN],
11 | bool *have_eoh_r, const char **error_r);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-event-flagsclear.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_EVENT_FLAGSCLEAR_H
4 | #define PUSH_NOTIFICATION_EVENT_FLAGSCLEAR_H
5 |
6 | #include "mail-types.h"
7 |
8 | struct push_notification_event_flagsclear_config {
9 | /* Store the old flags/keywords? */
10 | bool store_old;
11 | };
12 |
13 | struct push_notification_event_flagsclear_data {
14 | enum mail_flags flags_clear;
15 | ARRAY_TYPE(keywords) keywords_clear;
16 |
17 | enum mail_flags flags_old;
18 | ARRAY_TYPE(keywords) keywords_old;
19 | };
20 |
21 | #endif
22 |
23 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-event-flagsset.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_EVENT_FLAGSSET_H
4 | #define PUSH_NOTIFICATION_EVENT_FLAGSSET_H
5 |
6 | #include "mail-types.h"
7 |
8 | struct push_notification_event_flagsset_config {
9 | /* RFC 5423[4.2] - allow configuration whether FlagsSet event returns
10 | Deleted and/or Seen flags, since these flags are also settable via
11 | MessageRead/MessageTrash events. By default, include them here. */
12 | bool hide_deleted;
13 | bool hide_seen;
14 | };
15 |
16 | struct push_notification_event_flagsset_data {
17 | enum mail_flags flags_set;
18 | ARRAY_TYPE(keywords) keywords_set;
19 | };
20 |
21 | #endif
22 |
23 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-event-mailboxcreate.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_EVENT_MAILBOXCREATE_H
4 | #define PUSH_NOTIFICATION_EVENT_MAILBOXCREATE_H
5 |
6 | struct push_notification_event_mailboxcreate_data {
7 | /* RFC 5423 [4.4]: UIDVALIDITY required for create event. */
8 | uint32_t uid_validity;
9 | };
10 |
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-event-mailboxdelete.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_EVENT_MAILBOXDELETE_H
4 | #define PUSH_NOTIFICATION_EVENT_MAILBOXDELETE_H
5 |
6 | struct push_notification_event_mailboxdelete_data {
7 | /* Can only be TRUE. */
8 | bool deleted;
9 | };
10 |
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-event-mailboxrename.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_EVENT_MAILBOXRENAME_H
4 | #define PUSH_NOTIFICATION_EVENT_MAILBOXRENAME_H
5 |
6 | struct push_notification_event_mailboxrename_data {
7 | const char *old_mbox;
8 | };
9 |
10 | #endif
11 |
12 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-event-mailboxsubscribe.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_EVENT_MAILBOXSUBSCRIBE_H
4 | #define PUSH_NOTIFICATION_EVENT_MAILBOXSUBSCRIBE_H
5 |
6 | struct push_notification_event_mailboxsubscribe_data {
7 | /* Can only be TRUE. */
8 | bool subscribe;
9 | };
10 |
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-event-mailboxunsubscribe.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_EVENT_MAILBOXUNSUBSCRIBE_H
4 | #define PUSH_NOTIFICATION_EVENT_MAILBOXUNSUBSCRIBE_H
5 |
6 | struct push_notification_event_mailboxunsubscribe_data {
7 | /* Can only be FALSE. */
8 | bool subscribe;
9 | };
10 |
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-event-messageexpunge.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_EVENT_MESSAGEEXPUNGE_H
4 | #define PUSH_NOTIFICATION_EVENT_MESSAGEEXPUNGE_H
5 |
6 | struct push_notification_event_messageexpunge_data {
7 | /* Can only be TRUE. */
8 | bool expunge;
9 | };
10 |
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-event-messageread.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_EVENT_MESSAGEREAD_H
4 | #define PUSH_NOTIFICATION_EVENT_MESSAGEREAD_H
5 |
6 | struct push_notification_event_messageread_data {
7 | /* Can only be TRUE. */
8 | bool read;
9 | };
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-event-messagetrash.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_EVENT_MESSAGETRASH_H
4 | #define PUSH_NOTIFICATION_EVENT_MESSAGETRASH_H
5 |
6 | struct push_notification_event_messagetrash_data {
7 | /* Can only be TRUE. */
8 | bool trash;
9 | };
10 |
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-events-rfc5423.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_EVENTS_RFC5423_H
4 | #define PUSH_NOTIFICATION_EVENTS_RFC5423_H
5 |
6 | void push_notification_event_register_rfc5423_events(void);
7 | void push_notification_event_unregister_rfc5423_events(void);
8 |
9 | #endif
10 |
11 |
--------------------------------------------------------------------------------
/src/plugins/push-notification/push-notification-plugin.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
2 |
3 | #ifndef PUSH_NOTIFICATION_PLUGIN_H
4 | #define PUSH_NOTIFICATION_PLUGIN_H
5 |
6 | extern const char *push_notification_plugin_dependencies[];
7 | extern struct event_category event_category_push_notification;
8 | extern struct push_notification_event push_notification_event_messagenew;
9 |
10 | struct module;
11 |
12 | struct event_category *push_notification_get_event_category(void);
13 | struct push_notification_event *push_notification_get_event_messagenew(void);
14 |
15 | void push_notification_plugin_init(struct module *module);
16 | void push_notification_plugin_deinit(void);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/src/plugins/quota-clone/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = \
2 | -I$(top_srcdir)/src/lib \
3 | -I$(top_srcdir)/src/lib-settings \
4 | -I$(top_srcdir)/src/lib-dict \
5 | -I$(top_srcdir)/src/lib-mail \
6 | -I$(top_srcdir)/src/lib-index \
7 | -I$(top_srcdir)/src/lib-storage \
8 | -I$(top_srcdir)/src/lib-var-expand \
9 | -I$(top_srcdir)/src/plugins/quota
10 |
11 | NOPLUGIN_LDFLAGS =
12 | lib20_quota_clone_plugin_la_LDFLAGS = -module -avoid-version
13 |
14 | module_LTLIBRARIES = \
15 | lib20_quota_clone_plugin.la
16 |
17 | lib20_quota_clone_plugin_la_SOURCES = \
18 | quota-clone-plugin.c \
19 | quota-clone-settings.c
20 |
21 | noinst_HEADERS = \
22 | quota-clone-plugin.h \
23 | quota-clone-settings.h
24 |
--------------------------------------------------------------------------------
/src/plugins/quota-clone/quota-clone-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef QUOTA_CLONE_PLUGIN_H
2 | #define QUOTA_CLONE_PLUGIN_H
3 |
4 | void quota_clone_plugin_init(struct module *module);
5 | void quota_clone_plugin_deinit(void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/plugins/quota-clone/quota-clone-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef QUOTA_CLONE_SETTINGS_H
2 | #define QUOTA_CLONE_SETTINGS_H
3 |
4 | extern const struct setting_parser_info quota_clone_setting_parser_info;
5 | struct quota_clone_settings {
6 | pool_t pool;
7 | bool unset;
8 | };
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/plugins/quota/quota-status-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef QUOTA_STATUS_SETTINGS_H
2 | #define QUOTA_STATUS_SETTINGS_H 1
3 |
4 | struct quota_status_settings {
5 | pool_t pool;
6 | const char *recipient_delimiter;
7 | const char *quota_status_nouser;
8 | };
9 |
10 | extern const struct setting_parser_info quota_status_setting_parser_info;
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/plugins/trash/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = \
2 | -I$(top_srcdir)/src/lib \
3 | -I$(top_srcdir)/src/lib-settings \
4 | -I$(top_srcdir)/src/lib-mail \
5 | -I$(top_srcdir)/src/lib-index \
6 | -I$(top_srcdir)/src/lib-storage \
7 | -I$(top_srcdir)/src/lib-var-expand \
8 | -I$(top_srcdir)/src/plugins/quota
9 |
10 | NOPLUGIN_LDFLAGS =
11 | lib11_trash_plugin_la_LDFLAGS = -module -avoid-version
12 |
13 | module_LTLIBRARIES = \
14 | lib11_trash_plugin.la
15 |
16 | if DOVECOT_PLUGIN_DEPS
17 | lib11_trash_plugin_la_LIBADD = \
18 | ../quota/lib10_quota_plugin.la
19 | endif
20 |
21 | lib11_trash_plugin_la_SOURCES = \
22 | trash-plugin.c
23 |
24 | noinst_HEADERS = \
25 | trash-plugin.h
26 |
--------------------------------------------------------------------------------
/src/plugins/trash/trash-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef TRASH_PLUGIN_H
2 | #define TRASH_PLUGIN_H
3 |
4 | extern const char *trash_plugin_dependencies[];
5 |
6 | void trash_plugin_init(struct module *module);
7 | void trash_plugin_deinit(void);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/plugins/virtual/virtual-plugin.h:
--------------------------------------------------------------------------------
1 | #ifndef VIRTUAL_PLUGIN_H
2 | #define VIRTUAL_PLUGIN_H
3 |
4 | void virtual_mailbox_list_created(struct mailbox_list *list);
5 |
6 | void virtual_plugin_init(struct module *module);
7 | void virtual_plugin_deinit(void);
8 |
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/plugins/virtual/virtual-settings.h:
--------------------------------------------------------------------------------
1 | #ifndef VIRTUAL_SETTINGS_H
2 | #define VIRTUAL_SETTINGS_H
3 |
4 | struct virtual_settings {
5 | pool_t pool;
6 |
7 | unsigned int virtual_max_open_mailboxes;
8 | };
9 |
10 | extern const struct setting_parser_info virtual_setting_parser_info;
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/plugins/welcome/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = \
2 | -I$(top_srcdir)/src/lib \
3 | -I$(top_srcdir)/src/lib-settings \
4 | -I$(top_srcdir)/src/lib-mail \
5 | -I$(top_srcdir)/src/lib-index \
6 | -I$(top_srcdir)/src/lib-program-client \
7 | -I$(top_srcdir)/src/lib-storage \
8 | -I$(top_srcdir)/src/lib-var-expand
9 |
10 | NOPLUGIN_LDFLAGS =
11 | lib99_welcome_plugin_la_LDFLAGS = -module -avoid-version
12 |
13 | module_LTLIBRARIES = \
14 | lib99_welcome_plugin.la
15 |
16 | lib99_welcome_plugin_la_SOURCES = \
17 | welcome-plugin.c
18 |
--------------------------------------------------------------------------------
/src/pop3-login/client-authenticate.h:
--------------------------------------------------------------------------------
1 | #ifndef CLIENT_AUTHENTICATE_H
2 | #define CLIENT_AUTHENTICATE_H
3 |
4 | void pop3_client_auth_result(struct client *client,
5 | enum client_auth_result result,
6 | const struct client_auth_reply *reply,
7 | const char *text);
8 |
9 | bool cmd_capa(struct pop3_client *client, const char *args);
10 | bool cmd_user(struct pop3_client *client, const char *args);
11 | bool cmd_pass(struct pop3_client *client, const char *args);
12 | int cmd_auth(struct pop3_client *client);
13 | bool cmd_apop(struct pop3_client *client, const char *args);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/pop3-login/pop3-proxy.h:
--------------------------------------------------------------------------------
1 | #ifndef POP3_PROXY_H
2 | #define POP3_PROXY_H
3 |
4 | void pop3_proxy_reset(struct client *client);
5 | int pop3_proxy_parse_line(struct client *client, const char *line);
6 |
7 | void pop3_proxy_failed(struct client *client,
8 | enum login_proxy_failure_type type,
9 | const char *reason, bool reconnecting);
10 | const char *pop3_proxy_get_state(struct client *client);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/pop3/pop3-commands.h:
--------------------------------------------------------------------------------
1 | #ifndef POP3_COMMANDS_H
2 | #define POP3_COMMANDS_H
3 |
4 | struct pop3_command_context;
5 |
6 | struct pop3_command {
7 | const char *name;
8 | int (*func)(struct pop3_command_context *cctx);
9 | };
10 |
11 | struct pop3_command_context {
12 | struct client *client;
13 | const struct pop3_command *command;
14 | const char *orig_command;
15 | const char *orig_args;
16 | const char *args;
17 | struct event *event;
18 |
19 | struct {
20 | uint64_t bytes_in;
21 | uint64_t bytes_out;
22 | } stats;
23 | };
24 |
25 | const struct pop3_command *pop3_command_find(const char *name);
26 | int client_command_execute(struct pop3_command_context *cctx);
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/src/pop3/pop3-common.h:
--------------------------------------------------------------------------------
1 | #ifndef POP3_COMMON_H
2 | #define POP3_COMMON_H
3 |
4 | enum uidl_keys {
5 | UIDL_UIDVALIDITY = 0x01,
6 | UIDL_UID = 0x02,
7 | UIDL_MD5 = 0x04,
8 | UIDL_FILE_NAME = 0x08,
9 | UIDL_GUID = 0x10
10 | };
11 |
12 | #include "lib.h"
13 | #include "pop3-client.h"
14 | #include "pop3-settings.h"
15 |
16 | typedef void pop3_client_created_func_t(struct client **client);
17 |
18 | extern pop3_client_created_func_t *hook_client_created;
19 |
20 | /* Sets the hook_client_created and returns the previous hook,
21 | which the new_hook should call if it's non-NULL. */
22 | pop3_client_created_func_t *
23 | pop3_client_created_hook_set(pop3_client_created_func_t *new_hook);
24 |
25 | void pop3_refresh_proctitle(void);
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/src/stats/client-reader.h:
--------------------------------------------------------------------------------
1 | #ifndef CLIENT_READER_H
2 | #define CLIENT_READER_H
3 |
4 | struct stats_metrics;
5 |
6 | void client_reader_create(int fd);
7 |
8 | void client_readers_init(void);
9 | void client_readers_deinit(void);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/src/stats/client-writer.h:
--------------------------------------------------------------------------------
1 | #ifndef CLIENT_WRITER_H
2 | #define CLIENT_WRITER_H
3 |
4 | struct stats_metrics;
5 |
6 | void client_writer_create(int fd);
7 |
8 | void client_writer_update_connections(void);
9 |
10 | void client_writers_init(void);
11 | void client_writers_deinit(void);
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/src/stats/event-exporter-fmt-none.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2019 Dovecot authors, see the included COPYING file */
2 |
3 | #include "lib.h"
4 | #include "ioloop.h"
5 | #include "event-exporter.h"
6 |
7 | void event_export_fmt_none(const struct metric *metric ATTR_UNUSED,
8 | struct event *event ATTR_UNUSED,
9 | buffer_t *dest ATTR_UNUSED)
10 | {
11 | /* nothing to do */
12 | }
13 |
--------------------------------------------------------------------------------
/src/stats/event-exporter-transport-drop.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2019 Dovecot authors, see the included COPYING file */
2 |
3 | #include "lib.h"
4 | #include "event-exporter.h"
5 |
6 | static void
7 | event_exporter_drop_send(struct event_exporter *exporter ATTR_UNUSED,
8 | const buffer_t *buf ATTR_UNUSED)
9 | {
10 | }
11 |
12 | const struct event_exporter_transport event_exporter_transport_drop = {
13 | .name = "drop",
14 |
15 | .send = event_exporter_drop_send,
16 | };
17 |
--------------------------------------------------------------------------------
/src/stats/stats-common.h:
--------------------------------------------------------------------------------
1 | #ifndef STATS_COMMON_H
2 | #define STATS_COMMON_H
3 |
4 | #include "lib.h"
5 | #include "stats-settings.h"
6 |
7 | extern struct stats_metrics *stats_metrics;
8 | extern time_t stats_startup_time;
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/src/stats/stats-event-category.h:
--------------------------------------------------------------------------------
1 | #ifndef STATS_EVENT_CATEGORY_H
2 | #define STATS_EVENT_CATEGORY_H
3 |
4 | /* Register a new event category if it doesn't already exist.
5 | parent may be NULL. */
6 | void stats_event_category_register(const char *name,
7 | struct event_category *parent);
8 |
9 | void stats_event_categories_init(void);
10 | void stats_event_categories_deinit(void);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/stats/stats-service-private.h:
--------------------------------------------------------------------------------
1 | #ifndef STATS_SERVICE_PRIVATE_H
2 | #define STATS_SERVICE_PRIVATE_H
3 |
4 | #include "stats-service.h"
5 |
6 | void stats_service_openmetrics_init(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/src/stats/stats-service.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2019 Dovecot authors, see the included COPYING file */
2 |
3 | #include "stats-common.h"
4 | #include "http-server.h"
5 | #include "stats-service-private.h"
6 |
7 | void stats_services_init(void)
8 | {
9 | stats_service_openmetrics_init();
10 | }
11 |
12 | void stats_services_deinit(void)
13 | {
14 | /* Nothing yet */
15 | }
16 |
--------------------------------------------------------------------------------
/src/stats/stats-service.h:
--------------------------------------------------------------------------------
1 | #ifndef STATS_SERVICE_H
2 | #define STATS_SERVICE_H
3 |
4 | void stats_services_init(void);
5 | void stats_services_deinit(void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/src/submission-login/submission-proxy.h:
--------------------------------------------------------------------------------
1 | #ifndef SUBMISSION_PROXY_H
2 | #define SUBMISSION_PROXY_H
3 |
4 | void submission_proxy_reset(struct client *client);
5 | int submission_proxy_parse_line(struct client *client, const char *line);
6 |
7 | void submission_proxy_failed(struct client *client,
8 | enum login_proxy_failure_type type,
9 | const char *reason, bool reconnecting);
10 | const char *submission_proxy_get_state(struct client *client);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/src/util/health-check-settings.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2019 Dovecot authors, see the included COPYING file */
2 |
3 | #include "lib.h"
4 | #include "buffer.h"
5 | #include "settings-parser.h"
6 | #include "service-settings.h"
7 |
8 | struct service_settings health_check_service_settings = {
9 | .name = "health-check",
10 | .protocol = "",
11 | .type = "",
12 | .executable = "script -p health-check.sh",
13 | .user = "$SET:default_internal_user",
14 | .group = "",
15 | .privileged_group = "",
16 | .extra_groups = ARRAY_INIT,
17 | .chroot = "",
18 |
19 | .drop_priv_before_exec = TRUE,
20 |
21 | .client_limit = 1,
22 |
23 | .unix_listeners = ARRAY_INIT,
24 | .fifo_listeners = ARRAY_INIT,
25 | .inet_listeners = ARRAY_INIT
26 | };
27 |
--------------------------------------------------------------------------------
/stamp.h.in:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dovecot/core/7ed88b8e0318aa9153a38bddd038388ac5a36022/stamp.h.in
--------------------------------------------------------------------------------