[dev] IMP: trigger getmail upon "refresh" button press

Michael J Rubinsky mrubinsk at horde.org
Tue Jan 1 19:32:46 UTC 2019


Quoting Sebastian Birnbach <birnbacs at gmail.com>:

> A local IMAP server keeps my users' mails, and IMP is used as frontend. The
> local mail server has no MX record, so E-Mails must be fetched from the ISP
> with the "getmail" tool. A cron job triggers the getmail utility every few
> minutes.
>
> For the work with one of our customers we need faster mail pickup. After we
> request login to their sever they send us an E-Mail with a (short-lived)
> access token. Ideally getmail would be triggered every n minutes as long as
> a user is logged in, plus every time the user clicks 'refresh'. Oh, and it
> is a mailbox to which several users have access.
>
> I found getmail can be triggered upon mailbox read access (cf.
> https://wiki.dovecot.org/HowTo/TriggerGetmailOnIMAPAccess) but I am not at
> all sure about the efficiency and configurability of this solution.
>
>
> Does Horde offer any kind of support here? A hook to the pressing of
> 'refresh' in IMP maybe, or periodic command execution as long as a user is
> logged in? Anything?

Nothing out of the box, no. This really sounds like a job for the IMAP  
server/mail infrastructure.  If you really wanted to, you maybe able  
to do something like touch/create a file when the user's session  
starts (using any of the IMP hooks that are fired once per session)  
and unlink the file when the session ends (via  
register_shutdown_function in that same hook), then check the state of  
that file from some cronjob?

> --
> dev mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org



-- 
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 9272 bytes
Desc: PGP Public Key
URL: <https://lists.horde.org/archives/dev/attachments/20190101/6fdd4661/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 821 bytes
Desc: PGP Digital Signature
URL: <https://lists.horde.org/archives/dev/attachments/20190101/6fdd4661/attachment-0001.bin>


More information about the dev mailing list