Koozali.org: home of the SME Server

mail retrieval interval

Offline fastautomation

  • **
  • 31
  • +0/-0
mail retrieval interval
« on: September 01, 2009, 05:45:20 PM »
Is there anyway of getting sme server to retrieve e-mails from the external host at 5 minute (or less) intervals?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: mail retrieval interval
« Reply #1 on: September 01, 2009, 09:45:18 PM »
yes, you need to create a custom template for crontab.. anyway, polling external servers too frequently is not a good idea because:
- there's always the possibility that a fetchmail process can't finish polling in a short interval (think about many accounts and/or big messages)
- from the ISP side, you are consuming a lot of resources

Ciao
Stefano

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: mail retrieval interval
« Reply #2 on: September 01, 2009, 09:56:49 PM »
If you think you need low latency delivery of mail messages you shouldn't be using an external email server and multidrop fetchmail.

Offline fastautomation

  • **
  • 31
  • +0/-0
Re: mail retrieval interval
« Reply #3 on: September 02, 2009, 01:06:17 PM »
Thanks for the advice but you know how clients can be, this particular client has a blackberry that fetches his mail from the ISP, he is moaning that he gets his mail on the blackberry 15 mins before his pc. This is the kind of crap I have to deal with.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: mail retrieval interval
« Reply #4 on: September 02, 2009, 02:22:40 PM »
Thanks for the advice but you know how clients can be, this particular client has a blackberry that fetches his mail from the ISP, he is moaning that he gets his mail on the blackberry 15 mins before his pc. This is the kind of crap I have to deal with.
Perhaps you can configure his blackbarry to use the SME Server mailserver ;-)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline fastautomation

  • **
  • 31
  • +0/-0
Re: mail retrieval interval
« Reply #5 on: September 02, 2009, 03:01:19 PM »
I thought of that but I can't seem to get that to work either.

If I could just get the sme server to get mails every five minutes it would be fine.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: mail retrieval interval
« Reply #6 on: September 02, 2009, 03:20:18 PM »
how do you get mails? are you using smeserver-fetchmail contrib?

if so, you have this template fragment: /etc/e-smith/templates/etc/crontab/FetchMails

- create /etc/e-smith/templates-custom/etc/crontab dir
- copy the fragment in the new folder
- edit as you need/prefer and save
- expand /etc/crontab

you're done

Stefano

Offline thomasch

  • *
  • 232
  • +0/-0
Re: mail retrieval interval
« Reply #7 on: September 03, 2009, 04:43:14 AM »
Thanks for the advice but you know how clients can be, this particular client has a blackberry that fetches his mail from the ISP, he is moaning that he gets his mail on the blackberry 15 mins before his pc. This is the kind of crap I have to deal with.

You can't beat push technology with non realtime solutions like fetchmail.
Setting the mail retrieval to every 5 mins won't help. Your client will moans that he get's his mail on BB 5 minutes earlier.

You can set fetchmail to less than 5 min or less as per Stefano instruction, but if the time to retrieve mails is more than 5 mins (i.e lots of big messages) fetchmail will end up with a lot of duplicate zombie thread which do nothing than reporting that another instance is still running.

tom

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: mail retrieval interval
« Reply #8 on: September 03, 2009, 02:25:32 PM »
You can't beat push technology with non realtime solutions like fetchmail.

The solution is to not use fetchmail. Set the client PC to pull from the ISP, or change mail delivery to the SME server to use SMTP and bypass the mailbox as the ISP.