Emacs pinky

Beware of attractive Blondes in tight cloths…. lol

On a lighter note, I’ve had emacs on the brain lately. Which is some one strange as I’m Vi man with a strong liking for VIM.

Generally GNU Emacs is the emacsen by which I compare emacsen. I first learned the basics of using emacs day to day using XEmacs on a Windows machine. Nice editor although i’ve never cared much for the Meta key. Generally I found emacs key bindings to be the kind, that if you could remember what type of key sequence it was you could figure it out. Generally things are some what consistent, Control + D, deletes the next character (right of the point). While Meta + D deletes the next word. Basically as I remember it for regular commands. A Control+Key combo does a smaller action while a Meta+Same Key combo does a larger action. Like if Control+Key works on words, Meta+Key works on lines e.t.c. And classes of commands I think generally had a consistent prefix. Control+X+Control+F Open/Find files, Control+X+Control+S Save current file, Control+X+Control+C exit editor, e.t.c Most of the mutli-file Editor related commands I recall focused on a Control+X prefix arrangement, like Contorl+X+2 to open a second buffer, Control+X+O to switch to the other e.t.c

I’ve tried a number of emacsen but never found one I really like enough to use a lot. GNU Emacs I don’t’ care much for but respect it among emacsen. I find it to fat and slow to be effective. On my desktop it’s no problem to run it, theres a lot of RAM and a fast CPU. On my laptop theres a budget CPU and moderate RAM so it’s slow as nails to get it’s motor warmed up. Not being much of a GNU Emacs man, I usually keep a fairly out of the box installation.

I haven’t tried XEmacs on my laptop but I don’t expect it to be faster then GNU Emacs. I think I would prefer XEmacs though.

MicroEMACS 4.0 and variants I’ve used and enjoyed, you could say MicroEMACS is my favorite. I like MicroEMACS in that it is small yet extensible. With just enough features to be useful Some what like Vi but with perks. Most of my issues with the editor would be solved by learning more about emacs ways of doing things and the marco language. I remember poking around a Traditional C style code base as well.

The only emacsen I find my self using often when I do actually use one. Is mg, a Micro GNU Emacs like editor maintained by OpenBSD. It’s a pretty bare bone emacs but it gets the job done nicely. Since I’m to stuborn to install Vim on my file server (OpenBSD) and would _NEVER_ dream of installing GNU Emacs on it. I’ll usually use mg when I need to edit multiple files. Although I could probably use Window and multiple instances of nVi for the same purpose.

I’ve tried Jove but never cared for it. An intermediate between the GNU Emacs/XEmacs variants and MicroEMACS variants I’d say.

I generally have preferences but I do believe in knowing a lot of things when possible. While I don’t remember most of the commands I learned in XEmacs, and prefer the Vi style of doing things more to my taste. Especially to my wrists and fingers liking !! (Escape Meta Alt Control Shiftritis). I can use Emacs fine but generally prefer not to. I generally prefer a light and fast emacsen to most other editors if I can’t have a Vi based one.

Ippimail

www.ippimail.com offers a free webmail service, the catch?

You get a few advertisements in the webmail interface, to be honest I barely notice them unless I’m looking for them. Many peoples sig-blocks on internet forums are more obtrusive. A single line appended to out going E-Mails as well. Just a sig-block consisting of a one or two lines of message I think.

--

Email and shopping with the feelgood factor!
55% of income to good causes. http://www.ippimail.com

Compared to some mail I’ve received with a yahoo html ad a page long at the end of the E-Mail!! This is no problem for me.

The money they get from it, goes to them and a good portion of it to several charities which is a very good thing IMHO. Plus like 10% to supporting Open Source Projects, a very nice thing considering that they use a lot of FOSS.

The Webmail is essentially a Squirrel Mail setup with a number of plug ins and customizations. Including a theme thats much nicer then any of the ones I’ve seen come with Ippimail, which are not provided ^_^. The usual set of style sheets and features of course.

