From ef0528a9f2e1d55471b2109fcfffbc48b0e1ffd7 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Mon, 29 Aug 2022 13:55:07 -0400 Subject: send-receive: improve logging and returned errors Adds file logging, improves errors returned to the client, and makes templates more easily configurable via the config file. Signed-off-by: Konstantin Ryabitsev --- misc/default.conf | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 misc/default.conf (limited to 'misc/default.conf') diff --git a/misc/default.conf b/misc/default.conf new file mode 100644 index 0000000..a7a78d2 --- /dev/null +++ b/misc/default.conf @@ -0,0 +1,63 @@ +[main] + # This is what we describe ourselves as in messages + myname = B4 Web Endpoint + # The URL to the submission endpoint + myurl = http://localhost:8000/_b4_submit + # This must be in a format that is understood by SQLAlchemy, and you obviously + # don't want to use the default, which gets lost every time the app is restarted + dburl = sqlite:///:memory: + # These are the domains for which we have DKIM signing capabilities, so if we + # receive a submission with that domain in From, we don't have to do any + # in-body From substitution, Reply-To tricks, etc. + mydomains = kernel.org, linux.dev + # One of the To: or Cc: addrs must match this regex + # (to ensure that the message was intended to go to mailing lists) + mustdest = .*@(vger\.kernel\.org|lists\.linux\.dev|lists\.infradead\.org) + # Always bcc the address(es) listed here, separated by comma + # Useful during initial testing + #alwaysbcc = one@example.com, two@example.com + # If dryrun is set, the messages are printed to stdout instead of + # being actually sent out. Useful for testing. + #dryrun = false + # Where to write our app-specific logs. Make sure it's writable by the + # web process. + #logfile = /var/log/somewhere.log + # Can be "info", "debug", "critical" + #loglevel = info + +# This section matches the git's sendemail section one-for-one +[sendemail] + from = Web Endpoint + smtpserver = localhost + smtpserverport = 25 + #smtpencryption = + #smtpuser = + #smtppass = + +# information about the public-inbox feed we'll be writing to +# NOTE: we won't init the git repository, so make sure it's present +[public-inbox] + # Path to the public-inbox git repository. If there is a hooks/post-commit, + # we will execute it after writing a new batch of messages to the repo. + repo = + # This is required for public-inbox to work correctly + listid = Web Submitted Patches + +[templates] +verify-subject = Web endpoint verification for $${identity} +verify-body = Dear $${name}: + + Somebody, probably you, initiated a web endpoint verification routine + for patch submissions at: $${myurl} + + If you have no idea what is going on, please ignore this message + Otherwise, please follow instructions provided by your tool and paste + the following string: + + $${challenge} + + Happy patching! + +signature = Deet-doot-dot, I am a bot! + https://korg.docs.kernel.org + -- cgit v1.2.3