From ea0daf677bc75fa11cca43f707db5a7210579030 Mon Sep 17 00:00:00 2001 From: piaip Date: Sun, 30 Oct 2011 16:11:44 +0000 Subject: fix zip home (seems broken for a long time!?) git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5454 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/mbbsd/mail.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pttbbs/mbbsd/mail.c b/pttbbs/mbbsd/mail.c index feabeff0..82a51e2d 100644 --- a/pttbbs/mbbsd/mail.c +++ b/pttbbs/mbbsd/mail.c @@ -2158,6 +2158,14 @@ doforward(const char *direct, const fileheader_t * fh, int mode) } } while (mode == 'Z' && strstr(address, MYHOSTNAME)); } + if (mode == 'Z') { + if (strstr(address, MYHOSTNAME) || + strstr(address, ".bbs@")) { + vmsg("不可使用 BBS 信箱。"); + return 1; + } + } + // XXX bug: if user has already provided mail address... /* according to our experiment, many users leave blanks */ trim(address); if (invalidaddr(address)) @@ -2229,8 +2237,9 @@ doforward(const char *direct, const fileheader_t * fh, int mode) #ifdef MUTT_PATH snprintf(fname, sizeof(fname), TAR_PATH " -X " BBSHOME "/etc/ziphome.exclude " - "-cfz /tmp/home.%s.tgz home/%c/%s; " - MUTT_PATH " -s 'home.%s.tgz' -a /tmp/home.%s.tgz -- '%s' %s", cuser.userid[0], cuser.userid, cuser.userid, direct); system(fname); -- cgit v1.2.3