FileShack.com has the source code for the game Duke Nukem! I saw this on Linux Games but thought it was an April Fools! I’d love to play Duke Nukem again!
Monthly Archives: April 2003
Regular Expressions: Finding Email Addresses
Recently I fixed the Sendmail configuration on one of our boxes, and I’m now inundated daily with over 1700 return mails from old and expired email addresses. This is the second day so I decided to combat it:
- Create a procmail script to redirect all the bounced mails into a file.
- Grab all the email addresses from that file and create SQL statements to disable sending mail to those users of our site.
With Google’s help, I came up with the following procmail recipe, and stuffed it into my .procmailrc:
:0
* ^From: .*MAILER-DAEMON.*
* ^Subject:.*(Undeliverable|failure notice|Returned mail:|Delivery (Status )?Notification|Mail System Error|Delivery fail|Nondeliverable mail|Message status – undeliverable|Mail Delivery Problem|Notification d’état de la distribution).*
RETURNS
That should catch almost all the returns sent to my inbox.
I used the following code to extract the emails from the RETURNS
file. It can probably be done better, but this works well enough.
awk -F “< " '// {print $2}’ ” ‘{print $1}’| sort|uniq
I then grep out bogus lines such as the ones smtp servers add, opened the file in vi and added SQL statements around each email address. I expect a lot less email in my inbox tomorrow..
Here’s a handy online regex tester if you want to test a regular expression easily.
Vi users beware
When you’re using any other editor don’t press “u” to undo when you have lots of text highlighted. Just because you pressed ESC before doesn’t put you into command mode! Luckily I regained my senses and hit CTRL-Z.
BTW – using Open Office on my Red Hat 8.0 running box at home. It’s excellent!
b2 enhancement screenshots
I posted a small introduction and screenshots to show off some of the enhanced features of this site. Take a look if you’ve been wondering what all the fuss is about!
Linux screensavers
GURU Labs have impressive looking screensavers on their site. You’ll need an Nvidia or ATI chipset to view them though as they require hardware TCL support.
The Guru Labs site is well worth checking out for a wealth of other software packaged for Red Hat 8 and 9.
Michel, original b2 author is back!
The Full Irish mentioned Holy Shmoly!
Apparently Ryan Tubridy mentioned this site between 7am and 7:30am this morning. Unfortunately I only turned the radio on at 7:30 so I missed it. Thanks for the mention Ryan! (I’m psychic, that’s how I know he mentioned me, no really! No, ‘fraid not, thanks John for telling me!)
Red Hat 8.0 – man garbage
For as long as I’ve had Red Hat 8.0 installed I’ve had trouble using “man” and other marked up terminal apps. The marked up text appeared as garbage and only by careful examination could one spot the useful information trapped inside! Here’s the answer, courtesy of the Chicago LUNI list. European users may want to try another locale, and Irish users could find “en_IE@euro” most useful!
Sendmail – Masquerading And Relaying
Ah! The joys of Sendmail cf configuration. How arcane can the following get?
R$+ $@ $>93 $1
That line tells Sendmail to masquerade the headers of an email as another domain. Luckily I just generated another sendmail.cf with my install-sendmail script and did a vimdiff of both files. Comments are helpful too, and takes some of the bite out of the .cf file.
BlogShares trading on Holy Shmoly!
There’s been some trading on my Blogshares blog account. The site valuation has sky-rocketed overnight and should continue to do so as blog link here. Woo! Me’s (virtually) rich!