better spam (Lou Kamenov)

This commit is contained in:
rsc 2006-05-21 18:40:33 +00:00
parent 82f56ecee2
commit 25c823399b
3 changed files with 10 additions and 3 deletions

View file

@ -3,6 +3,8 @@
#include <bio.h>
#include "hash.h"
#define mergesort bayesmergesort
/***
* String hash tables.
*/

View file

@ -5,6 +5,7 @@
#include <thread.h>
#define system nedsystem
#define rcmd nedrcmd
typedef struct Message Message;
typedef struct Ctype Ctype;

View file

@ -22,16 +22,17 @@ Imap *imap;
void
usage(void)
{
fprint(2, "usage: mailfs [-t] server\n");
fprint(2, "usage: mailfs [-DVtx] [-s srvname] server\n");
threadexitsall("usage");
}
void
threadmain(int argc, char **argv)
{
char *server;
char *server, *srvname;
int mode;
srvname = "mail";
mode = Unencrypted;
ARGBEGIN{
default:
@ -42,6 +43,9 @@ threadmain(int argc, char **argv)
case 'V':
chattyimap++;
break;
case 's':
srvname = EARGF(usage());
break;
case 't':
mode = Tls;
break;
@ -63,6 +67,6 @@ threadmain(int argc, char **argv)
if((imap = imapconnect(server, mode)) == nil)
sysfatal("imapconnect: %r");
threadpostmountsrv(&fs, "mail", nil, 0);
threadpostmountsrv(&fs, srvname, nil, 0);
}