mail trought dietpi

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
matteos1
Posts: 30
Joined: Fri May 06, 2016 11:22 am

mail trought dietpi

Post by matteos1 »

i'd like to install a system of mail like www.raspberry-projects.com/pi/software_ ... end-emails but dietpi give Always error like

Code: Select all

mail: cannot send message : Process exited with a non-zero status
i woul like implement this system because pydio require to send mail.
thank you if someone answer to my question.
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: mail trought dietpi

Post by k-plan »

Hi,

scroll down on page you have linked.
If you got the error : "mail: cannot send message: Process exited with a non-zero status", you must to activate the less secure apps on you google account:

fixed by activating a "less secure" flag inside gmail, visiting this link:

https://www.google.com/settings/security/lesssecureapps
and please read: https://support.google.com/mail/answer/78775?hl=en

Tested and works here.

Code: Select all

X-Received: by 10.194.192.8 with SMTP id hc8mr30856575wjc.87.1463411034098; Mon, 16 May 2016 08:03:54 -0700 (PDT)
Message-Id: <5739e159.821b1c0a.9bbe7.ffffdf3a@mx.google.com>
X-Google-Original-From: "root" <root@RPi-B-Plus>
X-Mailer: mail (GNU Mailutils 2.99.98)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: mail trought dietpi

Post by Fourdee »

k-plan wrote:Hi,

scroll down on page you have linked.
If you got the error : "mail: cannot send message: Process exited with a non-zero status", you must to activate the less secure apps on you google account:

fixed by activating a "less secure" flag inside gmail, visiting this link:

https://www.google.com/settings/security/lesssecureapps
and please read: https://support.google.com/mail/answer/78775?hl=en

Tested and works here.

Code: Select all

X-Received: by 10.194.192.8 with SMTP id hc8mr30856575wjc.87.1463411034098; Mon, 16 May 2016 08:03:54 -0700 (PDT)
Message-Id: <5739e159.821b1c0a.9bbe7.ffffdf3a@mx.google.com>
X-Google-Original-From: "root" <root@RPi-B-Plus>
X-Mailer: mail (GNU Mailutils 2.99.98)
Believe it or not, this was the same reason why I couldn't get the forum emails to work with smtp lol :). Resolved that using the same process ^^
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
dt99
Posts: 1
Joined: Sat Sep 07, 2019 2:58 am

Re: mail trought dietpi

Post by dt99 »

I followed the instructions here. Because I am using 2 factor authentication, the lesssecureapps setting is not available, so I used app passwords instead. But I am getting the same error message as the original poster, and have tried both port 587 and 465 to no avail.

root=postmaster
mailhub=smtp.gmail.com:587
hostname=DietPi
AuthUser=<my gmail address>
AuthPass=<my gmail app password>
FromLineOverride=YES
UseSTARTTLS=YES

Any suggestions?
Post Reply