diff options
-rw-r--r-- | src/cmd/acme/mail/dat.h | 1 | ||||
-rw-r--r-- | src/cmd/acme/mail/mail.c | 10 | ||||
-rw-r--r-- | src/cmd/acme/mail/mesg.c | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/cmd/acme/mail/dat.h b/src/cmd/acme/mail/dat.h index 4b5c23c7..9a6be955 100644 --- a/src/cmd/acme/mail/dat.h +++ b/src/cmd/acme/mail/dat.h @@ -170,6 +170,7 @@ extern char *outgoing; extern char *mailboxdir; extern char *mboxname; extern char *user; +extern char *srvname; extern char deleted[]; extern int wctlfd; extern int shortmenu; diff --git a/src/cmd/acme/mail/mail.c b/src/cmd/acme/mail/mail.c index 988c53c2..326d7bc8 100644 --- a/src/cmd/acme/mail/mail.c +++ b/src/cmd/acme/mail/mail.c @@ -42,7 +42,7 @@ CFsys *acmefs; void usage(void) { - fprint(2, "usage: Mail [-sS] [-o outgoing] [mailboxname [directoryname]]\n"); + fprint(2, "usage: Mail [-sS] [-n srvname] [-o outgoing] [mailboxname [directoryname]]\n"); threadexitsall("usage"); } @@ -88,6 +88,7 @@ threadmain(int argc, char *argv[]) plumbshowmailfd = plumbopenfid("showmail", OREAD|OCEXEC); shortmenu = 0; + srvname = "mail"; ARGBEGIN{ case 's': shortmenu = 1; @@ -101,6 +102,9 @@ threadmain(int argc, char *argv[]) case 'm': smprint(maildir, "%s/", EARGF(usage())); break; + case 'n': + srvname = EARGF(usage()); + break; default: usage(); }ARGEND @@ -108,9 +112,9 @@ threadmain(int argc, char *argv[]) acmefs = nsmount("acme",nil); if(acmefs == nil) error("cannot mount acme: %r"); - mailfs = nsmount("mail", nil); + mailfs = nsmount(srvname, nil); if(mailfs == nil) - error("cannot mount mail: %r"); + error("cannot mount %s: %r", srvname); name = "mbox"; diff --git a/src/cmd/acme/mail/mesg.c b/src/cmd/acme/mail/mesg.c index 8e8443be..304714cd 100644 --- a/src/cmd/acme/mail/mesg.c +++ b/src/cmd/acme/mail/mesg.c @@ -1046,8 +1046,8 @@ mimedisplay(Message *m, char *name, char *rootdir, Window *w, int fileonly) dest = estrdup(m->filename); if(m->filename[0] != '/') dest = egrow(estrdup(home), "/", dest); - fsprint(w->body, "\t9p read mail/%s/%sbody > %s\n", - mboxname, name, dest); + fsprint(w->body, "\t9p read %s/%s/%sbody > %s\n", + srvname, mboxname, name, dest); free(dest); } } |