If
.B $SIGNATURE
is not set and this profile entry is not present, the \*(lqgcos\*(rq field of
-the \fI/etc/passwd\fP file will be used; otherwise, on hosts where
-.B nmh
-was configured with the UCI option, the file
-.I $HOME/.signature
-is consulted. Your signature will be added to the address
+the \fI/etc/passwd\fP file will be used.
+Your signature will be added to the address
.B send
puts in the \*(lqFrom:\*(rq header; do not include an address in the
signature text. (profile, no default)
grp_names ();
grp_members ();
grp_ids ();
-#ifdef UCI
- ldr_names ();
- ldr_ship ();
-#endif /* UCI */
maildrops ();
done (0);
}
}
}
-
-#ifdef UCI
-/*
- * UCI specific stuff for conflict
- */
-
-/* taken from <grpldr.h> */
-
-#define GLDRS "/admin/etc/GroupLeaders"
-
-struct grpldr {
- char *gl_name;
- char **gl_ldr;
-};
-
-int setglent (), endglent ();
-struct grpldr *getglent (), *getglnam ();
-
-
-/* taken from the getglent() routines */
-
-#define MAXGLS 100
-
-static FILE *glp = NULL;
-static char line[BUFSIZ+1];
-static struct grpldr grpldr;
-static char *gl_ldr[MAXGLS + 1];
-
-
-setglent() {
- if (glp == NULL)
- glp = fopen (GLDRS, "r");
- else
- rewind (glp);
-
- return (glp != NULL);
-}
-
-
-endglent() {
- if (glp != NULL) {
- fclose (glp);
- glp = NULL;
- }
-
- return 1;
-}
-
-struct grpldr *getglent () {
- register char *cp,
- **q;
-
- if (glp == NULL && !setglent ())
- return NULL;
- if ((cp = fgets (line, BUFSIZ, glp)) == NULL)
- return NULL;
-
- grpldr.gl_name = cp;
- grpldr.gl_ldr = q = gl_ldr;
-
- while (*cp) {
- while (*cp && !isspace (*cp))
- cp++;
- while (*cp && isspace (*cp))
- *cp++ = '\0';
- if (*cp == '\0')
- break;
- if (q < gl_ldr + MAXGLS)
- *q++ = cp;
- else
- break;
- }
- *q = NULL;
-
- return (&grpldr);
-}
-
-struct grpldr *getglnam (name)
-char *name;
-{
- register struct grpldr *gl = NULL;
-
- setglent ();
- while (gl = getglent ())
- if (strcmp (name, gl->gl_name) == 0)
- break;
- endglent ();
-
- return gl;
-}
-
-ldr_names () {
- register int gp,
- hit = 0;
- char *gldrs[NGRPS];
- register struct grpldr *gl;
-
- gldrs[0] = NULL;
- setglent ();
- while (gl = getglent ()) {
- if (getgrnam (gl->gl_name) == NULL) {
- setup ();
- fprintf (out, "unknown group %s in group leaders file\n",
- gl->gl_name);
- hit++;
- }
- for (gp = 0; gldrs[gp]; gp++)
- if (strcmp (gldrs[gp], gl->gl_name) == 0) {
- setup ();
- fprintf (out, "duplicate group %s in group leaders file\n",
- gl->gl_name);
- hit++;
- break;
- }
- if (gldrs[gp] == NULL)
- if (gp < NGRPS) {
- gldrs[gp++] = getcpy (gl->gl_name);
- gldrs[gp] = NULL;
- }
- else {
- setup ();
- fprintf (out, "more than %d groups in group leaders file%s\n",
- " (time to recompile)", NGRPS - 1);
- hit++;
- }
- }
- endglent ();
-
- for (gp = 0; gldrs[gp]; gp++)
- free (gldrs[gp]);
-
- if (!hit && out && !mail)
- fprintf (out, "all groups in group leaders file accounted for\n");
-}
-
-
-ldr_ship () {
- register int hit = 0;
- register char **cp,
- **dp;
- register struct grpldr *gl;
-
- setglent ();
- while (gl = getglent ())
- for (cp = gl->gl_ldr; *cp; cp++) {
- if (!check (*cp)) {
- setup ();
- fprintf (out, "group %s has unknown leader %s\n",
- gl->gl_name, *cp);
- hit++;
- }
-
- for (dp = cp + 1; *dp; dp++)
- if (strcmp (*cp, *dp) == 0) {
- setup ();
- fprintf (out, "group %s had duplicate leader %s\n",
- gl->gl_name, *cp);
- hit++;
- }
- }
- endglent ();
-
- if (!hit && out && !mail)
- fprintf (out, "all group leaders accounted for\n");
-}
-#endif /* UCI */
struct stat st;
char *attach = (char *)0; /* header field name for attachments */
int attachformat = 0; /* mhbuild format specifier for attachments */
-#ifdef UCI
- FILE *fp;
-#endif /* UCI */
#ifdef LOCALE
setlocale(LC_ALL, "");
if ((cp = getenv ("SIGNATURE")) == NULL || *cp == 0)
if ((cp = context_find ("signature")) && *cp)
m_putenv ("SIGNATURE", cp);
-#ifdef UCI
- else {
- snprintf (buf, sizeof(buf), "%s/.signature", mypath);
- if ((fp = fopen (buf, "r")) != NULL
- && fgets (buf, sizeof buf, fp) != NULL) {
- fclose (fp);
- if (cp = strchr (buf, '\n'))
- *cp = 0;
- m_putenv ("SIGNATURE", buf);
- }
- }
-#endif /* UCI */
for (msgnum = 0; msgnum < msgp; msgnum++)
if (stat (msgs[msgnum], &st) == NOTOK)
#ifndef lint
int distsw = 0;
#endif
-#ifdef UCI
- FILE *fp;
-#endif
/*
* Make sure these are defined. In particular, we need
if ((cp = getenv ("SIGNATURE")) == NULL || *cp == 0)
if ((cp = context_find ("signature")) && *cp)
m_putenv ("SIGNATURE", cp);
-#ifdef UCI
- else {
- snprintf (buf, sizeof(buf), "%s/.signature", mypath);
- if ((fp = fopen (buf, "r")) != NULL
- && fgets (buf, sizeof(buf), fp) != NULL) {
- fclose (fp);
- if (cp = strchr (buf, '\n'))
- *cp = 0;
- m_putenv ("SIGNATURE", buf);
- }
- }
-#endif /* UCI */
if ((annotext = getenv ("mhannotate")) == NULL || *annotext == 0)
annotext = NULL;