Index: message.c
===================================================================
--- message.c	(revision a387d12ee4e32845e2a021fb4ecd3cf11d6c18a8)
+++ message.c	(revision 85d1795974357393450740592a2c4ec288bcc63f)
@@ -851,31 +851,4 @@
   m->zwriteline=strdup("");
 
-  /* set the body */
-  tmp=owl_zephyr_get_message(n);
-  if (owl_global_is_newlinestrip(&g)) {
-    tmp2=owl_util_stripnewlines(tmp);
-    owl_message_set_body(m, tmp2);
-    owl_free(tmp2);
-  } else {
-    owl_message_set_body(m, tmp);
-  }
-  owl_free(tmp);
-
-#ifdef OWL_ENABLE_ZCRYPT
-  /* if zcrypt is enabled try to decrypt the message */
-  if (owl_global_is_zcrypt(&g) && !strcasecmp(n->z_opcode, "crypt")) {
-    char *out;
-    int ret;
-
-    out=owl_malloc(strlen(owl_message_get_body(m))*16+20);
-    ret=owl_zcrypt_decrypt(out, owl_message_get_body(m), owl_message_get_class(m), owl_message_get_instance(m));
-    if (ret==0) {
-      owl_message_set_body(m, out);
-    } else {
-      owl_free(out);
-    }
-  }
-#endif  
-
   /* save the hostname */
   owl_function_debugmsg("About to do gethostbyaddr");
@@ -886,4 +859,31 @@
     owl_message_set_hostname(m, inet_ntoa(n->z_sender_addr));
   }
+
+  /* set the body */
+  tmp=owl_zephyr_get_message(n, m);
+  if (owl_global_is_newlinestrip(&g)) {
+    tmp2=owl_util_stripnewlines(tmp);
+    owl_message_set_body(m, tmp2);
+    owl_free(tmp2);
+  } else {
+    owl_message_set_body(m, tmp);
+  }
+  owl_free(tmp);
+
+#ifdef OWL_ENABLE_ZCRYPT
+  /* if zcrypt is enabled try to decrypt the message */
+  if (owl_global_is_zcrypt(&g) && !strcasecmp(n->z_opcode, "crypt")) {
+    char *out;
+    int ret;
+
+    out=owl_malloc(strlen(owl_message_get_body(m))*16+20);
+    ret=owl_zcrypt_decrypt(out, owl_message_get_body(m), owl_message_get_class(m), owl_message_get_instance(m));
+    if (ret==0) {
+      owl_message_set_body(m, out);
+    } else {
+      owl_free(out);
+    }
+  }
+#endif  
 }
 #else
Index: zephyr.c
===================================================================
--- zephyr.c	(revision bb2c60daf3380cfd4deb87b226ee67a714f174b7)
+++ zephyr.c	(revision 85d1795974357393450740592a2c4ec288bcc63f)
@@ -381,5 +381,5 @@
  * caller must free the return
  */
-char *owl_zephyr_get_message(ZNotice_t *n)
+char *owl_zephyr_get_message(ZNotice_t *n, owl_message *m)
 {
   /* don't let ping messages have a body */
@@ -388,19 +388,12 @@
   }
 
-  /* deal with MIT Athena OLC messages */
-  if (!strcasecmp(n->z_sender, "olc.matisse@ATHENA.MIT.EDU")) {
-    return(owl_zephyr_get_field(n, 1));
-  }
   /* deal with MIT NOC messages */
-  else if (!strcasecmp(n->z_sender, "rcmd.achilles@ATHENA.MIT.EDU")) {
-    /* $opcode service on $instance $3.\n$4 */
-    char *msg, *opcode, *instance, *field3, *field4;
-
-    opcode = n->z_opcode;
-    instance = n->z_class_inst;
+  if (!strcasecmp(n->z_default_format, "@center(@bold(NOC Message))\n\n@bold(Sender:) $1 <$sender>\n@bold(Time:  ) $time\n\n@italic($opcode service on $instance $3.) $4\n")) {
+    char *msg, *field3, *field4;
+
     field3 = owl_zephyr_get_field(n, 3);
     field4 = owl_zephyr_get_field(n, 4);
 
-    msg = owl_sprintf("%s service on %s %s\n%s", opcode, instance, field3, field4);
+    msg = owl_sprintf("%s service on %s %s\n%s", n->z_opcode, n->z_class_inst, field3, field4);
     owl_free(field3);
     owl_free(field4);
@@ -410,10 +403,5 @@
   }
   /* deal with MIT Discuss messages */
-  else if (!strcasecmp(n->z_sender, "daemon@ATHENA.MIT.EDU") &&
-	   !strcasecmp(n->z_class, "DISCUSS")) {
-    /*New transaction [$1] entered in $2
-      From: $3 ($5)
-      Subject: $4 */
-    
+  else if (!strcasecmp(n->z_default_format, "New transaction [$1] entered in $2\nFrom: $3 ($5)\nSubject: $4")) {
     char *msg, *field1, *field2, *field3, *field4, *field5;
     
@@ -434,6 +422,23 @@
     }
   }
-
-  return(owl_zephyr_get_field(n, 2));
+  /* deal with MIT Moira messages */
+  else if (!strcasecmp(n->z_default_format, "MOIRA $instance on $fromhost:\n $message\n")) {
+    char *msg, *field1;
+    
+    field1 = owl_zephyr_get_field(n, 1);
+    
+    msg = owl_sprintf("MOIRA %s on %s: %s", n->z_class_inst, owl_message_get_hostname(m), field1);
+    owl_free(field1);
+    if (msg) {
+      return msg;
+    }
+  }
+
+  if (owl_zephyr_get_num_fields(n) == 1) {
+    return(owl_zephyr_get_field(n, 1));
+  }
+  else {
+    return(owl_zephyr_get_field(n, 2));
+  }
 }
 #endif
@@ -450,6 +455,7 @@
   }
 
-  /* No zsig for OLC messages */
-  if (!strcasecmp(n->z_sender, "olc.matisse@ATHENA.MIT.EDU")) {
+  /* If there's only one field, no zsig */
+  if (owl_zephyr_get_num_fields(n) == 1) {
+    *k=0;
     return("");
   }
