mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
mda-lmtp is a very basic MDA that uses LMTP to do the mail delivery. It takes command line arguments similar to maildrop or procmail, reads an email via standard input, and sends it over the given LMTP server. Supports connecting to LMTP servers over UNIX sockets and TCP. Since chasquid does not support direct LMTP local delivery, this can be used as a workaround instead. Example of use: $ mda-lmtp --addr localhost:1234 -f juan@casa -d jose < email
58 lines
1.2 KiB
Makefile
58 lines
1.2 KiB
Makefile
|
|
ifndef VERSION
|
|
VERSION = `git describe --always --long --dirty`
|
|
endif
|
|
|
|
# https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal
|
|
ifndef SOURCE_DATE_EPOCH
|
|
SOURCE_DATE_EPOCH = `git log -1 --format=%ct`
|
|
endif
|
|
|
|
|
|
default: chasquid
|
|
|
|
all: chasquid chasquid-util smtp-check spf-check mda-lmtp
|
|
|
|
|
|
chasquid:
|
|
go build -ldflags="\
|
|
-X main.version=${VERSION} \
|
|
-X main.sourceDateTs=${SOURCE_DATE_EPOCH} \
|
|
" ${GOFLAGS}
|
|
|
|
|
|
chasquid-util:
|
|
go build ${GOFLAGS} ./cmd/chasquid-util/
|
|
|
|
smtp-check:
|
|
go build ${GOFLAGS} ./cmd/smtp-check/
|
|
|
|
spf-check:
|
|
go build ${GOFLAGS} ./cmd/spf-check/
|
|
|
|
mda-lmtp:
|
|
go build ${GOFLAGS} ./cmd/mda-lmtp/
|
|
|
|
test:
|
|
go test ${GOFLAGS} ./...
|
|
setsid -w ./test/run.sh
|
|
setsid -w ./cmd/chasquid-util/test.sh
|
|
setsid -w ./cmd/mda-lmtp/test.sh
|
|
|
|
|
|
install-binaries: chasquid chasquid-util smtp-check mda-lmtp
|
|
mkdir -p /usr/local/bin/
|
|
cp -a chasquid chasquid-util smtp-check mda-lmtp /usr/local/bin/
|
|
|
|
install-config-skeleton:
|
|
if ! [ -d /etc/chasquid ] ; then cp -arv etc / ; fi
|
|
|
|
if ! [ -d /var/lib/chasquid ]; then \
|
|
mkdir -v /var/lib/chasquid; \
|
|
chmod -v 0700 /var/lib/chasquid ; \
|
|
chown -v mail:mail /var/lib/chasquid ; \
|
|
fi
|
|
|
|
|
|
.PHONY: chasquid chasquid-util smtp-check spf-check mda-lmtp test
|