0

I have fetchmail daemon set to 60 seconds in the fetchmailrc file. However it takes up to 8 minutes and sometimes even more to start fetching.

Here is my fetchmailrc:

set daemon 60 set postmaster "root" set syslog set logfile "/var/log/fetchmail.log" set no bouncemail set spambounce poll pop.gmail.com with proto pop3 user "[email protected]" there with password "mypassword" is root here fetchall no keep no rewrite ssl mda "/usr/bin/procmail -f %F -d %T"; 

The reason I have to have the time to 60 seconds is because we collect telemetry data (pressure and temperature) from different sites around Africa. The mails are piped to procmail and then sent to MySql. A "realtime" graph is then created and available to our maintenance team.

Waiting longer than a minute or 2 for fetchmail is not really desireable.

Any pointers?

2
  • How large are the mail messages that you fetch in this way? Commented Nov 22, 2018 at 14:00
  • between 5kb to 15kb ... consists of numerical values and sensors location and serial number Commented Nov 22, 2018 at 14:11

1 Answer 1

1

Many POP3 servers "discourage" too frequent polling.

https://webmasters.stackexchange.com/questions/49721/what-is-the-maximum-frequency-for-checking-email-in-gmail-and-are-there-alterna


IMAP with IDLE command

You can use IMAP with IDLE command instead of POP3.

Both fetchmail (program) and gmail (email provider) support IMAP with IDLE.

It would require one fetchmail process per one monitored IMAP account.
fetchamil will keep one IMAP session open permanently.
You should get "near real time" notifications about new emails.

man fetchmail

--idle (since 6.3.3)
(Keyword: idle, since before 6.0.0)
Enable IDLE use (effective only with IMAP). Note that this works with only one folder at a given time. While the idle rcfile keyword had been supported for a long time, the --idle command-line option was added in version 6.3.3. IDLE use means that fetchmail tells the IMAP server to send notice of new messages, so they can be retrieved sooner than would be possible with regular polls.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.