* sdmail - this routine will determine the owner
* of the file (file), create a message string and
* call "mailst" to send the cleanup message.
* This is only implemented for local system
static struct passwd
*pwd
;
struct passwd
*getpwuid();
sprintf(mstr
, "uuclean deleted file %s\n", file
);
if (pwd
->pw_uid
== uid
) {
mailst(pwd
->pw_name
, mstr
);
if ((pwd
= getpwuid(uid
)) != NULL
) {
mailst(pwd
->pw_name
, mstr
);
* mailst - this routine will fork and execute
* a mail command sending string (str) to user (user).
extern FILE *popen(), *pclose();
sprintf(cmd
, "mail %s", user
);
if ((fp
= popen(cmd
, "w")) == NULL
)