bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2005-2018 Dovecot authors, see the included COPYING file */
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainenconst struct doveadm_print_vfuncs *doveadm_print_vfuncs_all[] = {
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen /* do nothing. doveadm connections should be over soon. */
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainenstatic void client_connected(struct master_service_connection *conn)
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen i_error("doveadm server can handle only a single client");
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen master_service_client_connection_accept(conn);
f300f927771a39549ce6cb7607129508e9041b4aStephan Bosch doveadm_client = client_connection_http_create(conn->fd, conn->ssl);
e60c3e17c656c53da60f0ac51aa15e9ef2742d77Stephan Bosch doveadm_client = client_connection_tcp_create(conn->fd, conn->listen_fd,
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen i_fatal("Client sent invalid command. Usage: %s %s",
1e11a94ec50fc9b57eb2c859771c6a326ccaf86fAki Tuomi i_fatal("Client sent invalid command. Usage: %s %s",
816d20be0cf95fc4eb1a8aa716639e73b8ba525eMartti Rannanjärvi restrict_access_by_env(RESTRICT_ACCESS_FLAG_ALLOW_ROOT, NULL);
f36c4185474823594a78b3f252e79d8923522c36Timo Sirainen doveadm_settings_pool = pool_alloconly_create("doveadm settings", 1024);
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm_settings = master_service_settings_get_others(master_service)[0];
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm_settings = settings_dup(&doveadm_setting_parser_info,
5e327e031d1591f8bff17b67eba7139afbd36cddTimo Sirainen master_service_settings_get(master_service)->verbose_proctitle;
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen const struct setting_parser_info *set_roots[] = {
2d1892aaeb63b9774237b6e60d6bb04bf6f8259cTimo Sirainen master_service = master_service_init("doveadm", service_flags,
107659c01b2359b0ee426bde020c8d4e29ede30dTimo Sirainen while ((c = master_getopt(master_service)) > 0) {
c1fc5a97a15332f1253ee13a9cab65a7b4b6cd5fTimo Sirainen if (master_service_settings_read(master_service, &input, &output,
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen i_fatal("Error reading configuration: %s", error);
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen master_service_init_log(master_service, "doveadm: ");
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen master_service_set_die_callback(master_service, doveadm_die);