I have often wondered what the purpose of the -o flag to procmail is.
The man page says
-o Instead of allowing anyone to generate `From ' lines,
simply override the fakes.
which isn't very illuminating (at least to me). Grepping trough the
source,
grep -B5 -A5 override *.c /dev/null
procmail.c-#if 0 /* enable this if you want to
trace procmail */
procmail.c- kill (getpid (), SIGSTOP); /*raise(SIGSTOP); */
procmail.c-#endif
procmail.c- newid ();
procmail.c- {
procmail.c: int presenviron, Deliverymode, override;
procmail.c- char *fromwhom = 0;
procmail.c- const char *idhint = 0;
procmail.c- gid_t egid = getegid ();
procmail.c: Deliverymode = mailfilter = override = 0;
procmail.c- Openlog (procmailn, LOG_PID, LOG_MAIL); /* for the syslogd */
procmail.c- if (argc) /* sanity check, any argument
at all? */
procmail.c- {
procmail.c- Deliverymode = strncmp (lastdirsep (argv0 = argv[0]), procmailn,
procmail.c- STRLEN (procmailn));
--
procmail.c- continue;
procmail.c- case MAILFILTOPT:
procmail.c- mailfilter = 1;
procmail.c- continue;
procmail.c- case OVERRIDEOPT:
procmail.c: override = 1;
procmail.c- continue;
procmail.c- case BERKELEYOPT:
procmail.c- case ALTBERKELEYOPT:
procmail.c- berkeley = 1;
procmail.c- continue;
--
procmail.c- fwhom = chp2;
procmail.c- if (fromwhom && !tstamp)
procmail.c- {
procmail.c- if (!privs && !strcmp (fromwhom, fwhom))
procmail.c- privs = 1; /* if -f user is the same as the
invoker, allow it */
procmail.c: if (!privs && fromwhom && override)
procmail.c- {
procmail.c- if (verbose)
procmail.c- nlog (insufprivs); /* ignore the bogus -f */
procmail.c- syslog (LOG_ERR, slogstr, attemptst, fwhom);
procmail.c- fromwhom = 0;
--
procmail.c- goto no_from;
procmail.c- }
procmail.c- {
procmail.c- size_t tfrl;
procmail.c- i -= tfrl = ++rstart - themail; /* demarcate
From_ line */
procmail.c: if (Deliverymode && override && !privs)
procmail.c- {
procmail.c- if (verbose) /* discard the bogus From_ */
procmail.c- nlog (insufprivs);
procmail.c- syslog (LOG_ERR, slogstr, attemptst, fwhom);
procmail.c- goto no_from;
So it seems the only effect is to not do some things with From lines
if either -f or -d is specified at the same time, and procmail is
running without privilege. Why would that be useful? As as security
precaution, it could be defeated by not specifying these other flags,
or not?
Can someone explain?
--
<itz(_at_)transbay(_dot_)net> general personal mail
<itz(_at_)prosa(_dot_)it> gpm (and|or) other free software (co)?maintained by me
<itz(_at_)lbin(_dot_)com> work - only if \$\$ is involved
Electing a quail for President might cause wierd affects,
such as school principles refusing to eat baked potatoe.