decke / smtprelay

Simple Golang SMTP relay/proxy server
MIT License
459 stars 110 forks source link

Change to goreleaser build for generate .deb and also implement journal log #164

Closed josejuanmontiel closed 1 month ago

josejuanmontiel commented 1 month ago

Hi!

I want to use this relay in my raspberry (in this case) but if power restart in my house, i want that could be a service...

I could do in many ways ... but as proof of concept try to:

  1. Change to the release builder with https://goreleaser.com/ and then use https://goreleaser.com/customization/nfpm/ (the default config could solve #144)
  2. Even journal log could capture stdout... also try to use this wrapper of core https://github.com/wercker/journalhook

What do you think?

decke commented 1 month ago

I think the same rules apply for all distributions (and also docker).

I am a FreeBSD ports maintainer myself and also will not commit any of that integration here.

josejuanmontiel commented 1 month ago

Hi, a long story of my case, I have an old ip cam that to send movent alerts use SMTP, but the in this case the old android app only allows 32 characters isn't enough to place the token that the most SMTP providers use as password.

It's totally respectful don't include any specific stuff to any distribution (in this case more than distribution it's more than service management, systemd, because Deb it's more a consequence...but) and probably any person that came here probably know sufficient to make this generic binary run like a service or any need... Even can compile to any arch/os that go support.

In my case add goreleaser was as proof of concept to use this approach, that includes many distribution package...

And add journals to log in systemd ... As said before, another option to log.

Probably, to keep learning i'll try to submit to Debian repository. Meanwhile I'll use my Deb in my raspy...

Thank for this piece of code, that solve my problem.

decke commented 1 month ago

I cannot create packages for most Linux distros myself except the ones I use myself which are currently Alpine Linux and OpenWRT. In addition to that I have also created the port net/smtprelay for FreeBSD.

If someone wants to step up and bring smtprelay to his/her favourite distro I'd be glad.