summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruid65697 <uid65697>2003-12-25 11:17:47 +0000
committeruid65697 <uid65697>2003-12-25 11:17:47 +0000
commita4a29fde714a0bc14f02e783e79f392811524894 (patch)
treef5453d370a0ecc796480533f69875b04059634bf
parent7f9a8e30f1578c9365e1e73720fc89346a5b34d2 (diff)
downloadmailutils-a4a29fde714a0bc14f02e783e79f392811524894.tar.gz
mailutils-a4a29fde714a0bc14f02e783e79f392811524894.tar.bz2
Updated
-rw-r--r--ChangeLog6
-rw-r--r--m4/.cvsignore15
-rw-r--r--mailbox/imap/mbox.c1
-rw-r--r--mailbox/parse822.c9
-rw-r--r--mailbox/smtp.c4
-rw-r--r--mailbox/testsuite/Addrs3
-rw-r--r--mh/mh_format.c32
-rw-r--r--mh/mh_init.c33
-rw-r--r--mh/mh_list.c9
-rw-r--r--mh/mh_stream.c2
-rw-r--r--po/ChangeLog4
11 files changed, 77 insertions, 41 deletions
diff --git a/ChangeLog b/ChangeLog
index 188977db0..466f1e1da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-12-25 Sergey Poznyakoff
+
+ Added changes from the backup repository
+
2003-12-24 Sergey Poznyakoff
* examples/spamd.c: New file.
@@ -58,7 +62,7 @@
Date from Date to Repository
======== ======= ==========
1999-09-10 2003-12-01 Savannah
- 2003-12-04 *** Mirddin
+ 2003-12-04 2003-12-25 Mirddin
2003-12-05 Sergey Poznyakoff
diff --git a/m4/.cvsignore b/m4/.cvsignore
index b9f093509..d65bab2dc 100644
--- a/m4/.cvsignore
+++ b/m4/.cvsignore
@@ -1,21 +1,30 @@
Makefile
Makefile.in
-iconv.m4
codeset.m4
gettext.m4
glibc21.m4
+iconv.m4
intdiv0.m4
-inttypes-pri.m4
-inttypes.m4
+intmax.m4
inttypes_h.m4
+inttypes.m4
+inttypes-pri.m4
isc-posix.m4
lcmessage.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
+longdouble.m4
+longlong.m4
nls.m4
po.m4
+printf-posix.m4
progtest.m4
+signed.m4
+size_max.m4
stdint_h.m4
uintmax_t.m4
ulonglong.m4
+wchar_t.m4
+wint_t.m4
+xsize.m4
diff --git a/mailbox/imap/mbox.c b/mailbox/imap/mbox.c
index 423199c5e..35cef1f28 100644
--- a/mailbox/imap/mbox.c
+++ b/mailbox/imap/mbox.c
@@ -339,6 +339,7 @@ mailbox_imap_open (mailbox_t mailbox, int flags)
return status;
}
f_imap->state = IMAP_NO_STATE;
+ break;
default:
status = EINVAL;
diff --git a/mailbox/parse822.c b/mailbox/parse822.c
index 43445693e..1f87c2dc8 100644
--- a/mailbox/parse822.c
+++ b/mailbox/parse822.c
@@ -34,8 +34,6 @@ Things to consider:
--> Groups no longer show up in the address_t list.
- - Need a way to parse "<>", it's a valid SMTP address...
-
- Need a way to parse ",,,", it's a valid address-list, it just doesn't
have any addresses.
@@ -1022,6 +1020,13 @@ parse822_route_addr (const char **p, const char *e, address_t * a)
return rc;
}
+ if (!(rc = parse822_special (p, e, '>')))
+ {
+ (void) (((rc = fill_mb (a, 0, 0, 0, 0)) == EOK)
+ && ((rc = str_append (&(*a)->email, "")) == EOK));
+
+ return rc;
+ }
parse822_route (p, e, &route);
diff --git a/mailbox/smtp.c b/mailbox/smtp.c
index 063091a9a..747531aab 100644
--- a/mailbox/smtp.c
+++ b/mailbox/smtp.c
@@ -596,7 +596,7 @@ smtp_send_message (mailer_t mailer, message_t argmsg, address_t argfrom,
case SMTP_ENV_FROM:
ENV_FROM:
{
- status = smtp_writeline (smtp, "MAIL FROM: %s\r\n", smtp->mail_from);
+ status = smtp_writeline (smtp, "MAIL FROM: <%s>\r\n", smtp->mail_from);
CHECK_ERROR (smtp, status);
smtp->state = SMTP_MAIL_FROM;
}
@@ -639,7 +639,7 @@ smtp_send_message (mailer_t mailer, message_t argmsg, address_t argfrom,
CHECK_ERROR (smtp, status);
}
- status = smtp_writeline (smtp, "RCPT TO: %s\r\n", to);
+ status = smtp_writeline (smtp, "RCPT TO: <%s>\r\n", to);
free (to);
diff --git a/mailbox/testsuite/Addrs b/mailbox/testsuite/Addrs
index e55f8e49b..3c98a1f49 100644
--- a/mailbox/testsuite/Addrs
+++ b/mailbox/testsuite/Addrs
@@ -386,7 +386,8 @@ list-ietf-wg-apps-drums@faerber.muc.de (=?ISO-8859-1?Q?Claus_F=E4rber?=)=> pcoun
1 email <0xdeadbeef-request@petting-zoo.net>
local-part <0xdeadbeef-request> domain <petting-zoo.net>
-<>=> error MU_ERR_BAD_822_FORMAT
+<>=> pcount 1
+1 email <>
<Christia.Roberts@nrc.ca>=> pcount 1
1 email <Christia.Roberts@nrc.ca>
diff --git a/mh/mh_format.c b/mh/mh_format.c
index fdf995cb6..36afd2035 100644
--- a/mh/mh_format.c
+++ b/mh/mh_format.c
@@ -1822,40 +1822,12 @@ builtin_isreply (struct mh_machine *mach)
static void
decode_string (strobj_t *obj)
{
- char *charset = NULL;
char *tmp;
- int rc;
-
+
if (strobj_is_null (obj))
return;
- charset = mh_global_profile_get ("Charset", NULL);
- if (!charset)
- return;
- if (strcasecmp (charset, "auto") == 0)
- {
- /* Try to deduce the charset from LC_ALL variable */
-
- tmp = getenv ("LC_ALL");
- if (tmp)
- {
- char *sp;
- char *lang;
- char *terr;
- lang = strtok_r (tmp, "_", &sp);
- terr = strtok_r (NULL, ".", &sp);
- charset = strtok_r (NULL, "@", &sp);
-
- if (!charset)
- charset = mu_charset_lookup (lang, terr);
- }
- }
-
- if (!charset)
- return;
-
- rc = rfc2047_decode (charset, strobj_ptr (obj), &tmp);
- if (!rc)
+ if (mh_decode_2047 (strobj_ptr (obj), &tmp) == 0)
{
strobj_free (obj);
strobj_create (obj, tmp);
diff --git a/mh/mh_init.c b/mh/mh_init.c
index 4d49be31a..db011fdbd 100644
--- a/mh/mh_init.c
+++ b/mh/mh_init.c
@@ -806,3 +806,36 @@ mh_set_reply_regex (const char *str)
err ? ": " : "",
err ? err : "");
}
+
+int
+mh_decode_2047 (char *text, char **decoded_text)
+{
+ char *charset = mh_global_profile_get ("Charset", NULL);
+
+ if (!charset)
+ return 1;
+ if (strcasecmp (charset, "auto") == 0)
+ {
+ /* Try to deduce the charset from LC_ALL variable */
+
+ char *tmp = getenv ("LC_ALL");
+ if (tmp)
+ {
+ char *sp;
+ char *lang;
+ char *terr;
+
+ lang = strtok_r (tmp, "_", &sp);
+ terr = strtok_r (NULL, ".", &sp);
+ charset = strtok_r (NULL, "@", &sp);
+
+ if (!charset)
+ charset = mu_charset_lookup (lang, terr);
+ }
+ }
+
+ if (!charset)
+ return 1;
+
+ return rfc2047_decode (charset, text, decoded_text);
+}
diff --git a/mh/mh_list.c b/mh/mh_list.c
index eecdc2eb3..962a08b21 100644
--- a/mh/mh_list.c
+++ b/mh/mh_list.c
@@ -408,7 +408,8 @@ static mhl_variable_t vartab[] = {
{ B_NEWLINE, "newline", dt_flag },
{ B_ADDRFIELD, "addrfield", dt_flag },
{ B_DATEFIELD, "datefield", dt_flag },
-
+ { B_DECODE, "decode", dt_flag },
+
/* String variables */
{ S_OVERFLOWTEXT, "overflowtext", dt_string },
{ S_COMPONENT, "component", dt_string },
@@ -620,6 +621,12 @@ print_header_value (struct eval_env *env, char *val)
val = p;
}
+ if (env->bvar[B_DECODE])
+ {
+ if (mh_decode_2047 (val, &p) == 0)
+ val = p;
+ }
+
if (env->bvar[B_UPPERCASE])
{
for (p = val; *p; p++)
diff --git a/mh/mh_stream.c b/mh/mh_stream.c
index 8f7e05750..2f18b584a 100644
--- a/mh/mh_stream.c
+++ b/mh/mh_stream.c
@@ -206,7 +206,7 @@ restore_envelope (stream_t str, struct _mhdraft_message **pmenv)
char *env_from = NULL;
char *env_date = NULL;
int rc;
- char buffer[80];
+ char buffer[128];
size_t len;
off_t body_start, body_end;
diff --git a/po/ChangeLog b/po/ChangeLog
index be302ea8d..8e17fff56 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,7 @@
+2003-12-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
+
+ * ro.po: Added missing ^K in msgstrs
+
2003-12-10 Jordi Mallach <jordi@gnu.org>
* LINGUAS: Added ro.

Return to:

Send suggestions and report system problems to the System administrator.