BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] send email from script as non-root
- Subject: [Discuss] send email from script as non-root
- From: kentborg at borg.org (Kent Borg)
- Date: Sat, 23 Jan 2021 14:39:01 -0800
- In-reply-to: <4cc2af64-2953-6f4b-3a08-aae94cc0f193@thekramers.net>
- References: <4cc2af64-2953-6f4b-3a08-aae94cc0f193@thekramers.net>
, On 1/23/21 1:39 PM, David Kramer wrote: > As part of my home automation, I want a process on my server (which is > also my mail server) to send an email (actually an SMS throught he > email gateway).? The process that needs to do it is not run as root > though, it's running as a mortal user.? I've tried mail, sendmail, > curl, etc and they complain I just tried it on my notebook running the still-testing version of Debian, and it let me invoke /sbin/sendmail: > kentborg at tinpan:~$ /sbin/sendmail kentborg > test > . > > kentborg at tinpan:~$ And I got it. Locally sendmail is part of Exim. And I only sent locally, BTW. I tried it on both of my Debian/Postfix e-mail servers and they both worked, too: > entborg at mail:~$ /sbin/sendmail kentborg > test > > . > kentborg at mail:~$ Moments later, at the other end if the country, Thunderbird told me I had an new e-mail. Sent a similarly minimal e-mail to my gmail-hosted work account worked, but landed in the spam folder, presumably because it was too minimal. (No from, no subject, no nothin' but a recipient and tiny body.) So it is possible, and I guess it depends on details of how Postfix is installed; but Debian installed Postfix and Exim for me, I don't know details beyond minimal configuring of the two Postfix instances. -kb
- References:
- [Discuss] send email from script as non-root
- From: david at thekramers.net (David Kramer)
- [Discuss] send email from script as non-root
- Prev by Date: [Discuss] send email from script as non-root
- Next by Date: [Discuss] send email from script as non-root
- Previous by thread: [Discuss] send email from script as non-root
- Next by thread: [Discuss] send email from script as non-root
- Index(es):