summaryrefslogtreecommitdiff
path: root/libmailutils/diag/errors
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-10-20 22:13:00 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2010-10-20 22:13:00 +0300
commit1e409dd4c3369bc70cf2353935a610314228fa65 (patch)
tree1289112498fde379d801906f2020cc1eef581cc2 /libmailutils/diag/errors
parentf50c5d11f2775f11cb450c97008f9fa4b9e39fa1 (diff)
downloadmailutils-1e409dd4c3369bc70cf2353935a610314228fa65.tar.gz
mailutils-1e409dd4c3369bc70cf2353935a610314228fa65.tar.bz2
Improve registrar/url interaction. Fix SMTP URLs to comply to draft-earhart-url-smtp-00. Minor fix in maidag (url mode).
* include/mailutils/registrar.h (MU_RECORD_DEFAULT) (MU_RECORD_LOCAL): New flags. (_mu_record) <flags,url_may_have,url_must_have>: New members. Remove unnecessary externs. (mu_record_set_.*): Remove all protos. (mu_record_check_url, mu_registrar_test_local_url): New protos. * include/mailutils/sys/url.h (_mu_url) <flags>: New member. (MU_URL_USER, MU_URL_SECRET, MU_URL_AUTH) (MU_URL_HOST, MU_URL_PORT, MU_URL_PATH) (MU_URL_PARAM, MU_URL_QUERY) (MU_URL_CRED, MU_URL_INET, MU_URL_ALL): New flags. (mu_url_get_flags, mu_url_has_flag): New protos. * libmailutils/base/registrar.c (mu_record_set_.*): Remove all. (mu_record_check_url): New function. (mu_registrar_test_local_url): New function. * libmailutils/base/url.c (mu_url_copy0): Copy flags. (mu_url_parse): Use flags intead of inspecting each structure member. Set flags. (mu_url_get_flags, mu_url_has_flag): New functions. * libmailutils/diag/errors (MU_ERR_URL_MISS_PARTS) (MU_ERR_URL_EXTRA_PARTS): New error codes. * libmailutils/mailbox/folder.c (mu_folder_create_from_record): Check the URL using mu_record_check_url. * libproto/imap/folder.c (_imap_record, _imaps_record): Initialize new fields. * libproto/maildir/folder.c (_maildir_record): Likewise. * libproto/mbox/folder.c (_mbox_record): Likewise. * libproto/mh/folder.c (_mh_record): Likewise. * libproto/nntp/folder.c (_nntp_record): Likewise. * libproto/pop/folder.c (_pop_record, _pops_record): Likewise. * libproto/mailer/prog.c (_prog_record): Likewise. (_url_prog_init): Remove extra checks, rely on mu_record_check_url. * libproto/mailer/remote.c (_mu_remote_smtp_record) (_mu_remote_sendmail_record,_mu_remote_prog_record): Initialize new fields. * libproto/mailer/sendmail.c (_url_sendmail_init): Remove extra checks, rely on mu_record_check_url. (_sendmail_record): Initialize new fields. * libproto/nntp/url.c (url_nntp_destroy): Remove. (_nntp_url_init): Remove extra checks. * libproto/pop/url.c (url_pop_destroy): Remove. (_url_pop_init, _url_pops_init): Remove extra checks. * libproto/mailer/smtp.c (_url_smtp_init): Remove extra checks. (_smtp_record): Initialize new fields. (smtp_mailer_add_auth_mech): New function. (smtp_open): Allow for auth= part before the host name. * maidag/deliver.c (is_remote_url): New function. (do_delivery): Do not try to switch user privileges if the URL refers to a remote mailbox. * maidag/maidag.c (main): Initialize TLS.
Diffstat (limited to 'libmailutils/diag/errors')
-rw-r--r--libmailutils/diag/errors3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmailutils/diag/errors b/libmailutils/diag/errors
index 5f82f7b83..3807524b6 100644
--- a/libmailutils/diag/errors
+++ b/libmailutils/diag/errors
@@ -92,3 +92,6 @@ MU_ERR_READ _("Read error")
MU_ERR_NO_TRANSPORT _("Transport stream not set")
MU_ERR_AUTH_NO_CRED _("No credentials supplied")
+
+MU_ERR_URL_MISS_PARTS _("URL missing required parts")
+MU_ERR_URL_EXTRA_PARTS _("URL has parts not allowed by its scheme")

Return to:

Send suggestions and report system problems to the System administrator.