procmail
[Top] [All Lists]

Re: msgs, procmail, sendmail, and NeXTStep

1997-06-29 04:06:00
Timothy Luoma <luomat(_at_)peak(_dot_)org> writes:
Hey y'all.  This is rather interesting.  I want to match an incoming
message based on From and Subject and add it to 'msgs' (the system-wide
notices program).

'man msgs' says:


    The -s option is used for setting up the posting of mes-
    sages.  The line

        msgs: "| /usr/ucb/msgs -s"

    should be include in /etc/sendmail/aliases to enable posting
    of messages.

I assume this means that messages could be sent to 
'msgs(_at_)myhostname(_dot_)com'
and they would be posted?

Did you create the mentioned alias and run newaliases?  If so, it should
have worked.


However, that does not seem to work.  I wonder if it has something to do
with my particular mail setup (sendmail config'd to masquerade_as
peak.org) or with NeXTstep and NetInfo.

When you say it didn't work, how so?  Did the mail bounce?  Did no file
appear in /usr/msgs?


I could do a raw 'send the body of the message to "msgs"' using procmail:

Why feed just the body?


:0 B
* ^From:.*techsupport\.domain\.com
* ^Subject:.*Scheduled Downtime
| /usr/ucb/msgs -s

Well, that should be the 'b' flag, not the 'B' flag, which causes those
conditions to be matched against the body instead of the header of the
message, and thus probably always fail.


but if that worked (it's untested) it still wouldn't have a Subject.

Why don't you just feed the entire message into "msgs -s", after all,
that's what the alias would do:

        :0
        * ^From:.*techsupport\.domain\.com
        * ^Subject:.*Scheduled Downtime
        | /usr/ucb/msgs -s


Of course, all of this assumes that people actually run the msgs command
to read the msgs thus posted.


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>