I’ve come to enjoy using Squirrel Mail and when I learned about Ippimail it was from reading about Squirrel Mail on Wikipedia, so I knew I’d probably get a good Web mail interface. What I was worried about was the ads and possibility of spam. I remember when I had registered for a free Hotmail account some years back, it was like being placed in the worlds biggest Please_Spam_Me_List loool.

With ippimail I registered for the account and filled out even the extra questionnaire, which is for targeting the ads better and what not. So far I have gotten _0_ spam E-Mails !!! Heck, I get more then that from my ISP’s account. The data involved not really a major security risk ether. The Terms of Use and Privacy Policy is compatible with my views, and I can be quite pissy about agreeing to such things too.

I’ve only had two issues with Ippimail and I’ve found excellent service if thats what you want to call it. The average response time has been within 24 hours. And very friendly support for issues, unlike a call to an ISP. No need to call 3 freaking times to get some one competent, an issue on ippimail gets some ones attention, that actually can tell the difference between a file and a folder. I’ve been very satisfied with Ippimail in every thing I’ve seen and I’m a rather picky bastard :/


Maybe that’s the difference between the people at Ippimail and those at an ISP, they ain’t doing it just for $$$$.

One thing that I really love about the Squirrel Mail software they chose for the actual webmail interface. Is because it’s output is all HTML (with Javascript optional) and the people creating it had a nice brain. You can customize a lot of the User Interface, a very nice feature for people like me (Yes I am a KDE user not a Gnome user :-P).

We have the ability to have mail forwarded to another account, e.g. Ippimail to your Primary E-Mail. To have Ippimail fetch messages from another account (via POP3) and to set up Mail and Spam filters. It can filter messages into different folders based on the filter rules. And even provides a Spam/Anti-virus filter option. I’ve never needed them but my Ippimail account is basically my personal E-Mail address, so I’m not prone to signing up for accounts with it (I use my ISP’s SpamMeAlot address for that).

The address book used while composing mail is crappy IMHO but if one enables the Javascript version you get a quite nice one. It’s also never tripped my popup blocker or slowed down my browser ether. If Konquerors (annoying) Javascript engine can handle it fine I’d be even happier with it. Unfortunately while Ippimail seems to use the import/export address book plugin (hooah!). It can only handle CVS files, one thing I like about this; especially since you can customise the output. Is it means it’s not to hard to use other tools (sed, awk, perl, e.t.c) to process the file into a format more suitable for other things of Unix nature. But it means no real support for Outlook Express or Thunderbird address books 🙁

E-Mail storage is roughly 250MB right now, not as big as some (like gmail) but it’s more then enough for most people I think. Unless you’re prone to storing a lot of junk mail with attachments :/ Even with a real mother load of messages piling up, I’ve never surpassed 30-50mb before. If I really wanted to keep a few 100MB of mail in storage, I’d download it and archive+compress it %_%

The UI is fairly intruitive as any you’ll find and easy to change in options. It’s also very easy on the eyes, in addition to a simple E-Mail system. It comes with fairly simple Calendar, To-do list, and notes system. They even will provide a Blog with the account if wanted. Since I use Live Journal, I’ve never investigated it. I rarly use it for more then E-Mail but I’m interested in the To-Do and Notes plugins they have installed.

As a Web based Mail User Agent of sorts, I’ve found Squirrel Mail top notch and Ippimail to be a great provider. I’ve used many programs but never really been happy with any for E-Mail. Especially for dealing with mail in _volume_ and from multiple PC’s. So far, ippimails usage of squirrel mail has proven to be one arrangement I really like.

The website is quite compact and down to business, I like it even if it’s not very flashy. Theres links for site news, blogs, shopping, and google-searching. The thing Ippimail does best is E-Mail and thats what I use it most for 🙂

I almost went with a gmail account but didn’t quite like Googles policy, when I found out about ippimail I probed for awhile and thought about it. Then I dove in head first and I’m glad I did. I don’t like software that gets in my way, I like software that helps me get my work done, efficiently!

Things I would pay for….

