summaryrefslogtreecommitdiff
path: root/mailbox/mutil.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-10-18 21:32:36 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-10-18 21:32:36 +0000
commit11637b0f262db62b4dc466cefb9315098a1a995a (patch)
tree63f9ff2c09d9c405ee5b5fc89fcda8f3bd3b690e /mailbox/mutil.c
parent9106fc888e53df185181554a82d3fd1131755685 (diff)
downloadmailutils-11637b0f262db62b4dc466cefb9315098a1a995a.tar.gz
mailutils-11637b0f262db62b4dc466cefb9315098a1a995a.tar.bz2
New maidag mode: --url
* NEWS: Update. * doc/texinfo/libmuauth.texi: Update. * doc/texinfo/mailutils.texi: Update. * doc/texinfo/programs.texi: Update. * include/mailutils/mailbox.h (mu_mailbox_create_from_url): New function. * include/mailutils/mutil.h (mu_aget_user_email_domain): New function. * libproto/include/address0.h: Remove obsolete comment. * libproto/remote/mbox.c (remote_mbox_append_message): If recipient address is not given, try to construct it from the URL. * mailbox/mailbox.c (mu_mailbox_create_from_url): New function. * mailbox/mutil.c (mu_aget_user_email_domain): New function. * maidag/deliver.c (deliver_to_user): Mailbox and auth must be freed by the caller. (deliver_url): New function. (deliver): Rewrite to allow for delivering to mailboxes explicitly specified by URLs (--url command line option). * maidag/maidag.c (options): New option --url. (main): Handle --url. * maidag/maidag.h (url_option): New global. * maidag/mailquota.c (check_quota): Return if auth == NULL.
Diffstat (limited to 'mailbox/mutil.c')
-rw-r--r--mailbox/mutil.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/mailbox/mutil.c b/mailbox/mutil.c
index 6f0f2d360..972b826d5 100644
--- a/mailbox/mutil.c
+++ b/mailbox/mutil.c
@@ -411,6 +411,7 @@ mu_set_user_email_domain (const char *domain)
return 0;
}
+/* FIXME: must be called _sget_ */
int
mu_get_user_email_domain (const char **domain)
{
@@ -427,6 +428,24 @@ mu_get_user_email_domain (const char **domain)
return 0;
}
+int
+mu_aget_user_email_domain (char **pdomain)
+{
+ const char *domain;
+ int status = mu_get_user_email_domain (&domain);
+ if (status)
+ return status;
+ if (domain == NULL)
+ *pdomain = domain;
+ else
+ {
+ *pdomain = strdup (domain);
+ if (*pdomain == NULL)
+ return ENOMEM;
+ }
+ return 0;
+}
+
/* Note: allocates memory */
char *
mu_get_user_email (const char *name)

Return to:

Send suggestions and report system problems to the System administrator.