David Levine | 8 Jul 2012 01:12
Picon
Favicon

merge spost into post

I'm thinking about merging the spost sendmail interaction
method into post.  spost doesn't speak SMTP, but rather
feeds the entire message to sendmail -t.  That would be easy
to add to post without making a mess.

We'd need a new mts value, in addition to the current "smtp"
and "sendmail", in mts.conf to select it.  "spost", unless
there's a better idea?  -t doesn't have much of a description.
sendmail calls it "GrabTo" internally, which is a bit more
descriptive but just doesn't appeal to me.

We could then remove spost and let its users pick up all of
the wonderful post features.  If there's a need to provide a
replacement for spost that would forward to post, that
wouldn't be difficult.  It would be triival if we added a
command line option to post to select the mts method, but I
don't know if that's worth doing unless it would be useful
by itself to override the mts setting from the command line.

spost has these command line options that post doesn't:

  -noalias    to disable nmh alias expansion
  -[no]push   to (not) fork/exit before exec'ing sendmail
  -[no]backup to (not) copy the sendmail input to a .bak file
  -[no]remove to (not) remove the sendmail input file

I don't see a need to support any of these in post, let
me know if you disagree.

David
(Continue reading)

Oliver Kiddle | 8 Jul 2012 04:27
Picon
Favicon

Re: merge spost into post

David Levine wrote:

> We'd need a new mts value, in addition to the current "smtp"
> and "sendmail", in mts.conf to select it.  "spost", unless
> there's a better idea?

If all it does is pipe the message content in to sendmail's stdin then
how about "pipe". Or is it actually giving sendmail a file (the -remove
option makes me wonder).

>   -[no]push   to (not) fork/exit before exec'ing sendmail

This is the only one that looks even vaguely interesting if it means
that you can watch any errors coming from sendmail.

Oliver

_______________________________________________
Nmh-workers mailing list
Nmh-workers <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Alexander Zangerl | 8 Jul 2012 10:56
Picon

Re: merge spost into post

On Sat, 07 Jul 2012 18:12:20 -0500, David Levine writes:
>I'm thinking about merging the spost sendmail interaction
>method into post. 

oh, yes please!

>We'd need a new mts value, in addition to the current "smtp"
>and "sendmail", in mts.conf to select it.

why not reuse "sendmail" with a profile/cmdline option
for post to select the pipe mode instead of batched smtp?

after all both scenarios do involve sendmail (or whatever mts.conf
says is sendmail:)

regards
az

--

-- 
Alexander Zangerl + GnuPG Keys 0x42BD645D or 0x5B586291 + http://snafu.priv.at/
> hence the AIX boxen of increasing power [...]
That phrasing reminded me of "Rodents of Unusual Size".
 -- Mike and Greg Andrews
_______________________________________________
Nmh-workers mailing list
Nmh-workers <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers
(Continue reading)

David Levine | 8 Jul 2012 15:41
Picon
Favicon

Re: merge spost into post

Oliver wrote:

> If all it does is pipe the message content in to sendmail's stdin then
> how about "pipe". Or is it actually giving sendmail a file (the -remove
> option makes me wonder).

It pipes to sendmail.  The file is temporary, used internally
to build the message.  Just before exec'ing to sendmail, spost
freopens stdin to it.

The tmp file is what gets refiled with Fcc, so -noremove doesn't
seem to add anything useful.  (-remove is the default.)

I like "pipe" better than "spost".

> >   -[no]push   to (not) fork/exit before exec'ing sendmail
> 
> This is the only one that looks even vaguely interesting if it means
> that you can watch any errors coming from sendmail.

The default is -nopush.  sendmail errors should show up
either way.  send(1) has -push and that seems the right
place to do this.  If a user calls post directly, they could
fork/exec the entire post process, just like send.

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers <at> nongnu.org
(Continue reading)

David Levine | 8 Jul 2012 15:52
Picon
Favicon