Being an extraordinarily stingy bastard, I’m generally only willing to pay for what I need or want a lot. An example would be The Regiment, I want the game… So I’d be willing to buy it. I don’t need an IDE so why would I buy Microsoft Visual Studio??? And to be honest I’d rather make a charitable donation because of how much I love and use Vim then pay for MS Visual Studio $_$

I’m used to not having a lot of money, so needless to say while I don’t have problems spending a lot of money. When I do spend my money it is often as carefully Analyzed and as wisely as I can.

Products and services I would pay for if I could afford to:

  1. Strongspace
    • Strongspace would save me so much trouble. Not only would it make things easier then having to set stuff up on my lan and configure every thing (clients/servers) and deal with Winsucks | Nix relations… Namely that Windows my options. My server lacks a good sized hard drive so I can’t even make use of a similar solution with my own hardware. Even the cheapest plan on strongspace could probably hold my entire home directory! 5GB storage for $15/month is not bad. The medium plan costs more (25GB Storage for $50/month) but it could hold all of my personal data on the network. Geeze my laptop doesn’t even have 25GB of data on its 80GB disk. And my server has less free-space then strongspaces startup plan offers :/. If I could afford strongspace I would definitely go for it fast

  2. Live Journal
    • While I wasn’t sure if I would like it at first, nore blogs at all. Since I started using Live Journal I’ve come to like it quite a lot. If I had the spare money I’d go for a paid account. While my account at this time is basic and I do occasionally experiment with setting it to Plus (ad supported), feature wise I’ve found Basic (free, no advertisements) to be more then enough. A paid account would probably be more helpful to LJ then useful for me. I like Live Journal so I think it would be worth while even if I don’t need the extras;-)

  3. Ippimail
    • Webmail with a heart, they use Squirrel Mail with several plug ins and a custom theme. It looks very nice and provides a lot of features for a free service. Most of there setup is using Open Source Software and a portion of their profits goes to charities and supporting OSS Projects. The ads on the webmail are basically what pay them. The advertisements on the webmail are very on-obtrusive and dispite having filled out the surveys to the fullest, I have _NEVER_ gotten an ounce of spam from ippimail. I wish I could say the same about my ISP !!! Ippimail has saved my mail… Since I can’t afford a new UFD and mailx+lynx on my server would be a bitch. I’ve all ready tried mutt+lynx, I liked it but not when people sent me HTML mail ! I’m glad ippimail is free, because I probably wouldn’t be able to use it other wise 🙁 but it is a service I would pay for if I could + had to.

  4. DX For Nix
    • Some way to play any game on Linux and BSD and an assurance that any game would work. Would be worth a small fortune to me. The closest thing to it only works for Linux based systems but not on BSD using the Linux ABI. I don’t use GNU/Linux very often. Although I’d rather run a GNU/Linux Distro on my desktop then Windows XP hehe.

  5. Vim
    • If I ever win the lotto, oh boy is there going to be a donation sent this way 🙂

I don’t know why…. but some how every time I start looking at web browsers. Lynx just keeps coming up as #1.

Lynx seems to be able to give me every thing I could possibly want out of my browser. Except for Tabbed Browsing, the options of Images, and most importantly… being able to lay out a page decently !

Links does a much better job on laying pages but I’m more comfortable with Lynx, dang I wish I had time to see what trying to create a new browser based on the Links and Lynx code bases would result in :/

Netscape navigator 9 I like a lot but it’s just too bloody slow.

Firefox 2 I can’t stand, it’s crap as far as I’m concerned… Hopefully 3.x will rock.

I like Seamonkey but since I use only webmail now, theres no need for it when theres Firefox and Navigator.

Opera I like a lot, it’s got a few rough edges but it’s one of the best browsers I’ve ever used. I’ve got to reinstall it on my desktop, keeps crashing…. never had that problem before. It’s nice enough to ask to restore my session on the next run tho.

Konqueror and Safari I like a lot but nether are portable enough for my needs, *yet*

