Ssmtp_with_nc18_pi

Hi,
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:

Hi

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.
Thanks
Rolf

What settings did you use?

Hi,

I try to setup the mail function of nc with help from
https://docs.nextcloudpi.com/de/email-settings/
but it did’t work.

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

root=XXXX@gmx.net
mailhub:465=mail.gmx.net
UseTLS=yes
rewriteDomain=gmx.net
hostname=gmx.net
FromLineOverride=No
AuthUser=XXXX@gmx.net
AuthPass=YYYY

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
root:XXXX@gmx.net:mail.gmx.net:465

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

Many thanks for your help
rolf

I use the smtp-settings like this:

SMTP, STARTTLS
user@server
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

Hi,

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

@devnull

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

rolf

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.

Hi,

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…?

Rolf

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.

Rolf

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.

Hi,

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?

Rolf

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.