Sunday, May 10, 2020
yunohost@conference.lightwitch.org
May
Mon Tue Wed Thu Fri Sat Sun
        1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 31
             
YunoHost support room | Don't ask to ask, just ask ! | Be patient and stay polite with everybody (this is a free software project ran by volunteers) | No answer? Post on the forum: https://forum.yunohost.org | This room is mirrored via Echo1 | Donate: https://liberapay.com/YunoHost

[11:13:28] <irc> <Guillermo[m]> Hello,
[11:13:35] <irc> <Guillermo[m]> I'm looking to disable sending emails when a scheduled task has passed successfully in crontab do you have an idea?
[11:17:25] <irc> <axel:lawebb.org> > <@yunohost:matrix.org> [irc] Guillermo[m]: I'm looking to disable sending emails when a scheduled task has passed successfully in crontab do you have an idea?

You could append "> /dev/null 2>&1" at the end of the line. But keep in mind that you wouldn't be notified anymore if your cron job has failed
[11:18:16] <irc> <Guillermo[m]> Maybe if i had echo email at the end so if it's end true it sending email and not if it don't work
[11:26:09] <irc> <axel:lawebb.org> MAILTO="foo@bar.com"
* * * * /your-script > /dev/null
[11:27:24] <irc> <axel:lawebb.org> So stdout is sent to /dev/null and stderr should be emailed
[11:31:32] <irc> <Guillermo[m]> Thanks i will try with this option
[11:31:32] <irc> <Guillermo[m]> I there a way to see sort of log of crontab ?
[11:32:35] <irc> <axel:lawebb.org> grep CRON /var/log/syslog
[11:33:36] <irc> <Guillermo[m]> thanks a lott i will experiment that :)
[12:17:17] <irc> <Guillermo[m]> yunohost backup create -n Sauvegarde_emails --system data_mail && mv -f /home/yunohost.backup/archives/Sauvegarde_e* /media/Sauvegardes/ && chown -R nextcloud:nextcloud /media/Sauvegardes && chmod -R g+s /media/Sauvegardes && echo "La sauvegarde des emails est OK." | mail -s "Script : Emails test devnull" no-reply@domaine.tld > > /dev/null 2>&1
[12:17:34] <irc> <Guillermo[m]> I still receive the email of Cronjob
[12:21:26] <irc> <axel:lawebb.org> Hm, show me your cron cmd?
[12:23:12] <irc> <Guillermo[m]> */1 * * * * yunohost backup create -n Sauvegarde_emails --system data_mail && mv -f /home/yunohost.backup/archives/Sauvegarde_e* /media/Sauvegardes/ && chown -R nextcloud:nextcloud /media/Sauvegardes && chmod -R g+s /media/Sauvegardes && echo "La sauvegarde des emails est OK." | mail -s "Script : Emails test devnull" no-reply@domaine.tld > /dev/null 2>&1
[12:23:24] <irc> <Guillermo[m]> */1 * * * * (for the begin)
[12:26:29] <irc> <Alaiks> there are some funky syntax things in cron lines to be aware of because it's ran with /bin/sh and not /bin/bash
[12:26:40] <irc> <Alaiks> namely I would suspect the & in 2>&1
[12:26:56] <irc> <Alaiks> you can try running the command by hand in a /bin/sh shell I think
[12:27:52] <irc> <Alaiks> or at this point it would be worth writing a script and just calling the script rather than fitting all of it on one line
[12:29:53] <irc> <Guillermo[m]> When i see i don't work i look internet whith what you give to me and see could be use dev/null too but seems don"t work too
[12:30:47] <irc> <Guillermo[m]> or use that
[12:30:47] <irc> <Guillermo[m]> */1 * * * * bash /usr/local/bin/mailtest
[12:31:10] <irc> <Guillermo[m]> */1 * * * * bash /usr/local/bin/scriptperso > /dev/null 2>&1
[12:32:12] <irc> <Alaiks> yes
[12:37:52] <irc> <Guillermo[m]> It work thank a lot :) And more efficient than paste all the personnal script :)
[12:58:25] <irc> <autra[m]> Guillermo: IIRC you need to use `>/dev/null 2>&1` (not the reverse).
[13:04:07] <irc> <autra[m]> sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/LatYLmkEehSbNrAPrgJUaaCW >
[13:04:28] <irc> <autra[m]> that way I receive a mail only if cmd fails
[13:04:38] <irc> <autra[m]> downside, I need to ssh to my server to see the actual error
[13:05:41] <irc> <Alaiks> autra[m]: you could use the 'mail' command to send th log in an email ;P
[13:06:12] <irc> <autra[m]> Alaiks: oh good idea!
[13:10:15] <irc> <autra[m]> (mmmhh spammed....)
[13:14:06] <irc> <autra[m]> Alaiks: when I send mail with `mail` or `sendmail`, the mail is missing DKIM headers. Is it normal?
[13:14:21] <irc> <autra[m]> (and so it goes to spam in gmail for instance)
[13:45:08] <irc> <Alaiks> ugh yes
[13:45:13] <irc> <Alaiks> well not normal but expected
[13:45:30] <irc> <Alaiks> mail are only signed if properly authenticated on smtp
[13:46:02] <irc> <Alaiks> (and naively you could say "but my script is ran as root so i'm authenticated!" but that's not understood by postfix/dovecot)
[13:50:12] <irc> <autra[m]> oh so then, I just need to send them through the smtp server?
[13:50:13] <irc> <autra[m]> I'm sure it's easy, right ? :-)
[13:50:33] <irc> <Alaiks> through the smtp server *and* authenticate on the way
[13:51:46] <irc> <autra[m]> mmhh yeah, so I need to use my credentials
[13:52:37] <irc> <Alaiks> but now that we're once again talking about this i'm again pissed to I'm gonna look into how dovecot config because if you're already connected as user foo you shouldnt have to reauth when sending email ~.~
[13:53:35] <irc> <Alaiks> and actually that's also an issue for cron jobs (like diagnosis) inside yunohost which have exactly this issue that you describe but I never realize it because not on gmail
[13:53:50] <irc> <autra[m]> is it related to https://github.com/YunoHost/issues/issues/947 ?
[13:54:02] <irc> <Alaiks> yes kind of
[13:54:10] <irc> <autra[m]> actually, for my cron mail, it doesn't really matter now, because they are sent to my domain
[13:54:41] <irc> <autra[m]> but if one want to tighten rules on receiving mails because of spam (for instance by enforcing DKIM signature), it could be useful if yunohost supports that yes
[13:54:53] <irc> <Alaiks> yup, but ultimately you want people to received diagnosis notifications (from the cron job) and people should be able to just setup a forward to their "regular" email address
[13:55:03] <irc> <autra[m]> yep
[13:55:23] <irc> <Alaiks> it's also related to https://github.com/YunoHost/yunohost/pull/815
[13:55:33] <irc> <Alaiks> but this PR still imply that you provide credentials
[13:55:49] <irc> <Alaiks> whereas you should simply be implicitly auth from the fact that you're connected as a user...
[14:12:22] <irc> <autra[m]> ok I see, like the "peer" connexion method on postgres
[14:13:21] <irc> <Alaiks> yup
[14:14:00] <irc> <Alaiks> trying to find pieces of doc about this ... but either I don't even know how to properly phrase the question, either nobody ever implemented such a mechanism
[14:18:10] <irc> <Guillermo[m]> finally i put /dev/null at the end and send mail when errorr come
[14:18:25] <irc> <Guillermo[m]> I receive that but don't really understand the isssue
[14:18:28] <irc> <Guillermo[m]> rsync: change_dir "/root//media/Serenis" failed: No such file or directory (2)
[14:18:28] <irc> <Guillermo[m]> rsync: change_dir#3 "/root//media/Limbes" failed: No such file or directory (2)
[14:18:30] <irc> <Guillermo[m]> rsync error: errors selecting input/output files, dirs (code 3) at main.c(713) [Receiver=3.1.2]
[14:19:22] <irc> <Alaiks> sounds like an issue because of the double slash ?
[14:19:39] <irc> <Alaiks> (if you confirm that /root/media/Serenis does really exists ...)
[14:30:38] <irc> <Alaiks> One day I'm gonna end up writing my own replacement for Postfix ... With blackjack and unix authentication
[14:35:48] <irc> <gredin67[m]> hello, j'envisage de m'acheter un orange Pi 4 pour me faire un media center et plus tard y combiner yunohost+kodi. Est-ce qu'il y a plus de chances qu'une autre carte ARMv8 soit supportée à horizon 1 an? Ou je suis pas trop mal dans l'esprit?
[14:36:33] <irc> <Alaiks> à mon avis n'importe quelle carte où tu peux installer armbian peut être transformée en yunohost avec le script d'install
[14:37:04] <irc> <Alaiks> (modulo buster toussa)
[14:37:13] <irc> <gredin67[m]> btw ca intéresse quelqu'un un achat groupé de Orange Pi 4 sur Strasbourg?
[14:37:45] <irc> <Alaiks> c'est quoi les killer features du 4 ?
[14:38:41] <irc> <Alaiks> oh de l'usb 3 o/
[14:38:47] <irc> <gredin67[m]> 4GBRAM ? USB3
[14:39:27] <irc> <gredin67[m]> pis ARMv8
[14:39:50] <irc> <Alaiks> ca a l'air cool mais perso j'ai pas trop l'usage, j'ai deja ce qu'il me faut avec mon RPi2
[14:41:19] <irc> <gredin67[m]> okay, moi c'est juste que kodi dur la lime 2 c'est l'enfer. Pas réussi à installer l'acceleration materielle pour la video. Et ca combiné à la brique ca galère.
[14:44:10] <irc> <gredin67[m]> * okay, moi c'est juste que kodi sur la lime 2 c'est l'enfer. Pas réussi à installer l'acceleration materielle pour la video. Et ca combiné à la brique ca galère.
[14:47:59] <irc> <Alaiks> yep ça jveux bien croire que pour du média center spaouf
[15:56:16] <irc> <oldtiteuf> Bonjour,
[16:03:23] <irc> <Allhex> :|
[17:04:26] <irc> <nebulak:matrix.org> Hi, after adding and mounting external storage for a yunohost pi installation using this link: http://im.yunohost.org/paste/9a6f0613-b4c6-4ab5-a530-e3b46482168d
[17:05:25] <irc> <nebulak:matrix.org> Any one has ever encountered this problem? User data has been migrated as told in the above link.
[17:07:35] <irc> <tituspijean:pijean.ovh> can you check to whom belongs your external storage ?
[17:08:25] <irc> <tituspijean:pijean.ovh> `ls -la /media/stockage` or whatever your mount directory is?
[17:08:34] <irc> <nebulak:matrix.org> If the scan command is used with -u www-data the following error is thrown: http://im.yunohost.org/paste/6b8b46cf-6d8f-4290-9aed-55636fdaf4d5
[17:09:25] <irc> <tituspijean:pijean.ovh> yes, because it is not to be performed by www-data. The culprit is most likely the owner of your storage.
[17:15:35] <irc> http://im.yunohost.org/paste/5fe8d8cc-199b-44c1-9a68-74af4f28acd7
[17:17:31] <irc> http://im.yunohost.org/paste/8a17237c-a382-4616-b130-fc66a546f8ba
[17:19:20] <irc> <nebulak:matrix.org> Changed permissions back to user/group nextcloud
[17:23:47] <irc> <tituspijean:pijean.ovh> Can you check that:
* your storage directory belongs to `nextcloud:nextcloud`
* your `datadirectory` in `nano /var/www/nextcloud/config/config.php` points to your new storage path
* that you have restarted nginx and php-fpm ?
[17:24:44] <irc> <tituspijean:pijean.ovh> *php7.3-fpm
[17:40:15] <irc> <taziden> Hi, autodiagnostic tells me my server doesn't have ipv6 but it has actually. Should I create an issue ?
[17:40:34] <irc> <nebulak:matrix.org> Just doing a restart...
[17:43:48] <irc> <nebulak:matrix.org> Hm, didnt help. Files can be downloaded but not uploaded...
[18:02:59] <irc> <nebulak:matrix.org> > Can you check that: http://im.yunohost.org/paste/445a4027-27ff-4eff-9d3f-ca3fb6b9ed25
[18:03:17] <irc> <nebulak:matrix.org> Thank you! 🥳