Web lists-archives.com

Re: Simple Linux to Linux(Debian) email




On Mon, 8 Apr 2019 21:33:03 +0900
Mark Fletcher <mark27q1@xxxxxxxxx> wrote:


> 
> My image of an ideal solution is a piece of software that can present 
> email to a remote MTA (ie an MTA not on the local machine) for
> delivery, but is not itself an MTA, and certainly has no capability
> to listen for incoming mail.
> 

a) Sendmail. Not the full-featured MTA, but the utility.
https://clients.javapipe.com/knowledgebase/132/How-to-Test-Sendmail-From-Command-Line-on-Linux.html

b) Write it yourself. If you can do simple scripting then you can write
something that talks basic SMTP to a remote SMTP server.

Here's basic unencrypted SMTP:
https://my.esecuredata.com/index.php?/knowledgebase/article/112/test-your-smtp-mail-server-via-telnet

There are many similar sites, some going into more detail including how
to find out the recipient's MX server if you don't know already.
https://www.port25.com/how-to-check-an-smtp-connection-with-a-manual-telnet-session-2/

Other sites explain how to use authenticated SMTP and TLS. If you later
get a fixed IP address and want to run your own mail server, you can
test it for relaying using the telnet technique. Or rely on numerous
websites...

c) Use a standard MTA and tell it not to listen to anything from
outside your network. Use your firewall to not accept SMTP on the WAN
port, and unless you have previously received email directly then the
SMTP port shouldn't be open anyway. 

Use the MTA's configuration to listen only to localhost. Restart it and
check where it's listening with netstat -tpan as root. 

That way you have two mechanisms to prevent access, even if you
misconfigure one of them you should still be OK. After you have the MTA
running and sending email where you want it to go, use ShieldsUp!! on
https://grc.com to check which ports are open to the outside. Select
'All Service Ports' to check TCP/1-1055.

-- 
Joe