Giter Club home page Giter Club logo

Comments (12)

scottkosty avatar scottkosty commented on May 26, 2024 1

I'm not sure if the following is related, but just in case: #2606.

from neomutt.

alejandro-colomar avatar alejandro-colomar commented on May 26, 2024

@scottkosty

It looks like it's the same problem. It would be nice if this feature could be reintroduced without breaking something else.

I'm not sure a wrapper as a workaround, as you suggested in the other thread, would be easy. It would need to handle the subject, To, Cc, Bcc, ... and those fields can be repeated. Do you have a working wrapper? I'd be interested in trying it.

from neomutt.

scottkosty avatar scottkosty commented on May 26, 2024

I'm not sure a wrapper as a workaround, as you suggested in the other thread, would be easy. It would need to handle the subject, To, Cc, Bcc, ... and those fields can be repeated. Do you have a working wrapper? I'd be interested in trying it.

I do not have a wrapper. I abandoned the feature I was relying on. I would like to see it reintroduced as well if possible.

from neomutt.

alejandro-colomar avatar alejandro-colomar commented on May 26, 2024

I've done a git-bisect(1), within a debian:buster Docker container, where I could build everything between neomutt-20180716 and 20201127.

The test was:

git clean -dffx \
&& ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
        --disable-silent-rules --disable-maintainer-mode \
        --disable-dependency-tracking --mandir=/usr/share/man --libexecdir=/usr/lib \
        --with-mailpath=/var/mail --gpgme --lua --notmuch --with-ui --gnutls --gss \
        --idn --mixmaster --sasl --tokyocabinet \
&& make -j4 \
&& printf 'To: [email protected]\nSubject: foo\n\nBody\n' \
| ./neomutt -H -;
echo $?

The configure options were taken from the Debian Buster build of neomutt(1).

Here's what git found:

c4b3201e81cbf9cbffbb23cc5b754cb917e2d8c7 is the first bad commit
commit c4b3201e81cbf9cbffbb23cc5b754cb917e2d8c7
Author: Richard Russon <[email protected]>
Date:   Sat Jan 11 15:41:19 2020 +0000

    refactor: add get_field() to Connection
    
    Give the Connection a way to get connection login credentials from the
    backend.

