Bug#921244: comp/send: strange error and undocumented behaviour when using Bcc-header

2019-02-04 Thread Harald Geyer
Alexander Zangerl writes:

> On Sun, 03 Feb 2019 14:13:24 +, Harald Geyer writes:
> >I get the following error:
> >| What now? send
> >| sendmail: No recipients specified although -t option used
> >| exit 1
> 
> could you please provide (possibly sanitised) copies
> of your ~/.mh_profile and /etc/nmh/mts.conf?

I actually installed nmh from scratch to reproduce the bug before
writing up the report, so there shouldn't be anything special in there,
but sure:

lambda@hdev:~$ cat .mh_profile
MH-Profile-Version: 1.0
Path: Mail

lambda@hdev:~$ cat .mh_profile
MH-Profile-Version: 1.0
Path: Mail
lambda@hdev:~$ cat /etc/nmh/mts.conf
# nmh mail transport interface customization file.
#
# Check the mh-tailor(5) man page for descriptions of available options.
#

# The delivery method to use, which must be one of the following:
# smtp:  nmh opens a socket connection to the appropriate port
#on the servers listed below and speaks SMTP to the
#first one that responds.  This is the default.
# sendmail/smtp: nmh pipes messages directly to the sendmail program,
#speaking SMTP.  Can be abbreviated to "sendmail".
# sendmail/pipe: nmh pipes messages directly to the sendmail program,
#using the -t option so that addresses are retrieved
#from the message.
mts: sendmail/pipe

# Name that nmh considers `local'.  If not set, nmh will
# query the system for this value (gethostname, etc...).
#localname: foo.bar.com

# Default location of mail drops.  If this option is
# set, but empty, the user's home directory is used.
mmdfldir: /var/mail

# The name of the maildrop file in the directory where maildrops
# are kept.  If this is empty, the user's login name is used.
mmdflfil:

#
# The locking algorithm to use on the spool file.  Valid settings are:
#
#   fcntl   Locking using the fcntl() function
#   dot "Dot" locking using an external lock file
#   flock   Locking using the flock() function (if supported by OS)
#   lockf   Locking using the lockf() function (if supported by OS)
#
# Locking algorithms supported on this installation are:
#
#   fcntl dot flock lockf
#
# The default spool locking configured on this system is fcntl;
# change the line below to get a different value
#spoollocking: fcntl

# Hardcoded POP server name (prevents inc'ing from local mail spool).
#pophost: localhost

# A SINGLE SMTP server to use when using SMTP support
servers: localhost


> >Both recipients get messages with different Message-Ids, but the
> >content seems to be exactly the same.
> ...
> >I believe this is in conflict
> >with the man page of send(1), which states that Bcc-recipients will
> >receive a message with a clear indication in the body, warning them
> >not to disclose their status as recipients by replying.
> 
> i don't see any indication in the send manpage that supports your reasoning.

It is implied in the description of the dcc header.

> but looking closely at the FAQ, the post manpage and the actual
> code i do see that nmh tries to reformat bcc's under some/many/most
> circumstances (and offers a weird nonstandard dcc header to create the
> 'normal'/classic behaviour of identical copies).
> 
> i can confirm that nmh 1.7 has buggy bcc handling, at least
> when sendmail/pipe is used as transport:
> using a shim program instead of actual sendmail/postfix/whatever i could see
> that the sequence of comp-whatnow-post creates TWO messages to transmit,
> 
> * one that contains the original body, complete with to: and bcc:,
>   ie. leaving sendmail/postfix/whatever to handle that bcc:,
>   which causes normal mail transfer agents to produce the
>   'normal'/classic bcc: behaviour,
> * and one that has the warning-encrusted body but no to: at all and only a 
> blank
>   bcc: header. that one is clearly untransmittable, which is what causes
>   the error message you saw.
> 
> i'll get in touch with upstream and have a deeper look at the problem myself
> as well.
> 
> you might try switching to 'smtp' or 'sendmail/smtp' in /etc/nmh/mts.conf
> as a potential workaround until that bug is sorted;

Thanks for the info. I guess this explains why I vaguely remember bcc
working in the past.

> note that
> according to the mts.conf manpage dcc: is NOT supported if 'sendmail/pipe'
> is the transport.

