summaryrefslogtreecommitdiffabout
path: root/src/main.c
authorSergey Poznyakoff <gray@gnu.org>2018-11-08 21:15:09 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2018-11-08 21:15:09 (GMT)
commit90c1c828099d2703fe0eb44b09d5cd3fd67a97fe (patch) (side-by-side diff)
treec825a296693dd7c737afc3ba8cb27fcdf97f8b5e /src/main.c
parent40f3d1c9374c8f2330655acb856b8ecf9bde0767 (diff)
downloadmailfromd-90c1c828099d2703fe0eb44b09d5cd3fd67a97fe.tar.gz
mailfromd-90c1c828099d2703fe0eb44b09d5cd3fd67a97fe.tar.bz2
mtasim: don't clobber existing callout socket when used with -Xauto
* doc/mailfromd.texi: Document the --callout-socket option. * mtasim/mtasim.c (start_mailfromd): Supply the --callout-socket option. * src/main.c: New option --callout-socket
Diffstat (limited to 'src/main.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/main.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 15113a6..6aa8acf 100644
--- a/src/main.c
+++ b/src/main.c
@@ -341,13 +341,22 @@ opt_include_dir(struct mu_parseopt *po, struct mu_option *op,
}
static void
-opt_port(struct mu_parseopt *po, struct mu_option *op,
- char const *arg)
+opt_milter_socket(struct mu_parseopt *po, struct mu_option *op,
+ char const *arg)
{
mf_srvcfg_add("default", arg);
}
static void
+opt_callout_socket(struct mu_parseopt *po, struct mu_option *op,
+ char const *arg)
+{
+ mf_srvcfg_add("callout", arg);
+ free(callout_server_url);
+ callout_server_url = mu_strdup(arg);
+}
+
+static void
opt_mtasim(struct mu_parseopt *po, struct mu_option *op,
char const *arg)
{
@@ -552,7 +561,11 @@ static struct mu_option mailfromd_options[] = {
mu_c_string, NULL, opt_include_dir },
{ "port", 'p', N_("STRING"), MU_OPTION_DEFAULT,
N_("set communication socket"),
- mu_c_string, NULL, opt_port },
+ mu_c_string, NULL, opt_milter_socket },
+ { "milter-socket", 0, NULL, MU_OPTION_ALIAS },
+ { "callout-socket", 0, N_("STRING"), MU_OPTION_DEFAULT,
+ N_("set callout socket"),
+ mu_c_string, NULL, opt_callout_socket },
{ "mtasim", 0, NULL, MU_OPTION_IMMEDIATE,
N_("run in mtasim compatibility mode"),
mu_c_string, NULL, opt_mtasim },
@@ -1127,7 +1140,7 @@ provide_default_milter_server(void)
}
static void
-provide_default_callout_server()
+provide_default_callout_server(void)
{
struct variable *var;

Return to:

Send suggestions and report system problems to the System administrator.