mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-19 10:37:01 +00:00
Merge branch 'feature/distro-pkgs' into develop, closes #89
This commit is contained in:
@@ -1,14 +1,17 @@
|
|||||||
project_name: inbucket
|
project_name: inbucket
|
||||||
|
|
||||||
release:
|
release:
|
||||||
github:
|
github:
|
||||||
owner: jhillyerd
|
owner: jhillyerd
|
||||||
name: inbucket
|
name: inbucket
|
||||||
name_template: '{{.Tag}}'
|
name_template: '{{.Tag}}'
|
||||||
|
|
||||||
brew:
|
brew:
|
||||||
commit_author:
|
commit_author:
|
||||||
name: goreleaserbot
|
name: goreleaserbot
|
||||||
email: goreleaser@carlosbecker.com
|
email: goreleaser@carlosbecker.com
|
||||||
install: bin.install ""
|
install: bin.install ""
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
- binary: inbucket
|
- binary: inbucket
|
||||||
goos:
|
goos:
|
||||||
@@ -22,7 +25,7 @@ builds:
|
|||||||
- "6"
|
- "6"
|
||||||
main: ./cmd/inbucket
|
main: ./cmd/inbucket
|
||||||
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||||
- binary: client
|
- binary: inbucket-client
|
||||||
goos:
|
goos:
|
||||||
- darwin
|
- darwin
|
||||||
- freebsd
|
- freebsd
|
||||||
@@ -34,6 +37,7 @@ builds:
|
|||||||
- "6"
|
- "6"
|
||||||
main: ./cmd/client
|
main: ./cmd/client
|
||||||
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||||
|
|
||||||
archive:
|
archive:
|
||||||
format: tar.gz
|
format: tar.gz
|
||||||
wrap_in_directory: true
|
wrap_in_directory: true
|
||||||
@@ -48,12 +52,29 @@ archive:
|
|||||||
- CHANGELOG*
|
- CHANGELOG*
|
||||||
- etc/**/*
|
- etc/**/*
|
||||||
- ui/**/*
|
- ui/**/*
|
||||||
fpm:
|
|
||||||
bindir: /usr/local/bin
|
nfpm:
|
||||||
|
vendor: inbucket.org
|
||||||
|
homepage: https://www.inbucket.org/
|
||||||
|
maintainer: github@hillyerd.com
|
||||||
|
description: All-in-one disposable webmail service.
|
||||||
|
license: MIT
|
||||||
|
formats:
|
||||||
|
- deb
|
||||||
|
- rpm
|
||||||
|
files:
|
||||||
|
"ui/**/*": "/usr/local/share/inbucket/ui"
|
||||||
|
config_files:
|
||||||
|
"etc/linux/inbucket.service": "/lib/systemd/system/inbucket.service"
|
||||||
|
"ui/greeting.html": "/etc/inbucket/greeting.html"
|
||||||
|
|
||||||
snapshot:
|
snapshot:
|
||||||
name_template: SNAPSHOT-{{ .Commit }}
|
name_template: SNAPSHOT-{{ .Commit }}
|
||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
|
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
|
||||||
|
|
||||||
dist: dist
|
dist: dist
|
||||||
|
|
||||||
sign:
|
sign:
|
||||||
artifacts: none
|
artifacts: none
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Storage type is now displayed on Status page.
|
- Storage type is now displayed on Status page.
|
||||||
- Store size is now calculated during retention scan and displayed on the Status
|
- Store size is now calculated during retention scan and displayed on the Status
|
||||||
page.
|
page.
|
||||||
|
- Debian `.deb` package generation to release process.
|
||||||
|
- RedHat `.rpm` package generation to release process.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Massive refactor of back-end code. Inbucket should now be both easier and
|
- Massive refactor of back-end code. Inbucket should now be both easier and
|
||||||
|
|||||||
33
etc/linux/inbucket.service
Normal file
33
etc/linux/inbucket.service
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Inbucket Disposable Email Service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=daemon
|
||||||
|
Group=daemon
|
||||||
|
PermissionsStartOnly=true
|
||||||
|
|
||||||
|
Environment=INBUCKET_LOGLEVEL=WARN
|
||||||
|
Environment=INBUCKET_SMTP_ADDR=0.0.0.0:2500
|
||||||
|
Environment=INBUCKET_POP3_ADDR=0.0.0.0:1100
|
||||||
|
Environment=INBUCKET_WEB_ADDR=0.0.0.0:9000
|
||||||
|
Environment=INBUCKET_WEB_UIDIR=/usr/local/share/inbucket/ui
|
||||||
|
Environment=INBUCKET_WEB_GREETINGFILE=/etc/inbucket/greeting.html
|
||||||
|
Environment=INBUCKET_STORAGE_TYPE=file
|
||||||
|
Environment=INBUCKET_STORAGE_PARAMS=path:/var/local/inbucket
|
||||||
|
|
||||||
|
# Uncomment line below to use low numbered ports
|
||||||
|
#ExecStartPre=/sbin/setcap 'cap_net_bind_service=+ep' /usr/local/bin/inbucket
|
||||||
|
|
||||||
|
ExecStartPre=/bin/mkdir -p /var/local/inbucket
|
||||||
|
ExecStartPre=/bin/chown daemon:daemon /var/local/inbucket
|
||||||
|
|
||||||
|
ExecStart=/usr/local/bin/inbucket
|
||||||
|
|
||||||
|
# Give SMTP connections time to drain
|
||||||
|
TimeoutStopSec=20
|
||||||
|
KillMode=mixed
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Please see the RedHat installation guide on our website:
|
|
||||||
|
|
||||||
http://www.inbucket.org/installation/redhat.html
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# Inbucket reverse proxy, Apache will forward requests from port 80
|
|
||||||
# to Inbucket's built in web server on port 9000
|
|
||||||
#
|
|
||||||
# Replace SERVERFQDN with your servers fully qualified domain name
|
|
||||||
<VirtualHost *:80>
|
|
||||||
ServerName SERVERFQDN
|
|
||||||
ProxyRequests off
|
|
||||||
|
|
||||||
<Proxy *>
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
</Proxy>
|
|
||||||
|
|
||||||
RewriteRule ^/$ http://SERVERFQDN:9000
|
|
||||||
ProxyPass / http://SERVERFQDN:9000/
|
|
||||||
ProxyPassReverse / http://SERVERFQDN:9000/
|
|
||||||
</VirtualHost>
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# inbucket Inbucket email testing service
|
|
||||||
#
|
|
||||||
# chkconfig: 2345 80 30
|
|
||||||
# description: Inbucket is a disposable email service for testing email
|
|
||||||
# functionality of other applications.
|
|
||||||
# processname: inbucket
|
|
||||||
# pidfile: /var/run/inbucket/inbucket.pid
|
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: Inbucket service
|
|
||||||
# Required-Start: $local_fs $network $remote_fs
|
|
||||||
# Required-Stop: $local_fs $network $remote_fs
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: start and stop inbucket
|
|
||||||
# Description: Inbucket is a disposable email service for testing email
|
|
||||||
# functionality of other applications.
|
|
||||||
# moves mail from one machine to another.
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
# Source function library.
|
|
||||||
. /etc/rc.d/init.d/functions
|
|
||||||
|
|
||||||
# Source networking configuration.
|
|
||||||
. /etc/sysconfig/network
|
|
||||||
|
|
||||||
RETVAL=0
|
|
||||||
program=/opt/inbucket/inbucket
|
|
||||||
prog=${program##*/}
|
|
||||||
config=/etc/opt/inbucket.conf
|
|
||||||
runas=inbucket
|
|
||||||
|
|
||||||
lockfile=/var/lock/subsys/$prog
|
|
||||||
pidfile=/var/run/$prog/$prog.pid
|
|
||||||
logfile=/var/log/$prog.log
|
|
||||||
|
|
||||||
conf_check() {
|
|
||||||
[ -x $program ] || exit 5
|
|
||||||
[ -f $config ] || exit 6
|
|
||||||
}
|
|
||||||
|
|
||||||
perms_check() {
|
|
||||||
mkdir -p /var/run/$prog
|
|
||||||
chown $runas: /var/run/$prog
|
|
||||||
touch $logfile
|
|
||||||
chown $runas: $logfile
|
|
||||||
# Allow bind to ports under 1024
|
|
||||||
setcap 'cap_net_bind_service=+ep' $program
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
[ "$EUID" != "0" ] && exit 4
|
|
||||||
# Check that networking is up.
|
|
||||||
[ ${NETWORKING} = "no" ] && exit 1
|
|
||||||
# Check config sanity
|
|
||||||
conf_check
|
|
||||||
perms_check
|
|
||||||
# Start daemon
|
|
||||||
echo -n $"Starting $prog: "
|
|
||||||
daemon --user $runas --pidfile $pidfile $program \
|
|
||||||
-pidfile $pidfile -logfile $logfile $config \&
|
|
||||||
RETVAL=$?
|
|
||||||
[ $RETVAL -eq 0 ] && touch $lockfile
|
|
||||||
echo
|
|
||||||
return $RETVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
[ "$EUID" != "0" ] && exit 4
|
|
||||||
conf_check
|
|
||||||
# Stop daemon
|
|
||||||
echo -n $"Shutting down $prog: "
|
|
||||||
killproc -p "$pidfile" -d 15 "$program"
|
|
||||||
RETVAL=$?
|
|
||||||
[ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
|
|
||||||
echo
|
|
||||||
return $RETVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
reload() {
|
|
||||||
[ "$EUID" != "0" ] && exit 4
|
|
||||||
echo -n $"Reloading $prog: "
|
|
||||||
killproc -p "$pidfile" "$program" -HUP
|
|
||||||
RETVAL=$?
|
|
||||||
echo
|
|
||||||
return $RETVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
# See how we were called.
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
[ -e $lockfile ] && exit 0
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
[ -e $lockfile ] || exit 0
|
|
||||||
stop
|
|
||||||
;;
|
|
||||||
reload)
|
|
||||||
[ -e $lockfile ] || exit 0
|
|
||||||
reload
|
|
||||||
;;
|
|
||||||
restart|force-reload)
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
status -p $pidfile -l $(basename $lockfile) $prog
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo $"Usage: $0 {start|stop|restart|status}"
|
|
||||||
exit 2
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit $?
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/var/log/inbucket.log {
|
|
||||||
missingok
|
|
||||||
notifempty
|
|
||||||
create 0644 inbucket inbucket
|
|
||||||
postrotate
|
|
||||||
[ -x /bin/systemctl ] && /bin/systemctl reload inbucket >/dev/null 2>&1 || true
|
|
||||||
endscript
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Inbucket Disposable Email Service
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=inbucket
|
|
||||||
Group=inbucket
|
|
||||||
|
|
||||||
ExecStart=/opt/inbucket/inbucket -logfile /var/log/inbucket.log /etc/opt/inbucket.conf
|
|
||||||
|
|
||||||
# Re-open log file after rotation
|
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
|
||||||
|
|
||||||
# Give SMTP connections time to drain
|
|
||||||
TimeoutStopSec=20
|
|
||||||
KillMode=mixed
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Please see the Ubuntu installation guide on our website:
|
|
||||||
|
|
||||||
http://www.inbucket.org/installation/ubuntu.html
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# inbucket - disposable email service
|
|
||||||
#
|
|
||||||
# Inbucket is an SMTP server with a web interface for testing application
|
|
||||||
# functionality
|
|
||||||
|
|
||||||
description "inbucket - disposable email service"
|
|
||||||
author "http://jhillyerd.github.com/inbucket"
|
|
||||||
|
|
||||||
start on (local-filesystems and net-device-up IFACE!=lo)
|
|
||||||
stop on runlevel [!2345]
|
|
||||||
|
|
||||||
env program=/opt/inbucket/inbucket
|
|
||||||
env config=/etc/opt/inbucket.conf
|
|
||||||
env logfile=/var/log/inbucket.log
|
|
||||||
env runas=inbucket
|
|
||||||
|
|
||||||
# Give SMTP connections time to drain
|
|
||||||
kill timeout 20
|
|
||||||
|
|
||||||
pre-start script
|
|
||||||
[ -x $program ]
|
|
||||||
[ -r $config ]
|
|
||||||
touch $logfile
|
|
||||||
chown $runas: $logfile
|
|
||||||
# Allow bind to ports under 1024
|
|
||||||
setcap 'cap_net_bind_service=+ep' $program
|
|
||||||
end script
|
|
||||||
|
|
||||||
exec start-stop-daemon --start --chuid $runas --exec $program -- -logfile $logfile $config
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/var/log/inbucket.log {
|
|
||||||
missingok
|
|
||||||
notifempty
|
|
||||||
create 0644 inbucket inbucket
|
|
||||||
postrotate
|
|
||||||
[ -x /bin/systemctl ] && /bin/systemctl reload inbucket >/dev/null 2>&1 || true
|
|
||||||
endscript
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Inbucket Disposable Email Service
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=inbucket
|
|
||||||
Group=inbucket
|
|
||||||
|
|
||||||
ExecStart=/opt/inbucket/inbucket -logfile /var/log/inbucket.log /etc/opt/inbucket.conf
|
|
||||||
|
|
||||||
# Re-open log file after rotation
|
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
|
||||||
|
|
||||||
# Give SMTP connections time to drain
|
|
||||||
TimeoutStopSec=20
|
|
||||||
KillMode=mixed
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
Reference in New Issue
Block a user