On 2009-08-10 15:36, Paul Cartwright wrote:
I have been getting this error, and I'm not sure what it means or what is
wrong.
I have fetchmail setup to pull the email from my domain accounts to local
users. I set this up in a fetchmailrc file.
this morning I noticed there was no new email, but when I went to webmail (
squirrelmail) on my hosts servers, there was email . This is the error
message I am getting in /var/log/syslog:
Aug 10 16:31:47 paulandcilla fetchmail[16965]: timeout after 300 seconds
waiting to connect to server email_host.com.
Aug 10 16:31:47 paulandcilla fetchmail[16965]: socket error while fetching
from my_user_email+my_host....@email_host.com
Aug 10 16:31:47 paulandcilla fetchmail[16965]: Query status=2 (SOCKET)
mail.err has similar messages:
Aug 10 16:31:47 paulandcilla fetchmail[16965]: socket error while fetching
from my_user_email+my_host....@email_host.com
The same think occasionally happens to me. Sometimes the messages
eventually gets transferred, but sometimes I have to use this python
script to delete the offending message from the POP server.
import getpass, poplib, string, sys
import re
import readline
################
def check_re(d, patt_re, patt, s):
mo = patt_re.search(s)
if mo:
d[patt] = s
return d
################
M = poplib.POP3('pop.east.cox.net')
#M.set_debuglevel(2)
try:
M.user(sys.argv[1])
except:
x = sys.exc_info ()[1]
print 'login failed'
print x
sys.exit()
try:
M.pass_(sys.argv[2])
except:
print sys.exc_info ()[1]
sys.exit()
from_pattern = re.compile("^from\:")
subj_pattern = re.compile("^subject\:")
date_pattern = re.compile("^date\:")
msft1_pattern = re.compile(\
"^content-disposition: attachment; filename=")
try:
w = M.list()
except:
print sys.exc_info ()[1]
sys.exit()
print w[0]
print w[1]
print w[2]
size_array = w[1]
numMessages = len(size_array)
print 'Num emails ', numMessages
for i in range(1, numMessages+1):
d = {'from':'','subj':'','date': '','attach': '','haggis': ''}
b = ['==============================================',\
'==============================================']
x = M.top(i, 20)
a = string.split(size_array[i-1], ' ')
ndx = int(a[0])
bcnt = int(a[1])
b.append(('%d %d' % (ndx, bcnt)))
for y in x[1]:
y1 = y.lower()
d = check_re(d, from_pattern, 'from', y1)
d = check_re(d, subj_pattern, 'subj', y1)
d = check_re(d, date_pattern, 'date', y1)
d = check_re(d, msft1_pattern, 'attach', y1)
for c in b:
print c
print d['from']
print d['subj']
print d['date']
print d['attach']
r = raw_input('Action?[_D_elete,_P_rint,_S_kip,_Q_uit] -> ')
if r in ('D', 'd'):
M.dele(i)
if r in ('P', 'p'):
txt = M.retr(i)[1]
for i in txt:
print i
if r in ('Q', 'q'):
M.quit()
sys.exit()
M.quit()
print '============================================================'
print '============================================================'
print '============================================================'
print '============================================================'
--
Scooty Puff, Sr
The Doom-Bringer
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org