:040000 040000 8e27d11018e7caf2c70ab8e5ee8f5df4a737260f 5e8b62c0401928150dbd0485fa413a76f9f5ec42 M	conn
:040000 040000 02a6a0656ee418df5a6ece86880d51b132b0ec6b 80fd9d23b746ff90ed80fcefab003cb1a28842ea M	imap
:100644 100644 bff756ce81b48269b345325bd9edd58ee1891830 155956d29467efc4438786e1bcfd0db1f377e76f M	mutt_account.c
:040000 040000 56170c2aea91d58b243f50fc7b076dc7dd059187 8d0c65ec12d020d8a6d5e635a9fc77a87a71aa7e M	nntp
:040000 040000 8224a7fa25fd10ba7ad508a58878fbbab8508b55 03841c30b63b021fd44dc339a23d8c147ab189e1 M	pop
:100644 100644 8fc1bbf327b8e0a426ba64d7a17876b38aa37ab8 06ebe7b1a8525ef80afa0e0e81e82d92e943eaf6 M	smtp.c
# git bisect log
git bisect start
# bad: [520d3aa8c3169c0d34df187803ce0574b38a8be9] NeoMutt 2020-11-27
git bisect bad 520d3aa8c3169c0d34df187803ce0574b38a8be9
# good: [6a147a62cf39c2a12cf2e96a8a62f378164548fa] merge: NeoMutt 2018-07-16
git bisect good 6a147a62cf39c2a12cf2e96a8a62f378164548fa
# good: [92c3166cfc1804d9e56a5d397a459a0951e68383] use enum return value
git bisect good 92c3166cfc1804d9e56a5d397a459a0951e68383
# bad: [7592f3a5e35c61acfecd0b3369bbb61e32e44677] trans: sync translations
git bisect bad 7592f3a5e35c61acfecd0b3369bbb61e32e44677
# good: [bfdd5b1f1335ee5c9990ae320533f79e41a90b63] change check_stats() to return number of new emails
git bisect good bfdd5b1f1335ee5c9990ae320533f79e41a90b63
# good: [5cf743e378418cb0a83c7329fc060becd0d1b085] Do not check hidden mailboxes for new mail (#1981)
git bisect good 5cf743e378418cb0a83c7329fc060becd0d1b085
# good: [48fe9364833e96a4545528cff86f8b77b085ae04] clang-format gui/lib.h
git bisect good 48fe9364833e96a4545528cff86f8b77b085ae04
# good: [24b5207aa14f7297d0393e80d525e3829e1b0109] refactor logic for clarity
git bisect good 24b5207aa14f7297d0393e80d525e3829e1b0109
# good: [30aa097dfb577e9d7aebcc02cb29a39308bf24b5] rename mutt/mutt.h to lib.h
git bisect good 30aa097dfb577e9d7aebcc02cb29a39308bf24b5
# good: [e1e5ad7c077080de41842089545d3419d8472460] pop: drop ConnAccount
git bisect good e1e5ad7c077080de41842089545d3419d8472460
# bad: [21bfa9fceb63b620d2b088363d8b1e190a35591b] add mutt_str_strnlower()
git bisect bad 21bfa9fceb63b620d2b088363d8b1e190a35591b
# bad: [c7b82278b34bd9ea18a973cacbf0d7f5cf89df5a] conn: refactor mutt_account_getoauthbearer
git bisect bad c7b82278b34bd9ea18a973cacbf0d7f5cf89df5a
# bad: [c4b3201e81cbf9cbffbb23cc5b754cb917e2d8c7] refactor: add get_field() to Connection
git bisect bad c4b3201e81cbf9cbffbb23cc5b754cb917e2d8c7
# good: [a89056377620656c2b529386440a54fa1d276399] refactor connection service
git bisect good a89056377620656c2b529386440a54fa1d276399
# first bad commit: [c4b3201e81cbf9cbffbb23cc5b754cb917e2d8c7] refactor: add get_field() to Connection

I noticed different error messages in the commits where it failed, so I bisected for those too:

In c4b3201e81cbf9cbffbb23cc5b754cb917e2d8c7 (the first bad commit):

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
No authenticators available
Could not send the message
1

In 20201127 (Debian Bullseye neomutt(1)):

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
Refusing to send an empty email
Try: echo | neomutt -s 'subject' [email protected]
1

In 715d5153fb7050b7f6378c02546f7b604023348b:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
1

In 73709afd0c7bf67ce6941eecc460af934966dbb6:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
Error initializing terminal
0

In fd6b381335e165b301f51fd3019871e01ade6499 it seems to work for a short time:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
0

In 29e1116918f5bb1d4b200559c7e209d4335bdf38:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
Error in /root/.config/mutt/char.muttrc, line 1: Invalid value for option send_charset: /root/.config/mutt/utf-8
Error in /root/.config/mutt/muttrc, line 7: source: file /root/.config/mutt/char.muttrc could not be sourced
source: errors in /root/.config/mutt/muttrc
SASL authentication failed
Could not send the message
1

In the following post, I'll post a detailed history of the different behaviors the code has gone through.

from neomutt.

alejandro-colomar avatar alejandro-colomar commented on May 26, 2024

git-bisect(1) results:


Original behavior:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
0

Broken in:

c4b3201e81cbf9cbffbb23cc5b754cb917e2d8c7 is the first bad commit
commit c4b3201e81cbf9cbffbb23cc5b754cb917e2d8c7
Author: Richard Russon <[email protected]>
Date:   Sat Jan 11 15:41:19 2020 +0000

    refactor: add get_field() to Connection
    
    Give the Connection a way to get connection login credentials from the
    backend.

