]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lda: Removed old smtp-client API.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Thu, 14 Sep 2017 23:28:11 +0000 (01:28 +0200)
committerTimo Sirainen <tss@dovecot.fi>
Wed, 4 Oct 2017 22:07:46 +0000 (01:07 +0300)
src/lib-lda/Makefile.am
src/lib-lda/smtp-client.c [deleted file]
src/lib-lda/smtp-client.h [deleted file]

index fa7d25a0c06fd4c2ab2b1305046d512f10726697..ed7bf988f9ade1bed31e9de5dae99daa4c1d309e 100644 (file)
@@ -13,15 +13,13 @@ liblda_la_SOURCES = \
        duplicate.c \
        lda-settings.c \
        mail-deliver.c \
-       mail-send.c \
-       smtp-client.c
+       mail-send.c
 
 headers = \
        duplicate.h \
        lda-settings.h \
        mail-deliver.h \
-       mail-send.h \
-       smtp-client.h
+       mail-send.h
 
 pkginc_libdir=$(pkgincludedir)
 pkginc_lib_HEADERS = $(headers)
diff --git a/src/lib-lda/smtp-client.c b/src/lib-lda/smtp-client.c
deleted file mode 100644 (file)
index c8702a6..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright (c) 2006-2017 Dovecot authors, see the included COPYING file */
-
-#include "lib.h"
-#include "lda-settings.h"
-#include "smtp-submit.h"
-#include "smtp-client.h"
-
-struct smtp_client {
-       struct smtp_submit *submit;
-};
-
-struct smtp_client *
-smtp_client_init(const struct lda_settings *set, const char *return_path)
-{
-       struct smtp_submit_settings smtp_set;
-       struct smtp_client *client;
-
-        i_zero(&smtp_set);
-        smtp_set.hostname = set->hostname;
-        smtp_set.submission_host = set->submission_host;
-        smtp_set.sendmail_path = set->sendmail_path;
-
-       client = i_new(struct smtp_client, 1);
-       client->submit = smtp_submit_init_simple(&smtp_set, return_path);
-       return client;
-}
-
-void smtp_client_add_rcpt(struct smtp_client *client, const char *address)
-{
-       smtp_submit_add_rcpt(client->submit, address);
-}
-
-struct ostream *smtp_client_send(struct smtp_client *client)
-{
-       return smtp_submit_send(client->submit);
-}
-
-void smtp_client_abort(struct smtp_client **_client)
-{
-       struct smtp_client *client = *_client;
-
-       *_client = NULL;
-
-       smtp_submit_deinit(&client->submit);
-       i_free(client);
-}
-
-int smtp_client_deinit(struct smtp_client *client, const char **error_r)
-{
-       return smtp_client_deinit_timeout(client, 0, error_r);
-}
-
-int smtp_client_deinit_timeout(struct smtp_client *client,
-                              unsigned int timeout_secs, const char **error_r)
-{
-       int ret;
-
-       ret = smtp_submit_run_timeout(client->submit, timeout_secs, error_r);
-       smtp_submit_deinit(&client->submit);
-       i_free(client);
-
-       return ret;
-}
diff --git a/src/lib-lda/smtp-client.h b/src/lib-lda/smtp-client.h
deleted file mode 100644 (file)
index 585bb22..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef SMTP_CLIENT_H
-#define SMTP_CLIENT_H
-
-struct smtp_client * ATTR_NULL(3)
-smtp_client_init(const struct lda_settings *set, const char *return_path);
-/* Add a new recipient */
-void smtp_client_add_rcpt(struct smtp_client *client, const char *address);
-/* Get an output stream where the message can be written to. The recipients
-   must already be added before calling this. */
-struct ostream *smtp_client_send(struct smtp_client *client);
-void smtp_client_abort(struct smtp_client **client);
-/* Returns 1 on success, 0 on permanent failure (e.g. invalid destination),
-   -1 on temporary failure. */
-int smtp_client_deinit(struct smtp_client *client, const char **error_r);
-/* Same as smtp_client_deinit(), but timeout after given number of seconds. */
-int smtp_client_deinit_timeout(struct smtp_client *client,
-                              unsigned int timeout_secs, const char **error_r);
-#endif