nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-workers] draft validation, error checking


From: Paul Fox
Subject: [Nmh-workers] draft validation, error checking
Date: Sat, 28 Apr 2012 09:44:01 -0400

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, address@hidden (arlington, ma, where it's 39.6 degrees)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]