Thanks again, I'd have totally missed that. Sometimes it is hard to
know which man pages to read ... :)

Thanks for your help,
Harald



Bug#921244: comp/send: strange error and undocumented behaviour when using Bcc-header

2019-02-03 Thread Alexander Zangerl
retitle 921244 broken bcc handling with transport sendmail/pipe
thanks

On Sun, 03 Feb 2019 14:13:24 +, Harald Geyer writes:
>I get the following error:
>| What now? send
>| sendmail: No recipients specified although -t option used
>| exit 1

could you please provide (possibly sanitised) copies
of your ~/.mh_profile and /etc/nmh/mts.conf?

>Both recipients get messages with different Message-Ids, but the
>content seems to be exactly the same.
...
>I believe this is in conflict
>with the man page of send(1), which states that Bcc-recipients will
>receive a message with a clear indication in the body, warning them
>not to disclose their status as recipients by replying.

i don't see any indication in the send manpage that supports your reasoning.
but looking closely at the FAQ, the post manpage and the actual
code i do see that nmh tries to reformat bcc's under some/many/most
circumstances (and offers a weird nonstandard dcc header to create the
'normal'/classic behaviour of identical copies).

i can confirm that nmh 1.7 has buggy bcc handling, at least
when sendmail/pipe is used as transport:
using a shim program instead of actual sendmail/postfix/whatever i could see
that the sequence of comp-whatnow-post creates TWO messages to transmit,

* one that contains the original body, complete with to: and bcc:,
ie. leaving sendmail/postfix/whatever to handle that bcc:,
which causes normal mail transfer agents to produce the
'normal'/classic bcc: behaviour,
* and one that has the warning-encrusted body but no to: at all and only a blank
bcc: header. that one is clearly untransmittable, which is what causes
  the error message you saw.

i'll get in touch with upstream and have a deeper look at the problem myself
as well.

you might try switching to 'smtp' or 'sendmail/smtp' in /etc/nmh/mts.conf
as a potential workaround until that bug is sorted; note that
according to the mts.conf manpage dcc: is NOT supported if 'sendmail/pipe'
is the transport.

regards
az


-- 
Alexander Zangerl + GPG Key 2FCCF66BB963BD5F + http://snafu.priv.at/
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -- Benjamin Franklin


signature.asc
Description: Digital Signature


Bug#921244: comp/send: strange error and undocumented behaviour when using Bcc-header

2019-02-03 Thread Harald Geyer
Package: nmh
Version: 1.7.1-3
Severity: normal

Hi,

when drafting a message with comp(1) and including something like the
following in the headers:
| To: f...@example.com
| Bcc: b...@example.com

I get the following error:
| What now? send
| sendmail: No recipients specified although -t option used
| exit 1

Both recipients get messages with different Message-Ids, but the
content seems to be exactly the same. I believe this is in conflict
with the man page of send(1), which states that Bcc-recipients will
receive a message with a clear indication in the body, warning them
not to disclose their status as recipients by replying.

See the discussion von Bcc: vs. Dcc: fields in the man page of send(1)
for details.

I believe the body of bcc messages used to start with:
| --- Blind-Carbon-Copy
|
| From: har...@ccbib.org
| To: f...@example.com
| Bcc: b...@example.com
| Subject: ...
| [more headers]
|
| [original body]

Best regards and thanks for maintaining nmh.

Harald

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-7-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages nmh depends on:
ii  libc6   2.28-5
ii  libcurl47.63.0-1
ii  libdb5.35.3.28+dfsg1-0.2
ii  liblockfile11.14-1.1
ii  libsasl2-2  2.1.27+dfsg-1
ii  libssl1.1   1.1.1a-1
ii  libtinfo6   6.1+20181013-1
ii  mime-support3.61
ii  netbase 5.5
ii  sensible-utils  0.0.12

Versions of packages nmh recommends:
ii  ssmtp [mail-transport-agent]  2.64-8+b2

Versions of packages nmh suggests:
pn  exmh
ii  libmailtools-perl   2.18-1
ii  libmime-tools-perl  5.509-1
pn  mh-book 
pn  mh-e
pn  par 

-- no debconf information