Koozali.org: home of the SME Server

Fetchmail and SME v5

J Strome

Fetchmail and SME v5
« on: September 22, 2001, 01:55:31 AM »
Hi all,

New to the whole E-Smith / SME thing but very familiar with Linux.  Had 4.1.2 working quite nicely.  Just upgraded to SME 5 and noticed some weird behaviour.

Most notably, I was retrieving email from ISPs for a number of users, using fetchmail.  After upgrading, fetchmail no longer works correctly.  No matter what I do, it gives me the following error:

fetchmail: fetchmail: getaddrinfo(mail.xxx.xxx.xxx.com.pop3)
fetchmail: normal termination, status 2

running it with full verbosity:

fetchmail: 5.7.4 querying mail.xxx.xxx.xxx.com (protocol POP3) at Fri 21
 Sep 2001 04:50:25 PM EDT
fetchmail: fetchmail: getaddrinfo(mail.xxx.xxx.xxx.com.pop3)
fetchmail: Query status=2 (SOCKET)
fetchmail: Deleting fetchids file.
fetchmail: normal termination, status 2
fetchmail: Deleting fetchids file.

I've blocked out the ISP's mail address, except for the suffix and prefix.  You can see that in the first line it's attempting to connect to mail.xxx.xxx.xxx.com, which is the server I've identified in .fetchmailrc.  My .fetchmailrc is relatively simple, and looks like:

poll mail.xxx.xxx.xxx.com protocol pop3
        user "username", with password "pass", is "username" here smtphost
e-smith.servername.here;

What it's *supposed* to do is connect to mail.xxx.xxx.xxx.com via POP3, grab all emails for username, and then forward them via SMTP to the mail server on the e-smith/SME box.

Any thoughts?  As I said, it worked under 4.1.2 with no modification to the script.  After the upgrade, things stopped working.

J Strome

Re: Fetchmail and SME v5
« Reply #1 on: September 22, 2001, 02:19:18 AM »
Found the problem.  It looks like it's a Fetchmail bug (undocumented "feature" perhaps?)

fetchmail 5.5.0 (I believe) was included with e-smith 4.1.2.  This version of fetchmail would assume a port # of 110 if given a protocol of POP3 (you *could* override with the port keyword).

fetchmail 5.7.4 as included with SME v5.0 seems to *need* the port argument when connecting to POP3 servers.  Without it, you get:

fetchmail: fetchmail: getaddrinfo(mail.xxx.xxx.xxx.com.pop3)
fetchmail: Query status=2 (SOCKET)

However, if you add either "-P 110" to your fetchmail command line, or "port 110" in your .fetchmailrc file, everything works.

Dan Brown

Re: Fetchmail and SME v5
« Reply #2 on: September 22, 2001, 02:31:12 AM »
...or add a line for "pop3" to /etc/services.  Just found this earlier today.

Keith Silman

Re: Fetchmail and SME v5
« Reply #3 on: September 22, 2001, 02:20:54 PM »
I have just upgraded to SME5 and applied update1
have added pop3 110/tcp as suggested by Dan
but now have the message

fetchmail: couldn't time-check the run-control file
fetchmail: lock creation failed.

help!
any ideas?

Facer King

Re: Fetchmail and SME v5
« Reply #4 on: September 23, 2001, 04:28:11 AM »
Hi,

I also got the same error as mentioned by Keith Silman.

fetchmail: couldn't time-check the run-control file
fetchmail: lock creation failed.

