LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-18-2005, 06:22 AM   #1
FatOldSun
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Rep: Reputation: 0
Fetchmail only polls successfully first time it runs


I have set up a FC3 server, and I'm running Postfix and Fetchmail. I have a .fetchmailrc file in /root, which contains the line

set daemon 180

as well as two poll lines which connect to mail servers. When I run fetchmail by typing fetchmail, it downloads messages from the servers. If I look in /var/spool/maillog it shows this happening. However, every three minutes after that the log file shows

fetchmail[25383]: 6.2.5 querying pop.[mailserver].com (protocol POP3) at Fri 18 Mar 2005 11:08:58 GMT: poll started

Then I get a similar line but with poll completed at the end, followed by

fetchmail[25383]: Query status=2 (SOCKET)

and no mail is retrieved, and it goes back to sleep. However if I type fetchmail -quit and then restart fetchmail, it downloads the messages and then sleeps, then does the same as above.

I can't see that there's a problem with my .fetchmailrc file as it always works first time it loads. But why would it not continue to work? The only way I can think of to get around it is to add a cron job which starts fetchmail, then kills it, then restarts it etc every few minutes, but this isn't ideal.
 
Old 03-19-2005, 06:21 AM   #2
rgawenda
LQ Newbie
 
Registered: Mar 2005
Location: Ourense, Spain, EU
Distribution: Gentoo, Debian, Kubuntu
Posts: 29

Rep: Reputation: 15
Have you tried to sniff the network packets, or to manually check the connection with telnet?
 
Old 03-21-2005, 04:27 AM   #3
FatOldSun
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks for your reply. That's another problem I have - if I try to telnet anything from the server, it just says

Trying 1.0.0.0

However I'm not sure if that's the problem as fetchmail always connects successfully to the mail server and downloads messages when it is killed and restarted. I can ping the mail server continuously without it failing. That suggests it's not a DNS problem so I'm a bit confused.

If I telnet the ISP mail server from my Windows PC, I can login but it tells me:
+OK POP3 clients that break here, they violate STD53.
Could that have anything to do with it?
 
Old 03-21-2005, 04:41 AM   #4
rgawenda
LQ Newbie
 
Registered: Mar 2005
Location: Ourense, Spain, EU
Distribution: Gentoo, Debian, Kubuntu
Posts: 29

Rep: Reputation: 15
Now I'm lost
Does that occur if you try to telnet to a numeric IP address, or just the typical pop3.myisp.com?
You'd better have a look at the packets captured from both sessions, to compare.
 
Old 03-21-2005, 05:56 AM   #5
FatOldSun
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Original Poster
Rep: Reputation: 0
Sorry, I'm not being very clear. If I telnet pop.mailserver.com 110, it says Trying 1.0.0.0

If I ping pop.mailserver.com I get a reply, and it tells me the IP address.

If I telnet the IP address on 110 it connects.

How do you look at the packets captured? I'm by no means a Linux expert!
 
Old 03-21-2005, 02:30 PM   #6
rgawenda
LQ Newbie
 
Registered: Mar 2005
Location: Ourense, Spain, EU
Distribution: Gentoo, Debian, Kubuntu
Posts: 29

Rep: Reputation: 15
Try installing (ez) ethereal or something like that. Launch and activate before connections, and then just read the dialogs between fetchmail and the pop server.
 
Old 03-22-2005, 06:04 AM   #7
FatOldSun
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Original Poster
Rep: Reputation: 0
OK I've run tethereal to a log file and found the problem I think. It looks like a DNS problem although I'm not sure why. The relevant lines are as follows:

6.386511 192.168.0.254 -> 192.168.0.100 DNS Standard query AAAA pop.enta.net
6.404089 192.168.0.100 -> 192.168.0.254 DNS Standard query response
6.404289 192.168.0.254 -> 192.168.0.100 DNS Standard query AAAA pop.enta.net
6.406703 192.168.0.100 -> 192.168.0.254 DNS Standard query response[Malformed Packet]
6.406815 192.168.0.254 -> 192.168.0.100 DNS Standard query A pop.enta.net
6.408212 192.168.0.100 -> 192.168.0.254 DNS Standard query response A 1.0.0.0
6.408308 192.168.0.254 -> 1.0.0.0 TCP 38938 > pop3 [SYN] Seq=0 Ack=0 Win=5840 Len=0 MSS=1460 TSV=524182755 TSER=0 WS=2

You can see that for some reason it's resolving pop.enta.net to 1.0.0.0, which is what telnet was doing yesterday. The weird thing is that I can now telnet pop.enta.net on port 110 and it works every time.

I've added some more nameservers to resolv.conf and restarted the network service, however it doesn't seem to have fixed it. Anything else I can try?
 
Old 03-22-2005, 09:16 AM   #8
rgawenda
LQ Newbie
 
Registered: Mar 2005
Location: Ourense, Spain, EU
Distribution: Gentoo, Debian, Kubuntu
Posts: 29

Rep: Reputation: 15
Not a real fix, but I would put an entry to the correct IP into /etc/hosts, or directly fetchmailrc.
 
Old 03-22-2005, 11:44 AM   #9
FatOldSun
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Original Poster
Rep: Reputation: 0
OK I've removed the mailserver name and replaced it with its IP address in .fetchmailrc. And that's fixed the problem for now, let's hope they don't change their mail server's IP address too often! I'd still like to know what the problem is but it's not too urgent. Thanks for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to post polls vharishankar LQ Suggestions & Feedback 4 11-17-2004 10:58 AM
cron.daily runs at the wrong time dwz3591 Linux - Software 2 10-27-2004 10:46 AM
Command to time how long a program runs jing Linux - Newbie 1 07-19-2004 11:35 PM
a few suggestions about polls... frieza LQ Suggestions & Feedback 2 11-05-2003 04:21 PM
X only starts successfully 1/2 of the time?? kleptophobiac Linux - Software 2 06-09-2003 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration