Exim is good for everyone, but its configuration is not similar to anything, and the backlighting in it is dull-gray (see below), and to correct this annoying error, it was decided to delve into the depths of Google for a Midnight commander syntax highlight.
A brief summary of the search is presented below.
BEFORE:

Theory MC syntax Highlight
According to the manuscript, the MC editor (man mcedit) searches for highlights in the
~ / .mc / cedit / Syntax file.or if there are no files there then in
$ PREFIX / share / mc / syntax / Syntax.Attention . These
files are viewed in this sequence and are searched for before the first match. Therefore, if you write the Syntax file in your home directory, then ONLY the syntaxes described in it will be defined (this applies to version 4.7.5, maybe everything has changed in later versions).
')
Quick way
A quick (but VERY not accurate) method was found
here . It simply replaces the syntax of an unknown type (file /usr/local/share/mc/syntax/unknown.syntax) with sh.syntax)
But this method is not qualitative and unsportsmanlike. Therefore, we will go the other way.
Syntax syntax
To get started, we’ll go to
$ PREFIX / share / mc / syntax / Syntax and at the very beginning put a link to the file we are developing:
file configure exim\sconfiguration
include exim.syntax
Which means: all files starting with configuration and located in the Exim folder are highlighted with the syntax from the exim.syntax file. Thus, any backup copies (configure_28_11_2010, configure.orig, configure.default, etc. - will also be highlighted).
Contexts
There can be one or more contexts in the syntax. Context - all that is enclosed between certain service characters \ words (delimiters) example:
context " " green
spellcheck
- everything between the legs is green (in our case, a string)
context exclusive # \n brown
- everything between
# and the end of the line - brown (comment)
The default context context is used to highlight that it is not in any context.
Keywords
In any context, service words are defined as follows:
keyword [whole|wholeright|wholeleft] [linestart] string foreground [background]
briefly about the parameters:
- whole - only whole words (otherwise even parts of a larger word will stand out
- wholeright - from string to right to end of word
- wholeleft - from string to the left to the end of the word
- linestart - string should go at the beginning of the line
It would be good to determine which characters do NOT mark the end of a word. This is done with the command
wholechars :
wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_01234567890.-
exim.Syntax
Actually, we will start with the default context:
context default
keyword = white
keyword : yellow
keyword ! red
keyword # brown
keyword \/\/ brown
keyword ${ green
keyword } green
keyword whole domainlist brightcyan
keyword whole begin brightcyan
keyword whole acl brightcyan
keyword whole warn cyan
keyword whole accept cyan
keyword whole reject cyan
keyword whole drop cyan
keyword whole deny cyan
.............
- here we define whole words and their color
Further:
keyword wholeright smtp_* brightcyan
keyword wholeright rfc1413_* brightcyan
keyword wholeright recipients_max* brightcyan
keyword wholeright system_filter* brightcyan
keyword wholeright maildir_* brightcyan
keyword wholeright message_* brightcyan
keyword wholeright quota_warn_* brightcyan
keyword wholeright server_* brightcyan
.............
- we define whole families of service words (everything that starts from <keyword_> and to the end of the word
And we go to other contexts:
context " " green
spellcheck
context exclusive # \n brown
- line and single line comment
context exclusive = \n magenta
keyword \\\n red
keyword \\ red
keyword \/\/ brown
keyword "*" green
keyword '*' green
- Parameter assignment context
domainlist relay_to_domains = local_domains
It is also responsible for ensuring that the lines in this context are displayed in green:
keyword "*" is green, keyword '*' is green , and service line breaks are in red.
findings
AFTER these manipulations (without overloading the MS), our config began to look more attractive:

PS
Main sources:
man mceditAnd also / usr / local / share / mc / syntax / Syntax
The exim.Syntax syntax file itself can be picked up
here.PPS If someone finds a ready-made syntax file, you are welcome to drop his link somewhere here.