-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postfix: new packages for Postfix MTA #386
Conversation
05f0c08
to
029ac18
Compare
Hi, I have merged Mike Petullo's patches for optional LDAP, SASL and TLS support.
Please advise if I need to fix them before the package can be merged, or if I can fix it later. Best regards, |
7008d90
to
21f101f
Compare
Hi again, Well, I've managed to compile postfix without recompiling postconf natively.
config_directory=/etc/postfix Best regards, |
Item 2 - Use PKG_BUILD_DEPENDS:=+tinycdb (Instead of DEPENDS) Item 3 - You'll probably need postinst and prerm scripts to remove and replace the Busybox links respectively. |
Hi Ted, 2014-10-06 4:29 GMT+04:00 Ted Hess [email protected]:
I think that could be a problem because:
Does OpenWRT have anything similar to update-alternatives? Are there any |
Item 3 - The proper way to do this in the build environment, in my opinion, is to to set the appropriate conflict rules for menuconfig, so that if postfix is selected, sendmail gets deactivated in the busybox settings. I don't know enough about how to do this. Item 4 - Reason: to keep temporary and frequently changing files away from what is likely flash memory in a typical OpenWRT system. However, this means the directories need to be handled every time on startup and shutdown of postfix in the init.d script. The data directory needs exist before postfix starts, so it needs to be created on startup. The spool directory needs to be saved to flash on shutdown of postfix and read from flash on startup, otherwise queued mail will be lost on shutdown of postfix. in /etc/init.d/postfix start() { stop() { It would be better to use rsync rather than rm/cp for saving and restroring the mail queue,because that would result in fewer file operations on the flash memory. But rsync is not part of the standard OpenWrt installation, so it would have to be made a runtime dependency just for the purpose of the init script. |
@thess - I think both scenarios need to be covered. At build time, the conflict should be prevented in the first place my preventing busybox/sendmail and postfix being selected in config at the same time. At installation time via opkg, postint/prerm can be used as a workaround. The workaround will not kick-in on a properly built system, but it will cover the cases where the package is installed removed via opkg.. |
This might be interesting: https://dev.openwrt.org/changeset/42770 |
Interesting, yes - but I think nbd's change is for complete packages and not config options like those in busybox. It does prevent selection of conflicting packages in the menuconfig (like hostapd vs. wpad). I guess this feature could be extended to handle other CONFIG_xxx options? Anyway, after a brief test build with the utils/grep package which has postinst/prerm scripts to deal with busybox -- I noticed that only /usr/bin/grep was present in the rootfs and there was no link to busybox in /bin/grep. I belive packages are acutally "installed" in image builds and even SDK builds. I think it is a fair question to ask if one want just the alternative "full" package to quietly supercede others or to block build selections. There are cases for both types of behavior. |
Well feel free to merge then ;) |
Well, then I suggest another approach - install new file as /usr/sbin/sendmail.postfix and create a simlink in a postinst script. Let me do it to show you... |
Ok, done. Now the package installs /usr/sbin/sendmail.postfix, then in postinst script it creates a simlink to /usr/sbin/sendmail, and if that file is already present, it would back it up to /usr/sbin/sendmail.old. Please review and approve. |
25fc83e
to
8fb4f84
Compare
Hi again, I have changed the name of the /etc/init.d/postfix function that creates users from enable() to create_users(), because it appears that /etc/rc.common enable() function is not called if it is redefined in the script. Best regards, |
Anymore comments from anybody or shall we merge it as is? |
The only issue I see in this revision is that installing the package overwrites master.cf (unlike main.cf, which the package protects as a configuration file). I picked up on this because I just started using a custom master.cf. That said, I would support merging as is and fixing this master.cf issue following the merge. I have been using Shulyaka's various Postfix packages to process flyn.org mail for a few weeks now. This is not a simple package, and I greatly appreciate Shulyaka's work. Thank you! |
Signed-off-by: Denis Shulyaka <[email protected]>
Hi Mike, Thanks for the hint. Just fixed that. Best regards, |
Thanks for the hard work. |
postfix: new packages for Postfix MTA
Well, for me there is still the issue that the postfix package does not compile in the OpenWRT Buildroot (fails with linker errors). This may be down to my ineptitude, but shouldn't a package compile seamlessly within the official buildroot? |
Guess we'll have a look at the buildbot logs once they do their next round and see if anything is broken. |
Just did a compile test myself, don't see any issues right now, but maybe its dependent on a specific architecture or so. |
Hi Reinhard, Please make sure you have all dependencies in the package/ directory. tinycdb Best regards, |
Signed-off-by: Denis Shulyaka [email protected]