Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daemon mode #26

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Daemon mode #26

wants to merge 9 commits into from

Conversation

gmp216
Copy link

@gmp216 gmp216 commented Oct 27, 2016

Implement daemon mode (-d) with "fetch-frequency" configuration option (default 5 minutes). Fork into the background with daemon() and log to syslog, looping through accounts fetching all folders. On errors, try to restart.

To do:
--complete signal handling
--replace sleep() calls with I/O polling

Added FETCH_RESTART state to restart fetch from the beginning with a delay.

IMAP returns FETCH_RESTART without logging out in daemon mode.

POP3 will log out and close, but child_fetch.c should restart it. (have not tested pop3)

If FETCH_ERROR is received in daemon mode, attempt to restart after a delay.
reset a->wakein more safely
build fix (find math library and math.h)
Also combine FETCH_WAIT into FETCH_BLOCK in child_fetch.c
@stspdotname
Copy link

I would love something like this.
If it prompts for passwords at startup, it would make saving passwords in the config file unnecessary.

@concussious
Copy link

I would love something like this.

Why shouldn't we use cron and pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants