/usr/share/vim/addons/syntax/msmtp.vim is in msmtp 1.6.6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | " Vim syntax file
" Language: msmtp rc files
" Maintainer: Simon Ruderich <simon@ruderich.com>
" Eric Pruitt <eric.pruitt@gmail.com>
" Last Change: 2014-12-11
" Filenames: msmtprc
" Version: 0.3
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Comments.
syn match msmtpComment /#.*$/ contains=@Spell
" General commands.
syntax match msmtpOption /\<\(defaults\|account\|host\|port\|proxy_host\|proxy_port\|timeout\|protocol\|domain\)\>/
" Authentication commands.
syntax match msmtpOption /\<\(auth\|user\|password\|passwordeval\|ntlmdomain\)\>/
" TLS commands.
syntax match msmtpOption /\<\(tls\|tls_trust_file\|tls_crl_file\|tls_fingerprint\|tls_key_file\|tls_cert_file\|tls_certcheck\|tls_starttls\|tls_min_dh_prime_bits\|tls_priorities\)\>/
" Sendmail mode specific commands.
syntax match msmtpOption /\<\(auto_from\|from\|maildomain\|dsn_notify\|dsn_return\|add_missing_from_header\|add_missing_date_header\|remove_bcc_headers\|logfile\|syslog\)\>/
" Options which accept only an on/off value.
syn match msmtpWrongOption /\<\(tls\|tls_certcheck\|tls_starttls\|auto_from\|add_missing_from_header\|add_missing_date_header\|remove_bcc_headers\) \(on$\|off$\)\@!.*$/
" Option port accepts numeric values.
syn match msmtpWrongOption /\<\(port\|proxy_port\) \(\d\+$\)\@!.*$/
" Option timeout accepts off and numeric values.
syn match msmtpWrongOption /\<timeout \(off$\|\d\+$\)\@!.*$/
" Option protocol accepts smtp and lmtp.
syn match msmtpWrongOption /\<protocol \(smtp$\|lmtp$\)\@!.*$/
" Option auth accepts on, off and the method.
syn match msmtpWrongOption /\<auth \(on$\|off$\|plain$\|cram-md5$\|digest-md5$\|scram-sha-1$\|gssapi$\|external$\|login$\|ntlm$\)\@!.*$/
" Option auth accepts on, off and the facility.
syn match msmtpWrongOption /\<syslog \(on$\|off$\|LOG_USER$\|LOG_MAIL$\|LOG_LOCAL\d$\)\@!.*$/
" Marks all wrong option values as errors.
syn match msmtpWrongOptionValue /\S* \zs.*$/ contained containedin=msmtpWrongOption
" Mark the option part as a normal option.
highlight default link msmtpWrongOption msmtpOption
"Email addresses (yanked from esmptrc)
syntax match msmtpAddress /[a-z0-9_.-]*[a-z0-9]\+@[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+/
" Host names
syn match msmtpHost "\%(host\s*\)\@<=\h\%(\w\|\.\|-\)*"
" Numeric values
syn match msmtpNumber /\<\(\d\+$\)/
"Strings
syntax region msmtpString start=/"/ end=/"/
syntax region msmtpString start=/'/ end=/'/
highlight default link msmtpComment Comment
highlight default link msmtpOption Type
highlight default link msmtpWrongOptionValue Error
highlight default link msmtpString String
highlight default link msmtpAddress Constant
highlight default link msmtpNumber Number
highlight default link msmtpHost Identifier
let b:current_syntax = "msmtp"
|