Fetchmail only polls successfully first time it runs
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.