:040000 040000 8e27d11018e7caf2c70ab8e5ee8f5df4a737260f 5e8b62c0401928150dbd0485fa413a76f9f5ec42 M	conn
:040000 040000 02a6a0656ee418df5a6ece86880d51b132b0ec6b 80fd9d23b746ff90ed80fcefab003cb1a28842ea M	imap
:100644 100644 bff756ce81b48269b345325bd9edd58ee1891830 155956d29467efc4438786e1bcfd0db1f377e76f M	mutt_account.c
:040000 040000 56170c2aea91d58b243f50fc7b076dc7dd059187 8d0c65ec12d020d8a6d5e635a9fc77a87a71aa7e M	nntp
:040000 040000 8224a7fa25fd10ba7ad508a58878fbbab8508b55 03841c30b63b021fd44dc339a23d8c147ab189e1 M	pop
:100644 100644 8fc1bbf327b8e0a426ba64d7a17876b38aa37ab8 06ebe7b1a8525ef80afa0e0e81e82d92e943eaf6 M	smtp.c

behavior:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
No authenticators available
Could not send the message
1

Fixed in:

d4b578bfd60448b92952123726d07778f4b2940e is the first good commit
commit d4b578bfd60448b92952123726d07778f4b2940e
Author: Richard Russon <[email protected]>
Date:   Fri Feb 14 14:31:41 2020 +0000

    oauth: if 'login' name isn't available use 'user'
    
    Fixes: #2130

:040000 040000 68c913441c6d68d2b33a584fb5d5a9bed8040b39 5d214273c2a7265c3a0763c45d854f1235dc857a M	conn

behavior:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
0

Broken again in:

29e1116918f5bb1d4b200559c7e209d4335bdf38 is the first bad commit
commit 29e1116918f5bb1d4b200559c7e209d4335bdf38
Author: Richard Russon <[email protected]>
Date:   Fri Jan 24 20:07:31 2020 +0000

    config: add path type

:100644 100644 ebd9fe59b9036ff8b35171b80ab2c604737ea079 4556fd74f023173c4eaba0365a29f0b54c5c66b4 M	Makefile.autosetup
:040000 040000 285786ce9ef1e885704c7fed422fb2ad4d495bdb 4eaf42231b883d2afddfd56520d1fb55a9f04e3e M	config
:100644 100644 c8570a1bdaf17e22d3a11c46f3f9d2a2b677852c 1da17a44424357945bd0e9fac6b0fdef043c28b8 M	init.c
:040000 040000 b562bb9035cd71473eb4560f1100f6ed6e584263 ee9879e7dc9b16c42e9c3711535dcf4982100895 M	po
:040000 040000 8015d6243cf22863ccce0bac5ddf034c10565d58 1bcf1b55f74b8b63fe82ca71212bc48f5558e2c9 M	test

behavior:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
Error in /root/.config/mutt/char.muttrc, line 1: Invalid value for option send_charset: /root/.config/mutt/utf-8
Error in /root/.config/mutt/muttrc, line 7: source: file /root/.config/mutt/char.muttrc could not be sourced
source: errors in /root/.config/mutt/muttrc
SASL authentication failed
Could not send the message
1

If I comment out set send_charset = "utf-8", I get:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
SASL authentication failed
Could not send the message
1

Fixed again in:

908c91af68382d114c1916080979c069d329cd9e is the first good commit
commit 908c91af68382d114c1916080979c069d329cd9e
Author: Richard Russon <[email protected]>
Date:   Sun Jan 26 23:51:45 2020 +0000

    config: convert path variables

:100644 100644 9e0dc1bb56e85ea1a072b54fcd4f8acc35c9008d a29465b49679c990ab6c812730d7719352dacb8d M	command_parse.c
:040000 040000 821febf5e9c7b42e9c0725756eb5d728a3852fad 4ed3b389c10f4afbbc39d3dd46a210aecafd6240 M	config
:100644 100644 1da17a44424357945bd0e9fac6b0fdef043c28b8 d62e338abe11d15f8475143fe5cb6581c2e2e2eb M	init.c
:100644 100644 4bfaac107d22caff643524a33a5810e6949c25af 5eb80f095a95802d56800ba6026107e7ab5577a3 M	main.c
:100644 100644 32645050ef5a6c7c7e4f4d1a21b4800b57400c2a c7b373685c718c4c9bd13c3a8a948861597201b1 M	mutt_config.c
:100644 100644 e5bcba20183631d2ed1c953ac94fba79d1a012f7 9a3ee64e35dfc11dc7f21534cbf58715093a2853 M	mutt_lua.c

behavior:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
0

