I mentioned this in passing some time ago, but I joined the Cult and now have a nice 15″ Powerbook.

It’s been about three months, and I have to say: I don’t really miss windows much (see below though).

The screen is bright and clean, and I really like the “pretty” factor– didn’t think I would, but it really does cheer things up. The widescreen display also means that there’s a completely full size keyboard with room to rest your hands, so typing while mobile is excellent.

The applications are in general at least as good; word and excel are there for the mac, I use Thunderbird for email and Firefox for web stuff. For instant messaging, iChat isn’t horrible, but I use Adium, which is nice and cross-server capable. And configurable.

Which leads me to probably my biggest beef with the Mac experience: configuration. If Apple thought it was a good idea to be flexible, it’s super configurable, and awesome. If not… “These are our defaults. We put a lot of thought into them, and we like them. Think of them as mandatory”.

Which includes the freaking mouse button. Sure, I can (and usually do) have an external logitech 5 button mouse connected. Forward and Back buttons make the web browsing much better, and there’s support for those buttons in a lot of places (for example, in quicktime, the back button plays your movie clip sdrawkcab). But if you’re mobile with no mouse, you have only the one default mouse button (”We like one mouse button”). Very frustrating.

Still, as a serious platform for working, all the stuff I need for work is here. It also runs unix underneath, which means I can actually program while roving, which is a huge advantage for me (cvs support, perl w/o having to recode to support both unix AND windows, native emacs, etc).

But I do have virtual PC on here. I only use it for two things:

  1. visio (OmniGraffle is excellent, and can read Visio XML documents, but most of our existing docs are not xml, so I have to open and convert. And HOLY COW does visio run slow on in an emulated computer on a relatively slow cpu…
  2. Games. Hey, I like games. My poker client (pokerstars) runs nicely in Virtual PC, and it’s practically seemless. I play Civ 3 Conquests in that window, and Galactic Civilizations.

But I really have to say: As much as I like OS/x, and the mac, I am REALLY looking forward to the intel platforms. Partly for speed, and partly because I’m looking forward to projects like DarWINE, native windows emulation for the mac. It’s not really that I want to replace Virtual PC, or run every app, but I miss my games.

Some other things I like:

  • MaxMenus Put small menus right at the very corner of your screen. one has an application menu, another is all my control panels, a third is my filesystem. Quick and easy to get to no matter what you’re doing.
  • Usb Overdrive Highly recommended if you’re using a mouse with more than one button. Not everything supports 3, let alone 5 (forward and back, anyone?) If your applications don’t suppor the mouse wheel, create a per-application profile that sends some special code for mousewheel-up and mousewheel down. Or whatever. Awesome.
  • The Mega Man Effect. Completely useless, totally hilarious. If you have a mac, download it, run it, then run some other application. And laugh.
  • OhPhoneX and the rest of XMeeting. If you did any video conferencing under windows, this will likely fit the bill for you on your Mac. I use it regularly to Video into a meeting.

All in all, I find the experience very satisfying. Unix on my desktop with a smart, capable interface on top. I’ve got some annoyances, but fewer than with Windows, I think. And while I will never give up my Windows Game Machine, the powerbook does everything I need for work.

Sep 05 2005

Maia improvements

notarus | General, Open Source | 1 Comment

We’re converting to Maia Mailguard and one “major” drawback for me and a few other users on our shared email server is that we’re already long time users of SpamAssassin. Now, Amavis uses SA, but it doesn’t use your SA files, so you either lose your long hand crafted whitelist and blacklists, or you enter them one at a time in a web page.

That annoys me.

Because it’s open source, though, I have the opportunity to improve that. And I did. Patches vs 1.0.0rc5 below:


--- wblist.php 2005/09/05 17:09:30 1.1
+++ wblist.php 2005/09/05 17:36:29
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: wblist.php,v 1.1 2005/09/05 17:09:30 root Exp $
+ * $Id: wblist.php,v 1.3 2005/09/05 17:36:22 root Exp $
*
* MAIA MAILGUARD LICENSE v.1.0
*
@@ -117,6 +117,24 @@
</tr>

</table>
+
+<!--- mark added here -->
+<p>
+<table>
+<td class="menubody">
+Enter a batch file to process here
+</td>
+<td><textarea name=batch_wb cols=40 rows=4></textarea></td>
+</tr>
+<tr>
+<td class="menubody" colspan="2" align="center">
+<input type="submit" name="addbatch" value="Add batch to database">
+</td>
+</tr>
+</table>
+<!--- end mark -->
+
+
</div><br>

<?php
@@ -182,4 +200,15 @@

</form>

+<p>
+<center>
+Note: Accepted batch formats are:
+<pre>
+whitelist_from email@host.com
+whitelist email2@host.com
+blacklist_from email3@host.com
+blacklist email4@host.com
+</pre>
+</center>
+
<?php display_html_foot(); ?>

--- xwblist.php 2005/09/05 17:09:44 1.1
+++ xwblist.php 2005/09/05 17:10:40
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: xwblist.php,v 1.1 2005/09/05 17:09:44 root Exp $
+ * $Id: xwblist.php,v 1.2 2005/09/05 17:10:27 root Exp $
*
* MAIA MAILGUARD LICENSE v.1.0
*
@@ -101,6 +101,11 @@
} else {
$newaddr = "";
}
+ if (isset($HTTP_POST_VARS["batch_wb"])) {
+ $batch_wb = trim($HTTP_POST_VARS["batch_wb"]);
+ } else {
+ $batch_wb = “”;
+ }

