6.0.0-git
2019-03-20

[#8812] PHP script for command line fetchmail
Summary PHP script for command line fetchmail
Queue IMP
Queue Version 4.3.6
Type Enhancement
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester tjacyno (at) galasoft (dot) net
Created 2010-01-02 (3364 days ago)
Due
Updated 2010-10-27 (3066 days ago)
Assigned
Resolved 2010-02-04 (3331 days ago)
Milestone
Patch Yes

History
2010-10-27 17:50:10 cor3huis (at) gmail (dot) com Comment #12 Reply to this comment
Added to FW_3 (IMP 4.3.7).
That is great, however I could not find documentation anywhere how 
to accomplish it. Willing to add it to http://wiki.horde.org/ImpModule
Q: Someone give me a hint.
I see that just the "fetch.php" is added to /imp/scripts/ and the 
calling is still via a cron task to "php 
/path/to/horde/imp/scripts/fetch.php <username> <password> > /dev/null 
2>&1

A separate cron line need to be created for every email user though.

That's OK for now, at least it works.
2010-10-27 17:19:45 cor3huis (at) gmail (dot) com Comment #11 Reply to this comment
Added to FW_3 (IMP 4.3.7).
That is great, however I could not find documentation anywhere how to 
accomplish it. Willing to add it to http://wiki.horde.org/ImpModule
Q: Someone give me a hint.

2010-05-27 21:42:52 elbeardmorez (at) msn (dot) com Comment #10 Reply to this comment
Hi,

I've been faffing with configs for months to try and get this to work 
but have now finally got there. Note that this script doesn't work 
when IMP is setup to allow users to specify their required mail 
server. Turning this option off forced my default IMAP server to be 
used and it all works great.

fyi 'IMP authentication failed' ..the script's error message was 
useless for debug purposes ..as were the lack of entries in the 
horde.log.

Many thanks for this work though.
2010-05-04 16:50:49 mmoncada2 (at) uh (dot) edu Comment #9 Reply to this comment
This script works great thank a lot from the UH Physics IT.
2010-02-04 18:30:45 Michael Slusarz Comment #8
Assigned to Michael Slusarz
State ⇒ Resolved
Reply to this comment
Added to FW_3 (IMP 4.3.7).  Cleaned up usage of private imp API 
function (authenticate) and use of private variable in Notification 
object.
2010-02-04 18:28:56 CVS Commit Comment #7 Reply to this comment
2010-01-27 02:11:19 Michael Slusarz Comment #6 Reply to this comment
This script is obsolete in IMP 5 since all fetchmail code has been 
removed.  Wondering if this is something better posted on the wiki.
2010-01-26 23:13:53 Jan Schneider Comment #5
State ⇒ Accepted
Reply to this comment
Er, wait, sorry, I got confused by Arjen's question. This is about 
fetching mail, not filtering mail.
2010-01-26 23:12:28 Jan Schneider Comment #4
State ⇒ Feedback
Reply to this comment
This doesn't answer Arjen's question. Why don't use server-side 
filtering? I tend to reject this script, unless someone can convince 
me that the same can't be don't much better through server-side 
filtering.
2010-01-24 13:05:21 tjacyno (at) galasoft (dot) net Comment #3 Reply to this comment
Why don't you configure 'ingo' to use server side filtering instead?
The fetch.php script uses the rules defined with Ingo for filtering.

fetch.php does not introduce new functionality.  The end result can be 
obtained by configuring existing tools to fetch mail and by using 
scripts generated by Ingo to configure IMAP server filtering.  The 
goal, for me at least, was to simplify the administration process by 
making both the fetching and filtering actions configured within the 
Horde web interface available when accessing mail through desktop 
applications.
2010-01-14 13:08:14 arjen+horde (at) de-korte (dot) org Comment #2 Reply to this comment
Why don't you configure 'ingo' to use server side filtering instead?
2010-01-02 11:18:52 tjacyno (at) galasoft (dot) net Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ PHP script for command line fetchmail
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ Yes
New Attachment: fetch.php Download
Reply to this comment
Attached is a PHP script allowing to run Horde's fetchmail from the 
command line.  It is heavily based on the horde/scripts/alarms.php 
script and is meant to be placed within the horde/scripts directory.

After searching the Web, I saw that several inquiries had been made 
about such functionality.  In my case, I wanted to be able to call 
Horde's fetchmail as a cron job for the following reasons:

- Horde is great, but I sometimes want to access the IMAP server 
associated to Horde via a desktop application such as Thunderbird.   
The Horde fetchmail cron job avoids having to configure fetching and 
filtering in more than one place.

- Some of the e-mail accounts from which messages are fetched get a 
lot of spam.  Fetching messages regularly reduces the wait associated 
to processing when obtaining new e-mails.  Yes, getmail or the BerliOS 
fetchmail applications can be used, but this involves configuring 
fetching in more than one place.  Furthermore, Horde has a nice 
web-based configuration interface.

Currently, the Horde e-mail account's username and password have to be 
specified on the command line.  There must be a better way.

This script has been successfully used with the IMP found in Horde 
Groupware Webmail Edition 1.2.3 and 1.2.5 and can be related to the 
"[#6030] The possibility to automate the fetchmail-feature" 
enhancement request.  Hope you find this useful.

Regards,

Terence Jacyno

Saved Queries