Broken again in:

331702b6a96da072d031a38890b3f1c5d1273afb is the first bad commit
commit 331702b6a96da072d031a38890b3f1c5d1273afb
Author: Richard Russon <[email protected]>
Date:   Sun Feb 16 11:59:06 2020 +0000

    abort if run without a terminal
    
    Fixes: #2138

:100644 100644 64d1a7ecc1905cff1cc02773e1dda5235116fc3e 3915dcaed8eebe04ec808c5ab3f7b8a0e8aee552 M	main.c

behavior:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
Error initializing terminal
0

(but it exits with 0?!)


Changed behavior, still broken:

b113e9e986330992d06a6470f4b1e6423d76864b is the first bad commit
commit b113e9e986330992d06a6470f4b1e6423d76864b
Author: Richard Russon <[email protected]>
Date:   Sun Mar 15 14:53:50 2020 +0000

    fix command line sending
    
    Commit 331702b6 was created to fix issue #2138.
    Unfortunately, that broke sending email from the command line.
    
    Rather than check for a tty on stdin, count how many bytes are available.
    If there is none, abort.
    
    Fixes: #2176

:100644 100644 da54efe842bbb10c99c40a51c7ba055076d6ed06 e32c0d521d9d5edee773c0a7af7ab2d79d1a1324 M	main.c
:040000 040000 109d9ecf913b587473d5a0277fe86ad4e91f3296 a5ad843e5be6915fd9d0b98bd34a06f18483a464 M	mbox
:040000 040000 9de22cedc45f29a6de42fa84450f5d72f714d04b a7f3de67c8e8cb6c3e11bb031e6d9476b36e89a8 M	mutt
:100644 100644 76572a5310489265677ed1b26f6e7735af048fca 9e8a8978a4c14f567ef1af520ebc74fcc72198ae M	send.c
:100644 100644 38420689cb19de17aec36c3bb58c4d4b589dd7fa 873aefa462238123a9a5dfdb966a991047340f9f M	sendlib.c

behavior:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
1

And changed again, with the current behavior, still broken:

f9476b4f5bf3027cd69129d37ac6635e535697f9 is the first bad commit
commit f9476b4f5bf3027cd69129d37ac6635e535697f9
Author: Richard Russon <[email protected]>
Date:   Tue Apr 7 12:50:40 2020 +0100

    add error for CLI empty emails
    
    Issue #2243 wants to send empty emails, but that conflicts with issue 2138
    where empty emails were being sent by mistake.
    
    For now, disallow: `neomutt [email protected] < /dev/null`
    in favour of:      `echo | neomutt [email protected]`
    
    Add an error message to suggest this behaviour.
    
    Closes: #2243

:100644 100644 8ca9800984c58d665eb7f61e0b3d718014a9d8a8 3ca0a618a12e6734ec2e62be607b3e9d34e16c89 M	send.c

behavior:

# printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
Refusing to send an empty email
Try: echo | neomutt -s 'subject' [email protected]
1

Crazy history. :D

from neomutt.

alejandro-colomar avatar alejandro-colomar commented on May 26, 2024

It seems the intention would have been to fix this in b113e9e #2138, per the commit message, but I still see it broken. For some reason, it thinks STDIN has 0 bytes.

Then, in f9476b4 the behavior changed, but I think the intention was still that if there are bytes, it should send them; again from reading the commit message. It seems (this time even the error message says so) that neomutt(1) believes STDIN has 0 bytes, but it clearly is wrong.

So, I'd say this is a bug in the code checking if the message is empty. @flatcap , @scottkosty , any opinions?

from neomutt.

flatcap avatar flatcap commented on May 26, 2024

Thanks for digging into this, it good to get fresh eyes on it.

Crazy history. :D

hehe, thanks for the deep dive (exposing all my failings :-)

So, I'd say this is a bug in the code checking if the message is empty

Yeah, that sounds about right.

Back in 2018, I went through main.c and init.c, systematically trying to test all possible routes through the code.
Most of the resulting TESTnn comments are still there.
Since then, there have been numerous quick hacks to satisfy this or that.

What we need first, is to describe a set of tests -- even if they're manual.
All the possible batch uses of NeoMutt.

