Quantcast

Forums | MacLife

You are not logged in.

#1 2003-01-06 12:24 am

Buzzword
Member
From: college, ny
Registered: 1999-03-21
Posts: 7255

yay fetchmail!

I finally got the time and lack of apathy to get my mail checking up to par!  woo!  So basically, here were my two problems:  1)  my college supports Kerberos, and since we're all on the same ethernet network it's a good idea to use it, but my email programs didn't support it (for the Mac and PC, there's a program that runs on the side that Kerberoses apps for you).  2)  I like to leave my email checking on in the background, but that causes a problem when I want to check my mail from other computers, cause any mail recieved more than about 10 minutes ago would have already been checked.

So I set up fetchmail plus a little Perl script smile  Basically, all my email checking is done through local mail.  The Perl script has two functionalities.  The first is to just check if there's any new mail, and, if there is, to send a mail to a dummy accounted named check_mail.  This is done every 10 minutes through cron.  The second option is to just go ahead and download the mail, then forward it to various local accounts I have here and also clears any mail in check_mail's account.

So now I have three ways in which this script is used.  First of all, every 10 minutes a cron job uses the checking function to see if I have mail.  Second, I have an applet on my Gnome panel that constantly polls check_mail's mail spool to see if there's any mail.  As soon as the cron job finds mail for me on the server and sends that dummy mail to check_mail, the applet tells me I've got mail waiting.  Also, if I click on the applet, it calls the Perl script with options such that if it's already seen that there's mail waiting it'll download it, otherwise it just does a normal check.  (I can't have the applet just check the POP3 account because it doesn't have Kerberos support).  Thirdly, my email client calls a precommand to that script to download any mail that's waiting on the server, then just checks all those local accounts.

So now I have full Kerberos, plus an interval checker, plus the ability to keep all that running without giving up the ability to check mail remotely.

I know it's not much, but I'm happy with it smile


Just another CitiBank hacker...

Offline

 

Board footer

Powered by PunBB 1.2.6
© Copyright 2002–2005 Rickard Andersson