// User pressed the “Add to List” button to add an address to the
@@ -112,6 +117,63 @@
add_address_to_wb_list($euid, $newaddr, $list);
}
}
+ elseif ( $batch_wb != “” ){
+ if (preg_match(”/(whitelist|whitelist_from)\s+[\w\+\-]+\@[\.\w\+\-]/i”,$batch_wb)
+ ||
+ preg_match(”/(blacklist|blacklist_from)\s+[\w\+\-]+\@[\.\w\+\-]/i”,$batch_wb)){
+ // sa style white list. Process
+ $batch_output_data.=”Processing SA style inputs.<br>\n”;
+ $my_batch_lines=preg_split(”/\n/”,$batch_wb);
+ foreach ($my_batch_lines as $my_line){
+ // ignore comments and empty lines
+ if (preg_match(”/^\s*$/”,$my_line)){
+ continue;
+ }
+ if (preg_match(”/^\s*#/”,$my_line)){
+ continue;
+ }
+
+ $my_wb=”";
+ $data=preg_split(”/\s+/”,$my_line);
+ $data[0]=strtolower($data[0]);
+ if ($data[0] == “whitelist” || $data[0] == “whitelist_from”){
+ $my_wb=”W”;
+ }
+ elseif($data[0]==”blacklist” || $data[0]==”blacklist_from”){
+ $my_wb=”B”;
+ }
+ else{
+ $batch_output_error.= “Error: Can’t parse \”$my_line\”<br> Error: First element not whitelist or blacklist. Skipping.<br>”;
+ continue; // skip, we can’t process this line.
+ }
+ $data[1]=strtolower($data[1]);
+ if (preg_match(”/\*/”,$data[1])){
+ $batch_output_error.= “Error: Skipping email $data[1]. Amvis can not process a wildcard.<br>\n”;
+ continue;
+ }
+
+ // confirm data[1] has what appears to be an email address
+ if (preg_match(”/^[\w\+\.\-]+\@[\.\w\+\-]+$/”,$data[1],$match)){
+ $my_addr=$match[0];
+ }
+ else{
+ $batch_output_error.= “Error: Can’t parse \”$my_line\”<br> Error: Second element not an email. Skipping.<br>”;
+ continue; // skip, we can’t process this line.
+ }
+ // all good. Add.
+ add_address_to_wb_list($euid, $my_addr, $my_wb);
+ $batch_output_data.= “Added <b>$my_addr</b> as a <b>”;
+ if ($my_wb == “W”){
+ $batch_output_data.=”whitelist”;
+ }
+ else{
+ $batch_output_data.= “blacklist”;
+ }
+ $batch_output_data.=”</b><br>\n”;
+
+ }
+ }
+ }

// User pressed the “Update” button to modify the whitelist/blacklist
// settings.
@@ -168,6 +230,17 @@

<tr>
<td class=”messagebox” align=”center”>
+<?php
+if ($batch_output_error != “”){
+ print $batch_output_error;
+ print “<p>\n”;
+}
+if ($batch_output_data != “”){
+ print $batch_output_data;
+ print “<p>\n”;
+}
+?>
+
<?php print($lang_text_lists_updated); ?>
</td>
</tr>