Then we can avoid the constant fixing of one thing, but breaking another.


Longer term, main() needs rewriting -- not a simple task.
There's still quite a bit batch code that relies on gui initialisation.

from neomutt.

alejandro-colomar avatar alejandro-colomar commented on May 26, 2024

Here's the code where it fails:

$ grep -rl 'Refusing to send an empty email' \
| grep -v '^po/' \
| xargs grep -n -C5 'Refusing to send an empty email';
2421-
2422-    if (flags & SEND_BATCH)
2423-    {
2424-      if (mutt_file_copy_stream(stdin, fp_tmp) < 1)
2425-      {
2426:        mutt_error(_("Refusing to send an empty email"));
2427-        mutt_message(_("Try: echo | neomutt -s 'subject' [email protected]"));
2428-        goto cleanup;
2429-      }
2430-    }
2431-

Let's investigate mutt_file_copy_stream():

$ grepc mutt_file_copy_stream .
./mutt/file.h:int         mutt_file_copy_stream(FILE *fp_in, FILE *fp_out);
./mutt/file.c:int mutt_file_copy_stream(FILE *fp_in, FILE *fp_out)
{
  if (!fp_in || !fp_out)
    return -1;

  size_t total = 0;
  size_t l;
  char buf[1024] = { 0 };

  while ((l = fread(buf, 1, sizeof(buf), fp_in)) > 0)
  {
    if (fwrite(buf, 1, l, fp_out) != l)
      return -1;
    total += l;
  }

  if (fflush(fp_out) != 0)
    return -1;
  return total;
}

Let's add some debugging code:

diff --git a/mutt/file.c b/mutt/file.c
index 363de814a..1d30ef66e 100644
--- a/mutt/file.c
+++ b/mutt/file.c
@@ -261,22 +261,29 @@ int mutt_file_copy_bytes(FILE *fp_in, FILE *fp_out, size_t size)
  */
 int mutt_file_copy_stream(FILE *fp_in, FILE *fp_out)
 {
+fprintf(stderr, "ALX: %s(): %d\n", __func__, __LINE__);
   if (!fp_in || !fp_out)
     return -1;
 
+fprintf(stderr, "ALX: %s(): %d\n", __func__, __LINE__);
   size_t total = 0;
   size_t l;
   char buf[1024] = { 0 };
 
   while ((l = fread(buf, 1, sizeof(buf), fp_in)) > 0)
   {
+fprintf(stderr, "ALX: %s(): %d\n", __func__, __LINE__);
     if (fwrite(buf, 1, l, fp_out) != l)
       return -1;
+fprintf(stderr, "ALX: %s(): %d\n", __func__, __LINE__);
     total += l;
   }
 
+fprintf(stderr, "ALX: %s(): %d\n", __func__, __LINE__);
   if (fflush(fp_out) != 0)
     return -1;
+fprintf(stderr, "ALX: %s(): %d\n", __func__, __LINE__);
+fprintf(stderr, "ALX: ret= %zu\n", total);
   return total;
 }
 

And run it:

$ printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
ALX: mutt_file_copy_stream(): 264
ALX: mutt_file_copy_stream(): 268
ALX: mutt_file_copy_stream(): 275
ALX: mutt_file_copy_stream(): 278
ALX: mutt_file_copy_stream(): 282
ALX: mutt_file_copy_stream(): 285
ALX: ret= 38
ALX: mutt_file_copy_stream(): 264
ALX: mutt_file_copy_stream(): 268
ALX: mutt_file_copy_stream(): 282
ALX: mutt_file_copy_stream(): 285
ALX: ret= 0
Refusing to send an empty email
Try: echo | neomutt -s 'subject' [email protected]
1

It seems we're consuming stdin twice, and the second time doesn't have anything to read, of course. Does that sound familiar to you, @flatcap ?

from neomutt.

flatcap avatar flatcap commented on May 26, 2024

Familiar? No.
I must have read and debugged it before, but I don't remember.

I've just stepped through it myself, and yep, that's definitely the place where it goes wrong.
Killing the entire clause if (flags & SEND_BATCH) makes NeoMutt work in this case.

