Age | Commit message (Collapse) | Author |
|
RFC 5322 defines the domain-literal:
domain = dot-atom / domain-literal / obs-domain
domain-literal = [CFWS] "[" *([FWS] dtext) [FWS] "]" [CFWS]
dtext = %d33-90 / ; Printable US-ASCII
%d94-126 / ; characters not including
obs-dtext ; "[", "]", or "\"
RFC 5321 defines possible literal values in section 4.1.3.
I think this was unnoticed (and possibly unimplemented) because it's a
rare use-case. However, Stuart Gathman @sdgathman in the
ticket (#226) noted:
The use case is replacing alpine with mutt for this fully
decentralized usage:
https://fedoramagazine.org/decentralize-common-fedora-apps-cjdns/
The only requirements are to support IPv6 and IPv6 literals (to
avoid use of DNS).
Adding this slightly complicates the parser, because we can't wait to
decide whether it's a domain-literal until parse_mailboxdomain(), but
we also need to accommodate the CFWS.
Break out a parse_domain() function, with partial duplication of
parse_mailboxdomain()'s logic.
Also, add parse_literal() to the outer parser, because we need to
handle both name-addr and top level addr-spec.
The RFC822Errors[] are currently unused (and broken), but add a new
error code and message, in case those get fixed up and introduced to
the code in the future.
Disable IDNA encoding for domain-literals.
|
|
These are mostly automated changes corresponding to the emacs
settings:
(c-set-style "linux")
(setq c-basic-offset 2)
(c-set-offset 'case-label '+)
Most of the code follows the convention:
(add-to-list 'c-cleanup-list 'space-before-funcall)
but this is not enforced by this indentation cleanup.
Also, I personally dislike tabs, so I have:
(setq-default indent-tabs-mode nil)
in my own configuration. However I have no desire to change every line
just for that effect. So this cleanup does nothing about the mix issue.
Some of the secondary files (e.g. regex.c) have been skipped.
I've also skipped crypt-gpgme.c, because I need to think about that
file. Werner Koch and the GnuPG team contributed most it, and it
follows the Gnu indentation settings. It should probably be made
uniform with Mutt, but I don't want to discourage future GnuPG
contribution to the file.
I manually reverted a few unsightly cleanups, and added a few tweeks
when I saw things that could be improved.
|
|
The result of
find . -name "*.[ch]" -exec emacs -batch {} \
--eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
|
|
|
|
Vincent Lefèvre pointed out the common shortcut, e.g 1996-9, is
actually not allowed for copyright years. Convert all the copyright
years (for mutt files) to use 4 digits.
|
|
This patch only updates existing copyright notices in the source
files, using commit dates since the last copyright update in commits
e3af935cdb1a and f8fd60d8d3f2.
Add a notice to the COPYRIGHT file to refer to our mercurial
repository for the full commit history.
Add myself to the COPYRIGHT file and smime_keys.pl file.
|
|
Commit 831abf39d53a pulled the mbox_to_udomain() call inside the
conversion functions. Unfortunately, this causes local (user only)
mailboxes to be considered conversion errors instead of just skipping
them.
Revert mbox_to_udomain() back to using a static buffer and pull back
into the mutt_addrlist_to_local/intl() functions.
Pass the user and domain into the conversion functions instead of the address.
|
|
This ensures we don't lose information by converting to the local charset.
|
|
This is patch 3 of 4 implementing support for SMTPUTF8 (RFC 6531).
Add an option to control whether international domains are encoded with
IDN or not. This defaults to set, for backward compatibility.
Rename the use_idn option to idn_decode, since that more properly
reflects its purpose.
|
|
This is patch 2 of 4 implementing support for SMTPUTF8 (RFC 6531).
Perform charset conversion from local to UTF-8 for both the user and
domain parts of the address.
If IDN is enabled and the options (added in the next patch) are turned
on, encode/decode the domain part.
Use the intl_checked and is_intl status bits to record the intl/local
status of the ADDRESS mailbox part.
|
|
This is patch 1 of 4 implementing support for SMTPUTF8 (RFC 6531).
Change mutt_idna.c to be always compiled. Remove the stub functions in
mutt_idna.h. Instead, put #ifdefs around the idna function calls. The
conversion functions will be fixed up in the next patch.
Rename the conversion functions to mutt_addrlist_to_intl() and
mutt_env_to_intl(). Rename the ADDRESS idna status bits to "intl"
status bits.
|
|
|
|
I went through the logs of each file with a copyright header and
updated the years for the authors in the headers for any non-comment
changes they introduced. What a pain!
|
|
|
|
|
|
Closes #3122, #3123.
|
|
|
|
Wipe unwanted code depending on M_ICONV_HOOK_TO in charset.c:mutt_iconv_open().
Totally wipe M_ICONV_HOOK_TO symbol.
Remove misusages of M_ICONV_HOOK_FROM flag in:
- crypt-gpgme.c:print_utf8().
- mutt_idna.c:mutt_idna_to_local() and mutt_local_to_idna().
- pgp.c:pgp_traditional_encryptsign().
Document usage policy of M_ICONV_HOOK_FROM flag.
Cosmetic downcasing of some constant charset names (utf-8, euc-jp) for consistency.
Correction of a typo in the "iso8859-5" charset name.
|
|
Add checks to check_sec.sh for memory functions.
These include a check for use of safe_free() instead of FREE() and a
check whether FREE(&...) is used.
For the former, __SAFE_FREE_CHECKED__ is to be used, for the latter
__FREE_CHECKED__ to avoid messages from check_sec.sh
|
|
|
|
|
|
|
|
|
|
Remove it from mutt.h
|
|
|
|
there's a lot of type-punning in Mutt. With help from Philipp
Thomas, I've fixed all I could find in CVS (please double-check, one
might have slipped through the cracks), I can make one for 1.4 CVS
branch as well if wanted.
|
|
could overflow. Thanks to Timo Sirainen for the heads-up.
|
|
buffers was never deallocated.
(mbox_to_udomain): Fix memory leak. `scratch' buffer was not
deallocated when `mbx' doesn't contain '@'. Also rewritten for
allocating memory only when needed and only how many as needed.
|
|
|
|
|
|
some standards.)
|
|
once you have the GNU IDN library available from
ftp://alpha.gnu.org/pub/gnu/libidn/ installed. For IDN's which
can't be losslessly recoded to your local character set, mutt should
automatically fall back to using the ASCII representation. There's
probably a considerable number of bugs in this, and the code may, at
this point, not even compile on machines without libidn. Will start
working on that ASAP.
|