Fix uid/gid conflict with package icecast (uid=87, gid=87) and
package pianod (uid=88, gid=88) by claiming uid/gid 25 for postfix
instead of 87 and uid/gid 26 for postconf instead of 88.
Remove main.cf.default that is not used by any Postfix module.
The default configuration parameters are hardcoded into postconf
and they are available via "postconf -d <parameter>".
main.cf.default is therefore unnecessary.
"mydomain" parameter should be deduced from the domain configuration
setting in /e/c/dhcp rather than from "hostname" in /e/c/system
which is often just a hostname without the domain name component.
"mynetworks" parameter is unnecessary where "mynetworks_style" is
defined.
The change of the location of data_directory, queue_directory and
mail_spool_directory from /var/lib/postfix, /var/spool/postfix and
/var/mail to /data/postfix/lib, /data/postfix/spool and
/data/postfix/mail has been postponed until the author of this
commit and the maintainer of this package has had a meaningful
opportunity to consult with LEDE/OpenWrt developers on the preferred
mount point for the persistent data storage device.
Change the criteria for executing the post-installation script.
Invoke postinst() where the value of "myhostname" parameter in main.cf
is not defined rather than where "$config_directory"/opkg_postinst is
present with the value of "$config_directory" hardcoded to
"$IPKG_INSTROOT"/etc/postfix in /etc/init.d/postfix.
Enable PCRE support by default.
Remove the code making entries in /etc/sysupgrade.conf and instead
define configuration files to be saved during a sysupgrade in
Makefile's Package/postfix/conffiles section.
Move the creation of mail_spool_directory from host to target in
order to enable change of directory ownership to 'postfix' when
postinit() is executed on the target.
Avoid postfix restart in postinst script that results in an
error message during opkg install process.
Enable Postfix autostart by creating a link in /etc/rc.d/ on
installation.
Make the code less verbose.
Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
Fixed an issue with the default parameter value.
1. By default, the init script set ip address instead of network address in the parameter value (i.e. 192.168.1.1/24 instead of 192.168.1.0/24)
2. Dynamic address were not caught by the init script
As a result, if the mynetworks parameter was left default, Postfix would have rejected the mails with the following message in the logs:
Sat Dec 6 23:26:45 2014 mail.info postfix/smtpd[22806]: NOQUEUE: reject: RCPT from unknown[104.167.106.30]: 451 4.3.0 <ds_gitcommit@shulyaka.org.ru>: Temporary lookup failure; from=<delivery@mx.sailthru.com> to=<ds_gitcommit@shulyaka.org.ru> proto=ESMTP helo=<mx-indiegogo-b.sailthru.com>
Sat Dec 6 23:26:45 2014 mail.warn postfix/smtpd[22806]: warning: non-null host address bits in "127.0.0.1/8", perhaps you should use "127.0.0.0/8" instead
This commit fixes that behavior for the new installations.
Signed-off-by: Denis Shulyaka <Shulyaka@gmail.com>
Note that hash files are currently not supported by OpenWRT package of Berkeley DB.
CDB is still default.
Signed-off-by: Denis Shulyaka <Shulyaka@gmail.com>