#!/bin/sh osascript -e 'tell application "Mail" to check for new mail'Then do chmod 755 ~/bin/check-mail, and make sure the script works before you proceed. Next we'll need to open a port. We're lazy, so we'll just use the gopher port. Create the file /etc/xinetd.d/gopher with this in it:
service gopher
{
port = 70
socket_type = stream
wait = no
user = your_username
server = /Users/your_username/bin/checkmail
}
Note that the {}'s have to be on separate lines. Then type sudo service gopher start. To see if this works, type telnet 127.0.0.1 70. The Mail application should go fetch your mail. Now for the juicy part: add this to your .procmailrc file (on the mail server):
:0c | wget -T 5 -q http://your-home-ip:70/With this in place, whenever you receive mail, Mail.app will immediately go fetch it. No need to keep hammering the server every five minutes. If you keep moving your computer around, you might find it helpful to get a hostname from dyndns.org.
[robg adds: I haven't tested this one...]