I need to find a decent web browser, some thing I can use consistantly on Windows NT, Linux i386/AMD64, *BSD i386/AMD64, and Mac OS X. While I don’t have a Mac and rarly use Linux Distros. I like to have the SAME program as much as possible between OSes. Like Vim, works on every OS I’m likely to use and nearly any OS I’ll probably bump into. The major difference is I tend to preffer GVim (Vim’s GUI) only when I don’t have a decent terminal emulator, like on Windows XP. CMD.EXE is a poor one compared to Konsole.

Partition plan

I’d like a small partition in the lead, doesn’t need to be big, I’ll probably use OpenBSD or an old FreeBSD 6.0 disk for setup. I just want a pretty minimal install, kernel, manual pages, and required binaries. I’d like it to be a pretty small slice but with enough room to hold a few files in a ‘pinch. Its basically just there in case I need to do some recovery operations and can’t boot the primary OS.

As far as that goes, PC-BSD v1.4 when it is released.

# PC-BSD v1.4
ad0s2 66560MB (65GB)
/ 10240MB (10GB)
/swap 1024MB (1GB)
/home/ 20480MB (20GB)
/usr/ 25600MB (25GB)
/var/ 512MB (0.5GB)

All sizes are approximate but I’m figuring I should have 7-8gb free space in the slice. 512mb will be more then enough for /var, my current system has /tmp linked to /var/tmp and is only using 120-150mb on a 2.5gb partition. 10GB should be plenty for the root partition. My laptops not even 10GB with /:/usr:/home all being on the same partition. So I expect roughly 20gb for my home directory and ~25gb to be plenty for /usr. I could probably thin back /var and add a nice fat /tmp/ but I figure the spare space on / will do if I need the extra room in /tmp when un-packing a file. /usr/ports and /usr/src is only about 800-1200MB so it won’t make much dent into my /usr partition.

# My Laptop, PC-BSDv1.3.4 is on ad0s3, the other partitions are for storeage
Terry@Dixie$ df -h 8:41
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s3a 36G 8.2G 25G 25% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ad0s3e 2.9G 135M 2.5G 5% /var
/dev/ad0s1 10G 1.1G 8.9G 11% /mnt/ad0s1
/dev/ad0s2 20G 48K 20G 0% /mnt/ad0s2
linprocfs 4.0K 4.0K 0B 100% /usr/compat/linux/proc
Terry@Dixie$ 8:41

I can finally clean up my laptops partitions… which I have wanted to do for a long while but havn’t had time or wish to do to a ‘stable’ system. If its not broke don’t fix it ! But since I’ll need to reformat, may as well. I like to have issues of partitioning set out BEFORE I do any install. That way I know roughly what I want before hand. So I can adopt it to what I need when the situation comes up. As I have it now, I’ve got a few Gigs worth of free slice planned, more then enough for a minimalist BSD install. Plus a few free gigs on the main PC-BSD slice. So I can add another partition if I need to, it does leave me room to use growfs on my future PC-BSD install if I need to later on.

I hope the Release will be soon, that way I won’t have to lose much time. My home directory is cut down to only what it needs to function with copies of the backups near by in case I need some thing. Once my little synchronizer is done I can complete my change of browsers and get Vectra (an OpenBSD box) setup running an FTP server on the LAN to felicitate it. Thus I should again be able to keep my bookmark/mail/settings the same between computers again. Since I remembered Lynx has good support for Vi and Emacs keybindings… I’m almost tempted to switch to using Lynx as my primary browser but I know sasclan.org is pretty crappy in Lynx !!! And Links doesn’t work natively on Win32 yet afaik.

5 minutes to local 0500…. time to go to sleep !!!!

http://www.nabber.org/projects/appupdater/

Hmmmmm, I might want to take a look at that later.

Days log

While the automatic update between Netscape Navigator 9.0b1 and 9.0b2 was not so automatic on my laptop, it was still painless. Just had to download the Linux tarball and unpack it. I saved it to /tmp as I usually do when I download files I’m not going to need much.