We just need a way to distinguish it from any other cases.
SEND_BATCH is only set in main() so we only need to consider other CLI sends.

from neomutt.

alejandro-colomar avatar alejandro-colomar commented on May 26, 2024

Hmm, personally, I think sending /dev/null should be as valid as anything else, and if one doesn't want to send it, it should write some check before calling neomutt(1). In the case of xdg-open(1), as in #2138, that program should be fixed to give a terminal to the user. Sending /dev/null can be useful to debug neomutt, or debug some other program that handles mail.

Cc: @The-Compiler (in case he disagrees, since he wanted it to fail if there's no terminal)

If we still want this check, it should be done in main.c, at the first call to mutt_file_copy_stream(). We can't call it twice, since it would try to consume stdin twice, which is not possible. So now the questions would be:

  • Do we want to fail to send an empty mail?

I propose the following diff:

diff --git a/send/send.c b/send/send.c
index d82c4bc40..805ea544d 100644
--- a/send/send.c
+++ b/send/send.c
@@ -2419,16 +2419,6 @@ int mutt_send_message(SendFlags flags, struct Email *e_templ, const char *tempfi
     if (c_hdrs)
       process_user_header(e_templ->env);
 
-    if (flags & SEND_BATCH)
-    {
-      if (mutt_file_copy_stream(stdin, fp_tmp) < 1)
-      {
-        mutt_error(_("Refusing to send an empty email"));
-        mutt_message(_("Try: echo | neomutt -s 'subject' [email protected]"));
-        goto cleanup;
-      }
-    }
-
     if (!(flags & SEND_BATCH))
       mutt_make_greeting(e_templ, fp_tmp, sub);
 

The behavior after this patch, for two different tests, is:

$ printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
0
$ </dev/null ./neomutt -H - [email protected]; echo $?
0

In case we want to fail to send /dev/null, we may want to also apply this diff:

diff --git a/main.c b/main.c
index 2658d65c0..a9cf14d8e 100644
--- a/main.c
+++ b/main.c
@@ -1088,9 +1088,18 @@ main
         }
         if (fp_in)
         {
-          mutt_file_copy_stream(fp_in, fp_out);
+          int  ret;
+
+          ret = mutt_file_copy_stream(fp_in, fp_out);
           if (fp_in != stdin)
             mutt_file_fclose(&fp_in);
+          if ((sendflags & SEND_BATCH) && (ret < 1))
+          {
+            mutt_error(_("Refusing to send an empty email"));
+            mutt_message(_("Try: echo | neomutt -s 'subject' [email protected]"));
+            email_free(&e);
+            goto main_curses;
+          }
         }
         else if (bodytext)
         {

The behavior after applying both diffs is:

$ printf 'To: [email protected]\nSubject: foo\n\nBody\n' | ./neomutt -H -; echo $?
0
$ </dev/null ./neomutt -H - [email protected]; echo $?
Refusing to send an empty email
Try: echo | neomutt -s 'subject' [email protected]
1

It fixes the bug of reading stdin twice, while not regressing #2138. While I think sending /dev/null may be useful, I don't need it now, and can live with it if we apply both diffs for now.

Now the question would be: do you expect any other regression from these diffs? Is there any other path that may be affected by adding this check in main.c?

from neomutt.

flatcap avatar flatcap commented on May 26, 2024

Thanks for the PR!
What'd be nice is an exhaustive list of tests ;-)
(every CLI way to send an email)

Sunday's my Crossword day, but I'll try to find some time later to have a play.

from neomutt.

alejandro-colomar avatar alejandro-colomar commented on May 26, 2024

Thanks for the PR!

You're welcome! :)

What'd be nice is an exhaustive list of tests ;-) (every CLI way to send an email)

You'll know more of that than I. :)

BTW, my pillow has convinced me that /dev/null isn't so necessary to support. Since it's just a draft, echo should be as good; especially since an email body will at least contain a \n, to end the transmission, right? I don't know that much of email contents, but in HTTP requests it's necessary to end with a \n; I guess it's similar in email.

Sunday's my Crossword day, but I'll try to find some time later to have a play.

This Sunday for me was for repairing a sewing machine from my grandma; it works now :-)

from neomutt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.