Added suuport for vpopmail

This commit is contained in:
Michiel Broek
2002-02-24 21:20:25 +00:00
parent 2013b2bb89
commit f708e66b94
7 changed files with 84 additions and 13 deletions

View File

@@ -732,6 +732,7 @@ int main(int argc, char *argv[])
int pfd, tfd;
#endif
char *cp;
char temp[128];
/*
* Init $MBSE_ROOT/etc/login.defs file before the *pw gets overwritten.
@@ -910,6 +911,17 @@ int main(int argc, char *argv[])
#endif /* __FreeBSD__ */
#ifdef _VPOPMAIL_PATH
sprintf(temp, "%s/vpasswd %s %s", _VPOPMAIL_PATH, argv[2], argv[3]);
fflush(stdout);
fflush(stdin);
if (system(temp) != 0) {
perror("mbpasswd: Failed to change vpopmail password\n");
syslog(LOG_ERR, "Failed to change vpopmail password");
}
#endif
syslog(LOG_NOTICE, "password for `%s' changed by user `%s'", name, myname);
closelog();
exit(E_SUCCESS);

View File

@@ -267,6 +267,16 @@ int main(int argc, char *argv[])
sprintf(temp, "%s/%s/Maildir/tmp", argv[4], argv[2]);
makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
#ifdef _VPOPMAIL_PATH
sprintf(temp, "%s/vadduser %s %s", _VPOPMAIL_PATH, argv[2], argv[2]);
fflush(stdout);
fflush(stdin);
if (system(temp) != 0) {
perror("mbuseradd: Failed to create vpopmail account\n");
}
#endif
free(shell);
free(PassEnt);
free(temp);