Compare commits

..

9 Commits

Author SHA1 Message Date
Orien Vandenbergh
4e1410a3cd Correct paths to new host-based configurations 2025-09-26 11:04:30 -04:00
Orien Vandenbergh
12232994ee Forgot to include new file 2025-09-25 10:36:04 -04:00
Orien Vandenbergh
de00929fcd Moved host specific configurations out of central config files 2025-09-25 10:35:18 -04:00
Orien Vandenbergh
a751685924 New neomutt macro to mark all New as Read 2025-09-25 10:18:44 -04:00
Orien Vandenbergh
bd811dbe63 Some neomutt updates 2025-07-29 17:08:32 -04:00
Orien Vandenbergh
ac3de402b8 Some refinement 2025-07-29 17:08:32 -04:00
Orien Vandenbergh
2e7d87fb77 adding my hec_test-er 2025-07-29 17:08:32 -04:00
bc424c7346 neomutt updates
Cleaned up some more conflicts
2025-07-28 21:05:18 -04:00
543612e5ac misfit updates
resolved the mailboxes conflict
2025-07-28 21:03:31 -04:00
10 changed files with 107 additions and 6 deletions

2
.gitignore vendored
View File

@@ -1 +1 @@
neomutt/accounts neomutt/hosts/*/accounts

View File

@@ -8,7 +8,7 @@ set folder="imaps://imap.gmail.com/"
# Where archived mail goes # Where archived mail goes
set mbox="+[Gmail]/All Mail" set mbox="+[Gmail]/All Mail"
#set mbox="imaps://imap.gmail.com/[Gmail]/All Mail" #set mbox="imaps://imap.misfit.rodeo/[Gmail]/All Mail"
# Where postponed messaged die # Where postponed messaged die
set postponed="+[Gmail]/Drafts" set postponed="+[Gmail]/Drafts"

View File

@@ -0,0 +1,2 @@
set from="orien.vandenbergh@guidepointsecurity.com"
set hostname=felurian.guidepointsecurity.com # Name of the localhost

View File

@@ -0,0 +1,26 @@
# -*- muttrc -*-
#
# Mailboxes for mutt
#
# Where are mailboxes stored
set folder="imaps://imap.misfit.rodeo/INBOX"
# Where archived mail goes
set mbox="+Archive"
#set mbox="imaps://imap.misfit.rodeo/[Gmail]/All Mail"
# Where postponed messaged die
set postponed="+Drafts"
# ... and it gets saved in =outbox.
# Gmail does this automatically, let's not duplicate...
#set record="+[Gmail]/Sent Mail"
set record="+Sent"
# Look me up
set spoolfile="+INBOX"
mailboxes $spoolfile
set imap_check_subscribed = yes

3
neomutt/hosts/utage/main Normal file
View File

@@ -0,0 +1,3 @@
set from="orien@misfit.rodeo"
set hostname=utage.i.misfit.rodeo # Name of the localhost

View File

@@ -16,6 +16,7 @@ macro index "\ev" "<pipe-message>less<enter>" # View
macro index "\Cs\Co" "<limit>~h \"X-SpamProbe: GOOD\"<enter><last-entry>" # View good emails. macro index "\Cs\Co" "<limit>~h \"X-SpamProbe: GOOD\"<enter><last-entry>" # View good emails.
macro index "\Cs\Cs" "<limit>~h \"X-SpamProbe: SPAM\"<enter><last-entry>" # View bad emails. macro index "\Cs\Cs" "<limit>~h \"X-SpamProbe: SPAM\"<enter><last-entry>" # View bad emails.
macro index \Cr ":source ~/.config/neomutt/neomuttrc<enter>" "Re-source the neomuttrc" macro index \Cr ":source ~/.config/neomutt/neomuttrc<enter>" "Re-source the neomuttrc"
macro index "R" "<tag-pattern>~N<enter><tag-pattern>~O<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "Mark New as read"
# Macros for use in the pager. # Macros for use in the pager.
macro pager "w" "<enter-command>set invsmart_wrap invmarkers<enter>" # Toggle wrap stuff macro pager "w" "<enter-command>set invsmart_wrap invmarkers<enter>" # Toggle wrap stuff

View File

@@ -25,3 +25,4 @@ text/vcard; mutt_vcard_filter; copiousoutput
text/x-diff; view %s; needsterminal text/x-diff; view %s; needsterminal
text/x-patch; view %s; needsterminal text/x-patch; view %s; needsterminal
application/zip; unzip -c %s; copiousoutput; nametemplate=%s.zip

View File

@@ -1,10 +1,9 @@
set realname="Orien Vandenbergh" set realname="Orien Vandenbergh"
set signature="~/.signature.txt" set signature="~/.signature.txt"
set from="orien.vandenbergh@guidepointsecurity.com"
set use_from = yes set use_from = yes
set envelope_from = yes set envelope_from = yes
set hostname=felurian.guidepointsecurity.com # Name of the localhost
set hidden_host # Hide host details set hidden_host # Hide host details
set alias_file=~/.config/neomutt/aliases # Personal mail aliases set alias_file=~/.config/neomutt/aliases # Personal mail aliases
#set query_command="~/bin/mutt-ldap '%s'" # How to query the company contacts #set query_command="~/bin/mutt-ldap '%s'" # How to query the company contacts
@@ -64,7 +63,8 @@ set header_cache="~/.cache/neomutt/headers" # Where to cache imap header
set message_cachedir="~/.cache/neomutt/bodies" # "" bodies set message_cachedir="~/.cache/neomutt/bodies" # "" bodies
#source /usr/share/doc/mutt/samples/gpg.rc # Use GPG #source /usr/share/doc/mutt/samples/gpg.rc # Use GPG
source ~/.config/neomutt/accounts # Account details source ~/.config/neomutt/hosts/`hostname`/main # General Settings
source ~/.config/neomutt/hosts/`hostname`/accounts # Account details
source ~/.config/neomutt/aliases # Load in my aliases. source ~/.config/neomutt/aliases # Load in my aliases.
source ~/.config/neomutt/auto_views # Define auto_views. source ~/.config/neomutt/auto_views # Define auto_views.
source ~/.config/neomutt/bindings # Define key bindings. source ~/.config/neomutt/bindings # Define key bindings.
@@ -75,12 +75,15 @@ source ~/.config/neomutt/fcc-hooks # Define fcc-hooks
source ~/.config/neomutt/folder-hooks # Define folder-hooks. source ~/.config/neomutt/folder-hooks # Define folder-hooks.
source ~/.config/neomutt/headers # Configure header display. source ~/.config/neomutt/headers # Configure header display.
source ~/.config/neomutt/macros # Define macros. source ~/.config/neomutt/macros # Define macros.
source ~/.config/neomutt/mailboxes # Define the list of folders that receive mail. source ~/.config/neomutt/hosts/`hostname`/mailboxes # Host specific settings
source ~/.config/neomutt/message-hooks # Define message hooks. source ~/.config/neomutt/message-hooks # Define message hooks.
source ~/.config/neomutt/non-standard # Support for mutt patches. source ~/.config/neomutt/non-standard # Support for mutt patches.
source ~/.config/neomutt/save-hooks # Define save-hooks. source ~/.config/neomutt/save-hooks # Define save-hooks.
source ~/.config/neomutt/subscriptions # Define the list of subscribed mailing lists. source ~/.config/neomutt/subscriptions # Define the list of subscribed mailing lists.
color index_subject brightred default '~ihubspotemail.net'
color index_subject brightred default '~imarketo.org'
# Play with the sidebar? # Play with the sidebar?
#set sidebar_divider_char = '|' #set sidebar_divider_char = '|'
set sidebar_visible = yes set sidebar_visible = yes

View File

@@ -10,4 +10,12 @@ save-hook '~f @newyorklife\\.com$' "=Customers/NYLife"
save-hook '=f @rtx.com' "=Customers/RTX" save-hook '=f @rtx.com' "=Customers/RTX"
save-hook '=f @shu.edu' "=Customers/SHU" save-hook '=f @shu.edu' "=Customers/SHU"
save-hook '=f @partner.paloaltonetworks.com' "=Partners/PaloAlto" save-hook '=f @partner.paloaltonetworks.com' "=Partners/PaloAlto"
save-hook '~f "Krista Trigger via Smartsheet"' "=Customers/Tines"
save-hook '~s "(Tines|ADP)" ~f automation@app.smartsheet.com' "=Customers/Tines"
save-hook '=f @adp.com' "=Customers/Tines"
save-hook '=f @wellington.com' "=Customers/Wellington"
# This is the default, it must be at the bottom...
save-hook '.*' "=[Gmail]/All Mail" save-hook '.*' "=[Gmail]/All Mail"
#save-hook .* =Archive/`date "+%Y-%m"`
#save-hook .* "=[Gmail]/All Mail"

57
scripts/hec_test Executable file
View File

@@ -0,0 +1,57 @@
#!/usr/bin/env python3
import argparse
from datetime import datetime
import subprocess
import json
def build_json(field,path):
return json.dumps({field:f"This is a sample json event sent to {path}","hecTest":"yes"})
def build_raw(path):
return f"{datetime.now().strftime('%Y-%m-%dT%H:%M:%S.%fZ')} nowhere This is a sample raw event sent to {path} hecTest=yes"
def test_hec(dtype,verbose,baseurl,path,data):
url = baseurl+path
cmd = ['curl','-k',url,'-H',f"Authorization: {args.token}",'-d',data]
if verbose:
print(f"Running command:")
print(f">\t{cmd[0]} {cmd[1]} {cmd[2]} \\")
print(f"\t{cmd[3]} {cmd[4]} \\")
print(f"\t{cmd[5]} '{cmd[6]}'")
print()
else:
print(f"Testing '{dtype}': '{path}'")
result = subprocess.run(cmd,capture_output=True,text=True)
#print("stderr")
#print(result.stderr)
print(f"\033[0;32mResult\033[0m: {result.stdout}")
print("")
parser = argparse.ArgumentParser(
prog='hectest',
description='Send a set of test HEC message to a receiver, using a variety of endpoints')
parser.add_argument('-t', '--token', required=True,
help='token to use (required)')
parser.add_argument('-v', '--verbose', action='store_true',
help='print the curl commands for further debugging')
parser.add_argument('url',
help="base url to send to, example: 'https://host.com:10080'")
args = parser.parse_args()
# Run an array of hec tests
test_hec('json', args.verbose, args.url, '/cribl/_bulk', build_json( '_raw', '/cribl/_bulk'))
test_hec('json', args.verbose, args.url, '/services/collector', build_json('event', '/services/collector'))
test_hec('json', args.verbose, args.url, '/services/collector/raw', build_json('event', '/services/collector/raw'))
test_hec('json', args.verbose, args.url,'/services/collector/event', build_json('event','/services/collector/event'))
# Run an array of raw tests
test_hec( 'raw', args.verbose, args.url, '/cribl/_bulk', build_raw( '/cribl/_bulk'))
test_hec( 'raw', args.verbose, args.url, '/services/collector/raw', build_raw( '/services/collector/raw'))
# Can't send raw to /services/collector
# test_hec(args.url, '/services/collector', build_raw( '/services/collector'))