inbox

command module
v0.0.0-...-a665a66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 16 Imported by: 0

README

Inbox

Inbox is a simple upload server with Pushover notification for messages or small files.

echo "Hallo Freund" | \
  curl -F file=@- -F "from=Kay" -F "subject=re: inbox" http://localhost:25478/inbox

Persist upload to disk.

./data/f6ab2023-c582-4939-ba77-d758e3b85aee

{
  "time":"2022-05-21T18:33:51.562755+02:00",
  "id":"f6ab2023-c582-4939-ba77-d758e3b85aee",
  "from":"Kay",
  "subject":"re: inbox",
  "payload":"SGFsbG8gRnJldW5kCg=="
}

With Pushover notification.

Use case

Upload a file
curl -F "file=@msg.txt" -F "from=Kay" -F "subject=file upload" https://127.0.0.1:12345/inbox
Upload encrypted message

I prefer age instead of pgp.

echo "Hallo Freund" | \
  age -r age1tjup7hvt35ldu3n98kzfl8ckl6dm43s4wnr02vrx7vvw27njhv4qfgdwym -a -o - | \
  curl -F file=@- -F "from=Kay" -F "subject=encrypted message" http://localhost:25478/inbox

Install

git clone https://github.com/kernelschmelze/inbox.git
cd inbox
go build

Usage

./inbox -f inbox.toml

Config

inbox.toml


# 25478
# :25478
# http://127.0.0.1:25478
# https://127.0.0.1:25478
# default :25478

listen = ":25478"

# tls crt and key file
# default empty

crt = "srv.crt"
key = "srv.key"

# simple json store
# default path ./data
# default days 0, no housekeeping

[jsonstore]
path = "./data"
days = 30

# pushover config

[pushover]
  app = "API Token"
  user = "Your User Key"
  

Uberspace setup

If you use uberspace as hoster, then here is the setup.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL