Koozali.org: home of the SME Server

fetchmail stalls after ADSL dropsout

Offline chewie

  • 2
  • +0/-0
fetchmail stalls after ADSL dropsout
« on: August 30, 2010, 04:11:26 PM »
Hi,

I have an issue with a clients site, i have set them up with smeserver and fetchmail to download multiple POP accounts for them to imap to internally.

The problem they are having is, mail is sometimes not downloaded from the external source.

I found it today after running   /etc/fetmail and getting a process still running error it dawned on me that their ADSL service is flakey and downtime periods are less then the uptrimes.  Is it possible that the ADSL dropout is happening during a fetchmail download and fetchmail is left hanging, to be fixed with a server reboot??

Is there a solution, or is there a method where I can load a "webpage" on the local smebox which can "restart" the fetmail process or is there a PUTTY SCRIPT version that will do the same, something which wont require rebooting ?

Any help here is appreciated..

Thanks in Advance.

Offline Curly

  • ****
  • 114
  • +0/-0
Re: fetchmail stalls after ADSL dropsout
« Reply #1 on: August 30, 2010, 08:14:54 PM »
If that happens to me, I just kill the hanging fetchmail process. (log in as root, the file /var/lock/fetchmail/fetchmail.pid contains the number of the running process, and then I just use the command "kill")   But as I read this, I'm wondering wether specifying a timeout would help.

Oops, my mistake, there is already a timeout specified:

   poll pop3.live.com with proto POP3 timeout 60 and options uidl no dns
« Last Edit: August 30, 2010, 08:27:00 PM by Curly »
.......................................

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: fetchmail stalls after ADSL dropsout
« Reply #2 on: August 31, 2010, 12:41:28 AM »
chewie

Quote
I have an issue with a clients site, i have set them up with smeserver and fetchmail to download multiple POP accounts for them to imap to internally.

it would be better if the POP accounts were redirected to email addresses/accounts on the SME mail server. In time do away completely with the external POP accounts and use the SME domain based email addresses.
Users can access & send mail externally as well as internally via the SME server mail server (use IMAP/SMTP authentication & useports 465 & 993).
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline chewie

  • 2
  • +0/-0
Re: fetchmail stalls after ADSL dropsout
« Reply #3 on: August 31, 2010, 05:08:30 AM »
My clients dont want to see me at their office nor do they allow remote access (very strict policy regarding incomings), and due to the fact they are brain dead to IT matters, a simple solution would be a easy to access internal web page with a couple buttons on it to initiate a kill/restart process.

Either that, or does anyone know of a Putty script that will remotely do the job without the requirement for user input?  (my expertise in this is very limited as my linux exposure is minimal, i love default settings :)  )

Mary,
They have dirty lines and adsl reception quality is degraded to say the least, the clients have had their systems COMPLETELY rewired from the MDF to the office, its the ISP/Telco responsibility to solve the reception issues, but we all know that moves at snails pace.  For the meantime I need to provide a quick and easy solution to "band aid" fix the problem.  Eventually, when the connection is stable I will set them up with inhouse email services.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: fetchmail stalls after ADSL dropsout
« Reply #4 on: August 31, 2010, 09:11:59 AM »
chewie

Quote
For the meantime I need to provide a quick and easy solution to "band aid" fix the problem.  Eventually, when the connection is stable I will set them up with inhouse email services.

I believe using the SME mail server to receive mail will be more reliable than using fetchmail, and there are many reports in these forums and elsewhere that support that.
External mail servers will "try again" to resend any mail messages that could not be sent during periods of poor or no reception due to the ISPs noisy ADSL service.
The noisy ADSL service is not being handled well by fetchmail, whereas the SME & other external mail servers default behaviour (ie to retry) will more reliably workaround the bad or erratic connection.
« Last Edit: August 31, 2010, 09:40:02 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: fetchmail stalls after ADSL dropsout
« Reply #5 on: August 31, 2010, 09:37:48 AM »
chewie

With a simple db command you can limit ssh access to only come from one specified host ie the IP of your main support network/location.
That should reduce the clients "fear" of remote access being allowed, and their fear of all and sundry being able to access their network.
Also the use of public/private keys ensures extremely secure remote access.
See the FAQ & Howtos.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline axessit

  • *****
  • 213
  • +0/-0
Re: fetchmail stalls after ADSL dropsout
« Reply #6 on: August 31, 2010, 05:59:06 PM »
And just for the record, does the adsl line share any phone or fax service? It may be a bad or no filter on the phone line that cuts out the adsl if there is a phone call (or fax). Seems to me that fixing the cause of the problem is better than trying to band-aid the problems.