Stop myself from sending an email with a particular string

Christian Brabandt cblists at 256bit.org
Sat Sep 15 09:09:20 UTC 2018


On Sa, 15 Sep 2018, Erik Christiansen wrote:

> On 15.09.18 05:30, Francesco Ariis wrote:
> > Hello Xu,
> > 
> > On Fri, Sep 14, 2018 at 11:18:09PM -0400, Xu Wang wrote:
> > > Long story short:
> > > How can I have mutt refuse to send an email if the contents contain a
> > > certain string, such as the example "Erica"?
> > 
> > There is a script that implements a similar functionality
> > 
> >     https://gitlab.com/muttmua/mutt/wikis/ConfigTricks/CheckAttach
> 
> If you compose emails in Vim, then simpler yet, Christian Brabandt's
> long established¹ CheckAttach plugin checks for default keywords, and
> the user can configure new ones in the g:attach_check_keywords variable.
> OK, it will then prompt for attachments on an exit attempt, but _also_
> highlight the triggering keywords - in this case "Erica". The attachment
> process, spurious for this use-case, is aborted by hitting <enter>, so
> the plugin adaptation is a quick and simple way to achieve the desired
> watchdog function.

Yes that would be one possibility. But note, that starting from mutt 1.8 
I believe, mutt now supports this natively using the abort_noattach 
quadoption and abort_noattach_regexp option.

regards,
Christian
-- 
Canonical, adj.:
	The usual or standard state or manner of something.  A true story:
One Bob Sjoberg, new at the MIT AI Lab, expressed some annoyance at the use
of jargon.  Over his loud objections, we made a point of using jargon as
much as possible in his presence, and eventually it began to sink in.
Finally, in one conversation, he used the word "canonical" in jargon-like
fashion without thinking.
	Steele: "Aha!  We've finally got you talking jargon too!"
	Stallman: "What did he say?"
	Steele: "He just used `canonical' in the canonical way."


More information about the Mutt-users mailing list