modulepackage
1.1.1
Repository: https://github.com/sharkfoursix/go-transact.git
Documentation: pkg.go.dev
# README
go-transact
Turn bank transaction notifications into action.
How it works
- You receive money in your bank account.
- Your institution sends a notification to your email address with transaction details. Importantly, the transaction has a description field which contains a unique string (let's call it a vendor reference id)
- Your email provider redirects the email to go-transact
- go-transact extracts transaction information from the email
- go-transact POSTS the transaction details to a callback url of your choosing
Use cases
- Can be used in environments where payment API services are non-existent or hard to acquire to automate service offerings and subscriptions upon receipt of payment.
- etc 👀
Data storage
A database (SQLite) file will be created in the current working directory to store the following:
- Received emails (unmatched emails are treated as spam)
- Callback status and data
Building
The provided Makefile contains the necessary commans to build.
- To build a stripped down version:
make build
- To clean without cleaning build and test cache:
make clean
- To clean everything:
make clean-all
Usage
Requirements
- Have an account at a bank that allows specifying a description when sending money.
- Have the account receive email notifications upon receipt of credit transactions.
- Email provider must be able to redirect emails.
- Have a server to run go-transact on.
Setup
- In your mail client, note your bank's email address and create a rule to redirect credit transaction emails to where go-transact will be running, i.e,
[email protected]
. I recommend using unguessable generated mailbox names such asopenssl rand -hex 24
- In your config.yaml, configure the regex patterns that will be used to extract transaction information from the mail.
- Run go-transact (prefereably as a service)
- (Optional but recommended) Setup firewall rules to only allow connections from mail service provider servers on port 25
To start daemon
./go-transact --config-file myconfig.yaml
To show usage
./go-transact --help
Security considerations
This program will only process emails from configured mailbox addresses to block uninvited visitors.
To prevent unwanted emails, you can setup firewall rules to only allow incoming connections from your mail provider.
The following example would only allow Outlook SMTP server to connect on port 25
iptables -A INPUT -s 40.92.18.77 -p tcp --dport 25 -j ACCEPT
iptables -A INPUT -p tcp --dport 25 -j DROP
Changelog
v1.1.1 | 2022-05-08
- Fix typo in struct field in config.go
v1.1.0 | 2022-05-08
- Automatic cleaning of amount values.
v1.0.6 | 2022-05-08
- Improvements
v1.0.5 | 2022-05-08
- Improvements
v1.0.4 | 2022-05-08
- Workflow improvements
v1.0.3 | 2022-05-08
- Workflow improvements
v1.0.2 | 2022-05-08
- Fix workflow write permissions
v1.0.1 | 2022-05-08
- Small improvements
v1.0.0 | 2022-05-08
- Initial release
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author