You mean it doesn’t fetch mails, right? How about logging?
EDIT: Maybe OVH forbids the use of shell_exec, then we’re out of luck.
You mean it doesn’t fetch mails, right? How about logging?
EDIT: Maybe OVH forbids the use of shell_exec, then we’re out of luck.
Still no luck, but it seems that shell_exec is not the issue. here’s the log output :
[2024-10-05 12:53:02] ## OVH ## START - 2024-10-05 12:53:02.375822 executing: /usr/local/php8.1/bin/php /homez.359/lagirafe/prog/cron.php
[2024-10-05 12:53:02] sh: ./cli: No such file or directory
[2024-10-05 12:53:02]
[2024-10-05 12:53:02] ## OVH ## END - 2024-10-05 12:53:02.443612 exitcode: 0
although the cli file is in its right place in the “prog” directory …
Can you select the (correct) path there?
EDIT: Also Try to remove the ‘./’ prefix from cli: simply cli Mailmagik:fetchmail
.
I cannot change the path on the UI, it’s not a select box…
I tried (before you mention it), to remove the ./ prefix and try to execute directly
cli Mailmagik:fetchmail
but it returned me the following error :
[2024-10-05 13:53:02] ## OVH ## START - 2024-10-05 13:53:02.435236 executing: /usr/local/php8.1/bin/php /homez.359/lagirafe/prog/cron.php
[2024-10-05 13:53:02] sh: cli: command not found
[2024-10-05 13:53:02]
[2024-10-05 13:53:02] ## OVH ## END - 2024-10-05 13:53:02.512012 exitcode: 0
Gotta go for now, will get back to it tomorrow… if you have any other idea, please don’t hesitate to share !
Please try this:
<?php
chdir('/homez.359/lagirafe/prog');
./cli mailmagik:fetchmail;
hi. this gave me a 255 error code again, which means the conjob crashed. as said before, this can be due to wrong permissions or problems with paths in the php file. I read some more discussions related to this on the OVH forum, and apparently we’re supposed to use /home/ instead of /homez.359/ - Now trying this and will let you know how it goes.
I used the path found in your log message.
Hello alfred,
did you have a chance to look into the webcron url redirecting to the login page ?
(I was wondering if there was any setting I could change in the application preferences in order to grant a “public access” for this, but I didn’t find anything of the kind…)
Yes, I did, but It’s not yet ready. I could create a testing version for you if you need it now.
no need to bother with that. there’s nothing urgent for me…
I was just asking cos’ I kept on trying various things to get the cli cron to work on OVH shared hosting, but with no more luck yet…
[ EDIT ]
I finally found the proper php command to make it work (and switched to php 8.2)
#!/usr/local/bin/php
<?php
$cron_prog = '/usr/local/php8.2/bin/php '.__DIR__.'/cli mailmagik:fetchmail '; exec($cron_prog);
With the newly published version 1.6.1, the webcron functionality was fixed.
Simply invoke your URL like:
https://<your_server>/?controller=FetchmailController&plugin=Mailmagik&action=run&token=<your_webhook_token>
With URL rewriting enabled, you can use the new fetchmail route:
https://<your_server>/fetchmail?token=<your_webhook_token>
If it works, you’ll get
mailmagik:fetchmail executed
as a response.
How can I debug the fetchmail part?
.... php8.2 ./cli mailmagik:fetchmail
[Project#7] text
to my set email adress it’s working in 8 from 10 cases and I have a new Task in the project.When I do that with a forwarded email (only change the subject there so it begins with [Project#7]
it works only in 2 from 10 cases I would guess.
But ‘I’m totally blank why it doesn’t work in such cases’. Every email sent to my configured email adress is seen by the mailmagik fetchmail task because they all are marked as seen after the cronjob run.
But why (sometimes) no task is created is a mystery to me.
(I’ve already set debug to true but there is only one ConvertEmailToTask
line in there when the cronjob runs - no further debug output)
[2025-03-09 17:17:04] [debug] \Kanboard\Plugin\Mailmagik\Action\ConvertEmailToTask(column_id='37'|color_id='yellow') [mailmagik.fetchmail] => executable=true exec_success=NULL
....a few lines also with:
[2025-03-10 04:22:02] [error] Kanboard\Core\Action\ActionManager::attachEvents: Automatic Action Not Found: \Kanboard\Plugin\Mailm agik\Action\ConvertEmailToTask
...or:
[2025-03-10 03:21:02] [critical] Mailmagik: SQL Error[HY000]: SQLSTATE[HY000]: General error: 5 database is locked
This is all I can tell, with the given information. MM cannot create tasks due to this error.
Yes, but this SQLSTATE error didn’t appear when Mailmagik fetched the email.
So I tried again now to forward an email.
MM doesn’t create any log messages, IIRC.
ConvertEmailToTask(column_id=‘37’|color_id=‘yellow’) [mailmagik.fetchmail] => executable=true exec_success=NULL
Maybe you’d better start without passing any attributes.
After verifying my suspicion, I could see what happened.
You are addressing a column_id=‘37’, which is an illegal name, unless you really have 37 columns.
The column addresses are usually by name (‘Backlog’) or by the index number. If the value is numeric, it is taken as index, if you don’t have that index, it’s out of bounds.
I deny the use of pure numerical column names, for me, this is relatively senseless.
But some extended value checking could be added to the code in the future.
index 37 is correct.
When adding that Mailmagik autom. task it is set there correct.
More and more I think it’s a problem whit sqlite - I’m testing some added PRAGMA....
settings to the PDO connection if this helps.
But adding some debug informations to the code in general would be a good idea I t hink
Uhhh! It’s not that index!
It’s project relative, it refers to the index of the project board, starting with 1 for the leftmost column, IIRC.
Hm, really? Because several times it works as it should and they land correct in that “Ideen” column
Small update here: I went to the trouble of converting my SQLite database to MySQL and ran over 20 more tests with Mailmagik and each one worked as it should
so it looks like SQLite is the culprit here (for reasons not yet known)