I have nc 18 pi up and will use ssmtp for email. But nc does not use my email server - it always try to contact an external server directly.

How to config nc to use a local mail server.

Thanks for your help

Read an configure:


I’m not so stupid not to read docs before I ask.
I intercept the sendmail call from my local machine and there is no call form nc comming! With the settings - shown in the link nc allway gives “www-data” as the From address which is not what I want.

Some more help requiered.

What settings did you use?


I try to setup the mail function of nc with help from
but it did’t work.

I installed ssmtp instead of postfix and configure it as follows:

With this settings mail can be send successfully with mailx as user root.

The only setting in nc that seems to do something (nc says that the mail is sent) is:

sendmodus: sendmail
sendmail-modus: pipe(-t)
sendaddress: root@localhost

The user root should be substituted by ssmtp (from the configuration in revaliases) with

nc says the mail was sent but I do not receive any.

Many thanks for your help

I use the smtp-settings like this:

authentication used
server mailserver, port 587
user and password

did you read this hint in the manual?

(depreciated and no longer supported by or available in Debian Buster repo)

1 Like


I read the hint, that ssmtp is not supported in buster, but buster is not nc or am I wrong?


Can you be so kind and explain, how your answer helps to solve the problem, that nc does not call my local mailserver.


Can you not direct contact your mail server (gmx)?

is the underlaying version of your OS if you’re running the newest available ncp-imagefile from ownyourbits.

nc is just a piece of software. no OS.


as I wrote in my first message, I don’t like the user “www-data” in the from header when send the mail directly.

And yes, why is a local mailserver not supported/allowed…?


Hi Jimmy

I use the latest image which runs buster and there was no problem to install ssmtp - so it is supported in the OS.


Ok. Sorry. No Idea. Perhaps you must modify your mailserver-config.

My e-mails send from the user i insert into the nextcloud-configuration see above.
But i do not use GMX. I use a local mail provider.


with the given port number it seems that you use t-online. Is that your local mail server?

Not t-online. The port 587 because of STARTTLS.

Hi devnull

So do you use a complete own mailserver on a static ip with a valid MX record or connect a provider through a smart host?


I use an own domain. The mx-record (incoming mail) looks to a shared mailserver. To send e-mails through the mailserver (smtp starttls 587) i need username and password to authenticate. This settings i use in the nextcloud configuration for mailing.