[opensuse] simplest way to send mail from cron
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN. My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA. Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?* * At the moment I make it write all the output from the jobs to files in a directory under /var/log but: (a) that means I have to actively go to the Pi to check them rather than have them delivered to my desktop, and (b) it only keeps the last output from each job, which is normally OK but could cause grief. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
I would install postfix and set "hostname=your.pi.name" "relayhost=your.opensuse.box". -- Per Jessen, Zürich (26.4°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, 12 Jun 2020 14:46:52 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
I would install postfix and set
"hostname=your.pi.name" "relayhost=your.opensuse.box".
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page. Do I just need to set those lines in some file (which file?) and do nothing else, except perhaps have to do some systemd trickery to start the service? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
On Fri, 12 Jun 2020 14:46:52 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
I would install postfix and set
"hostname=your.pi.name" "relayhost=your.opensuse.box".
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page.
Ignore the man page for now :-) the openSUSE default config is sufficient for sending mails.
Do I just need to set those lines in some file (which file?)
Sorry, yes - in /etc/postfix/main.cf There is already lines with relayhost= and hostname=, just edit those.
and do nothing else, except perhaps have to do some systemd trickery to start the service?
Yup: systemctl enable --now postfix -- Per Jessen, Zürich (28.4°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, 12 Jun 2020 16:37:30 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
On Fri, 12 Jun 2020 14:46:52 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
I would install postfix and set
"hostname=your.pi.name" "relayhost=your.opensuse.box".
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page.
Ignore the man page for now :-) the openSUSE default config is sufficient for sending mails.
Do I just need to set those lines in some file (which file?)
Sorry, yes - in /etc/postfix/main.cf
There is already lines with relayhost= and hostname=, just edit those.
and do nothing else, except perhaps have to do some systemd trickery to start the service?
Yup: systemctl enable --now postfix
Hmm, this is on a Pi remember, so the opensuse defaults don't apply. When I installed postfix (4 MB now!) it asked whether I wanted to preconfigure, so I said no. Now main.cf is fairly short: # See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname smtpd_banner = $myhostname ESMTP $mail_name (Raspbian) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = no # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on # fresh installs. compatibility_level = 2 So I could just add the two lines you indicated but is that sufficient? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
Hmm, this is on a Pi remember, so the opensuse defaults don't apply.
Ah, yes I _did_ assume you were openSUSE - it works fine, I just recently installed TW on a 2nd Pi. So you're running Raspbian ?
So I could just add the two lines you indicated but is that sufficient?
It's worth a try - you can't do much wrong. Btw, it is 'myhostname', not 'hostname'. Maybe also add 'inet_interfaces = localhost' -- Per Jessen, Zürich (25.7°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Per Jessen wrote:
Dave Howorth wrote:
Hmm, this is on a Pi remember, so the opensuse defaults don't apply.
Ah, yes I _did_ assume you were openSUSE - it works fine, I just recently installed TW on a 2nd Pi.
So you're running Raspbian ?
So I could just add the two lines you indicated but is that sufficient?
It's worth a try - you can't do much wrong.
That may sound a little facetious, but you can always start over with a clean main.cf. Or copy one from an openSUSE system.
Btw, it is 'myhostname', not 'hostname'.
Maybe also add 'inet_interfaces = localhost'
At this point, once you have started postfix, it is easy to test with mailx. -- Per Jessen, Zürich (26.2°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/06/2020 10:32, Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message,
That statement I'm in full agreement with! There should be a light-weight alternative in order to simply send a message in this manner. heck, days gone by when you'd 'telnet' or 'netcat' to the email port or similar Perl/Python/Ruby in your web application. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
On 12/06/2020 10:32, Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message,
That statement I'm in full agreement with! There should be a light-weight alternative in order to simply send a message in this manner.
postfix is really quite light weight - most apps simply depend on being able to drop a message into the queue with sendmail. -- Per Jessen, Zürich (28.2°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/06/2020 11:02, Anton Aylward wrote:
On 12/06/2020 10:32, Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message,
That statement I'm in full agreement with! There should be a light-weight alternative in order to simply send a message in this manner.
heck, days gone by when you'd 'telnet' or 'netcat' to the email port or similar Perl/Python/Ruby in your web application.
oh WAIT! Here on my shelf I have the O'Reilly "Exploring Expect" by Don Libes. That's great for automating something sort of interactive like working directly on the SMTP port. And yes its there, and yes there are examples. OK not a cut-and-paste for solution to this, you'll need a bit of your won working. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello, On Fri, 12 Jun 2020, Dave Howorth wrote:
On Fri, 12 Jun 2020 14:46:52 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN. [..] Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page.
Checkout these for sending without the need of a daemon: https://software.opensuse.org/package/mailutils e.g.: 'mailutils send [options] host file' and it can read stdin. https://software.opensuse.org/package/email that needs to be configured (via environment variables (at least SMTP_SERVER, SMTP_AUTH, SMTP_AUTH_USER, SMTP_AUTH_PASS, USE_TLS) or https://software.opensuse.org/package/ssmtp for a minimal daemon. HTH, -dnh --
This needs quotes: use lib "/path/to/perl/modules"; Single or double quotes? Yes. -- Tad McClellan in comp.lang.perl.misc
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page. Do I just need to set those lines in some file (which file?) and do nothing else, except perhaps have to do some systemd trickery to start the service?
On some older netboot machines I use a program called 'nail' for that. There's no package for it in OS, and I forgot where I found it. Guess it was a Slackware package (that is what runs on there). It's extremely convenient for this kind of things.... Ooops! Googling for it, it seems this is now 'Heirloom mailx', http://heirloom.sourceforge.net/mailx.html, which is what you actually get with the 'mailx' package in OS :P -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/06/2020 19.53, Peter Suetterlin wrote:
Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page. Do I just need to set those lines in some file (which file?) and do nothing else, except perhaps have to do some systemd trickery to start the service?
On some older netboot machines I use a program called 'nail' for that. There's no package for it in OS, and I forgot where I found it. Guess it was a Slackware package (that is what runs on there). It's extremely convenient for this kind of things....
Ooops! Googling for it, it seems this is now 'Heirloom mailx', http://heirloom.sourceforge.net/mailx.html, which is what you actually get with the 'mailx' package in OS :P
Yes, I remember "mail" being changed to "nail" at some time or as an alternative, then being replaced with "mailx". -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
On Fri, 12 Jun 2020 20:01:27 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 19.53, Peter Suetterlin wrote:
Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page. Do I just need to set those lines in some file (which file?) and do nothing else, except perhaps have to do some systemd trickery to start the service?
On some older netboot machines I use a program called 'nail' for that. There's no package for it in OS, and I forgot where I found it. Guess it was a Slackware package (that is what runs on there). It's extremely convenient for this kind of things....
Ooops! Googling for it, it seems this is now 'Heirloom mailx', http://heirloom.sourceforge.net/mailx.html, which is what you actually get with the 'mailx' package in OS :P
Yes, I remember "mail" being changed to "nail" at some time or as an alternative, then being replaced with "mailx".
But mail(x) sends mail via postfix, at least on opensuse. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
On Fri, 12 Jun 2020 20:01:27 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 19.53, Peter Suetterlin wrote:
Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page. Do I just need to set those lines in some file (which file?) and do nothing else, except perhaps have to do some systemd trickery to start the service?
On some older netboot machines I use a program called 'nail' for that. There's no package for it in OS, and I forgot where I found it. Guess it was a Slackware package (that is what runs on there). It's extremely convenient for this kind of things....
Ooops! Googling for it, it seems this is now 'Heirloom mailx', http://heirloom.sourceforge.net/mailx.html, which is what you actually get with the 'mailx' package in OS :P
Yes, I remember "mail" being changed to "nail" at some time or as an alternative, then being replaced with "mailx".
But mail(x) sends mail via postfix, at least on opensuse.
<nitpick> mailx sends mail via sendmail, the standard Unix mail interface. Postfix comes with a sendmail wrapper that just drops the mail into the queue. </nitpick> Whether you have postfix, sendmail or exim or qmail, mailx will never know or care. -- Per Jessen, Zürich (19.7°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, 12 Jun 2020 21:12:42 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
On Fri, 12 Jun 2020 20:01:27 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 19.53, Peter Suetterlin wrote:
Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page. Do I just need to set those lines in some file (which file?) and do nothing else, except perhaps have to do some systemd trickery to start the service?
On some older netboot machines I use a program called 'nail' for that. There's no package for it in OS, and I forgot where I found it. Guess it was a Slackware package (that is what runs on there). It's extremely convenient for this kind of things....
Ooops! Googling for it, it seems this is now 'Heirloom mailx', http://heirloom.sourceforge.net/mailx.html, which is what you actually get with the 'mailx' package in OS :P
Yes, I remember "mail" being changed to "nail" at some time or as an alternative, then being replaced with "mailx".
But mail(x) sends mail via postfix, at least on opensuse.
<nitpick> mailx sends mail via sendmail, the standard Unix mail interface. Postfix comes with a sendmail wrapper that just drops the mail into the queue. </nitpick>
Well, OK, I should have said 'opensuse by default' :) I just looked at the logs. I haven't configured anything except my MUA.
Whether you have postfix, sendmail or exim or qmail, mailx will never know or care.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/06/2020 21.08, Dave Howorth wrote:
On Fri, 12 Jun 2020 20:01:27 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 19.53, Peter Suetterlin wrote:
Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page. Do I just need to set those lines in some file (which file?) and do nothing else, except perhaps have to do some systemd trickery to start the service?
On some older netboot machines I use a program called 'nail' for that. There's no package for it in OS, and I forgot where I found it. Guess it was a Slackware package (that is what runs on there). It's extremely convenient for this kind of things....
Ooops! Googling for it, it seems this is now 'Heirloom mailx', http://heirloom.sourceforge.net/mailx.html, which is what you actually get with the 'mailx' package in OS :P
Yes, I remember "mail" being changed to "nail" at some time or as an alternative, then being replaced with "mailx".
But mail(x) sends mail via postfix, at least on opensuse.
By default, yes, it does. The easiest method and most efficient. But it can be told to contact external mail providers, both for sending and fetching. I pasted the relevant section of the man page. The traditional "mail" simply called the "/usr/sbin/sendmail" program directly. But mailx talks smtp and can talk to to other machines via network instead. Assuming that Raspbian has mailx and not the original mail. I don't know. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
No :-)
But mail(x) sends mail via postfix, at least on opensuse.
mailx needs a mail server, but it does not: a) need a specific server implementation b) it need not be local I've used mailx in the past for precisely the OP's intent, a lightweight way to send an email without a local mail server installed. You can use -S to set the smtp=(YOUR MAIL SERVER) smtp Normally, mailx invokes sendmail(8) directly to transfer mes- sages. If the smtp variable is set, a SMTP connection to the server specified by the value of this variable is used instead. If the SMTP server does not use the standard port, a value of server:port can be given, with port as a name or as a number. There are two possible methods to get SSL/TLS encrypted SMTP sessions: First, the STARTTLS command can be used to encrypt a session after it has been initiated, but before any user- related data has been sent; see smtp-use-starttls above. Sec- ond, some servers accept sessions that are encrypted from their beginning on. This mode is configured by assigning smtps://server[:port] to the smtp variable. The SMTP transfer is executed in a child process; unless either the sendwait or the verbose variable is set, this process runs asynchronously. If it receives a TERM signal, it will abort and save the message to the `dead.letter' file.
Yes, I remember "mail" being changed to "nail" at some time or as an alternative, then being replaced with "mailx".
-- __________________________________________________________________________ Josef Fortier (he/him/his) Systems Administrator fortier@augsburg.edu Phone: 612-330-1479 __________________________________________________________________________ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 15 Jun 2020 14:25:52 -0500 Josef Fortier <fortier@augsburg.edu> wrote:
No :-)
Sorry, I don't understand the meaning of the comment above. And BTW, please don't send me a separate copy of any mail.
But mail(x) sends mail via postfix, at least on opensuse.
mailx needs a mail server, but it does not: a) need a specific server implementation b) it need not be local
It depends on the version of mailx. The GNU version behaves as you say but is very large, so is not a lightweight solution. the BSD version doesn't have that option. My problem is solved using a direct connection via /dev/tcp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
It depends on the version of mailx. The GNU version behaves as you say but is very large, so is not a lightweight solution. the BSD version doesn't have that option.
Get the TW version of mailx. As I mentioned in the other thread, it's 0.5MB installed size (at least for x86 - don't know for ARM). And does work without installed MTA.
My problem is solved using a direct connection via /dev/tcp
There's almost always more than one working solution ;^> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 15/06/2020 23.37, Peter Suetterlin wrote:
Dave Howorth wrote:
It depends on the version of mailx. The GNU version behaves as you say but is very large, so is not a lightweight solution. the BSD version doesn't have that option.
Get the TW version of mailx. As I mentioned in the other thread, it's 0.5MB installed size (at least for x86 - don't know for ARM). And does work without installed MTA.
My problem is solved using a direct connection via /dev/tcp
There's almost always more than one working solution ;^>
A problem with both methods is that if the server can not accept the mail that minute the attempt is done, the mail will be lost. Like when the server is rebooting, or updating itself, or anything. A proper smtp daemon will try and try till it gets the job done (for 5 days), and not holding the calling process stuck. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
Carlos E. R. wrote:
On 15/06/2020 23.37, Peter Suetterlin wrote:
Dave Howorth wrote:
It depends on the version of mailx. The GNU version behaves as you say but is very large, so is not a lightweight solution. the BSD version doesn't have that option.
Get the TW version of mailx. As I mentioned in the other thread, it's 0.5MB installed size (at least for x86 - don't know for ARM). And does work without installed MTA.
My problem is solved using a direct connection via /dev/tcp
There's almost always more than one working solution ;^>
A problem with both methods is that if the server can not accept the mail that minute the attempt is done, the mail will be lost. Like when the server is rebooting, or updating itself, or anything.
A proper smtp daemon will try and try till it gets the job done (for 5 days)
That is a very good point!! I have a Raspi running 24h, and it has problems with the wifi dropping occasionally. I've put some monitoring on it to try to debug the problem. Just today I saw a mail attempted, but failed due to lack of DNS. (the wifi was just coming up). -- Per Jessen, Zürich (18.7°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 16 Jun 2020 21:08:56 +0200 Per Jessen <per@computer.org> wrote:
Carlos E. R. wrote:
A proper smtp daemon will try and try till it gets the job done (for 5 days)
That is a very good point!! I have a Raspi running 24h, and it has problems with the wifi dropping occasionally. I've put some monitoring on it to try to debug the problem. Just today I saw a mail attempted, but failed due to lack of DNS. (the wifi was just coming up).
Check the number of retries and if excessive: $ sudo iwconfig wlan0 retry short 14 PS It's not a problem for my situation, since the log files will still exist. As long as the problem is still there, it will retry sending a mail every time it runs (every 5, 10, 15 or 60 mins depending on the sensor). It's not likely my suse machine will be down for long since it's also my TV server. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
On Tue, 16 Jun 2020 21:08:56 +0200 Per Jessen <per@computer.org> wrote:
Carlos E. R. wrote:
A proper smtp daemon will try and try till it gets the job done (for 5 days)
That is a very good point!! I have a Raspi running 24h, and it has problems with the wifi dropping occasionally. I've put some monitoring on it to try to debug the problem. Just today I saw a mail attempted, but failed due to lack of DNS. (the wifi was just coming up).
Check the number of retries and if excessive:
$ sudo iwconfig wlan0 retry short 14
Thanks, I have not seen that incantation mentioned. People are suggesting to turn off power management, which I have just done tonight.
PS It's not a problem for my situation, since the log files will still exist. As long as the problem is still there, it will retry sending a mail every time it runs (every 5, 10, 15 or 60 mins depending on the sensor). It's not likely my suse machine will be down for long since it's also my TV server.
Server or client? I have a 2nd Raspi that I tried getting to run as my MythTV client, but despite many positive reports on the 'net, it was still too slow. -- Per Jessen, Zürich (17.2°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 16 Jun 2020 21:27:27 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
On Tue, 16 Jun 2020 21:08:56 +0200 Per Jessen <per@computer.org> wrote:
Carlos E. R. wrote:
A proper smtp daemon will try and try till it gets the job done (for 5 days)
That is a very good point!! I have a Raspi running 24h, and it has problems with the wifi dropping occasionally. I've put some monitoring on it to try to debug the problem. Just today I saw a mail attempted, but failed due to lack of DNS. (the wifi was just coming up).
Check the number of retries and if excessive:
$ sudo iwconfig wlan0 retry short 14
Thanks, I have not seen that incantation mentioned. People are suggesting to turn off power management, which I have just done tonight.
I had a pi 3B+ that was forever dropping out, and that change fixed it. Though checking now I see it's set at the default of 7 and I haven't noticed any problems. It's new hardware though - I blew the old one up with some careless wiring - and it's got an updated copy of buster so there could be any number of differences.
PS It's not a problem for my situation, since the log files will still exist. As long as the problem is still there, it will retry sending a mail every time it runs (every 5, 10, 15 or 60 mins depending on the sensor). It's not likely my suse machine will be down for long since it's also my TV server.
Server or client? I have a 2nd Raspi that I tried getting to run as my MythTV client, but despite many positive reports on the 'net, it was still too slow.
Server - the box with the tuners and disk with TVH. The client is an Amazon Fire TV with Kodi. Connection via NFS and TVH's own link. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/12/2020 12:53 PM, Peter Suetterlin wrote:
Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page. Do I just need to set those lines in some file (which file?) and do nothing else, except perhaps have to do some systemd trickery to start the service?
On some older netboot machines I use a program called 'nail' for that. There's no package for it in OS, and I forgot where I found it. Guess it was a Slackware package (that is what runs on there). It's extremely convenient for this kind of things....
Ooops! Googling for it, it seems this is now 'Heirloom mailx', http://heirloom.sourceforge.net/mailx.html, which is what you actually get with the 'mailx' package in OS :P
All, mailx, nail, s-nail, heirloom-mailx, etc... are various forks of the original Berkeley mail program. (though there are significant differences in the options they support) The one in current development is s-nail, https://www.sdaoden.eu/code.html -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 13/06/2020 09.12, David C. Rankin wrote:
On 06/12/2020 12:53 PM, Peter Suetterlin wrote:
Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, plus I'm somewhat intimidated by the postfix man page. Do I just need to set those lines in some file (which file?) and do nothing else, except perhaps have to do some systemd trickery to start the service?
On some older netboot machines I use a program called 'nail' for that. There's no package for it in OS, and I forgot where I found it. Guess it was a Slackware package (that is what runs on there). It's extremely convenient for this kind of things....
Ooops! Googling for it, it seems this is now 'Heirloom mailx', http://heirloom.sourceforge.net/mailx.html, which is what you actually get with the 'mailx' package in OS :P
All, mailx, nail, s-nail, heirloom-mailx, etc... are various forks of the original Berkeley mail program. (though there are significant differences in the options they support)
mailx adds a lot of options and thus a lot of code.
The one in current development is s-nail, https://www.sdaoden.eu/code.html
-- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
On 06/13/2020 05:45 AM, Carlos E. R. wrote:
All, mailx, nail, s-nail, heirloom-mailx, etc... are various forks of the original Berkeley mail program. (though there are significant differences in the options they support)
mailx adds a lot of options and thus a lot of code.
s-nail is mailx... (in other words it is the most recent mailx in development) Few lesser known config options: https://wiki.archlinux.org/index.php/S-nail Attachment handling is one of my most frequent uses. I use it to send images from PC to mailserver (50 feet away) which I access via imap from all devices allowing a quick way to transfer images to my phone. (cables - Bah Humbug...) -- David C. Rankin, J.D.,P.E.
On 12/06/2020 10:32, Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, p
Yes, you're right. It is a canon to swap a flea. <old fart mode> Those of us who grew up on a <insert name of ancient machine> with single digit kilobytes of core and millisecond cpu cycle times think about resources and programming quite differently from the young <pejorative> programmers of today with multi-core, multi-tread cpus, triple digit gigabytes of high speed semiconductor RAM, terabytes ssds ... </old fart mode> -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
On 12/06/2020 10:32, Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, p
Yes, you're right. It is a canon to swap a flea.
<old fart mode> Those of us who grew up on a <insert name of ancient machine> with single digit kilobytes of core and millisecond cpu cycle times think about resources and programming quite differently from the young <pejorative> programmers of today with multi-core, multi-tread cpus, triple digit gigabytes of high speed semiconductor RAM, terabytes ssds ... </old fart mode>
Wietse, the postfix author, is not exactly a spring chicken. -- Per Jessen, Zürich (20.1°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 13/06/2020 18.23, Per Jessen wrote:
Anton Aylward wrote:
On 12/06/2020 10:32, Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, p
Yes, you're right. It is a canon to swap a flea.
Who cares! Cannons are as cheap as fly swatters these days. :-P
<old fart mode> Those of us who grew up on a <insert name of ancient machine> with single digit kilobytes of core and millisecond cpu cycle times think about resources and programming quite differently from the young <pejorative> programmers of today with multi-core, multi-tread cpus, triple digit gigabytes of high speed semiconductor RAM, terabytes ssds ... </old fart mode>
Wietse, the postfix author, is not exactly a spring chicken.
And it shows. Postfix is smaller than mailx, who would have thought of that. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
On 14/06/2020 07:31, Carlos E. R. wrote:
On 13/06/2020 18.23, Per Jessen wrote:
Anton Aylward wrote:
On 12/06/2020 10:32, Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, p
Yes, you're right. It is a canon to swap a flea.
Who cares! Cannons are as cheap as fly swatters these days. :-P
Yes, but we see a contrapuntal (counterpoint-based) compositional technique. which is another way of looking at a canon, one that displays elegance and subtly rather than overloaded brute force. https://www.youtube.com/watch?v=NlprozGcs80 Oh, wait! How many "N"s are required here? Is this l-l-l-like the difference between a breed of Alpaca and a Buddhist monk for someone who doesn't speak Welsh? -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 18/06/2020 17.49, Anton Aylward wrote:
On 14/06/2020 07:31, Carlos E. R. wrote:
On 13/06/2020 18.23, Per Jessen wrote:
Anton Aylward wrote:
On 12/06/2020 10:32, Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, p
Yes, you're right. It is a canon to swap a flea.
Who cares! Cannons are as cheap as fly swatters these days. :-P
Yes, but we see a contrapuntal (counterpoint-based) compositional technique. which is another way of looking at a canon, one that displays elegance and subtly rather than overloaded brute force. https://www.youtube.com/watch?v=NlprozGcs80
Best explanation of the canon I know: <https://www.youtube.com/watch?v=10Y6SBoImkk> In Spanish with cc in English. But he talks very fast, which I was told is an Spanish trait.
Oh, wait! How many "N"s are required here? Is this l-l-l-like the difference between a breed of Alpaca and a Buddhist monk for someone who doesn't speak Welsh?
That part I don't get, sorry. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
Carlos E. R. wrote:
On 18/06/2020 17.49, Anton Aylward wrote:
On 14/06/2020 07:31, Carlos E. R. wrote:
On 13/06/2020 18.23, Per Jessen wrote:
Anton Aylward wrote:
On 12/06/2020 10:32, Dave Howorth wrote:
Thanks, Per. I was hoping to avoid 3.7 MB of stuff just to send a mail message, p
Yes, you're right. It is a canon to swap a flea.
Who cares! Cannons are as cheap as fly swatters these days. :-P
Yes, but we see a contrapuntal (counterpoint-based) compositional technique. which is another way of looking at a canon, one that displays elegance and subtly rather than overloaded brute force. https://www.youtube.com/watch?v=NlprozGcs80
Best explanation of the canon I know: <https://www.youtube.com/watch?v=10Y6SBoImkk> In Spanish with cc in English. But he talks very fast, which I was told is an Spanish trait.
All way off-topic, see follow-up there. -- Per Jessen, Zürich (13.2°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 6/18/2020 2:53 PM, Carlos E. R. wrote:
Oh, wait! How many "N"s are required here? Is this l-l-l-like the difference between a breed of Alpaca and a Buddhist monk for someone who doesn't speak Welsh?
That part I don't get, sorry.
I'm aware of three ways to interpret this discussion: Canon: a musical technique using the same theme over and over with variations in the harmonies around it (Pachelbel's Canon in D) Canon: a recognized collection of authentic works by an author or composer (Shakespeare's or Mozart's works or the Bible) Cannon: a large firearm used in battle, such as the cannons used on old warships (USS Constitution, HMS Victory) John Perry -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 18/06/2020 14:53, Carlos E. R. wrote:
On 18/06/2020 17.49, Anton Aylward wrote:
Oh, wait! How many "N"s are required here? Is this l-l-l-like the difference between a breed of Alpaca and a Buddhist monk for someone who doesn't speak Welsh?
That part I don't get, sorry.
It's a English spelling mnemonic. By a guy from America. https://en.wikipedia.org/wiki/Ogden_Nash "The one-L lama, he's a priest. The two-L llama, he's a beast. And I will bet a silk pajama: there isn't any three-L lllama!". Many welsh words start with "ll" and it is pronounced as a throaty 't-thhh' I have no idea how you'd pronounce a trippple-l :-) -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton, et al -- ...and then Anton Aylward said... % ... % % "The one-L lama, he's a priest. The two-L llama, he's a beast. And I will bet a % silk pajama: there isn't any three-L lllama!". [snip] Nah ... A three-alama is a huge fire ;-) :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/06/2020 14.37, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
It is possible to send mail by using mailx only, but you need having another machine in the network that has a listening postfix, so that you configure mailx to use it instead: man mail: smtp Normally, mailx invokes sendmail(8) directly to transfer messages. If the smtp variable is set, a SMTP connection to the server specified by the value of this variable is used instead. If the SMTP server does not use the standard port, a value of server:port can be given, with port as a name or as a number. There are two possible methods to get SSL/TLS encrypted SMTP sessions: First, the STARTTLS com- mand can be used to encrypt a session after it has been initiated, but before any user-related data has been sent; see smtp-use-starttls above. Sec- ond, some servers accept sessions that are encrypted from their beginning on. This mode is configured by assigning smtps://server[:port] to the smtp variable. The SMTP transfer is executed in a child process; unless either the sendwait or the verbose variable is set, this process runs asynchronously. If it receives a TERM signal, it will abort and save the message to the `dead.letter' file. However, I'm afraid you can't then tell cron to use mailx in the "MAILTO=" line.
* At the moment I make it write all the output from the jobs to files in a directory under /var/log but: (a) that means I have to actively go to the Pi to check them rather than have them delivered to my desktop, and (b) it only keeps the last output from each job, which is normally OK but could cause grief.
You could select the name based in datetime instead of a fixed name :-? -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
On Fri, 12 Jun 2020 18:45:21 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 14.37, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
It is possible to send mail by using mailx only, but you need having another machine in the network that has a listening postfix, so that you configure mailx to use it instead:
man mail:
smtp Normally, mailx invokes sendmail(8) directly to transfer messages. If the smtp variable is set, a SMTP connection to the server specified by the value of this variable is used instead. If the SMTP server does not use the standard port, a value of server:port can be given, with port as a name or as a number.
There are two possible methods to get SSL/TLS encrypted SMTP sessions: First, the STARTTLS com- mand can be used to encrypt a session after it has been initiated, but before any user-related data has been sent; see smtp-use-starttls above. Sec- ond, some servers accept sessions that are encrypted from their beginning on. This mode is configured by assigning smtps://server[:port] to the smtp variable.
The SMTP transfer is executed in a child process; unless either the sendwait or the verbose variable is set, this process runs asynchronously. If it receives a TERM signal, it will abort and save the message to the `dead.letter' file.
Ah, thanks, I'll look into that.
However, I'm afraid you can't then tell cron to use mailx in the "MAILTO=" line.
Doesn't matter. I can add mailx or whatever command to the cron jobs
* At the moment I make it write all the output from the jobs to files in a directory under /var/log but: (a) that means I have to actively go to the Pi to check them rather than have them delivered to my desktop, and (b) it only keeps the last output from each job, which is normally OK but could cause grief.
You could select the name based in datetime instead of a fixed name :-?
Yeah, but that still leaves the files on the pi. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, 12 Jun 2020 18:45:21 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 14.37, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
It is possible to send mail by using mailx only, but you need having another machine in the network that has a listening postfix, so that you configure mailx to use it instead:
Aargh! mailx is in mailutils, which is 17.7 MB :) The following additional packages will be installed: guile-2.0-libs libfribidi0 libgc1c2 libgsasl7 libkyotocabinet16v5 libmailutils5 libntlm0 mailutils-common No way is that going on my Pi! Hmm, there's also bsd-mailx, which is 230 kB. That sounds a lot more reasonable; does it supply the same functionality? Anybody know? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, 12 Jun 2020 18:45:21 +0200
"Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 14.37, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
It is possible to send mail by using mailx only, but you need having another machine in the network that has a listening postfix, so that
you configure mailx to use it instead: Aargh! mailx is in mailutils, which is 17.7 MB :)
The following additional packages will be installed: guile-2.0-libs libfribidi0 libgc1c2 libgsasl7 libkyotocabinet16v5 libmailutils5 libntlm0 mailutils-common
No way is that going on my Pi!
Hmm, there's also bsd-mailx, which is 230 kB. That sounds a lot more reasonable; does it supply the same functionality? Anybody know? How large is your SD card? Looks like not big enough if a couple of MB (!) is already bothering you. These days we're ( even on Pi's ) talking about GBs
Op vrijdag 12 juni 2020 22:01:00 CEST schreef Dave Howorth: like we were talking about MBs twenty years ago. How much free space does it have? -- Gertjan Lettink a.k.a. Knurpht openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, 12 Jun 2020 22:07:26 +0200 Knurpht-openSUSE <knurpht@opensuse.org> wrote:
Op vrijdag 12 juni 2020 22:01:00 CEST schreef Dave Howorth:
On Fri, 12 Jun 2020 18:45:21 +0200
"Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 14.37, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
It is possible to send mail by using mailx only, but you need having another machine in the network that has a listening postfix, so that
you configure mailx to use it instead: Aargh! mailx is in mailutils, which is 17.7 MB :)
The following additional packages will be installed: guile-2.0-libs libfribidi0 libgc1c2 libgsasl7 libkyotocabinet16v5 libmailutils5 libntlm0 mailutils-common
No way is that going on my Pi!
Hmm, there's also bsd-mailx, which is 230 kB. That sounds a lot more reasonable; does it supply the same functionality? Anybody know? How large is your SD card? Looks like not big enough if a couple of MB (!) is already bothering you. These days we're ( even on Pi's ) talking about GBs like we were talking about MBs twenty years ago. How much free space does it have?
No disrespect, but that's not the point. Things should take a reasonable amount of resources, and that doesn't seem to be true of most things gnome/gnu. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/06/2020 23.26, Dave Howorth wrote:
On Fri, 12 Jun 2020 22:07:26 +0200 Knurpht-openSUSE <knurpht@opensuse.org> wrote:
Op vrijdag 12 juni 2020 22:01:00 CEST schreef Dave Howorth:
On Fri, 12 Jun 2020 18:45:21 +0200
"Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 14.37, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
It is possible to send mail by using mailx only, but you need having another machine in the network that has a listening postfix, so that
you configure mailx to use it instead: Aargh! mailx is in mailutils, which is 17.7 MB :)
The following additional packages will be installed: guile-2.0-libs libfribidi0 libgc1c2 libgsasl7 libkyotocabinet16v5 libmailutils5 libntlm0 mailutils-common
No way is that going on my Pi!
Hmm, there's also bsd-mailx, which is 230 kB. That sounds a lot more reasonable; does it supply the same functionality? Anybody know? How large is your SD card? Looks like not big enough if a couple of MB (!) is already bothering you. These days we're ( even on Pi's ) talking about GBs like we were talking about MBs twenty years ago. How much free space does it have?
No disrespect, but that's not the point.
Things should take a reasonable amount of resources, and that doesn't seem to be true of most things gnome/gnu.
Well, this mailx has many more features than the old plain mail had. I'm not that much surprised, only that it is bigger than postfix, that I thought more complex. However, postfix is running full time, while mailx only runs for a second. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
Carlos E. R. wrote:
Well, this mailx has many more features than the old plain mail had. I'm not that much surprised, only that it is bigger than postfix, that I thought more complex. However, postfix is running full time, while mailx only runs for a second.
Oh, it isn't larger. It's just packaged with a lot other stuff. On TW, it's a separate package of 0.5MB installed size :D -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 14/06/2020 19.11, Peter Suetterlin wrote:
Carlos E. R. wrote:
Well, this mailx has many more features than the old plain mail had. I'm not that much surprised, only that it is bigger than postfix, that I thought more complex. However, postfix is running full time, while mailx only runs for a second.
Oh, it isn't larger. It's just packaged with a lot other stuff. On TW, it's a separate package of 0.5MB installed size :D
:-D -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
On Sun, 14 Jun 2020 18:11:24 +0100 Peter Suetterlin <pit@astro.su.se> wrote:
Carlos E. R. wrote:
Well, this mailx has many more features than the old plain mail had. I'm not that much surprised, only that it is bigger than postfix, that I thought more complex. However, postfix is running full time, while mailx only runs for a second.
Oh, it isn't larger. It's just packaged with a lot other stuff. On TW, it's a separate package of 0.5MB installed size :D
Sure, it's the required packages associated with it that cause the bloat. Are you saying there are no required packages on TW? If so, maybe I'll have a go at the Raspbian packagers. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 14/06/2020 23.52, Dave Howorth wrote:
On Sun, 14 Jun 2020 18:11:24 +0100 Peter Suetterlin <pit@astro.su.se> wrote:
Carlos E. R. wrote:
Well, this mailx has many more features than the old plain mail had. I'm not that much surprised, only that it is bigger than postfix, that I thought more complex. However, postfix is running full time, while mailx only runs for a second.
Oh, it isn't larger. It's just packaged with a lot other stuff. On TW, it's a separate package of 0.5MB installed size :D
Sure, it's the required packages associated with it that cause the bloat. Are you saying there are no required packages on TW? If so, maybe I'll have a go at the Raspbian packagers.
Probably, that you can install it normally and then delete the other stuff. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
Dave Howorth wrote:
On Sun, 14 Jun 2020 18:11:24 +0100 Peter Suetterlin <pit@astro.su.se> wrote:
Carlos E. R. wrote:
Well, this mailx has many more features than the old plain mail had. I'm not that much surprised, only that it is bigger than postfix, that I thought more complex. However, postfix is running full time, while mailx only runs for a second.
Oh, it isn't larger. It's just packaged with a lot other stuff. On TW, it's a separate package of 0.5MB installed size :D
Sure, it's the required packages associated with it that cause the bloat. Are you saying there are no required packages on TW? If so, maybe I'll have a go at the Raspbian packagers.
No, nothing really required: woodstock:~% rpm -q --requires mailx /bin/sh /bin/sh config(mailx) = 12.5-29.8 libc.so.6()(64bit) libc.so.6(GLIBC_2.11)(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) libc.so.6(GLIBC_2.7)(64bit) libcrypto.so.1.1()(64bit) libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) libgssapi_krb5.so.2()(64bit) libgssapi_krb5.so.2(gssapi_krb5_2_MIT)(64bit) libssl.so.1.1()(64bit) libssl.so.1.1(OPENSSL_1_1_0)(64bit) rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsXz) <= 5.2-1 update-alternatives update-alternatives And while by default it will send mail via postfix (or whatever the default MTA is), you can easily override this to do direct SMTP by itself: echo Bla | env smtp=<host> mailx -r <from> -s Test <to> Or set up a dedicated mailrc. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op vrijdag 12 juni 2020 23:26:25 CEST schreef Dave Howorth:
How large is your SD card? Looks like not big enough if a couple of MB (!) is already bothering you. These days we're ( even on Pi's ) talking about GBs like we were talking about MBs twenty years ago. How much free space does it have?
No disrespect, but that's not the point.
It is a point if you bring the MBs up point not to use $whatever. Where $whatever means a solution to your question.
Things should take a reasonable amount of resources, and that doesn't seem to be true of most things gnome/gnu.
What does that statement have to do with your question everyone is trying to help you with? If you have a better solution, use that. No need to ask here then. -- Gertjan Lettink a.k.a. Knurpht openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
On Fri, 12 Jun 2020 18:45:21 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 14.37, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
It is possible to send mail by using mailx only, but you need having another machine in the network that has a listening postfix, so that you configure mailx to use it instead:
Aargh! mailx is in mailutils, which is 17.7 MB :)
I thought you said you already had mailx ? it doesn't matter, you don't need it. As for space, surely you're running of a 16Gb SD card or some such ? -- Per Jessen, Zürich (19.1°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, 12 Jun 2020 22:10:01 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
On Fri, 12 Jun 2020 18:45:21 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 14.37, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
It is possible to send mail by using mailx only, but you need having another machine in the network that has a listening postfix, so that you configure mailx to use it instead:
Aargh! mailx is in mailutils, which is 17.7 MB :)
I thought you said you already had mailx ? it doesn't matter, you don't need it.
I said my opensuse box has mailx, WRT the pi I said "The Pi by default has no mail software installed".
As for space, surely you're running of a 16Gb SD card or some such ?
See my previous reply. That's not the point, IMHO. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
On Fri, 12 Jun 2020 22:10:01 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
On Fri, 12 Jun 2020 18:45:21 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 14.37, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
It is possible to send mail by using mailx only, but you need having another machine in the network that has a listening postfix, so that you configure mailx to use it instead:
Aargh! mailx is in mailutils, which is 17.7 MB :)
I thought you said you already had mailx ? it doesn't matter, you don't need it.
I said my opensuse box has mailx, WRT the pi I said "The Pi by default has no mail software installed".
Ah yes, my mistake, sorry.
As for space, surely you're running of a 16Gb SD card or some such ?
See my previous reply. That's not the point, IMHO.
Okay, I thought you were actually worried about space which made little sense to me. I still think the answer to $SUBJ is to set up the standard Unix mail interface, with postfix. It's easy, it's quick, it's standard, once it's running, you can forget about it. -- Per Jessen, Zürich (18.9°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/06/2020 22.01, Dave Howorth wrote:
On Fri, 12 Jun 2020 18:45:21 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 12/06/2020 14.37, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
It is possible to send mail by using mailx only, but you need having another machine in the network that has a listening postfix, so that you configure mailx to use it instead:
Aargh! mailx is in mailutils, which is 17.7 MB :)
Wow. Even bigger that postfix. That nails it, doesn't it? You are better off by installing postfix. :-D
The following additional packages will be installed: guile-2.0-libs libfribidi0 libgc1c2 libgsasl7 libkyotocabinet16v5 libmailutils5 libntlm0 mailutils-common
No way is that going on my Pi!
Hmm, there's also bsd-mailx, which is 230 kB. That sounds a lot more reasonable; does it supply the same functionality? Anybody know?
No idea. I guess not. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
Hello, On Fri, 12 Jun 2020, Carlos E. R. wrote:
On 12/06/2020 22.01, Dave Howorth wrote:
Aargh! mailx is in mailutils, which is 17.7 MB :)
Wow. Even bigger that postfix. That nails it, doesn't it? You are better off by installing postfix. :-D
"email": 292 KiB including docs. HTH, -dnh -- Documentation: Cryptic, lacking, erroneous. Pick any three. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, 12 Jun 2020 23:42:29 +0200 David Haller <dnh@opensuse.org> wrote:
Hello,
On Fri, 12 Jun 2020, Carlos E. R. wrote:
On 12/06/2020 22.01, Dave Howorth wrote:
Aargh! mailx is in mailutils, which is 17.7 MB :)
Wow. Even bigger that postfix. That nails it, doesn't it? You are better off by installing postfix. :-D
"email": 292 KiB including docs.
I looked at the link you gave, but obviously that's opensuse and I need it (/whatever) for Raspberry Pi OS (nee Raspbian). Do you have a link to the original source or whatever? (email is a difficult term to search for)
HTH, -dnh
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 13/06/2020 00.07, Dave Howorth wrote:
On Fri, 12 Jun 2020 23:42:29 +0200 David Haller <dnh@opensuse.org> wrote:
Hello,
On Fri, 12 Jun 2020, Carlos E. R. wrote:
On 12/06/2020 22.01, Dave Howorth wrote:
Aargh! mailx is in mailutils, which is 17.7 MB :)
Wow. Even bigger that postfix. That nails it, doesn't it? You are better off by installing postfix. :-D
"email": 292 KiB including docs.
Does it talk smptp?
I looked at the link you gave, but obviously that's opensuse and I need it (/whatever) for Raspberry Pi OS (nee Raspbian). Do you have a link to the original source or whatever? (email is a difficult term to search for)
Download the opensuse rpm and look inside at the information section for the url to the sources. Or download the opensuse source rpm. I would try the minimal smptp daemon called ssmtp, which David pointed at on another post. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
Le 12/06/2020 à 22:01, Dave Howorth a écrit :
No way is that going on my Pi!
giving it's a PI, I guerss it's on a local network. So may be any "talk" application could do the job. looks "apropos message", you get many answers like "message" or "xmessage" that may be lighters than any mail one (not verified) jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/06/2020 16:01, Dave Howorth wrote:
Aargh! mailx is in mailutils, which is 17.7 MB :)
Aargh! back to the canon to swat a fly situation again! -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/06/2020 12:45, Carlos E. R. wrote:
However, I'm afraid you can't then tell cron to use mailx in the "MAILTO=" line.
That can be taken care of outside of CRON. CRON will invoke some mailer and you simply link that to mailx. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
On 12/06/2020 12:45, Carlos E. R. wrote:
However, I'm afraid you can't then tell cron to use mailx in the "MAILTO=" line.
That can be taken care of outside of CRON. CRON will invoke some mailer and you simply link that to mailx.
cron uses /usr/sbin/sendmail. I don't think your suggestion will work very well. -- Per Jessen, Zürich (22.4°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 15/06/2020 11.56, Anton Aylward wrote:
On 12/06/2020 12:45, Carlos E. R. wrote:
However, I'm afraid you can't then tell cron to use mailx in the "MAILTO=" line.
That can be taken care of outside of CRON. CRON will invoke some mailer and you simply link that to mailx.
I understand cron invokes /usr/sbin/sendmail directly. CRON(8) System Administration CRON(8) ... -m This option allows you to specify a shell command to use for sending Cron mail output instead of using sendmail(8) This command must accept a fully formatted mail message (with headers) on standard input and send it as a mail message to the recipi- ents specified in the mail headers. Specifying the string off (i.e., crond -m off) will disable the sending of mail. maybe someone has concocted a script named /usr/sbin/sendmail which will call mailx instead. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
Carlos E. R. wrote:
On 15/06/2020 11.56, Anton Aylward wrote:
On 12/06/2020 12:45, Carlos E. R. wrote:
However, I'm afraid you can't then tell cron to use mailx in the "MAILTO=" line.
That can be taken care of outside of CRON. CRON will invoke some mailer and you simply link that to mailx.
I understand cron invokes /usr/sbin/sendmail directly.
CRON(8) System Administration CRON(8)
...
-m This option allows you to specify a shell command to use for sending Cron mail output instead of using sendmail(8)
Way too much ado about nothing - just install postfix, the problem would have been solved three days back :-) -- Per Jessen, Zürich (22.1°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 15/06/2020 12.11, Per Jessen wrote:
Carlos E. R. wrote:
On 15/06/2020 11.56, Anton Aylward wrote:
On 12/06/2020 12:45, Carlos E. R. wrote:
However, I'm afraid you can't then tell cron to use mailx in the "MAILTO=" line.
That can be taken care of outside of CRON. CRON will invoke some mailer and you simply link that to mailx.
I understand cron invokes /usr/sbin/sendmail directly.
CRON(8) System Administration CRON(8)
...
-m This option allows you to specify a shell command to use for sending Cron mail output instead of using sendmail(8)
Way too much ado about nothing - just install postfix, the problem would have been solved three days back :-)
Yes, absolutely :-) Although, worth a look to see if raspian has ssmtp available. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
On 15/06/2020 06:11, Per Jessen wrote:
Way too much ado about nothing - just install postfix, the problem would have been solved three days back :-)
Back to 'canon to swap a flea' situation. Postfix is an ISP-grade mail hub-grade router and manager, more than a simple dispatcher or SMTP access tool. As a earlier posting pointed out, mailx can be told to access SMTP directly. no need for the postfix/sendmail grade monolith. How big is the 'mailx' package? It depends on the packager. And what else is dragged in In X86/64 its not a big package, but I don't know the rpm-fu to see what the dependencies are. Can anyone help in that regard? -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
On 15/06/2020 06:11, Per Jessen wrote:
Way too much ado about nothing - just install postfix, the problem would have been solved three days back :-)
Back to 'canon to swap a flea' situation.
Disagree. postfix is the default MTA on any openSUSE installation. Without it, many apps are simply unable to send mails - mdadmd, smartd, crond, snmpd, apcupsd. They all rely on the standard Unix mail interface.
As a earlier posting pointed out, mailx can be told to access SMTP directly. no need for the postfix/sendmail grade monolith.
It's a kludge and unnecessary. Why not just rely on the standard Unix mail interface. Anyway, we're going offtopic, no more from me on this topic. -- Per Jessen, Zürich (23.2°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 15 Jun 2020 08:04:35 -0400 Anton Aylward <opensuse@antonaylward.com> wrote:
On 15/06/2020 06:11, Per Jessen wrote:
Way too much ado about nothing - just install postfix, the problem would have been solved three days back :-)
Back to 'canon to swap a flea' situation.
Postfix is an ISP-grade mail hub-grade router and manager, more than a simple dispatcher or SMTP access tool.
As a earlier posting pointed out, mailx can be told to access SMTP directly. no need for the postfix/sendmail grade monolith.
How big is the 'mailx' package? It depends on the packager. And what else is dragged in In X86/64 its not a big package, but I don't know the rpm-fu to see what the dependencies are. Can anyone help in that regard?
FWIW. On Raspbian: $ sudo apt install mailx Reading package lists... Done Building dependency tree Reading state information... Done Package mailx is a virtual package provided by: mailutils 1:3.1.1-1 bsd-mailx 8.1.2-0.20160123cvs-4 You should explicitly select one to install. E: Package 'mailx' has no installation candidate $ sudo apt install mailutils Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: exim4-base exim4-config exim4-daemon-light guile-2.0-libs libfribidi0 libgc1c2 libgsasl7 libkyotocabinet16v5 liblzo2-2 libmailutils5 libntlm0 mailutils-common Suggested packages: eximon4 exim4-doc-html | exim4-doc-info spf-tools-perl swaks mailutils-mh mailutils-doc The following NEW packages will be installed: exim4-base exim4-config exim4-daemon-light guile-2.0-libs libfribidi0 libgc1c2 libgsasl7 libkyotocabinet16v5 liblzo2-2 libmailutils5 libntlm0 mailutils mailutils-common 0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded. Need to get 6,846 kB of archives. After this operation, 21.5 MB of additional disk space will be used. Do you want to continue? [Y/n] n Abort. $ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 15/06/2020 à 16:25, Dave Howorth a écrit :
Package mailx is a virtual package provided by: (...) bsd-mailx 8.1.2-0.20160123cvs-4
and this one? jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 15 Jun 2020 16:58:43 +0200 "jdd@dodin.org" <jdd@dodin.org> wrote:
Le 15/06/2020 à 16:25, Dave Howorth a écrit :
Package mailx is a virtual package provided by: (...) bsd-mailx 8.1.2-0.20160123cvs-4
and this one?
Doesn't provide the required functionality AFAIK. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Saturday 13 June 2020, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
* At the moment I make it write all the output from the jobs to files in a directory under /var/log but: (a) that means I have to actively go to the Pi to check them rather than have them delivered to my desktop, and (b) it only keeps the last output from each job, which is normally OK but could cause grief.
Is python or perl already installed? With python you could write a script such as: import smtplib server = smtplib.SMTP('mysmtpserver.myco.com', 25) #optionally login #server.login("emailusername", "password") server.sendmail("sender@sender.com", "receiver@receiver.com", "hello world") It's probably quite similar for perl (google would track down the equivalent). You could also just ssh to the opensuse box using authorised keys and create an email. Michael -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, 13 Jun 2020 09:54:07 +1200 Michael Hamilton <michael@actrix.gen.nz> wrote:
On Saturday 13 June 2020, Dave Howorth wrote:
I run some cron jobs on a Raspberry Pi and would like to see output emailed by cron on my [separate] opensuse box. The Pi by default has no mail software installed, so I'd like to find the smallest/simplest way of enabling its cron to forward mail to my opensuse host on the LAN.
My opensuse box has the usual postfix, mailx etc stuff, which I confess to not knowing much about, and claws-mail that I use as my MUA.
Do I need to install (and configure :( ) postfix on my Pi or is there some other way to send mail that is less complicated. Or some other way to get cron to send its output?*
* At the moment I make it write all the output from the jobs to files in a directory under /var/log but: (a) that means I have to actively go to the Pi to check them rather than have them delivered to my desktop, and (b) it only keeps the last output from each job, which is normally OK but could cause grief.
Is python or perl already installed? With python you could write a script such as:
import smtplib server = smtplib.SMTP('mysmtpserver.myco.com', 25) #optionally login #server.login("emailusername", "password") server.sendmail("sender@sender.com", "receiver@receiver.com", "hello world")
It's probably quite similar for perl (google would track down the equivalent).
Yes, both perl and python are there.
You could also just ssh to the opensuse box using authorised keys and create an email.
Now that's an interesting idea. I have fond memories of rsh :)
Michael
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave, et al -- ...and then Dave Howorth said... % % I run some cron jobs on a Raspberry Pi and would like to see output % emailed by cron on my [separate] opensuse box. The Pi by default has no % mail software installed, so I'd like to find the smallest/simplest way % of enabling its cron to forward mail to my opensuse host on the LAN. [snip] Are you in love with email for this? Personally I find it to be a lousy filing system, and I'd much rather put the log files in the proper target directory and manage them with rotation or any other standard process. What about ssh keys to either scp the files across (my favorite if you have a known limited set of files), tar them through an ssh pipeline if there are bunches each time, or just rsync the local & remote directories? I know you have ssh installed, and it's simpler than postfix or mailx ;-) HTH & HANW :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this: Adjust for your needs and put in a script and call from cron cat > /dev/tcp/yourserver.tld/25 <<EOF HELO MAIL FROM: dave@howorth.org.uk RCPT TO: dave@howorth.org.uk DATA Hello world . EOF -- /bengan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 13/06/2020 05:11, Bengt Gördén wrote:
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF
Yer what? I recall proposing /dev/inet/{tcp,udp}/domainname/port protocl for a virtual device back when I was beta testing BSD4.1C on a VAX in 1982/3 But when BSD4.2 came out it wasn't there. I recall reading about Bell's Plan 9 ... Now tell me, is this implemented on the Pi? 'Cos it aint on my 5.7 kernel -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
On 13/06/2020 05:11, Bengt Gördén wrote:
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF
Yer what?
I recall proposing /dev/inet/{tcp,udp}/domainname/port protocl for a virtual device back when I was beta testing BSD4.1C on a VAX in 1982/3 But when BSD4.2 came out it wasn't there.
I recall reading about Bell's Plan 9 ...
Now tell me, is this implemented on the Pi? 'Cos it aint on my 5.7 kernel
It not a kernel topic, it's in bash. It's been around at least since openSUSE 10.3. (just happens to be the oldest system I have running). -- Per Jessen, Zürich (19.6°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Bengt Gördén wrote:
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF
Very clever, I didn't know about that /dev/tcp. -- Per Jessen, Zürich (24.2°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, 13 Jun 2020 15:41:05 +0200 Per Jessen <per@computer.org> wrote:
Bengt Gördén wrote:
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF
Very clever, I didn't know about that /dev/tcp.
# ls /dev/tcp ls: cannot access '/dev/tcp': No such file or directory -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
On Sat, 13 Jun 2020 15:41:05 +0200 Per Jessen <per@computer.org> wrote:
Bengt Gördén wrote:
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF
Very clever, I didn't know about that /dev/tcp.
# ls /dev/tcp ls: cannot access '/dev/tcp': No such file or directory
Yes, /dev/tcp is a bash built-in, only works with piping/redirdction. -- Per Jessen, Zürich (20.1°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 13/06/2020 12:24, Per Jessen wrote:
Yes, /dev/tcp is a bash built-in, only works with piping/redirdction.
Oh. man BASH says Bash handles several filenames specially when they are used in redirections, as described in the following table. If the operating system on which bash is running provides these special files, bash will use them; otherwise it will emulate them internally with the behavior described below. /dev/fd/fd If fd is a valid integer, file descriptor fd is duplicated. /dev/stdin File descriptor 0 is duplicated. /dev/stdout File descriptor 1 is duplicated. /dev/stderr File descriptor 2 is duplicated. /dev/tcp/host/port If host is a valid hostname or Internet address, and port is an integer port number or service name, bash attempts to open the corresponding TCP socket. /dev/udp/host/port If host is a valid hostname or Internet address, and port is an integer port number or service name, bash attempts to open the corresponding UDP socket. Let's see. # ls -l /dev/stdin /dev/stdout /dev/stderr lrwxrwxrwx 1 root root 15 Jun 16 08:25 /dev/stderr -> /proc/self/fd/2 lrwxrwxrwx 1 root root 15 Jun 16 08:25 /dev/stdin -> /proc/self/fd/0 lrwxrwxrwx 1 root root 15 Jun 16 08:25 /dev/stdout -> /proc/self/fd/1 that's what I'd expect :-) # ls -l /dev/fd/ total 0 lrwx------ 1 root root 64 Jun 16 20:51 0 -> /dev/pts/3 lrwx------ 1 root root 64 Jun 16 20:51 1 -> /dev/pts/3 lrwx------ 1 root root 64 Jun 16 20:51 2 -> /dev/pts/3 lr-x------ 1 root root 64 Jun 16 20:51 3 -> /proc/12354/fd Well, yes, default of std{in,out,err} is the terminal # ls -l /dev/tcp /dev/udp # ls -l /dev/tcp /dev/udp ls: cannot access '/dev/tcp': No such file or directory ls: cannot access '/dev/udp': No such file or directory Ah. Redirection in the shell you say. Pitty. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 16 Jun 2020 21:02:38 -0400 Anton Aylward <opensuse@antonaylward.com> wrote:
On 13/06/2020 12:24, Per Jessen wrote:
Yes, /dev/tcp is a bash built-in, only works with piping/redirdction.
Oh. man BASH says [snip] /dev/tcp/host/port If host is a valid hostname or Internet address, and port is an integer port number or service name, bash attempts to open the corresponding TCP socket. /dev/udp/host/port If host is a valid hostname or Internet address, and port is an integer port number or service name, bash attempts to open the corresponding UDP socket.
Let's see. [snip] # ls -l /dev/tcp /dev/udp # ls -l /dev/tcp /dev/udp ls: cannot access '/dev/tcp': No such file or directory ls: cannot access '/dev/udp': No such file or directory
Ah. Redirection in the shell you say.
Pitty.
Works very nicely in reality :) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, 13 Jun 2020 11:11:25 +0200 Bengt Gördén <bengan@bag.org> wrote:
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF HELO MAIL FROM: dave@howorth.org.uk RCPT TO: dave@howorth.org.uk DATA Hello world . EOF
I thought I'd give this idea a try. When I run it (suitably adapted) on the pi, it says: -bash: connect: Connection refused -bash: /dev/tcp/acer-suse.fritz.box/25: Connection refused I guess I need to start some kind of minimal server and/or open a port or something on my opensuse box to receive inter-system mail from the LAN, but I have no idea how to do that (whatever 'that' is) and the YaST Mail Server setup doesn't seem to cover my case, at least not in a way that it's intelligble to me. :( Can anybody steer me in the right direction? TI, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
On Sat, 13 Jun 2020 11:11:25 +0200 Bengt Gördén <bengan@bag.org> wrote:
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF HELO MAIL FROM: dave@howorth.org.uk RCPT TO: dave@howorth.org.uk DATA Hello world . EOF
I thought I'd give this idea a try. When I run it (suitably adapted) on the pi, it says:
-bash: connect: Connection refused -bash: /dev/tcp/acer-suse.fritz.box/25: Connection refused
I guess I need to start some kind of minimal server and/or open a port or something on my opensuse box to receive inter-system mail from the LAN, but I have no idea how to do that (whatever 'that' is) and the YaST Mail Server setup doesn't seem to cover my case, at least not in a way that it's intelligble to me. :(
If you have postfix running on 'acer-suse.fritz.box', you probably just need to amend "inet_interfaces" to say "all". Maybe also open the firewall. You may still run into issues if names don't resolve etc. If you are using /etc/hosts, I think you will likely need to add this to your postfix::main.cf : smtp_host_lookup = native (which tells postfix to use nsswitch.conf). -- Per Jessen, Zürich (16.2°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sun, 14 Jun 2020 19:47:55 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
On Sat, 13 Jun 2020 11:11:25 +0200 Bengt Gördén <bengan@bag.org> wrote:
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF HELO MAIL FROM: dave@howorth.org.uk RCPT TO: dave@howorth.org.uk DATA Hello world . EOF
I thought I'd give this idea a try. When I run it (suitably adapted) on the pi, it says:
-bash: connect: Connection refused -bash: /dev/tcp/acer-suse.fritz.box/25: Connection refused
I guess I need to start some kind of minimal server and/or open a port or something on my opensuse box to receive inter-system mail from the LAN, but I have no idea how to do that (whatever 'that' is) and the YaST Mail Server setup doesn't seem to cover my case, at least not in a way that it's intelligble to me. :(
If you have postfix running on 'acer-suse.fritz.box',
Yes, that's correct.
you probably just need to amend "inet_interfaces" to say "all".
Sorry, amend it where?
Maybe also open the firewall.
I'm not running a firewall.
You may still run into issues if names don't resolve etc. If you are using /etc/hosts,
I haven't encountered any name resolution problems yet. How would I know?
I think you will likely need to add this to your postfix::main.cf :
smtp_host_lookup = native
(which tells postfix to use nsswitch.conf).
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sun, 14 Jun 2020 22:37:02 +0100 Dave Howorth <dave@howorth.org.uk> wrote:
On Sun, 14 Jun 2020 19:47:55 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
On Sat, 13 Jun 2020 11:11:25 +0200 Bengt Gördén <bengan@bag.org> wrote:
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF HELO MAIL FROM: dave@howorth.org.uk RCPT TO: dave@howorth.org.uk DATA Hello world . EOF
I thought I'd give this idea a try. When I run it (suitably adapted) on the pi, it says:
-bash: connect: Connection refused -bash: /dev/tcp/acer-suse.fritz.box/25: Connection refused
I guess I need to start some kind of minimal server and/or open a port or something on my opensuse box to receive inter-system mail from the LAN, but I have no idea how to do that (whatever 'that' is) and the YaST Mail Server setup doesn't seem to cover my case, at least not in a way that it's intelligble to me. :(
If you have postfix running on 'acer-suse.fritz.box',
Yes, that's correct.
you probably just need to amend "inet_interfaces" to say "all".
Sorry, amend it where?
OK, having RTFM I see that inet_interfaces is a parameter in master.cf and its default value is 'all', which may account for it not being present in the file but doesn't then account for my problem?
Maybe also open the firewall.
I'm not running a firewall.
You may still run into issues if names don't resolve etc. If you are using /etc/hosts,
I haven't encountered any name resolution problems yet. How would I know?
I think you will likely need to add this to your postfix::main.cf :
smtp_host_lookup = native
(which tells postfix to use nsswitch.conf).
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 15/06/2020 00.10, Dave Howorth wrote:
On Sun, 14 Jun 2020 22:37:02 +0100 Dave Howorth <dave@howorth.org.uk> wrote:
On Sun, 14 Jun 2020 19:47:55 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
On Sat, 13 Jun 2020 11:11:25 +0200 Bengt Gördén <bengan@bag.org> wrote:
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF HELO MAIL FROM: dave@howorth.org.uk RCPT TO: dave@howorth.org.uk DATA Hello world . EOF
I thought I'd give this idea a try. When I run it (suitably adapted) on the pi, it says:
-bash: connect: Connection refused -bash: /dev/tcp/acer-suse.fritz.box/25: Connection refused
I guess I need to start some kind of minimal server and/or open a port or something on my opensuse box to receive inter-system mail from the LAN, but I have no idea how to do that (whatever 'that' is) and the YaST Mail Server setup doesn't seem to cover my case, at least not in a way that it's intelligble to me. :(
If you have postfix running on 'acer-suse.fritz.box',
Yes, that's correct.
you probably just need to amend "inet_interfaces" to say "all".
Sorry, amend it where?
OK, having RTFM I see that inet_interfaces is a parameter in master.cf and its default value is 'all', which may account for it not being present in the file but doesn't then account for my problem?
Plain text no authorization, in the "external" interface, probably. Check the mail log on the server. And must be in the same LAN, firewall on the outside. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
On Mon, 15 Jun 2020 00:13:45 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 15/06/2020 00.10, Dave Howorth wrote:
On Sun, 14 Jun 2020 22:37:02 +0100 Dave Howorth <dave@howorth.org.uk> wrote:
On Sun, 14 Jun 2020 19:47:55 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
On Sat, 13 Jun 2020 11:11:25 +0200 Bengt Gördén <bengan@bag.org> wrote:
> simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF HELO MAIL FROM: dave@howorth.org.uk RCPT TO: dave@howorth.org.uk DATA Hello world . EOF
I thought I'd give this idea a try. When I run it (suitably adapted) on the pi, it says:
-bash: connect: Connection refused -bash: /dev/tcp/acer-suse.fritz.box/25: Connection refused
I guess I need to start some kind of minimal server and/or open a port or something on my opensuse box to receive inter-system mail from the LAN, but I have no idea how to do that (whatever 'that' is) and the YaST Mail Server setup doesn't seem to cover my case, at least not in a way that it's intelligble to me. :(
If you have postfix running on 'acer-suse.fritz.box',
Yes, that's correct.
you probably just need to amend "inet_interfaces" to say "all".
Sorry, amend it where?
OK, having RTFM I see that inet_interfaces is a parameter in master.cf and its default value is 'all', which may account for it not being present in the file but doesn't then account for my problem?
Plain text no authorization, in the "external" interface, probably. Check the mail log on the server. And must be in the same LAN, firewall on the outside.
Thanks for the reply. After my last message, I discovered that the setting should be in main.cf rather than master.cf so I did that and restarted postfix. After that I can see in /var/log/mail that it is getting a connection from the other host, but there's no mail for the user: Can't get the log to format (it's too late :) - I've attached a copy that's hopefully OK. BTW is there any way to tell postfix to only accept mail from other machines on my LAN? (or even specific machines on my LAN?)
Dave Howorth wrote:
Thanks for the reply. After my last message, I discovered that the setting should be in main.cf rather than master.cf so I did that and restarted postfix. After that I can see in /var/log/mail that it is getting a connection from the other host, but there's no mail for the user:
Can't get the log to format (it's too late :) - I've attached a copy that's hopefully OK.
2020-06-14T23:26:15.486595+01:00 acer-suse postfix/smtpd[1627]: connect from emonpi.fritz.box[192.168.1.24] 2020-06-14T23:26:15.486949+01:00 acer-suse postfix/smtpd[1627]: improper command pipelining after HELO from emonpi.fritz.box[192.168.1.24]: MAIL FROM: emonpi@emonpi.fritz.box\nRCPT TO: emoncms@acer-suse.fritz.box\nDATA\nDoes this work?\n.\n This is postfix choking on your data from the Raspi. Normally the SMTP setup is an exchange of commands and replies, not just a stream of commands. Maybe try with "EHLO raspi" instead of just "HELO". I think that might enable the pipelining. (yes, EHLO, not HELO). 2020-06-14T23:26:15.526135+01:00 acer-suse postfix/smtpd[1627]: disconnect from emonpi.fritz.box[192.168.1.24] helo=0/1 mail=1 rcpt=1 data=1 commands=3/4 Okay, looks like you still got a message delivered. 2020-06-14T23:26:15.570440+01:00 acer-suse postfix/smtp[1618]: 77DE576D9: to=<emoncms@acer-suse.fritz.box>, relay=none, delay=0.04, delays=0.04/0/0/0, dsn=5.4.6, status=bounced (mail for acer-suse.fritz.box loops back to myself) Question - do you have an already working postfix setup on this machine? The above suggests 'not quite'. The machine should at least be prepared to receive mails for acer-suse.fritz.box. (or @fritz.box). 2020-06-14T23:26:15.581894+01:00 acer-suse postfix/bounce[1630]: 77DE576D9: sender non-delivery notification: 8B53176DB 2020-06-14T23:26:15.625961+01:00 acer-suse postfix/smtp[1619]: 8B53176DB: to=<emonpi@emonpi.fritz.box>, relay=emonpi.fritz.box[192.168.1.24]:25, delay=0.06, delays=0.01/0/0.01/0.04, dsn=4.7.1, status=deferred (host emonpi.fritz.box[192.168.1.24] said: 454 4.7.1 <emonpi@emonpi.fritz.box>: Relay access denied (in reply to RCPT TO command)) The above is the non-delivery message bouncing - 192.168.1.24 is your Raspi, right? something is listening on port 25 - something that speaks SMTP and sends proper error codes.
BTW is there any way to tell postfix to only accept mail from other machines on my LAN? (or even specific machines on my LAN?)
Yes, you can tell postfix to only accept mails for '@fritz.box', and not to do any relaying. You can also tell it which network is trusted (192.168.1.0/24 I presume). The default openSUSE setup already does this. If you will be using 'fritz.box' as your local domain, and send mails from e.g. 'emonpi@fritz.box' to 'emoncms@fritz.box', on your 'acer-suse' machines, I would add this to /etc/postfix/main.cf : mydestination=fritz.box -- Per Jessen, Zürich (16.8°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 15/06/2020 08.24, Per Jessen wrote:
Dave Howorth wrote:
...
2020-06-14T23:26:15.581894+01:00 acer-suse postfix/bounce[1630]: 77DE576D9: sender non-delivery notification: 8B53176DB 2020-06-14T23:26:15.625961+01:00 acer-suse postfix/smtp[1619]: 8B53176DB: to=<emonpi@emonpi.fritz.box>, relay=emonpi.fritz.box[192.168.1.24]:25, delay=0.06, delays=0.01/0/0.01/0.04, dsn=4.7.1, status=deferred (host emonpi.fritz.box[192.168.1.24] said: 454 4.7.1 <emonpi@emonpi.fritz.box>: Relay access denied (in reply to RCPT TO command))
This one is very surprising. Either Dave finally installed postfix on the Pi, or it does have some other mail server daemon. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
On Mon, 15 Jun 2020 08:24:10 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
Thanks for the reply. After my last message, I discovered that the setting should be in main.cf rather than master.cf so I did that and restarted postfix. After that I can see in /var/log/mail that it is getting a connection from the other host, but there's no mail for the user:
Can't get the log to format (it's too late :) - I've attached a copy that's hopefully OK.
2020-06-14T23:26:15.486595+01:00 acer-suse postfix/smtpd[1627]: connect from emonpi.fritz.box[192.168.1.24] 2020-06-14T23:26:15.486949+01:00 acer-suse postfix/smtpd[1627]: improper command pipelining after HELO from emonpi.fritz.box[192.168.1.24]: MAIL FROM: emonpi@emonpi.fritz.box\nRCPT TO: emoncms@acer-suse.fritz.box\nDATA\nDoes this work?\n.\n
This is postfix choking on your data from the Raspi. Normally the SMTP setup is an exchange of commands and replies, not just a stream of commands.
Maybe try with "EHLO raspi" instead of just "HELO". I think that might enable the pipelining. (yes, EHLO, not HELO).
Using EHLO instead doesn't seem to make any difference. Neither does typing the commands one at a time instead of via <<EOF. Maybe I actually need a two-way connection? In which case this simple approach doesn't seem likely to fly? Bengt?
2020-06-14T23:26:15.526135+01:00 acer-suse postfix/smtpd[1627]: disconnect from emonpi.fritz.box[192.168.1.24] helo=0/1 mail=1 rcpt=1 data=1 commands=3/4
Okay, looks like you still got a message delivered.
2020-06-14T23:26:15.570440+01:00 acer-suse postfix/smtp[1618]: 77DE576D9: to=<emoncms@acer-suse.fritz.box>, relay=none, delay=0.04, delays=0.04/0/0/0, dsn=5.4.6, status=bounced (mail for acer-suse.fritz.box loops back to myself)
Question - do you have an already working postfix setup on this machine? The above suggests 'not quite'. The machine should at least be prepared to receive mails for acer-suse.fritz.box. (or @fritz.box).
Exactly so. I installed postfix on the pi early on but haven't configured it or removed it yet. Ahah! The key is the "mail for acer-suse.fritz.box loops back to myself" bit. Google tells me I need to add acer-suse.fritz.box to mydestination in main.cf and having done that it works!
2020-06-14T23:26:15.581894+01:00 acer-suse postfix/bounce[1630]: 77DE576D9: sender non-delivery notification: 8B53176DB 2020-06-14T23:26:15.625961+01:00 acer-suse postfix/smtp[1619]: 8B53176DB: to=<emonpi@emonpi.fritz.box>, relay=emonpi.fritz.box[192.168.1.24]:25, delay=0.06, delays=0.01/0/0.01/0.04, dsn=4.7.1, status=deferred (host emonpi.fritz.box[192.168.1.24] said: 454 4.7.1 <emonpi@emonpi.fritz.box>: Relay access denied (in reply to RCPT TO command))
The above is the non-delivery message bouncing - 192.168.1.24 is your Raspi, right? something is listening on port 25 - something that speaks SMTP and sends proper error codes.
BTW is there any way to tell postfix to only accept mail from other machines on my LAN? (or even specific machines on my LAN?)
Yes, you can tell postfix to only accept mails for '@fritz.box', and not to do any relaying. You can also tell it which network is trusted (192.168.1.0/24 I presume). The default openSUSE setup already does this.
If you will be using 'fritz.box' as your local domain, and send mails from e.g. 'emonpi@fritz.box' to 'emoncms@fritz.box', on your 'acer-suse' machines, I would add this to /etc/postfix/main.cf :
mydestination=fritz.box
Hmm, just fritz.box didn't work but acer-suse.fritz.box did. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
On Mon, 15 Jun 2020 08:24:10 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
Thanks for the reply. After my last message, I discovered that the setting should be in main.cf rather than master.cf so I did that and restarted postfix. After that I can see in /var/log/mail that it is getting a connection from the other host, but there's no mail for the user:
Can't get the log to format (it's too late :) - I've attached a copy that's hopefully OK.
2020-06-14T23:26:15.486595+01:00 acer-suse postfix/smtpd[1627]: connect from emonpi.fritz.box[192.168.1.24] 2020-06-14T23:26:15.486949+01:00 acer-suse postfix/smtpd[1627]: improper command pipelining after HELO from emonpi.fritz.box[192.168.1.24]: MAIL FROM: emonpi@emonpi.fritz.box\nRCPT TO: emoncms@acer-suse.fritz.box\nDATA\nDoes this work?\n.\n
This is postfix choking on your data from the Raspi. Normally the SMTP setup is an exchange of commands and replies, not just a stream of commands.
Maybe try with "EHLO raspi" instead of just "HELO". I think that might enable the pipelining. (yes, EHLO, not HELO).
Using EHLO instead doesn't seem to make any difference. Neither does typing the commands one at a time instead of via <<EOF.
Okay, I wasn't sure it would - pipelining is an extension, and you have start with EHLO to enable SMTP extensions. If you want to see what it should look like, maybe try telnet.
Question - do you have an already working postfix setup on this machine? The above suggests 'not quite'. The machine should at least be prepared to receive mails for acer-suse.fritz.box. (or @fritz.box).
Exactly so. I installed postfix on the pi early on but haven't configured it or removed it yet.
Ahah! The key is the "mail for acer-suse.fritz.box loops back to myself" bit. Google tells me I need to add acer-suse.fritz.box to mydestination in main.cf and having done that it works!
Perfect, good stuff!
If you will be using 'fritz.box' as your local domain, and send mails from e.g. 'emonpi@fritz.box' to 'emoncms@fritz.box', on your 'acer-suse' machines, I would add this to /etc/postfix/main.cf :
mydestination=fritz.box
Hmm, just fritz.box didn't work but acer-suse.fritz.box did.
It depends on which email addresses you will be using - also including the hostname is a little unusual, but that's just my opinion. -- Per Jessen, Zürich (22.0°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 15.06.20 um 12:22 schrieb Dave Howorth:
On Mon, 15 Jun 2020 08:24:10 +0200 Per Jessen <per@computer.org> wrote:
If you will be using 'fritz.box' as your local domain, and send mails from e.g. 'emonpi@fritz.box' to 'emoncms@fritz.box', on your 'acer-suse' machines, I would add this to /etc/postfix/main.cf :
mydestination=fritz.box
Hmm, just fritz.box didn't work but acer-suse.fritz.box did.
try something like this here: (to gave you an idea how i solved hostame and domaninaim for postfix) mydestination = $myhostname, localhost.$mydomain, localhost, $myhostname.$mydomain, $myhostname.site myhostname = whateveryourhostnameis (of course 'site' and 'localhost' are no variables) simoN -- www.becherer.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dove Howorth wrote:
On Sun, 14 Jun 2020 22:37:02 +0100 Dave Howorth <dave@howorth.org.uk> wrote:
If you have postfix running on 'acer-suse.fritz.box',
Yes, that's correct.
you probably just need to amend "inet_interfaces" to say "all".
Sorry, amend it where?
/etc/postfix/main.cf
OK, having RTFM I see that inet_interfaces is a parameter in master.cf and its default value is 'all', which may account for it not being present in the file but doesn't then account for my problem?
In an openSUSE installation, the default is 'localhost' though. To check if your postfix is listening on port 25: "ss -ltn" You ought to see a line with '*:25' if you have 'inet_interfaces=all'. If you have 'inet_interfaces=localhost', there will probably be two lines: 127.0.0.1:25 ::1:25
You may still run into issues if names don't resolve etc. If you are using /etc/hosts,
I haven't encountered any name resolution problems yet. How would I know?
What are you using for name resolution, i.e. are you running a local name server or do you rely on /etc/hosts ? The default openSUSE postfix setup expects to be able to resolve names and addresses. When you want to send from your Raspi, postfix will do a look up on the IP address to see if it is a known address, for instance. It will also look at the sender and recipient addresses to check that they exist/resolve. -- Per Jessen, Zürich (16.9°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 14/06/2020 23.37, Dave Howorth wrote:
On Sun, 14 Jun 2020 19:47:55 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
On Sat, 13 Jun 2020 11:11:25 +0200 Bengt Gördén <bengan@bag.org> wrote:
simplest way to send mail from cron
I'd say that the easiest way to send mail from a box without any small helper programs is this:
Adjust for your needs and put in a script and call from cron
cat > /dev/tcp/yourserver.tld/25 <<EOF HELO MAIL FROM: dave@howorth.org.uk RCPT TO: dave@howorth.org.uk DATA Hello world . EOF
I thought I'd give this idea a try. When I run it (suitably adapted) on the pi, it says:
-bash: connect: Connection refused -bash: /dev/tcp/acer-suse.fritz.box/25: Connection refused
I guess I need to start some kind of minimal server and/or open a port or something on my opensuse box to receive inter-system mail from the LAN, but I have no idea how to do that (whatever 'that' is) and the YaST Mail Server setup doesn't seem to cover my case, at least not in a way that it's intelligble to me. :(
If you have postfix running on 'acer-suse.fritz.box',
Yes, that's correct.
you probably just need to amend "inet_interfaces" to say "all".
Sorry, amend it where?
On the server postfix configuration. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
participants (15)
-
Anton Aylward
-
Bengt Gördén
-
Carlos E. R.
-
Dave Howorth
-
David C. Rankin
-
David Haller
-
David T-G
-
jdd@dodin.org
-
John Perry
-
Josef Fortier
-
Knurpht-openSUSE
-
Michael Hamilton
-
Per Jessen
-
Peter Suetterlin
-
Simon Becherer