Re: SMTP via tunnel working at last, with nbsmtp
On Mon, Feb 02, 2004 at 05:42:38PM -0500, David Yitzchak Cohen wrote:
> On Mon, Feb 02, 2004 at 03:54:06PM EST, Chris Green wrote:
>
> > I have finally got my sending via an ssh tunnel working, I found the
> > most trivial MTA ever called nbsmtp, a single 'C' source file and a
> > makefile is all there is. Fortunately (for me) the Makefile knows
> > about solaris. So I built it and it worked straight away, unlike ssmtp
> > and nullmailer neither of which I have managed to make work.
> >
> > However there's one remaining question, how can I get mutt to do
> > something like fetchmail's 'preconnect' so that I can fire off the
> > required ssh command before running nbsmtp? The problem is that you
> > need to start ssh without mutt seeing its stdin or stdout and then
> > mutt sends the message to "sendmail" on its stdin (well nbsmtp
> > actually).
>
> The easiest thing should be to find a method of direct invocation for
> nbsmtp, and have ssh run it for you on the target host, as the "command."
> At that point, the ssh process becomes your "sendmail," and everything
> should be all fine and dandy :-)
>
Would that work, I hadn't thought of doing it that way round but I
suppose it would make sense in a way. It means I'll have to compile
nbsmtp (or something else, presumably I could use sendmail directly)
and in mutt I 'set sendmail' to something like:-
ssh -l cgreen -x remote.host /usr/lib/sendmail -oem -oi
I do actually have a shell login account on the remote system and have
set up 'passwdordless' login using RSA authentication so I think this
would work.
I'll try it an report if it works.
--
Chris Green (chris@xxxxxxxxxxx)