vm icon indicating copy to clipboard operation
vm copied to clipboard

Issues with Emails from my Nextcloud instance

Open pflavio opened this issue 10 months ago • 6 comments

Steps To Reproduce

  1. Set-up Email under "basic settings" with address "[email protected]"
  2. Send test email -> no issues, received from "Nextcloud [email protected]" to "[email protected]"
  3. Send passwort reset emails to users -> no issues, received from "Nextcloud [email protected]" to "[email protected]"
  4. Every morning at 10:27 receive an email from "Mail Delivery System MAILER-DAEMON@nextcloud" to "root@nextcloud" with subject "Undelivered Mail Returned to Sender" and content
This is the mail system at host nextcloud.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<[[email protected]](mailto:[email protected])> (expanded from <root>): host
    [mail.protonmail.ch](http://mail.protonmail.ch/)[185.205.70.128] said: 504 5.5.2 <root@nextcloud>: Sender
    address rejected: need fully-qualified address (in reply to RCPT TO
    command)

plus some logs. The addresses used in these automatic emails don't have a tld, but I can't find where to set (and possibly disable) those. The Email credentials I entered personally in the admin panel work as expected.

Expected Result

Either receive no automated emails or receive them using the credentials provided.

Actual Result

Receive aan undeliverable notice every day.

Screenshots, Videos, or Pastebins

No response

Additional Context

No response

Build Version

30.0.6

Environment

By using the scripts

Environment Details

No response

pflavio avatar Feb 16 '25 13:02 pflavio

It seems that you use Protonmail. They validate the sender, if it's not a valid email adress it will be rejected. I suggest you change the FROM (sender) to something like [email protected].

enoch85 avatar Mar 21 '25 13:03 enoch85

You could also try our SMTP script which you can run by using the built in menu in the VM (CLI).

sudo bash /var/scripts/menu.sh

enoch85 avatar Mar 21 '25 13:03 enoch85

It seems that you use Protonmail. They validate the sender, if it's not a valid email adress it will be rejected. I suggest you change the FROM (sender) to something like [email protected].

Thanks but where exactly would I do that? I actually don't remember setting that email address in the first place...

pflavio avatar Mar 21 '25 22:03 pflavio

It seems that you use Protonmail. They validate the sender, if it's not a valid email adress it will be rejected. I suggest you change the FROM (sender) to something like [email protected].

Thanks but where exactly would I do that? I actually don't remember setting that email address in the first place...

It depends on how you set it up... But root@hostname indicates postfix of some sort. I'm not 100% sure what the from address is when sending with the PHP app in Nextcloud.

Again, easiest option is to run our built in script. 👍

enoch85 avatar Mar 21 '25 22:03 enoch85

So I've been trying to get this to work but I can't really, I'm still receiving emails from this account (or rather failed email attempts). Unfortunately I also haven't been able to locate your script in my instance. Could you please point me in the right directory? Thank you @enoch85

pflavio avatar Apr 08 '25 18:04 pflavio

sudo bash /var/scripts/menu.sh

Server Configuration

SMTP Mail

👍🏼

enoch85 avatar Apr 08 '25 20:04 enoch85