static char sccsid
[] = "@(#)sdmail.c 5.2 (Berkeley) %G%";
* 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
= NULL
;
struct passwd
*getpwuid();
sprintf(mstr
, "uuclean deleted file %s\n", file
);
if (pwd
!= NULL
&& 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).
sprintf(cmd
, "mail %s", user
);
if ((fp
= rpopen(cmd
, "w")) == NULL
)
/* \n added to mail message. uw-beave!jim (Jim Rees) */
fprintf(fp
, "%s\n", str
);