cc-test.sh: fix for UnixWare 7.1.4 awk(1)
[s-mailx.git] / TODO
blob36c640801647ced6b6bc4ec9bec91cda2b44fed9
1 TODO reminder.
3 Release S-nail v20 on 2018-03-25, the 40th anniversary of Mail.
4 With a clean, conforming and efficient codebase, then.
6 Backward-compatibility breakers
7 -------------------------------
9 - Recipients specified on the command line should be added to those
10   specified in the message when the -t option is set.
12 - The -q option makes me sad as it doesn't use *indentprefix* for the
13   quoted file.  So either there should be -Q which does so, or -q should be
14   changed.  Also see ~R below.
15   [Note: i think i go for the latter.  Please complain.]
17 - At least optionally disallow silent discarding of invalid addresses,
18   i.e., cause sending to be aborted if not all recipient addresses pass the
19   validity test.
21 - Ditto if a resource file can't be found that has been explicitly set via
22   environment variables there should be some feedback.
24 - I.e., it is fine to be silent unless an error occurs, but then please
25   report errors and offer (in interactive mode) the possibility to act at
26   a glance.
28 -- While there.  There should be some kind of "verbose" switch that - in
29    interactive mode - also gives *positive* feedback, as in "added
30    attachment X, charset Y", but without giving details about protocol
31    delivery etc.
33    [It is terrible that there is almost no feedback in the UI.  When
34    i temporarily implemented a sorted cmdtab i've often used wrong commands,
35    but got no feedback at all!  E.g., wanted to "undelete 14", first did "u
36    14", then "und 14" and then realized my fault and did "undelete 14".
37    *Nothing*.]
39 - POSIX says that, when written to DEAD: "If the file exists, the message
40   shall be written to replace the contents of the file".  This is mentioned
41   for ASYNCHRONOUS EVENTS, but it's the only description of what should be
42   done in which way to DEAD.  savedeadletter() yet appends.  See ZOMBIE ,)
44 - Furthermore, *all* file operations yet append, even recipient target
45   files are appended.  I don't know if this is really desirable behaviour,
46   but i have not thought about that for real.  Maybe this should be at
47   least configurable.
49 - Maybe we should not use pipes to pagers at all.
50   This would also (beside getting rid of longjumps that cross allocations
51   afaik etc.) make it possible to honour the *crt* variable in respect
52   to what really is displayed, not in respect to message size.
53   It irritates me that a message with 5 visible lines but 115 header lines
54   goes through the pager, even if i have *crt=*.
55   P.S.: we could simply count the headers in addition?
57 - The IMAP cache is file-based, which is quite nice, since a filesystem
58   is a database.  On the other hand it may be better if we could hook
59   into sqlite3, which is available almost everywhere by default, with
60   a clearly documented DB content (so that users can use sqlite3(1) to
61   dig into it).  (And just in case S-nail will ever be able to read news
62   and/or have MTA functionality.)
63   One question would be wether compression should be applied.
65 - We should possibly get away of using command line utilities for
66   compression.  (At least optionally?)  Instead we should link against
67   zlib(3), bz2lib(3) and lzma(3), if found.  Or we may use dlopen(3)
68   instead, if found, to avoid linking (though those libraries don't need
69   much linker work unless actually used afaik, 'should look in detail).
70   We should also drop lzw.c, it is used for the IMAP cache.
72 - We should maybe turn -~ into the meaning "force interactive".
73   We should extend cc-test.sh, then, to test some interactive things.
75 Non-breakers
76 ------------
78 - We need a "void" box that can be jumped to, i.e., a state in which no box
79   at all is active.
81   (schdir(): realpath() local files before leaving CWD.., 2013-01-08)
82   did a first step to avoid "getting stuck" when the current folder becomes
83   unaccessible.
84   That is however only a command-specific workaround for a deeper design
85   problem.
87 -- When a MBOX mailbox is removed while it is opened then changing the
88   folder is not possible.  (At least when the only mail that was present
89   therein has been "move"d off that MBOX.)  While trying this i got
90   a deallocation abort trap in lex.c:commands():385:
91         if (linebuf)
92                 free(linebuf);
93   Note that Berkeley Mail (NetBSD mail(1) that is) seems to have the same
94   problem in respect to not allowing a hard-change, but only allows an exit
95   (not a quit thus).  The error may still exist even there, it maybe that
96   it simply doesn't show up because a stack buffer is used ...
98   In interactive mode, dump the temporary file to the TMPDIR and inform the
99   user; it's up to him to decide what should happen.
101   Otherwise it must be possible to switch the folder (to the *void* one)
102   forcefully.
104 -- Also, when the folder is modified concurrently we should bail, or, in an
105   interactive session, prompt the user what to do.
107 - IDNA decoding.  It may be that this will never be supported.  But
108   wouldn't it be nice for at least viewing messages?
110 - Mail-Followup-To:.
112 - Make it possible to reply to/save/write/xy part X.Y[.Z] by allowing its
113   specification directly, as in, e.g., ':w 1.2'.  If doing so on an
114   embedded message/rfc822, e.g., a message embedded in a digest, it should
115   be possible to reply to the very message in respect to its header fields,
116   but (optionally?) keep the original Cc:'d.  (Parts by Martin Neitzel)
118 -- In general i like the possibility of mutt(1) to toggle in between header
119    and header-ignore mode with a simple switch (h), and that *this toggle
120    is used when replying*.  Yes i know mutt(1) sucks beside that in respect
121    to base64, MBOX, QP for CRLF files etc.
123 -- Also, mutt(1) quotes all text parts of a message, not only the first
124    one!  This should at least be optionally available.
126 - If pipes fail for part viewers then at least the usual PART X.Y should be
127   shown, maybe even including some error message.
128   I had 'set pipe-text/html="lynx -dump -force_html /dev/stdin"' but NetBSD
129   does not have lynx(1), and i thought i've found a S-nail(1) bug.
130   And so it was.
132 = Update: (Change "Part X:" display message.., 2012-12-20) did one step,
133   but we need to rewrite the entire layers to handle that the separating
134   newline in between messages is considered to be part of it.
136 - I want to have a ~R tilde command that works like ~r except it performs
137   quoting of the input just as ~m does.  Also see -q above.
139 - Offer the possibility to work with certificate fingerprints instead of
140   full certificates, in equal spirit to the current maintainers S-Postman
141   and Mercurial.  S-nail(1) could simply offer something in equal spirit to
142   the formers --fingerprint, so that no other tool is necessary for
143   certificate management (for at least secure transport).
145 - It would be nice if it would be possible to define a format string for
146   *quote*, like 'set quote="format=some formats"'.
147   In general the current approach is somewhat messy IMO.  I.e., it would
148   make more sense to act rather like mutt(1) and as written elsewhere in
149   this document, i.e., have some toggles that act on the display and use it
150   for multiple modes (show/reply/forward etc.)
151   Otherwise introduce commands which include all the headers plus, e.g.,
152   "hreply" or "freply", and then the ditto series, i.e., "hReply" ...
154 -- This would also mean that interactive message editing would work
155   accordingly.  PleasE!
157 - Command line editing should gain possibility of context sensitive tab
158   completion.
160 -- Note that the TTY is sick.  If ^C on input it simply jumps to next
161    input, instead of saying "Interrupted, one more to die hard" or
162    something (talking about ~@ charset selection prompts in particular).
164 - For those who use S-nail(1) only with a MTA it may be desirable to have
165   some "smopts" expansion mechanism in equal spirit to NetBSD mailx(1).
167 - While talking about NetBSD mailx(1), the author can imagine that being
168   able to use the optional -H:xy stuff is sometimes nice.
170 - Check against RFC 5322.
171   Rework all the header parsing code.  Actually understand the content,
172   classify the stuff so that it matches what is defined in RFC dependent on
173   header field.  Place the result in objects that know what they represent.
174   See the name extraction topic below.
176 - Also check against newest POSIX.
177   Maybe add a bash(1)ish POSIXLY_CORRECT (or so) variable?  Though..
179 - Maybe there should be an additional ZOMBIE directive that is served in
180   equal spirit to DEAD, but that could be a valid MBOX... ?
181   What i want is a *real* resend, best if possible from command line.
182   Meaning, also the possibility to postpone a message.  In general.
184 - POP3 doesn't support "newmail" for real.  If implemented, should it sync?
185   Look at POP3 impl. in general..
187 - Having a newsreader would be a really cool thing.  (RFC 977 and 2980)
189 - There should be a way to ignore the From_ line, as opposed to the From:
190   line, i.e., distinctively.
192 - There should be a variable that controls wether leading and trailing
193   empty lines of parts and/or messages as such should be printed or not.
195 - RFC 2387: multipart/related.
197 - rfc2384.txt etc.  I.e., Much better URL support.
199 - printhead()/hprf(): support %n newline format (%t tab?).
200   Make it possible to use the *datefield* algorithm for plain From_ derived
201   dates (needs a From_ parser, i.e., strptime()-alike).
202   Once we have that, rename *datefield-markout-older* to
203   *date-markout-older* ??
204   Note that NetBSD's mail(1) has some other nice things.
205   Note also that our code is quite unflexible.
207 -- NetBSD's mail(1) has nice *indentprefix* and *indentpostscript*
208    variables (though prefix and appendix or prefix and suffix, but..).
209    Note that our code is quite unflexible.
211 - The "top" command should honour ignoretab, or there should be a very
212   special "top" ignoretab.  It simply doesn't make sense to "top" 5 lines
213   when all that you get are Received: lines...
215 - In the very end it is not that hard to add (optional) MTA
216   functionality at a most simple level.
217   Use sqlite for aliases (and possibly cache), then.
219 - We should support IMAP compression over the wire.
221 Low-Level
222 ---------
224 - Revise the code:
225   + [v13:messed up] Use NetBSD KNF in respect to parens for return+.
226   + [v13:started] Add C99-likeish typedefs and use them everywhere.
227   + [v13:started] Don't use magic constants/values.
228   + [v13:started] Use const arguments whenever possible.  Yet started, but
229     with ugly casts at some places because this is a can of worms.
230   + Inline functions?  [Restrict pointers?]
231   + [v13:started] Document the functions in the interface declarators.
232   + [v13:started] Resort the functions and where they are implemented.
233   + Make more use of struct str, and offer more support functions for it.
234   + Make more use of value carriers in the call stack.  There are functions
235     with an incredible amount of arguments, needlessly.
236   ++ E.g., use a struct readlinectx.
237   + Ftemp(): offer an operation mode enum that includes "do-unlink".
238     In general: now there is O_CLOEXEC etc. ...
239   + Lazy install sigchild handler etc.
241 - [v13:started] Improve name extraction rules.  And field parsing.  There
242   are structured and unstructured fields.  There are quoted pairs and
243   comments etc.  Rewrite the entire parsing mechanism to comply to RFC
244   5322, and try to merge all those many subparsers around in the codebase,
245   and accordingly.  So much duplicated work ...
246   Name parsing has been improved a bit for v13, but it's still broken.
247   yankword(), *extract(), etc.: RFC 5322 says that comments in address
248   fields SHOULD NOT be used (mutt(1) maps them to full name-addr forms if
249   approbiate, even if that actually changes content!!?), and that full
250   name-addr SHOULD be used.  Our functions are yet quite silly (i.e.,
251   leading comments remain, as in "(bier2) <a2@b2.de>", unless the address
252   doesn't come in angle brackets, trailing go away, as in "<a6@b6.de>
253   (bier6)", that becomes "<a6@b6.de>").
254   Something silly like
255     (co$mm1) abc@däf.de (cö,mm,2)   ('c'o"m"m.3)
256   Should eventually become
257     co$mm1 cö,mm,2 'c'o"m"m.3 <abc@xn--df-via.de>
258   on the display, or, with IDNA decoding (and thus rather unlikely)
259     co$mm1 cö,mm,2 'c'o"m"m.3 <abc@däf.de>
260   It should NOT become this mutt(1)ism:
261     "co$mm1 cö,mm,2 'c'omm.3" <abc@däf.de>
262   Or?
264 - Think about a name bypass hashmap cache, and whenever we have to skin or
265   nalloc() or whatever, look in there.  Maybe even an additional link for
266   non GFULL(/GSKIN) and fully skinned struct name objects.
267   The amount of duplicated work in this codebase is frustrating, but the
268   real healing would make necessary a complete rewrite of the name handling!
269   Such a cache would work without touching the current code flow ... or
270   allow a smooth transition to a new one anyway.
272 - Think about a value() cache.  (Yet added boption() and soption() stubs.)
274 - Think about replacing the IMAP cache with an SQLITE3 interface.
275   Or rewrite it.  Error handling etc. etc. is peculiar.
277 - The char classification stuff can be improved; currently each character
278   has exactly one classification bit set, even if multiple would apply
279   (e.g., HT=\t == CNTRL|SPACE|ASCII|BLANK).  This would allow better
280   testing using our own classification functions in quite some places.
282 - The quoted-printable Content-Transfer-Encoding: supports soft linebreaks;
283   it happens that a lot of mailers (Apple Mail?, Microsoft Word, Yahoo!
284   Webmail) create HTML parts which solely consist of a single line,
285   created via soft linebreaks.
286   To handle such mess we need to be able to break out of the input-line ==
287   output line relationship that is still fixated in the codebase.
288   I.e., it is not even sufficient to convert "rest" into an array, but best
289   would be if we would be able to sequentially work what we have, and
290   detect when it is safe to "dump that out".
291   This MUST be part of the send/mime layer rewrite in 15.0.
293 - I want a clean PTF interface for the actual layers.  There should be no
294   switch() statements around that test for the type of BOX that is
295   currently open.  Especially important for possible NEWS support, but the
296   code is a mess in general...
298 - I hate longjmp()s and signals.  I suspect some pitfalls in the codebase.
299   All that stuff should at least be collected in a single place.
300   Just imagine how easy it could be done with a non-blocking select(2)
301   based event loop, ISIG off termios flags, etc.  ach!!
303   I would like to see that compilation with a C++ compiler is possible,
304   though that would be a long way and be especially problematic due to the
305   (C ish) way enums are used.
307 - I never used anything but the *datefield* option, and it would really be
308   nice if the date strings would be parsed off into some 16 byte or what
309   storage when about to producing the summary, so that it would be directly
310   available and there would be no need to reread the mail.  Moreover, or
311   even more than that - the m_date field exists and should possibly simply
312   be init, at least in these cases.  (P.S.: this doesn't contradict the
313   statement somewhere else in this file that the structure should be
314   slacked; simply use multiple thereof or so)
316 - All error messages should not go to stderr but instead we should add our
317   own n_warn() family and use that.  In the background we should have
318   a ring of error messages (oldest fall off), and a command that is capable
319   to display the ring.  The command loop should recognize whenever an error
320   happened during the last command, and print something like "XY errors
321   occurred", followed by a (truncated as necessary) error report.
322   It simply doesn't make any sense to print errors on stderr if normal
323   output goes to stdout and scrolls it off the screen.
324   Note that yet some errors messages still go to stdout.
326 - Dramatically pimp the cc-test.sh script, and recognize and report
327   compilation errors, too.
328   WE NEED MORE AUTOMATIZED TESTING!
330 - An `account' should imply an environment snapshot of all variables.
331   I.e., variables which become modified while an account is active would
332   gain their old / a different value (back) when switching off this
333   account.  We would need some "set-variable-global" or something, to
334   get around that?
335   There should be an implicit account ("global" or "*" or whatever) that
336   can be switched back to.
338 -- It would be very nice if it would be possible to have
339    account-specific macros that will be lost when a user switches off
340    an account.
342 --- It would also be very nice if we could define macros while defining
343     account, i.e., recursive definition of macros...
344     See below on account/define though.
346 - At some later time extend the logic behind -# -- it should not have
347   a current folder, but start in VOID mode (...), and unless one is
348   explicitly chosen..  We need a reliable batch mode.
350 - (Support for mailcap files?  As of RFC 1524?  Unlikely.  Though the
351   % expansions would be very helpful, especially once we can address
352   individuals parts as of v15.0!)
354 - After I/O layer rework we should optionally be able to read RSS
355   (Atom?) feeds -- Expat should be available almost everywhere and
356   should be able to parse that?
357   Atom is harder because it may support html+.
358   I mean, yeah, it's stupid, but we could fill in header fields with
359   dummies and still use S-nail to look into the separated feeds as if
360   they were mail messages; anyway i would like to save me from using too
361   many tools -- three seems reasonable.
363 TODO S-nail 14.6:
364 -----------------
366 - Deal with faulty message selection that may occur when selecting threads
367   via & (when at least mixed with other selectors).
369 -- Also (?same problem?) the thread sort doesn't get
371     [A is deleted]
372     B answers A
373       C answers B
374       D answers B
375     E is unrelated
376     F answers A
378   The current sort fails to recognize that F and the thread starting at
379   B are related, which results in a mess.
381 - Drop the restriction that environment variables cannot be modified
382   from within interactive S-nail(1), check carefully what depends on
383   that (findmail() looks for MAIL, be aware of -u interaction etc.).
384   Drop tempdir, myname and homedir variables and always use functions to
385   look the values up (just make them function local variables where
386   used).
387   If necessary, add more hooks in vars.c:_check_special_vars() (or
388   finally implement the value cache for real).
389   Drop main.c:_setup_vars(), then.
391 - Make *password* and *password-USER@HOST* global, introduce
392   *PROTOCOL-auth-password* and *PROTOCOL-auth-password-USER@HOST*.
393   Then, drop smtp_auth_var(), and change lookup_password_for_token() to
394   work like (PROTOCOL, user,host|TOKEN) -- *password* is a global override,
395   only if that is not set lookup protocol specific.
396   Use that single function from everywhere.
398 - Change **use-starttls* to the opposite.  I.e., CAPA or whatever, if TLS
399   is supported, use automatically.  *UNLESS* explicitly disabled.
401 - NOTE: we do not really support IPv6 sofar in that we are not prepared to
402   deal with IPv6 addresses.
403   Introduce an URI abstraction structure in 14.5, and start using it, i.e.,
404   _pop3_user() and, very important, sopen().
405   Note this shit software use a lot of places which mess around...
407 - The account command involves a lot of code but it's only difference to
408   define is that a "fi" is executed.  If we would have the possibility to
409   explicitly jump to VOID boxes, we could use QUIT->FOLDER instead of
410   FOLDER[OK? -> QUIT], and then it'd be up to the use to simply use a "fi"
411   at the end of a define.  Or so.
412   See above for more on account/define though.
414 -- If *folder* is set to an IMAP box, and we're about to "mbox" data to
415    there, and we're currently on a POP3 server, and the connection fails,
416    we're completely lost and cannot even interrupt...
418 - mutt(1) dotlock ..., "mbox" command doesn'T work?
420 - ARGH!  Should `folders' auto-login if *folder* is an IMAP account that is
421   not active?  Why does _expand() use *mailname* to expand `@', not
422   getfold() (care: res may point into cbuf, savestr() or so!).
423   Why does demail() etc. treat *mailname* as a file (more or less), why do
424   we need *mailname* at all;  we should have Folder objects, multiple of
425   which concurrently, one the active; a Folder may not become *folder*
426   unless it has write (store) capabilities).  Maybe then `mbox' works fine
427   if connected to a POP3 server with a *MBOX* on an IMAP account that yet
428   never was connected and needs to read a password on the terminal before
429   the login works ... note the latter situation yet kills us since i think
430   INT is blocked during all that ;-((
432 - I had a connection collapse during a POP3 download, and neither was
433   there a chance to get access to the 22 yet downloaded mails (after
434   five minutes of waiting followed by CNTRL-C), nor did the layer
435   recognize this very well (got myriads of `POP3 connection already
436   closed.' messages, btw., the thirty-something messages which were not
437   yet downloaded caused (after CNTRL-C) this:
439     POP3 connection already closed.
440     POP3 connection already closed.
441     POP3 connection already closed.
442     POP3 connection already closed.
443     POP3 connection already closed.
444     POP3 connection already closed.
445      U 23                    Thu Jan  1 0    /    0
446     POP3 connection already closed.
447     POP3 connection already closed.
448     POP3 connection already closed.
449     POP3 connection already closed.
450     POP3 connection already closed.
451     POP3 connection already closed.
452      U 24                    Thu Jan  1 0    /    0
454   i had to switch off and back).  At least we didn't crash.
455   Thereafter, still very unstable connection, i tried to login again:
457     ? fi xpop
458     Resolving host pop.gmail.com . . . done.
459     Connecting to 173.194.70.109:pop3s . . . connected.
460     Comparing DNS name: "pop.gmail.com"
461     POP3 connection already closed.
462     +OK Gpop ready for requests from XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
463   [..nothing!..]
464     ^CInterrupt
465     ? fi %
466     "/private/var/mail/steffen": 0 messages
467     ? fi xpop
468     Resolving host pop.gmail.com . . . done.
469     Connecting to 173.194.70.109:pop3s . . . connected.
470     Comparing DNS name: "pop.gmail.com"
471     ? fi
472     ? fi
473     ? fi
475   Can of worms.
477 - Add a value-duplication command, i.e.,
478     clone _x header
479     unset header
480     ...
481     clone header _x
482     unset _x
484 - Add a boolify() function, so that things like `localopts' and yorn()
485   may be less strict on user input
487 - Ensure that `.' and EOF on a line works with all TTY modes (*ignoreeof*
488   relationship, too)!  EOF conditions in general!
490 -- NCL / current expand-on-tab: fexpand() should take additional size_t* to
491    store the number of the results OR should "return char** array", so that
492    individual results can be addressed.
493    Then we could simply print "\nALL-RESULTS\n" and NOT expand the current
494    line if the result is ambiguous, i.e., we have more than one possible
495    expansion.
496    However, we would then need something to print the results page-wise,
497    in case we have so many of them that they don't fit on the screen.
498    ...  Etc. ...
500 - Add TODO notes for those RFCs:
501   RFC 5322 - The basic format of email messages. 
502   MIME (Multimeda) email extensions
503   RFC 2405 - The format of MIME message bodies. 
504   RFC 2406 - Common multimedia types. 
505   RFC 2017 - URL External-Body Access-Type 
506   RFC 3676 - Updates to the text/plain MIME type and extensions for flowed
507     text (format=flowed).   (Martin Neitzel)
508   RFC 2407 - Encoding of non-ASCII text in message headers. 
509   RFC 2183 - The Content-Disposition Header 
510   RFC 2231 - Encoding of character set and language information in MIME
511     parameter values. 
512   SMTP (Simple Mail Transfer Protocol)
513   RFC 5321 - Simple Mail Transfer Protocol. 
514   RFC 6409 - Message Submission for Mail 
515   RFC 4954 - SMTP Authentication 
516   RFC 3207 - SMTP over TLS 
517   RFC 6152 - SMTP Service Extension for 8-bit MIME Transport 
518   Post Office Protocol (POP)
519   RFC 1939 - Post Office Protocol v3 
520   RFC 2449 - POP3 Extensions (including SASL) 
521   RFC 2595 - TLS for POP3 (among others) 
522   Security
523   RFC 4422 - Simple Authentication and Security layer (SASL) 
524   RFC 5246 - Transport Layer Security (TLS)
525   RFC 977 - Network News Transfer Protocol
526   RFC 2980 - Common NNTP Extensions
528 - IMAP: if i `d' a message then this is a local change (in the meanwhile);
529   yet, when i `u' it, that will go through the server, needlessly.
531 - I got an email in base64 that obviously used CRNL line endings, and once
532   i've replied the CR where quoted as *control* characters.
533   Get rid of those (kwcrtest.mbox; may be hard to do everywhere for some
534   time). (2013-08-06)
536 - Yet another one:
538   :>>> T1026 NOOP
539   Received SIGPIPE during IMAP operation
540   IMAP write error: error:00000000:lib(0):func(0):reason(0)
542   [DOING STUFF]
544   ? newmail
545   >>> T1027 FETCH 51:52 (FLAGS UID)
546   IMAP write error: Bad file descriptor
547   >>> T1028 FETCH 51:52 (RFC822.HEADER)
548   IMAP write error: Bad file descriptor
549   IMAP connection closed.
550   IMAP connection closed.
551   IMAP connection closed.
552   IMAP connection closed.
553   IMAP connection closed.
554   IMAP connection closed.
555   IMAP connection closed.
556   IMAP connection closed.
557   New mail has arrived.
558   Loaded 2 new messages.
559   >>> T1029 FETCH 51:52 (RFC822.HEADER)
560   IMAP write error: Bad file descriptor
561   IMAP connection closed.
562   IMAP connection closed.
563   IMAP connection closed.
564   IMAP connection closed.
565   IMAP connection closed.
566    U 51                    Thu Jan  1 0    /    0 
567    IMAP connection closed.
568    IMAP connection closed.
569    IMAP connection closed.
570    IMAP connection closed.
571    IMAP connection closed.
573 - The codebase has a lot of problems with type mixing; int,off_t,size_t are
574   often used INTERCHANGEABLY to store the same size / value; especially
575   IMAP seems to be quite weird.  I've yet changed some off_t to size_t,
576   which is not a good idea for 32-bit and large files, but (a) it's
577   questionable wether we could handle those anyway and (b) all bets are off
578   since pieces of code also use int storage for them, iirc.
579   This will be a long-term problem.
581 - edit.c doesn't do NEED_BODY (yeah, IMAP won't work anyway).
583 - Some (configurable?) verbosity for certificate validation.
584   See, e.g., 'curl -v' output, which is quite nice (not only in respect
585   ot certificates).
586   (Martin Neitzel)
587   Rework certificate handling to match RFC 6125!  14.4!
589 - . Builtin line editor really should support cursor movement.
590     (For at least xterm terminals, i.e., CSI + a single character.)
591   .. s-nail </dev/null should work interactively when STDERR_FILENO is
592     a terminal!  (Builtin editor; how do editline and readline work?
593     should this be documented?  What does NetBSD Mail do?  Should we NOT
594     be interactive??  POSIX says for sh(1) (APPLICATION USAGE): 'sh
595     2>FILE' is not interactive, even though it accepts terminal input.)
596   . Automatically track message attachments when switching off the
597     folder.
598   . 'localopts' is crap for folder hooks: there any locally set option
599     should remain until we switch off the folder.
600     E.g., i can think about variables that one wants to set on
601     a per-folder basis, like Reply-To or, later ;), Mail-Followup-To:,
602     etc!  Can't we do this??  (Note this means we need to be able to
603     have multiple "threads of locality".)
604     (In fact i'm long thinking about internal events, like
605     on-folder-enter, on-folder-leave etc.  This is how i would implement
606     it (event based, non-blocking select(2) based mainloop) when
607     starting from scratch.)
608   .. Also, 'ghosts' should possibly be included in 'localopts'?
609      I ran into some not-so-nice conditions...
610      As long as it is possible to define regular ghosts when the
611      'account' command is not currently executing, that is a good idea.
612   . The spam* series (spam.c:_spam_action()) should abort if the command
613     execution failed, instead of iterating the entire list.  Look into
614     that.
615   . DESTDIR= should not be taken into account when deciding wether
616     a rebuild is necessary (not wrong to give that to Gaetan Bisson).
617   . _update-release: GMANE didn't announcement mail right (UTF-8, binary
618     encoded..)  This was an embedded NBSP (manually messed up).
619     Nonetheless, see the following comm with Gaetan Bisson, the
620     is-same-thread detection fails!
621   . In v15.0, when we can address attachments of a message individually,
622     it would be nice to provide even more access, just like nmh(1) does
623     (Johan Commelin: Are s-nail and mh related?).
624   . Just like the RFC 3676 link above, it would be nice if it would be
625     somehow possible to recognize links in a document; i don't know yet
626     how this could be achieved without loosing formatting information (i
627     mean, we could enable this and inject terminal colour sequences, but
628     one should be able to say 'follow link x', starting an action
629     handler, and the 'x' must come from somwhere - simply injecting
630     '[NUMBER]' references distorts visual).  Anyway, it's just a filter
631     that recognized the usual <SCHEME:/> stuff, and of course we can
632     simply have a buffer which records all such occurrences, so that
633     user can say '? xy NUMBER', but without the context it soon gets
634     hard.
635   . I want regular expression searches, if available.
636   . TTY layer: the tc*() family may fail with EINTR, which MUST be
637     handled; setting also generates SIGTTOU when we're not in foreground
638     pgrp, so we better deal with all that and ENSURE WE GET THROUGH when
639     resetting terminal attributes!
640   . Remove all occurrences of mbtowc() with mbrtowc(); temporarily add (some)
641     global mbstate_t objects until the send / MIME layer rewrite is done and
642     has the carrier.  Use flip states and add aux funs with only update the
643     state+toggle on success -- CURRENTLY MBTOWC FAILURES ARE PRACTICALLY NOT
644     HANDLED!!
645   . Ypnose (linuxien AT legtux DOT org) pointed out that for the IMAP
646     cache we have some kind of UID validity check -- couldn't that be
647     used to perform some kind of automatic reconnection when we get that
648     much-too-frequent connection breaks in IMAP mode??
649     Also, and also for POP3, don't let the ALARM based (ugh!  I'm
650     starting to dream wet from select(2), almost truly) timer blindly
651     tick, but restart it with a full interval when we did regular
652     conversation with a server.  Don't forget the SSL timeouts (300
653     seconds) and their interaction with normal (user) keepalives.
654     Add a global *keepalive*, add *keepalive-USER@HOST*.  (Add and use
655     a generic, single function to get the value for either protocol.)
657 vim:set fenc=utf-8:s-ts-mode