Dixie# cd /usr/compat/linux/opt/
Dixie# ls
navigator
Dixie# mv navigator navigator_9.0b1
Dixie# tar -xzf /tmp/netscape-navigator-9.0b2.tar.gz
Dixie# ls
navigator navigator_9.0b1
Dixie# rm -rf navigator_9.0b1/

Even took a backup of the install just in case.

Today we got to meet to new dogs and a nice family. We’ll be taking care of the dogs while they’re on vacation.. and financially thats a pretty good thing for us.

Managed to launch part of my continuation training today. Was just Hellfish, Duke, and Me.. Chester and Lake seem to have been lost in the reboot. For the most part we failed the missions, although all but one was completed….. We went into over time on all but 1 and the other, was neutral. We had met the conditions before time was up but didn’t know it till 40 seconds later.

We did pretty good if you ask me. Because when I sat down and made the list of scenarios. I had plotted the times figuring on 6-8 players. And trying to find a flexible border between the impossible and the possible. Well, I had planned there to be a fairly good sized [SAS] presense and some good applicants. On one mission we went just a wee bit over. But I know if we had two 4-man Elements and proper pre planning. We would’ve taken the mission in half the required time.

With just 3 people I didn’t really expect to complete any successfully. But I think it showed Duke and Hellfish a bit more about me. You see, when I was young and had time to train myself harder. Well I still do, just not as often as I’d like.

I set high goals to obtain, make the as good as impossible or highly improbable a completed mission. Not always successful… but I would train till I got better, till I could do no better. I remember my own little ‘personal’ one man training sessions in SWAT3. I would set the map to Brentwood residence. Which is a large 3 floor house, back and front lawns swimming pool. With a Den, Bedroom, and Bathroom on Level 1. Kitchen, Family room, Library/office’et, Bathroom (2 rooms), Huge Living/Dinning room, and garage on Level 2. And 4-5 Bedrooms upstairs including 2-3 closets and 2 bathrooms. Huge house, kinda nightmare to clean… lol. Mission was simple, 2 Adults and 3 Children that needed to be evacuated and maybe 5-6 suspects in body armour with light assault weapons holding them hostage.

The [SAS] Record time was like 54-67 seconds or so. 10 Men, no team casualties, every thing pre-planned. Mission complete 100%. My personal training op was to try and break that record. I never succeeded, not once but I learned greatly.

To make things harder on my self, I would take my usual S3 training loadout. A Compact primary for working in close confines. Usually the AKS74U with Kobra sight or if running the [SAS] Realism Mod (which included a large weapon mod). I’d bring my HK53 which used the same sight overlay as the MP5 family (I didn’t like the Aimpoint scopes). I’d load it with a SINGLE magazine of FMJ, pack a pistol with a suppressor. Normally a HK MK23 .45 Cal or HK USP.40 Cal with ONE magazine of JHP loaded. A single CS Gas canister, one Flashbang, and a lone C2 Breaching Charge. And my favorite uniform, the Guardian duds with Navy Blue pattern. Later on I would do it with [SAS] PTE uniform.

To make it even harder, I set the AI to the max and the difficulty to the hardest mode. Level 1, rear poolside entrance. I’d head in stealth to first contact then go dynamic when necessary. Or when I decided a loud tactical aid was just to good to pass up. I’d make use of the Opti-wand when I wanted to be extra cautius, like coming up into the blind hallway on the top floor. Or making entry on the back door, where a Suspect might be lurking on the near by stairs.

I made the level as hard and realistic as I could. Secured the area and even after the game gave me the mission complete. I’d keep going till I had personally cleared every room. After awhile and a lot of getting shot at. My average *best* clear time. Was 1:07, far from my mark but the best I could do. I had learned some valuable lessons and how to ‘rough it’ without good equipment. Later on, I’d learn how to master any weapon in Raven Shield. When I was a bucking recruit, you could hand me a Mac-9/11+SD or SR-2 off the rack and I could put a two-round burst in a tangos head from quite a distance away as fast as I could think fire.

