[solved] Toggle_watch - email notification

Hi,

I’ve got problem to set up toggle_watch on modification with email notification.

I use Pydio 8.02 on Ubuntu 16.04 with Sendmail (mail() function is working from php)

I’ve tried to set up watch from user interface or with php cli :

php cmd.php -u=user -p=****** -r=my-files -a=toggle_watch -i=**/* --watch_action=watch_change --file=/

It seems to work as i have “stop watching” when i do right clic on “My Files”

In Settings / Mailers i dont really know if i need to “Activate Queue” and/or in Scheduler add a task with consume_notification_queue

I’ve tried :
PHPMail-lite /usr/sbin/sendmail
Event downloaded PHPMailer-smtp plugin
Set up Sender email with Unique Sender On

I’ve tried all combinasions and i dont get that notification. Don’t know how to debug this

Thanks for any help

Hi,
basically you want to receive the mails that notifies about what’s happening to your watches, to do so you have to set it up, go to settings(the 3 dots top left) “My account” and in the “My Profile” tab scroll down you will see the enable notifications and the frequency settings.

Hi Zayn,

Of course i did that :wink:

Also that is not clear why to set frequency here and then need to create a CRON ( https://pydio.com/en/docs/v8/configure-mail-digest ) WHERE you may set another frequency

Hi,
the frequency for the CRON is when you are using the queue which will queue up all the notifications and send all of them in a single mail for the set time.

Ok,i’ve missed the point that it will send it in one single mail, that’s not bad, but i’ll start without activating the Queue

So how to troubleshoot ?

Hi,
did you try to test sendmail by sending a test mail ,
if yes then it should be working on your sendmail side and we can look at your pydio’s conf.

I’ve tested it with a simple .php page on my server using : mail($to, $subject, $message, $headers)
And it works ! There’s no button “test mail” within Pydio ?

So PHPMail-lite plugin pointing to /usr/sbin/sendmail sould work, souldn’t ?

Hi,
yes /usr/sbin/sendmail is the right path, are you using a gmail address ?, because if you dont have the right smtp it might be an issue, what you can do is look at your mails error log incase theres an issue, you can find it in /var/log/ .

Sendmail is an SMTP server on localhost it sends the mail when i test it as i sad.

Jan 29 08:32:21 upload sendmail[14971]: w0T7WLBC014971: from=www-data, size=206, class=0, nrcpts=1, msgid=<201801290732.w0T7WLBC014971@upload.****.com>, relay=www-data@localhost

But there’s no activity in log file from Pydio

Hi,
sorry to be kinda repetitive but could use this command
echo "Subject: test" | /usr/lib/sendmail -v mail@address.com
and see if you receive some sort of mails and look at the /var/log/mail.log & mail.err.

Yes it works.

050 250 2.0.0 Ok: queued as 646363FE99
050 <@.fr>… Sent (Ok: queued as 646363FE99)
250 2.0.0 w0TCSYPC006096 Message accepted for delivery
@.fr… Sent (w0TCSYPC006096 Message accepted for delivery)
Closing connection to [127.0.0.1]
QUIT
221 2.0.0 *.fr closing connection

Hi,
it should be working properly on Pydio, you could try to share a file and send the link through Pydio, right click on a file/share you enable public link and then you click on the mail icon ( send invitation ) then type an email and try to see if pydio can send mail.

Yes it is working as well !

Hi,
then your notifications are supposed to work if you set them lets say to every minute and when you’re watching a file that’s been modified/viewed.
You could try enabling “Activate Queue” and put a “consume_mail_queue” task to lets say every minute just to see if the issue is with the notifications.

Hi,

I’ve done that before and haven’t received any notificaton…
Let me explain whant i want : i have one user who is creating a lot of shared folder, sending the public links to clients ans waiting them to upload their files, and i need that mail notification to know when it’s happining

Hi,
yes i understood that, but the issue is that you’re supposed to get thoses emails but you aren’t so we"re trying to see steps by steps where’s the solution.

So i’ve created CRON first executed by administrator applied on all repositories and i’ve got a mail (i don’t event know why)

• The folder FOOTBALL SAISON 2018 was opened by a public user (connection from ‘PHP_CLI’) 5 days ago, by a public user (connection from ‘PHP_CLI’)

After i change to user try to set it only on My-Files (Workspace : 1) and i’ve got You have no write permission on this folder

Hi,

It might have stayed in the queue that’s why you 've got this 5 days old notification,
it means that atleast now you get the notifications,

As for the “No write permission on this folder” you should look at your user’s permission/role/groups the issue might be here.

My user is a simple Standard profile with / group role , rw acces to “My Files” what i’ve cheked for watch on modification.

I can(t find the issue …

To test i’ve did the same thing with my administrator user now i’ve got :
JOB RUNNING "User ‘andras’ - Applying action ‘consume_mail_queue’ on workspace My Files (1)

And it won’t stop & no mail for more than 10 minutes …