From: Grant Edwards <grant.b.edwards@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: Simple SMTP to cmd-line MTA relay?
Date: Sat, 20 Jan 2018 00:53:18 +0000 (UTC) [thread overview]
Message-ID: <p3u3tu$dcg$1@blaine.gmane.org> (raw)
In-Reply-To: 8d4032b1-ecf6-059e-ac04-5c052260e06c@spamtrap.tnetconsulting.net
On 2018-01-20, Grant Taylor <gtaylor@tnetconsulting.net> wrote:
> On 01/19/2018 04:58 PM, Grant Edwards wrote:
>
>> That would require seperate outbound transports that are selected based
>> on how the mail was read: smtp vs. /usr/bin/sendmail (the real one).
>
> Okay....
>
>> I get the impression from exim and postfix docs that outbound routing
>> based on input method aren't possible (I may be wrong about that).
>
> Depending on what exactly you're needing, I might be able to think of a
> way to do this with Sendmail. - This may be one of the exceedingly
> rare times that Sendmail's splitting MTA and MSA roles may actually be
> beneficial (other than for the security reasons).
[...]
> Am I regurgitating this properly?
>
> 1) You want incoming SMTP connections to go out via your custom mailer
> script.
>
> 2) You want messages originated locally and piped into $commandTBD to
> go out via SMTP.
Yes -- the two are completely unrelated and unconnected.
> Would I be correct in assuming that the path and / or name of the
> sendmail like script that interfaces with the Exchange server could
> change if necessary? I.e. you could name it
> /usr/local/bin/sendmail_to_exchange_gateway if you needed to.
Yes. It's not actually located at /usr/bin/sendmail, and doesn't need
to be.
> Question: What name are your scripts currently calling to interface
> with msmtp? - Can that name change if necessary?
Yes they can be changed. Most of the things that invoke msmtp invoke
it as /usr/bin/msmtp. A few invoke it as /usr/bin/sendmail.
> I'm trying to juggle the various pieces as I understand them to see if
> everything can work together.
Don't waste any time on it -- I think the current SMTP server combined
with stunnel is going to work.
> Note: I'm not trying to push Sendmail. - I know I'm strange in my
> predilection for it. - I'm simply trying to solve the problem (as I
> understand it) with the tools that I know.
>
>> Well I have several msmtp "accounts" set up and run multiple mutt
>> configurations that use those different accounts for outbound mail.
>
> The different accounts outbound may complicate things. Are those
> accounts configured as part of msmtp? Or are they configured in the
> things using msmtp?
Both. msmtp has a config file that defines the accounts, and things
that invoke msmtp directly (e.g. mutt) use a command-line option to
specify an account. There is a default account that's used if the
command line option isn't present (which would be the case for apps
that invoke msmtp as '/usr/bin/sendmail'). Now that I think about it,
I think a configuration that chooses outbound routes for locally
generated email based on from address could work. Several of those
accounts/routes actually go to the same SMTP server but authenticate
with different username/password combinations.
In mutt's case, I also believe I could switch from msmtp to mutt's
"new" built-in SMTP client code.
Another option would be to set up a container in which to run the
"relay" MTA (sendmail/exim/postfix) that's doing SMTP -->
sendmail-like-script. This is probably the cleanest way to do it.
But, that's all moot if the stunnel solution works.
--
Grant
next prev parent reply other threads:[~2018-01-20 0:56 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 18:03 [gentoo-user] Simple SMTP to cmd-line MTA relay? Grant Edwards
2018-01-19 18:19 ` Ralph Seichter
2018-01-19 18:31 ` [gentoo-user] " Grant Edwards
2018-01-19 18:51 ` Grant Taylor
2018-01-19 18:59 ` Grant Edwards
2018-01-19 19:10 ` Grant Taylor
2018-01-19 18:28 ` [gentoo-user] " Grant Taylor
2018-01-19 18:38 ` [gentoo-user] " Grant Edwards
2018-01-19 18:57 ` Grant Taylor
2018-01-19 19:48 ` Grant Edwards
2018-01-19 20:14 ` Grant Taylor
2018-01-19 20:29 ` Grant Edwards
2018-01-19 20:36 ` Grant Taylor
2018-01-19 18:46 ` Ian Zimmerman
2018-01-19 18:49 ` Grant Edwards
2018-01-19 19:43 ` Ian Zimmerman
2018-01-19 19:48 ` Alan McKinnon
2018-01-19 20:01 ` Grant Edwards
2018-01-19 20:05 ` Alan McKinnon
2018-01-19 20:04 ` Grant Taylor
2018-01-19 20:16 ` Grant Edwards
2018-01-19 19:54 ` Grant Edwards
2018-01-19 19:56 ` Alan McKinnon
2018-01-19 20:03 ` Grant Edwards
2018-01-19 20:06 ` Alan McKinnon
2018-01-19 20:19 ` Grant Edwards
2018-01-19 22:24 ` Ian Zimmerman
2018-01-19 22:31 ` Grant Taylor
2018-01-19 23:04 ` Grant Edwards
2018-01-19 23:21 ` Grant Taylor
2018-01-19 23:58 ` Grant Edwards
2018-01-20 0:30 ` Grant Taylor
2018-01-20 0:39 ` Grant Taylor
2018-01-20 0:53 ` Grant Edwards [this message]
2018-01-20 0:44 ` Ian Zimmerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='p3u3tu$dcg$1@blaine.gmane.org' \
--to=grant.b.edwards@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox