iPhone leaving POP3 lock on mail server until powered off

Yesterday, I had a new iPhone user complain that they were getting a message about a POP3 lock when attempting to get new messages from the mail server after checking email on their iPhone.  I have been doing this for sometime and never noticed this issue, but decided to investigate further when I had time.

This morning, I ran a number of tests and was able to easily reproduce the lock message when attempting to check email after the iPhone had checked the POP3 server for email.  This is typical behavior that I have experienced when using multiple computers and one POP3 account.  The lock file is used to ensure that only one computer is updating the mailbox at one time (since typical POP3 behavior is to download messages AND remove them from the server). 

What I was surprised to find was that after I exited the Mail application on the iPhone and left it at the Home screen… the lock persisted on the mail server.  I waited a minute, and was still getting the message about the lock existing on my POP3 mail server.

I found through trial and error that it appears the iPhone continues to maintain the lock on the POP3 server until the phone is powered off.  In our case, 15secs after the iPhone is powered off, the lock is removed from the mail server (or at least allows the desktop mail client to download mails from that POP3 account).

After finding this, I realized that my common behavior would have never caused this to appear (for me).  My typical use case is that I check emails while out-and-about, or in a meeting.  When I have checked messages, I power off the phone.   I return to my computer and press Send/Receive (or Get Messages) and the new emails come down without an issue.  I guess I have never checked my email on my iPhone and while the phone is still on try to check them from my computer.

Setting up SMTP AUTH under RedHat 7.3 (Linux)

I recently had to configure a Linux machine to require SMTP AUTH so that we could test a new product at Codonics. So I wanted to provide a little guidance and some insight that I gained while working on this task.

The requirement was “basic” SMTP AUTH… so PLAIN/LOGIN functionality, no need for TLS, and use the existing user accounts on the linux machine. Local email needs to still function (mail from cmd line) but anything from a “remote” user would require a username/password to be verified before allowing the machine to send the email.

Notes:
======
1) need to allow sendmail to talk to more than just localhost (allow network connections)
– firewall (open ports, or disable for testing)
– “dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA’)” line in the sendmail.mc instead of “DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA’)” …. adding the dnl in front of the command basically comments it out.

2) need to install from source (for our RedHat 7.3 machine, I used these versions):
– cyrus-sasl (v1.5.24)
– sendmail (8.11.6)
* these versions were selected because they matched the rpms/version that were already installed on machine. I needed to be rebuild to provide support for PLAIN and LOGIN AUTH methods… which I understand are not typically available via RPMs.

3) Important lines in the sendmail.mc:
————————————————————————————————
define(`confAUTH_OPTIONS’, `A’)dnl
TRUST_AUTH_MECH(`LOGIN PLAIN’)dnl
define(`confAUTH_MECHANISMS’, `LOGIN PLAIN’)dnl
————————————————————————————————
make sure that none of these have a dnl in front of them… that would cause them to be ignored (considered comments).

4) There needs to be a file: /usr/lib/sasl/Sendmail.conf (note the upper-case S in filename) with the following line (only line):
– “pwcheck_method: PAM”

5) Not sure if this is actually required, but during my travels, I found that I need the file /etc/sasldb to exist and it can only be read/writeable by root so:
– touch /etc/sasldb (to create it if necessary)
– chown root:root /etc/sasldb (to change it to owner/group root)
– chmod 600 /etc/sasldb (to ensure that only root user can read/write file)

6) I did confirm that these changes will only require AUTH on connections from external mail clients (doesn’t affect mail cmd-line on the host).

7) If you want to test via “telnet host 25” the sequence of events would be:
-> EHLO hostname (doesn’t matter what you use as hostname)
-> AUTH LOGIN
<- 334 VXNlcm5hbWU6 -> anNueWRlcg== (Base64 encoded username, ie: jsnyder thru the base64 encoder)
<- 334 UGFzc3dvcmQ6 -> dGVzdGluZw== (Base64 encoded password for username above)
<- 235 2.0.0 OK Authenticated (this is a good sign... no need to continue) -> QUIT

Useful commands:
==============
– m4 /etc/mail/sendmail.mc > /etc/sendmail.cf (converts the sendmail.mc file into the necessary sendmail.cf for sendmail to use)

– sendmail -d0.1 -bv root (shows if SASL support is available in sendmail in the list of “Compiled with:” items)

– sendmail -d0.20 -bv (shows location it is expecting sendmail.cf … “Def Conf file:” line).

– sendmail -O LogLevel=33 -bs (runs a quick instance of sendmail with logging turned up to level 33, and then you can enter “ehlo localhost” and it should give you back the options for the server… should include the line: “250-AUTH LOGIN PLAIN” when everything is configured correctly).

Helpful Links:
==========
http://www.jonfullmer.com/smtpauth/saslv1.html
http://www.linuxforums.org/forum/servers/5206-smtp-auth-sasl-sendmail-not-getting-along.html
http://linuxgazette.net/153/misc/lg/smtp_auth_problem.html
http://www.sendmail.org/~ca/email/cyrus/sysadmin.html
http://lists.freebsd.org/pipermail/freebsd-questions/2003-June/008118.html
http://www.sendmail.org/~ca/email/auth.html
http://www.joreybump.com/code/howto/smtpauth.html
http://linux.derkeiler.com/Mailing-Lists/Fedora/2006-06/msg03793.html

Sendmail downloads: ftp://ftp.sendmail.org/pub/sendmail/past-releases/

Base64 Encode/Decoder: http://www.motobit.com/util/base64-decoder-encoder.asp

Content of my “sendmail.mc” file for comparison:

divert(-1)
dnl This is the sendmail macro config file. If you make changes to this file,
dnl you need the sendmail-cf rpm installed and then have to generate a
dnl new /etc/sendmail.cf by running the following command:
dnl
dnl m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')
VERSIONID(`linux setup for Red Hat Linux')dnl
OSTYPE(`linux')
dnl Uncomment and edit the following line if your mail needs to be sent out
dnl through an external mail server:
dnl define(`SMART_HOST',`smtp.your.provider')
define(`confDEF_USER_ID',``8:12'')dnl
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dnl
define(`LOCAL_RELAY', `mail2.n1.codonics.com')
define(`MAIL_HUB', `mail2.n1.codonics.com.')
define(`SMART_HOST', `mail2.n1.codonics.com')
define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
dnl define(`STATUS_FILE', `/etc/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`no_default_msa',`dnl')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
dnl The '-t' option will retry delivery if e.g. the user runs over his quota.
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
dnl This changes sendmail to only listen on the loopback device 127.0.0.1
dnl and not on any other network devices. Comment this out if you want
dnl to accept email over the network.
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
dnl NOTE: binding both IPv4 and IPv6 daemon to the same port requires
dnl a kernel patch
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')
dnl We strongly recommend to comment this one out if you want to protect
dnl yourself from spam. However, the laptop and users on computers that do
dnl not have 24x7 DNS do need this.
FEATURE(`accept_unresolvable_domains')dnl
dnl FEATURE(`relay_based_on_MX')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
Cwlocalhost.localdomain

Netscape 7.2 Email Client and Internet Explorer Browser

I realize that many have already migrated to another program for email (instead of Netscape 7.2). However, I was asked to solve the problem of getting Netscape 7.2 email to open links in IE 7 that required a non-obvious answer (and some googling).

I am documenting it here, incase someone else wants to do the same thing.

Basically, you need to edit the prefs.js file for Netscape (C:\Documents and Settings\*username*\Application Data\Mozilla\Profiles\default\*.slt\prefs.js)

Adding the following lines:

user_pref("network.protocol-handler.app.http", "iexplore.exe");
user_pref("network.protocol-handler.app.https", "iexplore.exe");
user_pref("network.protocol-handler.expose.http", false);
user_pref("network.protocol-handler.expose.https", false);

Also, important to note that you need to have Netscape closed when editing this file… otherwise the changes will not take effect. Easiest way to ensure this, make sure that netscp.exe isn’t running in Task manager.

Removing a couple of nuisance icons from “My computer”

How to remove “Nero Scout” from “My Computer” [Link]

This command worked for me:
regsvr32 /u "%commonprogramfiles%\Ahead\Lib\MediaLibraryNSE.dll"

How to remove “My Sharing Folders” from “My Computer” [Link]

This command worked for me:
regsvr32 /u "C:\Program Files\Windows Live\Messenger\fsshext.8.5.1302.1018.dll"

Remove Snapz Pro X’s splash screen

Ever since installing Snapz Pro X, I have been interested in turning off the splash screen that appears every time I startup my MacBook. Today, I took the time to do a little digging at Ambrosia Software’s website and found the FAQ that answers my question:

Can I get rid of the Splash Screen?

Which provided the following solution, open a terminal and type in the following:
defaults write com.ambrosiasw.snapz SkipSplashScreen true

Custom Folder Icons in MacOSX

I found the following site that explains what you need to do, I will simply summarize for my specific application/needs:

http://www.lockergnome.com/usrbingeek/2007/05/03/how-to-make-custom-drive-and-folder-icons-for-your-mac/

  1. Make an image that is 128px by 128px in Photoshop (other other program)
  2. Save as a PSD or as a PNG file with a transparent background
  3. If you don’t have Apple’s Developer Tools installed, install them now
  4. Open “Icon Composer”, /Developer/Applications/Utilities
  5. Drag your PSD/PNG into the 128px square and confirm the defaults for the dialogs
  6. Save this file to your computer
  7. Download Icns2Rsrc
  8. Open Icns2Rsrc and File->Open and select the file you saved from step #6 above
  9. It will save a file with the same name and location (with a .rsrc extension)
  10. Command-I that file and and the folder you want to use the new graphic
  11. Highlight the graphic in the upper right of the .rsrc file and Edit->Copy (Command-C)
  12. Highlight the graphic in the upper right of the folder and Edit->Paste (Command-V)
  13. Close both “Info” dialogs and the folder should now display your custom graphic in Finder (including Cover Flow view).
Examples:
CustomFolderIcon-MacOSX.PNG

 

CustomFolderIcon-MacOSX2.PNG

Disable Content Preparation Progress Dialog in Adobe Acrobat

Content Preparation Progress Dialog

If you have been annoyed by this following dialog when you open PDF files in Adobe Acrobat v8, here are the two different ways is the way you can disable it.

  • Rename the Accessibility.api and ReadOutLoud.api to Accessibility.old and ReadOutLoud.old (or you can move them to a different folder). These files are found in C:\Program Files\Adobe\Acrobat 8.0\Acrobat\plug_ins. This solution however, has the possibilty that a future upgrade of Acrobat would cause these plugins to renable.
  • Remove “Speech Recognition” from the Language Tool bar, settings, Installed Services. The other way to get this, if you don’t have the Language Toolbar visible, is via the Regional and Language Options Control Panel, under the Languages Tab, and click on the Details button and then you can remove any references to “Speech Recognition” that you find under the Installed Services.

Winmail.dat Viewers (Mac and Windows)

I occasionally run into a winmail.dat file that I can’t open (typically because some outlook user has “rich text” as their default email type. Although, occasionally they aren’t sure how this happened and the default is HTML or plain text.

I wanted to post on two utilities (one for MacOSX and one for Windows) that allows you to open these files and see the attachments contained within these annoying files. Thanks Microsoft!

Windows:
Winmail Opener
http://www.eolsoft.com/freeware/winmail_opener/

MacOSX:
TNEF’s Enough:
http://www.joshjacob.com/macdev/tnef/index.html

Useful little programs for getting around these problematic files, and definitely a lifesaver when you have a winmail.dat and need the contents.

SyncServer Unexpectedly Quit (resolved)

I believe that I have finally resolved the problem on my MacBook when starting Mail.app that it would display this error message “SyncServer has unexpectedly quit” with a relaunch button.

After doing a few google searches I found a site that referenced this problem a way to resolve it.
Link

Since, I wasn’t using .Mac for anything the solution was to:
1) Delete the following folder: /Users//Library/Application Support/SyncServices/
2) Reboot