wendt@segovia.CS.ColoState.Edu (alan l wendt) (03/08/89)
I'm trying to set up my .forward file so that it does a few things for me. It would route some mailing list messages to files instead of putting them in the /usr/spool/mail/wendt. It would check the subject lines so that students can check in their assignments by mailing them to me, have the assignment compiled and verified, and mail back a reply to the student. And the rest of the stuff wants to get put in /usr/spool/mail/wendt. The sensible thing to do with the rest of the stuff is to pipe it back into sendmail, with a flag saying not to do forwarding, but I can't find such a flag on sendmail. Suggestions anyone? Thanks Alan Wendt
mlandau@bbn.com (Matt Landau) (03/08/89)
In comp.mail.misc, alan l wendt writes: >And the rest of the stuff wants to get put in /usr/spool/mail/wendt. >The sensible thing to do with the rest of the stuff is to pipe >it back into sendmail, with a flag saying not to do forwarding, >but I can't find such a flag on sendmail. Suggestions anyone? [ Why was this in comp.emacs? ] [ I've directed followups to comp.mail.sendmail. ] My sendmail man page (SunOS 4.0) describes a -n flag that means "don't do aliasing" -- I'm not sure whether aliasing is construed to include per-user forwarding, but I think I recall from the sendmail source that they're handled in the same place, so maybe. You might also be able to quote the recipient name by preceding it with a backslash. At least, if sendmail finds a name of the form '\name' in a .forward file, it doesn't try to reforward the message. Alternatively, instead of handing the stuff back to sendmail, you could just feed it to /bin/mail, which will deliver it to your mailbox. I wrote a rule-based pattern matcher for dispatching mail based on ed-style regular expressions in its headers, and it uses this technique to effect final delivery for sites that use the sendmail / /bin/mail combination. In fact it derives the sender's name from the message and then uses "/bin/mail -r <sender> -d <recipient>" to force the "From " lines to contain the right name. -- Matt Landau Waiting for a flash of enlightenment mlandau@bbn.com in all this blood and thunder