Re: merge spost into post

az wrote:

> On Sat, 07 Jul 2012 18:12:20 -0500, David Levine writes:
> 
> >We'd need a new mts value, in addition to the current "smtp"
> >and "sendmail", in mts.conf to select it.
> 
> why not reuse "sendmail" with a profile/cmdline option
> for post to select the pipe mode instead of batched smtp?

Well, post doesn't read the profile.  If we used a command
line option, we'd have to feed it through send.  But I think
the biggest reason not to go this route is that we'd then
have an unsupported combination (network non-SMTP).  With
the third mts value, a user couldn't get there.

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Alexander Zangerl | 9 Jul 2012 00:55
Picon

Re: merge spost into post

On Sun, 08 Jul 2012 08:52:09 -0500, David Levine writes:
>Well, post doesn't read the profile.

ah, good point. i was misled by an ancient "post: -msgid" in
my .mh_profile.

on further reflection your setup makes much more sense indeed:
only one file to configure all the relevant bits in.

maybe call the mts values: smtp, bsmtp (alias sendmail, for backwards compat),
pipe?

regards
az

--

-- 
Alexander Zangerl + GnuPG Keys 0x42BD645D or 0x5B586291 + http://snafu.priv.at/
You can believe anything you want. The universe is not obliged to keep
a straight face.
_______________________________________________
Nmh-workers mailing list
Nmh-workers <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers
Ken Hornstein | 9 Jul 2012 02:41
X-Face
Picon
Favicon

Re: merge spost into post

>maybe call the mts values: smtp, bsmtp (alias sendmail, for backwards compat),
>pipe?

I'm fine with merging spost into post.  A couple of comments:

- I'm not so sure about about what to call it either.  It gets kinda confusing
  now that we have two different ways to call sendmail.  I like "pipe" for
  the spost replacement, but I think having "sendmail" would be confusing.
  But I don't like "bsmtp" either (I assume that's "batched SMTP"?  What's
  particularly batched about it?).  But I don't have any better suggestions.
  Maybe "sendmail/smtp" and "sendmail/pipe"?  With just "sendmail" meaning
  "sendmail/smtp"?  To me that's a little clearer.

- It occurs to me that some of these things should be overrideable via
  mh_profile (like the path to sendmail).  Just saying :-)

- It should be made clear in the man pages that in the "pipe" or
  "sendmail/pipe" case that it's impossible to set the envelope-from
  address.

- Are we going to have some notification at runtime for those people who
  put "spost" in their postproc a couple of decades ago for some
  long-forgotten reason? :-)  As far as I can tell that's pretty much the
  case for everyone except Alex.

I was going to say that we should make sure that we create a test for it,
but I know David is the test suite champ :-)

--Ken

(Continue reading)

David Levine | 9 Jul 2012 06:40
Picon
Favicon

Re: merge spost into post

Ken wrote:

>   Maybe "sendmail/smtp" and "sendmail/pipe"?  With just
>   "sendmail" meaning "sendmail/smtp"?  To me that's a
>   little clearer.

I like those.  I just had some quality airplane time and was
able to wrap up the addition of "pipe".  It's committed.  I
got your message after, I'll change the names this week.
spost is still there so nothing should be broken.

> - It occurs to me that some of these things should be
>   overrideable via mh_profile (like the path to sendmail).
>   Just saying :-)

And an -mts command line option would help with the
migration away from spost, which could then just exec "post
-mts sendmail/pipe".

> - It should be made clear in the man pages that in the
>   "pipe" or "sendmail/pipe" case that it's impossible to
>   set the envelope-from address.

Is what's already in the send(1) man page sufficient, starting
with "When using SMTP for mail submission?"

> - Are we going to have some notification at runtime for
>   those people who put "spost" in their postproc a couple
>   of decades ago for some long-forgotten reason? :-)

(Continue reading)


Gmane