I did a fresh install of SME v5 and still got the same error but I noticed that it appears even without editing the services file :(

Has anyone run into the same problem ?

Thx

Rob Fantini

Re: Fetchmail and SME v5. ./startmail, ./fetchmail
« Reply #5 on: September 23, 2001, 08:06:07 AM »
I've the same problem.

THis is long and I don't have THE answer.
But cron runs /etc/startmail which as root from command line fails.

run /etc/fetchmail  and you'll get you mail.

------------------------------------

This note is long...


I can send mail.  Receiving happens only once in awhile, i think on reboot or network restart?


 I did a fresh install and every time /etc/crontab does

*/5     *       *       *       6-7     root    /etc/startmail

I get a mail:
fetchmail: couldn't time-check the run-control file
fetchmail: lock creation failed.
.........................................................................................

/etc/startmail:
#------------------------------------------------------------
# dedicated connection; just call fetchmail to get things started
su qmailr -s /bin/bash -c "/etc/fetchmail"
-----------------------------------------------------------------------
rpm -q fetchmail: fetchmail-5.7.4-4

/etc/fetchmail:
# multi-drop configuration; fetchmail retrieves all mail from a remote POP mailbox:
 
/usr/bin/fetchmail --syslog --silent --fetchmailrc - < 
set postmaster "postmaster"
set bouncemail
set properties ""
 
poll myisp.xyz.net
    protocol POP3
    localdomains fantinibakery.com
       username fantinibakery password xxxxxxxx to * here
           smtphost localhost
           smtpaddress fantinibakery.com
           fetchall
           forcecr
 
EOF
----------------------------

 I can send mail but not receive.....

 /etc/services has  pop3 not pop-3  . [there are I think other msgs on this,  my support great person told me about the bug.

 I need a fix for this or will need to put 4.1 back online.... Too bad as 5.0 fixes some other problems..


--------------------------
I noticed that some mails had the wrong date.

 the ones cron sent had corrrect date. Maybe that is from the machine which received the mail .  [I use pine on a diff server].

 Checking /var/log/messages:

Sep 22 14:44:20 e-smith ntpd[680]: time error 14400 over 1000 seconds; set clock manually    


[root@e-smith /etc]# date
Sat Sep 22 18:44:15 EDT 2001
[root@e-smith /etc]# date -s 'Sat Sep 22 22:48:41 EDT 2001'
Sat Sep 22 22:48:41 EDT 2001
[root@e-smith /etc]# date
Sat Sep 22 22:48:43 EDT 2001

-------------------------------
So I try to run from command line, sorry of this note is long,
but here is an error:

[root@e-smith /etc]# ./startmail &
[1] 2688
[root@e-smith /etc]# bash: /root/.bashrc: Permission denied
fetchmail: lock creation failed.

----------------------------------------------
note the weird date.  Mail stamped a diff time then
system time:[root@e-smith /root]# date
Sat Sep 22 22:59:30 EDT 2001


Date: 23 Sep 2001 02:55:00 -0000
From: Cron Daemon
To: root@fantinibakery.com
Subject: Cron /etc/startmail

 So maybe the time stamp problem has something to do with the various date/times?  
 man would 'man' be good to have...

---------------------------------------------------
as ROOT  if I run , as cron does
[root@e-smith log]# cd /etc
[root@e-smith /etc]# ./fetchmail &
[1] 2701
[root@e-smith /etc]# ./startmail
bash: /root/.bashrc: Permission denied
fetchmail: lock creation failed.
[1]+  Done                    ./fetchmail


But if I run:
[root@e-smith /etc]# ./fetchmail

 I GET MY MAIL.

 Time for sleep.

 I'm posting this  
in the hope that it gives the many who know more than I a clue.

Rob Fantini

Re: Fetchmail and SME v5. ./startmail, ./fetchmail
« Reply #6 on: September 23, 2001, 08:40:21 AM »
Here is my temp solution.

 I get mail and elim the  fetchamil errors:

as root:
crontab -e
1,15,30.59 * * * *  /etc/fetchmail  >/u4/fbc2/fetch.out 2>&1

vi /etc/crontab:
comment out all  fetchmail lines
# fetchmail times during office hours
 
##*/5   8-17    *       *       1-5     root    /etc/startmail
 
# fetchmail times outside office hours
 
##*/5   0-7     *       *       1-5     root    /etc/startmail
##*/5   18-23   *       *       1-5     root    /etc/startmail
 
# fetchmail times during the weekend
 
##*/5   *       *       *       6-7     root    /etc/startmail



 I know that this is a temp solution... I'll need to put this in
custom-templates ...

 Atleast the 4:00am shift will get mail...

I'm sure there will be a fix to elim this problem.

guestFF

Re: Fetchmail and SME v5
« Reply #7 on: September 24, 2001, 01:49:45 PM »
Hi,

Same problem here....

Anybody?

Robert Field

Re: Fetchmail and SME v5
« Reply #8 on: September 24, 2001, 05:54:39 PM »
Same problem as well.  Is it possible to roll back to fetchmail 5.5.0 as per e-smith 4.1.2 but still keep SME 5. with the following:

rpm -e fetchmail-5.7.4-4.i386.rpm (to remove)

then

rpm -ivh fetchmail-5.5.0-3.i386.rpm  (to install)

then

/etc/fetchmail restart


I've tried upgrade and fresh install. In both cases fetchmail does not work.


Thanks

guestFF

Re: Fetchmail and SME v5
« Reply #9 on: September 25, 2001, 02:38:31 AM »
Hello everyone,

This issue has been posted on all forums now and no suiteable answer has been given by any of the devoted and dedicated forum members.

I can't believe that Mital isn't listening in on this subject. Obviously it IS a BIG issue to multiple installations/upgrade's, but no reply/suggestions from Mitel.

Don't get me wrong, but Mitel advises to perform an immediate upgrade from version 4.x.x to SME V5. I did just this... Can anybody at Mitel please resolve this issue on behalf of those who followed yur instructions and did a upgrade?

Thanks in advance.

Rob Fantini

Re: Fetchmail and SME v5
« Reply #10 on: September 25, 2001, 05:35:54 AM »
Did you try:
/etc/crontab : comment out all /etc/startmail lines

add to root's crontab:
1,15,30,45,59 * * * * /etc/fetchmail >/var/log/fetch.out 2>&1

/etc/services
change 'pop-3' to 'pop3'

[I still need to change the custom-template.]

Laurence Griffiths

Re: Fetchmail and SME v5
« Reply #11 on: September 25, 2001, 05:51:32 AM »
Robert, Has uninstalling the new package and then re-installing the old package worked?

Rob Fantini

Re: Fetchmail and SME v5
« Reply #12 on: September 25, 2001, 06:19:41 AM »
Laurence

 I did not need to change rpms.

Did you try the steps in my prior msg?

Do you know how to log in as root and use vi ?  I'm not trying to be a wiseguy, just trying to help.

 I am receiving mail and NOT getting the fetchmail error. I am using Multi-drop and a constant connection.

 If you need more help or want me to explain what I did alittle clearer then let me know!


Rob

Laurence Griffiths

Re: Fetchmail and SME v5
« Reply #13 on: September 25, 2001, 06:24:02 AM »
Greetings Rob. My reply was meant for Robert Field. :-)

I haven't tried your suggestions yet. I'll give it a try in another hour or so when I next manage to get my hands on that server and post what happens. It is 11:27am here in the east of Australia.

Thanks

Laurence Griffiths

Re: Fetchmail and SME v5
« Reply #14 on: September 25, 2001, 08:43:23 AM »
Rob,

I have just tried your suggestions. The important thing was to change 'pop-3' to 'pop3' so that fetchmail would work. All the backed-up email messages were then downloaded. We now just need to check whether the addition to root's crontab is effective. Having made that modification, I had to re-edit /etc/services and change 'pop-3' to 'pop3' again. - I hadn't changed the custom template.

Thanks