packages
packages copied to clipboard
emailrelay: more options
Maintainer: @fededim Compile tested: nothing to compile
Description: fix of a bug when server_tls option break daemon start. Add more essential options.
Also I think we should support --interface which is list. It may have a prefix so maybe it should be a separate section with advanced configuration.
Another big problem is that users still must edit emailrelay.auth and pop.auth manually. This makes the UCI conf useless because ideally everything must be configurable from LUCI without a terminal.
Also there is a new version v2.3. Could you please update it?
All options seem to work but one.
E-MailRelay V2.2 does not accept --server-tls-key option (tested on OpenWrt v22.03.2):
emailrelay: error: invalid option: "--server-tls-key"
nor second --server-tls-certificate:
emailrelay: error: duplicate use of "--server-tls-certificate"
So only way to pass both fullchain.pem and privkey.pem is to cat them into one file and pass that to E-MailRelay.
yes, the --server-tls-key was added in v2.3 But the PR can be merged separately: just don't use the unsupported (yet) option
Ok. Well, looking forward to E-MailRelay V2.3 for OpenWrt then.
There is a newer version 2.4 with a cool feature of direct delivery to SMTP by MX lookup. The maintainer of the package doesn't response so maybe we should created a PR with a newer version ourselves.
@stokito I don't know how to do that. Do you?
And do you know where I can get the new sources to compile them myself meanwhile?
@rodajc if you have a time you can try to make the PR yourself. I never did it but steps should be:
- git clone https://github.com/openwrt/packages.git
- Update version in the openwrt/packages/blob/master/mail/emailrelay/Makefile
- PKG_VERSION: 2.4.1 PKG_HASH=cff8cf5bff19fd1721cefdbd6207da67af01d2b1b4a51d147c33f4429a79766e
- Remove mail/emailrelay/patches/010-gcc11.patch
- Build and test it on a router
- Send the PR
Sources are here in SVN https://sourceforge.net/p/emailrelay/code/HEAD/tree/ there is also a git repo but it's outdated and author didn't migrated yet fully to the git
I do have time but I don't have a clue. After step one in packages/mail/emailrelay I have:
./Makefile
./files/emailrelay.config
./files/emailrelay.init
./files/emailrelay.auth
./patches/010-gcc11.patch
I can modify Makefile and remove the patch, but I don't see the new source to compile. I can't find the source either in the openwrt directory that I used to compile the firmware with emailrelay 2.2 that I am using currently, so you can safely say that I don't know what I'm doing...
@rodajc I created the PR with version update.
You don't see sources of the EmailRelay because they are downloaded by OpenWrt's makefile during a build. This is a complicated procedure. You may find on wiki "OpenWrt Create package" or something like that. I'm not experienced here too so I don't want to give a bad instruction.
@stokito Many thanks!
Tomorrow I'll try and build a new emailrelay.
If you just want to use tls you can do that even with the old version. You just need to merge privkey and fullchain and specify tls option with ext_command e.g. pass them manualy
I know. The new version is more compatible with Let's Encrypt exactly because you don't need to merge keys anymore. One more thing, emailrelay does not appear in the available updates on my OpenWrt router. Do you know why not?
Maybe there is no a package for your version of the OpenWrt. If you have a last version... my PR wasn't merged yet so you wont see it soon :(
I'll wait for the next OpenWrt stable release then.
So I waited for the new OpenWrt stable release which is OpenWrt 22.03.3. I checked it out and compiled it, I flashed the result to the router and then there was a deep disappointment. E-MailRelay is still on V2.2! What now? Will it ever merge into OpenWrt at all? If so, when? Isn't there any workaround to compile it already?
I finally managed to compile E-MailRelay V2.4.1. @stokito Your instructions were right but if only you had mentioned this path: feeds/packages/mail/emailrelay. So now I could test the config and the init script. There seems to be an error in the init script for E-MailRelay:
[ -n "$server_tls_key" ] && procd_append_param command --server-tls-certificate "$server_tls_certificate"
should be:
[ -n "$server_tls_key" ] && procd_append_param command --server-tls-certificate "$server_tls_key"
The same may apply for $client_tls_key, but I don't use that, so I can't confirm.
you right, will change that latter. Meanwhile author of the ER preparing v2.5 with many other changes that I waiting https://sourceforge.net/p/emailrelay/support-requests/75/ Going to test it latter.
Please do no longer set PKG_RELEASE to AUTORELEASE as the feature is deprecated. Please use an integer instead. Below is a list of affected packages including correct PKG_RELEASE:
- mail/emailrelay/Makefile: PKG_RELEASE:=14
@rodajc I added a fix for the missing var. Please test. I can't compile for my router now
@rodajc I added a fix for the missing var. Please test. I can't compile for my router now
Sorry for the delay. I will check the modification. Is that still with:
PKG_VERSION:=2.4.1
in Makefile?
yes, the change is in the openwrt scripts but not in the ER itself. Currently the next version of ER v2.5 is prepared and tested. Soon it should be released then I'll send a PR with the version upgrade
With:
PKG_VERSION:=2.4.1
in Makefile exactly the same package is compiled. Containing the same init script. Without the modification.
I assume this is as expected. The modification will be in a new version, right?
This is a pull (merge) request (PR) with my patch. OpenWrt devs didn't reviewed it yet and not merged into sources.