nmh-workers
[Top] [All Lists]

[Nmh-workers] draft validation, error checking

2012-04-28 08:44:11
is there a way to set up a hook of some sort, either at the whatnow
level, or deeper in send or post, which will cause forbid sending, or
cause sending to fail, if a set of user-defined sanity checks
don't succeed?

i use a wrapper script for my editor in mh, and the script
prints warnings regarding the draft when the editor exits.  it
checks for things like a missing To: header at all, or if the
From: header looks like my home address but the To: header looks
like a work address -- that sort of thing.  when vi exits,
and i'm back at whatnow, i get this:

    WARNING:  missing or empty 'To:' header....
    What now?

and that's great, when i'm fully caffeinated and am actually paying
attention to what's on the screen.

i'd like to elevate at least some of those warnings to fatal errors --
i'd like to not be able to send the message until i fix the problem.

how might i do that?
 
paul
=---------------------
 paul fox, pgf(_at_)foxharp(_dot_)boston(_dot_)ma(_dot_)us (arlington, ma, 
where it's 39.6 degrees)

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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