Fetch mails autmatically via CronJob [UPDATE]

Hints for improving your installation and tuning it

Fetch mails autmatically via CronJob [UPDATE]

Postby mso » 25.07.2005 12:16

Besides the fetcher in PHlyMail's frontend there's another way of getting mails into the system - run a certain script via CronJob. This script will then fetch all mails for all the users' active profiles, even when they are currently not logged in.

Your crontab entry could look like this:
0,20,40 * * * * cd /path_to_phlymail/backend && php -f email.fetcher.php
That means, that the script is run every 20mins.

The path to PHlyMail and probably to PHP are to be adopted by you. PHP is very often run with /usr/bin/php.

Advantages of this method:
- POP3 accounts, which allow a login only every x minutes can be fetched without problems
- Mails are fetched even without the user being logged in
- Downloading very big mails, which might take longer than 30s via frontend, is possible this way

Notice: As of PHlyMail 3.3.0 the script to run is named email.fetcher.php, before this version it was named pop3.fetcher.php. This change has been made, since now also IMAP INBOX folders are checked for new mails.
Matthias Sommerfeld

phlyMail Developer
http://phlymail.com
User avatar
mso
Site Admin
Site Admin
 
Posts: 1259
Joined: 01.11.2001 01:00
Location: Berlin

Return to Tipps & Tricks

Who is online

Registered users: No registered users

cron