Today, well I’d probably miss by a mile at that range on my first try. Lack of hours in the shoot-house but it was great fun training to my sharpest edge. I looked for the impossible situations and I tried to best them, usually I couldn’t or it would be close. But I would do so and try to walk away the better for having tried.

As a Recruit I had a lot of fun, my typical day consisted of going through the map list like 3 or 4 times. Usually I’d start off in an Element with Rasa and Leon, then end up alone several hours later to keep on going. Being able to complete a mission on my own was not to far off. As a trooper I pushed my self even further then that. Completing a mission on my own was not a problem.. just an inconvenience. After awhile… I got rather bored, what else was their to do? I even started to do less then ‘as perfect as I could get’ things. To make it more challenging — instead of taking the most professional, safest, most effective routes. I would take the most dangerous, insane ones. I learned how to handle them as best as I could. It even got to the point that I thought about leaving the [SAS], boredom set in.

Then some day some body decided to make me an SAS_LCpl_Spidey01. In my opinion I was the worlds biggest failure as a LCpl… Lazy good for nothing bum with often no one to train. Eventually they made me a Cpl, I took it as a second chance. It was during those days that I got to see a lot of close training time (Trp->LCpl->Cpl). Later on I was to become an SSM.. and now I’m the RSM. As I look back on my past, I think Recruit, Corporal, and Squadron Sergeant Major are my favorites. As a Rct I got to learn so much and wanted to help pass it on. As a Cpl, I could work on passing it on and as SSM. My mind started to grow tactically to make up for the slack in my shooting skills. I’m not sure if I enjoy being the RSM more then I did SSM, it’s to early to tell. But right now I find my self situated just where I want to be.

I’m an SNCO and able to help in more business matters that I would like to be of service in. Yet I’m also close enough to the front lines to keep limber and have fun. I don’t really know if theres any one more active then me thats above Cpl. I love the fact, that I’ve trained personally with almost every one in [SAS]. And those that I have not, I’m on familer enough terms with. Like me and Random, we’re not exactly bosom buddies or any thing. But when it comes to server time, we’re not strangers ether. How many people in [SAS] can say the same? I’ve trained with all of the Rct personally, I’ve helped the Troopers during their Recruit time. And I’ve seen many of the NCO grow since pre-rct times. Most of the people who trained me are gone… But those I have trained with know me as Spidey01.

I’m not chained to a desk, yet I’m not glued to the field; It’s awesome. I remember when I was a NCO, my favorite past time was to try and get the younger generation to one up me. If I could do it to Gold Star perfection, I’d try and get them to go for the Platinum one. When ever people have been able to surpass me, I have been very greatly pleased.

I hope some day, to see the outcome. Being a member of the [SAS] has had an impact on my life, for the better in my humble opinion. And I hope it does for others, I found a group of kindred spirits when I stumbled on [SAS] Training Grounds #1 one day. Looking for a smoke-free zone I could play RvS with a realistic frame of mind. I’ve learned much, grown much, and have seen a lot since then. Here is part of my home… And I’m happy enough with it. In years to come maybe the same or similar will shine true for other Members.

Notes

archive: pax -wf archive /what
append to archive: pax -waf archive /more
unpack: pax -rf archive # unpacks in current directory
list: pax -f archive | $PAGER

the -z option adds gzip compression as with tar.

Also the -i and -v options work as per convention.

exclude file with the -c ‘file’ command or only file with -n ‘file’. Like:

pax -rf archive -c ‘ignoreme’ && pax -rf archive -n ‘onlyme’

gzip -# works well for the archives, where # is 0-9 low-high compression.

Well I’ve solved one problem, now to tackle another problem.

Solved:

KMail would crash when ever moving or deleting a message in my SMB mounted mailboxes.

Solution? I backed every thing up by moving them to /tmp. Replaced my .kde/share/config/kmail* and .kde/share/apps/kmail files with roots which was never configured. Then I set up kmail and imported my messages from backup.

