The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Applications (http://hintsforums.macworld.com/forumdisplay.php?f=5)
-   -   Mail.app 10.3 - 10.4 (http://hintsforums.macworld.com/showthread.php?t=39701)

ibroughton 05-18-2005 07:14 AM

Mail.app 10.3 - 10.4
 
OK Apple mail is really starting to annoy me. It constantly takes the account offline and (although this does happen less in Tiger, the problem is still there) I keep getting prompted for passwords. Is this due to the connection to the server timing out? If so, can the timeout be increased? Any other suggestions welcome!

Photek 05-18-2005 07:44 AM

I am getting that all the time over in Warwick! and its only started happening in the past 3 weeks, I'm with BT and BYWW, what about you?

dhayton 05-18-2005 08:00 AM

For what it's worth, I don't experience this at all here in Oxford (with Freedom2Surf). I have my mail app set to check for mail in two imap accounts every 5 minutes.

Do you have yours set to check manually? Would that make a difference? Is there something with your carrier? I wouldn't think that mail would care, if you've stored your password in the keychain.

Can you provide any further information about ISP, preferences, etc?

best,
darin

ibroughton 05-18-2005 08:05 AM

The latest error is "The server error encountered was: The connection to the server "pop3.names.co.uk" on port 110 failed (error 50: Network is down)" when I know it isn't, the server isn't busy or anything.

The ISP doesn't matter. It happens with Plusnet, Zen and Namesco. Also, the platform the server is running on doesn't seem to matter either, I get this on both Windows and Linux servers. Increasing the mail to check every 5 minutes (minimum) eliminates the errors some of the time (it'll work for a couple of hours and then go down for ages again). The password prompt thing seemed to be a bug in 10.3.x and appeared to be fixed in Tiger, but now has reared it's ugly head again. Deleting and recreating the keychain has no effect at all.

Photek 05-18-2005 08:11 AM

Mine is set to check every 5 mins on 3 accounts (all through the same provider) I have been meaning to back up the accounts, blank mail and start again.... to see if that would fix it but I need a spare 20 min that I never seem to get!!

I have also found that changing the frequency from 1 min to 5 minimises it but its a real pain, I have found that instead of continually putting my password in, if I just hit cancel it sorts its self out and doesn't ask again for a few hours.

ibroughton 05-18-2005 08:22 AM

The thing is though, once Keychain has your password, surely it shouldn't need to ask for it again unless it changes?

I've tried a fresh install (on more than one machine with a different ISP and hosting company) and the same thing happens. In 10.3 it seems to be a bug with keychain.app, and it is mostly fixed in Tiger but the problem hasn't gone away completely. It is definately a keychain problem as this error replicates itself in Entourage and Thunderbird.

Is there a way of increasing the timeout delay in Mail? The option has been there in most mail apps I've used but not in Apple Mail.

ibroughton 05-18-2005 09:15 AM

Latest error is
The server error encountered was: The attempt to read data from the server "pop3.names.co.uk" failed.

Again, there is no problem with the server, just Mail being a pain in the &*#!

Photek 05-18-2005 02:22 PM

I have tried to get rid of the keychains and start again, but with no joy. Its odd, I dont get any problems connecting to gmail and hotmail at home, its just my work accounts....

ibroughton 05-18-2005 02:32 PM

This is reaelly annoying, and my customers are blaming our servers! <sob>

cudaboy_71 05-18-2005 04:16 PM

this same issue came up a long time ago (early 10.3 release IIRC)...too lazy to search for the thread, especially since i dont recall a solution.

i speculated at the time that maybe another machine was querying the server at the time. for example i have 3 pop accounts and a hotmail account i regularly check on my powerbook, my work computer, and my home computer. theyre all set to check every 5 minutes...so maybe one is checking simultaneous with the other and the pop server doesnt like it? who knows.

the only advice i had at the time was to hit the esc key, rather than typing in the password as requested.

you're right...keychain does have the passoword. but, on a timeout (or whatever the error in fact is) that's the only alert mail offers.

if you just hit esc, the window goes away. then you have to click the little lightning bolt icon next to your 'in' box indicating offline status. in my experience the account(s) go back online and continue to check every 5 minutes (until the next timeout)

ibroughton 05-18-2005 04:40 PM

Is there any way of increasing the timeout while mail waits for a response from the server or for a keychain response? My clients really are unhappy with this and pressing the esc key or hitting cancel is unacceptable to them, and I would really like to find a long term solution if one exists.

macmath 05-18-2005 10:25 PM

I might be wrong, and commonly am, but here is my guess:

While you have a dedicated cable or DSL connection, it is probably set to 'on demand' rather than to 'always on'. Thus, by the time your router or whatever has realized that there is a demand for your connection when Mail goes to check mail, it is already too late and Mail has taken that account offline and you get the password prompt.

I don't think the timeout interval is critical here because Mail will try and try to get mail if it senses a valid connection, but it gives up sooner if it realizes there is no connection. You would either need to set (in your router settings) your connection to be 'always on' then I think that would do it; or set something to keep the connection active (what, I don't know). Your ISP might not allow you to set it to 'always on'.

I used to think the issue was because of mail being checked by several clients simultaneously until I disabled mail checking from all but one computer account and the issue still occurred. It never happened to me until we recently went from Dialup to DSL. The DialUp was 'always connected' while it was dialed in, but I don't think that dsl is necessarily always connected.

ibroughton 05-19-2005 02:03 AM

Our ADSL is an always on connection, our office connection is an always on connection. I don't think that there is an 'on demand' option here in the UK. Obvioulsy there are occasional drop-outs where the router has to be rebooted but other than that it is a permenant connection

macmath 05-19-2005 08:12 AM

Oh well. I'm good at coming up with guesses, just bad at being correct.

On my (Westell 6100) router, under Expert Mode, there is a Configuration page where I can choose between Manual, On-Demand, and Always-On; it was on 'On-Demand' by default. When I saw that, I got this idea. The only reason that I haven't changed it to 'Always-On' is that I'm not sure what my ISP would have to say about it. However, that does not explain your office connection. Well, I'll keep thinking about it, because it has annoyed me as well.

I wonder how Mail, Safari, etc. interact with KeyChain...is there a daemon which handles this?

ibroughton 05-19-2005 08:55 AM

Isn't it just the system security deamon?

macmath 05-19-2005 11:27 AM

Quote:

Originally Posted by ibroughton
Isn't it just the system security deamon?

I don't know; that seems reasonable. I checked the following while checking mail manually:
Code:

shortname:~ shortname$ sudo fs_usage | grep Security
Password:
09:46:59  stat            /System/Library/Security/dotmac_tp.bundle                                        0.000043  Mail       
09:46:59  stat            /System/Library/Security/dotmacdl.bundle                                          0.000017  Mail       
09:46:59  stat            /System/Library/Security/ldapdl.bundle                                            0.000015  Mail       
09:46:59  stat            /System/Library/Frameworks/Security.framework                                    0.000022  Mail       
09:46:59  stat            /System/Library/Security                                                          0.000036  Mail       
09:46:59  open            /System/Library/Security                                                          0.000022  Mail       
09:46:59  stat            /Users/shortname/Library/Security                                                      0.000074  Mail

Using lower case 'security', or 'authentication' yielding nothing.

Using just 'sudo fs_usage generated nothing that jumped out at me and nothing much in general.

However, checking mail automatically generated much, much, much more in sudo fs_usage. Apparently the process is somewhat different.

Suppose one wrote a shellscript with an osascript in it which asked Mail to check mail. Then suppose one had cron execute this every 15 minutes or so. Perhaps this would be more like a manual check and would not have the same issue.

macmath 05-20-2005 06:57 PM

Quote:

Originally Posted by macmath
Suppose one wrote a shellscript with an osascript in it which asked Mail to check mail. Then suppose one had cron execute this every 15 minutes or so. Perhaps this would be more like a manual check and would not have the same issue.

I have verified (as you probably assumed) that doing this avoids the issue of Mail going offline. I agree that one should not have to do this, but on the otherhand it will avoid the problem until a fix has come from Apple. If manually checking mail as often as you like does not result in the same problem, then it would seem that it can't be the ISP's fault. The experiment I ran above demonstrates that Mail goes through a lot of work to automatically check mail; a lot more than it goes to for checking mail manually. It seems that somewhere along the way, it has a problem from time to time.

PS: As you might suspect: if several users are logged simultaneously (under FUS), the Mail which is in the active account when the script is triggered is the only one which will actually check mail, even though Mail is open for each of the accounts.

ibroughton 05-21-2005 08:56 AM

Thanks for all this info, it is causing me a great headache at the moment as our users are balming us for this issue. The more info I can gather that says otherwise the better. If it is something at our end, I can set about fixing it, but as it appears that the root cause is with Apple, not a lot can be done it would seem.

Has anyone done a script to check for mail that would work round this problem? (I know so little about scripting, I wouldn't know where to start!)

hayne 05-21-2005 09:53 AM

Quote:

Originally Posted by ibroughton
our users are balming us

I presume that the users who are on the most recent version of the OS are using Tiger balm ?

:)

retiredff 05-21-2005 10:05 AM

FWIW, I use Opera 7.54 with Linux, and have the same problem. My ISP is direcway.

hayne 05-21-2005 10:25 AM

Perhaps some useful info could be obtained by turning on logging in Mail.app

In Tiger you can do this via the AppleScript at /Library/Scripts/Mail Scripts/Turn On Logging.scpt (which presumably should show up in the Scripts menu).

For Panther, see this macosxhints article:
http://www.macosxhints.com/article.p...04101603285984

I note that the topic of getting debugging info from Mail.app was in this other thread:
http://forums.macosxhints.com/showthread.php?t=38996

macmath 05-21-2005 11:16 AM

Quote:

Originally Posted by ibroughton
Thanks for all this info, it is causing me a great headache at the moment as our users are balming us for this issue. The more info I can gather that says otherwise the better. If it is something at our end, I can set about fixing it, but as it appears that the root cause is with Apple, not a lot can be done it would seem.

I wonder if anyone has filed a bug report?

Quote:

Has anyone done a script to check for mail that would work round this problem? (I know so little about scripting, I wouldn't know where to start!)
This is very unsophisticated, but it works for me.
Code:

#!/bin/bash
if ps -auxw |grep -q Mail;
then osascript -e "tell application \"Mail\" to check for new mail";
else osascript -e "tell application \"Mail\" to launch" -e "tell application \"Mail\" to check for new mail";
fi

Some explanations are in order:
(A) If Mail is open, asking it to launch everytime seems inefficient and excessive, however, if Mail is not open when the script is called, then the delay while Mail opens causes you to get prompts for passwords on all accounts. Replacing 'launch' by 'activate' is not an answer to this as it will cause Mail to come to the front every time mail is checked and that would be annoying to users who are working when Mail is being checked. Hence, the script is as above.
(B) The -q flag is to keep grep silent.
(C) Amazingly enough, the script ignores the Mail processes of other users and will launch your Mail if it is not yet open even though other users have their Mail open.

After creating the file mailcheck with these contents with pico, I made it executable (chmod ugo+x mailcheck) and then moved it to /usr/local/bin so that it could be accessed by all users [I don't know if ownership has to be changed for all users to be able to use it or not]. Then, I used the system cron to call this script every 15 minutes. It will check mail only for the user who is logged into the GUI at the time.

I think I will do as hayne has suggested and turn logging on. Thanks, hayne.

ibroughton 05-21-2005 12:23 PM

I've filed a bug report and am advising users to do the same, the script works great, not sure if our users are savvy enough to get it installed as a cron job though.

ibroughton 05-21-2005 05:41 PM

Never even thought that this might affect another OS. Maybe it's something in the UNIX based core that is having the problem?

macmath 05-25-2005 09:14 AM

Here is a new thread where a user has this problem with one of his Macs but not with the other. That seems to exonerate the ISP as well.

macmath 05-26-2005 09:59 PM

On that other thread, the problem seemed to be fixed by deleting the user's keychain and then rebuilding it. So it might the the user's corrupt keychain.

ibroughton 05-27-2005 02:13 AM

No, deleting and rebuilding the keychain doesn't usually work. Even from a clean install (10.3 and 10.4) this error still occours

Photek 05-27-2005 03:48 AM

Been a bit busy over the last week and have only just noticed that the problem has gone away! Mail is no lnger asking me for my passwords!

I don't know about you ibroughton, but I still think it was BT or Blueyonder screwing me up, they are right scheisters!


All times are GMT -5. The time now is 03:09 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.