That fixed it all but now I have a new problem:

How to access mail from any where on my network.

THe Soultion I’d like, kolab- > KDE Group Ware xD

Man, I don’t look forward to source installing that monster on a 500Mhz Pentium III !!! Maybe I can run it in a FreeBSD Jail for security as well.

SSMTP/Getmail how-to part III

back to part II

The getmail documentation said that was the best way to automate it, and its bloody better then buling up getmail with ‘daemon mode’ code. But also like the documentation said if we want to ‘stop’ this daemon like mail checking we need a script for cron to run getmail through and program it to not run getmail if a file is pressent. Now we can do this many ways, heck we could set a enviroment variable if we want.

I’ve written a little script that can be run with a users cron jobs and skip over all mail or only the given account. You need one rcfile per account and you can tweak it to follow any conventions you want. My RCFiles follow the convention of getmailrc-shortaccountname, hence getmailrc-bell and getmailrc-sas for my bellsouth and sasclan accounts. This script should work on any system that has a bourneshell compatible /bin/sh. Just edit the shebang if you need to run it as another shell (such as /bin/ksh).

#!/bin/sh

# Use getmail to check my E-Mail account using the RC variable
# This script has the advantage that one can save it as another file, change
# one variable and set a cron job to check each account at different times (1
# cron job per script). Then not only use a file in their .getmail folder to
# stop all the scripts from running getmail or use a file to stop one script
# from checking its account. It also keeps a log which will be trimmed by
# another script

# Name of the getmailrc file to use
RC=getmailrc-sas

# log to a file when mail is checked
LOGFILE=${HOME}/.getmail/cronjobs.log

#
# If a nomail or nocheck file is found in ~/.getmail/ exit without checking
# else look for a no file. Where is equal to every thing that
# comes after the getmailrc- in $RC. If none of these files exsist check mail
# using the $RC file.
#
if [ -e ${HOME}/.getmail/nomail ]
then
LOG=$(echo "Skipping mail for $RC")
exit 1
elif [ -e ${HOME}/.getmail/nocheck ]
then
LOG=$(echo "Skipping mail for $RC")
exit 1
else
DIE=$(ls ${HOME}/.getmail| grep $RC | cut -d '-' -f 2)
if [ -e ${HOME}/.getmail/no${DIE} ]
then
LOG=$(echo "You have desided not to check this mailbox - $DIE")
else
LOG=$(echo `date` "checked mailbox with $RC")
getmail -r$RC
fi
fi

# Update log with the result
echo $LOG >> $LOGFILE 2> /dev/null

if you want to use the script copy and paste it into a text file and mark it executible. I saved them as ~/.getmail/check-.sh and chmod’d them 0700

Ok, let us make a cron job, because this is allready a big long post that took me forever to write with the way my house is. I’m not detailing cron(8) so please read the handbook or read the fine manual.

I created this crontab file to run my scripts to check my accounts every 5 and 4 hours respecfully and to ‘trim’ my log file every week.

# rstf's crontab
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/usr/home/rstf/
MAILTO=""
#
#minute hour mday month wday who command
#
# check sas every 5hr
5 * * * * rstf ${HOME}/.getmail/check-sas.sh
#
# check bell every 4hr
4 * * * * rstf ${HOME}/.getmail/check-bell.sh
#
# trim log @weekly
0 0 * * 0 rstf ${HOME}/sh/trim-getmail-cronlog
#

The trim-getmail-cronlog script is thus

#!/bin/sh

# Rotate my logfile for running get mail via cron

LOGFILE=${HOME}/.getmail/cronjobs.log
TMPDIR=/tmp/

if [ -e $LOGFILE ]
then
tail $LOGFILE > $TMPDIR/gmlog.$$
rm $LOGFILE
mv $TMPDIR/gmlog.$$ $LOGFILE
else
exit 1
fi

To load my crontab file into crons system i.e. /var/run/tabs/${USER} all I have to do is run a simple command.

crontab ~/rstf-contrab