Commit Graph

32 Commits

Author SHA1 Message Date
Khem Raj
407b28f8f2 postfix: Fix build with security flags and clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-09-12 10:55:06 -04:00
Khem Raj
9f04f8c048 postfix: Upgrade to 3.2.2
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-09-12 10:37:18 -04:00
Khem Raj
f7ce2ae063 postfix: Disable nis support on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-09-08 16:38:19 -04:00
Kai Kang
066360f31e postfix: do NOT create directory /var/spool/mail
postfix installs directory /var/spool/mail which conflicts with package
shadow.

| Error: Transaction check error:
|  file /var/spool/mail conflicts between attempted installs of
|  postfix-3.1.1-r0.ppc64e6500 and shadow-4.2.1-r0.1.ppc64e6500

Make postfix not create /var/spool/mail that it does NOT create the
directory on Fedora and Ubuntu either.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-04-26 09:59:39 -04:00
Yi Zhao
64ab19b7d1 postfix: remove references to buildmachine paths in target makedefs.out
Clean the buildmachine paths in makedefs.out

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-03-24 14:10:17 -04:00
Kai Kang
e37d985654 postfix: add dependency icu
It calls icu-config to detect icu support in file makedefs of postfix.
The compile results are different depends on whether icu has been built
already.

postfix should provide Unicode support, so add dependency icu to solve
the problem.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-14 09:20:12 -05:00
Mingli Yu
e3a0a0b23e postfix: 3.0.3 -> 3.1.1
* Upgrade postfix from 3.0.3 to 3.1.1

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-05 13:34:11 -04:00
Dai Caiyun
7832c67350 postfix: Fix rootfs creation errors
1) error: file /usr/share/man/man1/mailq.1 from install of postfix-doc
        conflicts with file from package esmtp-doc
2) error: file /usr/share/man/man1/newaliases.1 from install of postfix-doc
        conflicts with file from package esmtp-doc
3) error: file /usr/share/man/man1/sendmail.1 from install of postfix-doc
        conflicts with file from package esmtp-doc

Signed-off-by: Dai Caiyun <daicy.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-06-01 19:35:50 -04:00
Ross Burton
275b6c30fb meta-networking: use bb.utils.contains() instead of base_contains()
base_contains() is a compatibility wrapper and may warn in the future, so
replace all instances with bb.utils.contains().

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-05-05 11:41:28 -04:00
Hongxu Jia
440bc361de postfix: fix clean broken issue
There is a build failure while rebuilding postfix
...
| NOTE: make -e MAKEFLAGS= OPT= DEBUG= OPTS= clean
| make -f Makefile.in MAKELEVEL= Makefiles
| (echo "# Do not edit -- this file documents how Postfix was built for your
machine.";/bin/sh makedefs) >makedefs.tmp
| No <db.h> include file found.
| Install the appropriate db*-devel package first.
| Makefile.in:31: recipe for target 'Makefiles' failed
| make: *** [Makefiles] Error 1
| Makefile:21: recipe for target 'Makefiles' failed
| make: *** [Makefiles] Error 2
| ERROR: oe_runmake failed
| ERROR: Function failed: do_configure (log file is located at tmp/work/
core2-64-wrs-linux/postfix/3.0.2-r0/temp/do_configure/log.do_configure.12848)
...

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-02-29 16:23:35 -05:00
Dai Caiyun
a909c97b3b postfix: 3.0.2 -> 3.0.3
Upgrade postfix from 3.0.2 to 3.0.3.

Signed-off-by: Dai Caiyun <daicy.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-01-20 21:41:44 -05:00
Hongxu Jia
2b6226e66f postfix.inc: fix start postfix failed while hostname is numeric
While hostname is numeric, start postfix failed
...
root@qemux86-64:~# hostname 1.2.3.4
root@qemux86-64:~# systemctl restart postfix
|Job for postfix.service failed because the control process exited
with error code. See "systemctl status postfix.service" and
"journalctl -xe" for details.

root@qemux86-64:~# systemctl status postfix -l
Dec 02 08:05:40 1.2.3.4 aliasesdb[535]: /usr/sbin/postconf: fatal: unable to use my own hostname
Dec 02 08:05:41 1.2.3.4 aliasesdb[535]: newaliases: warning: valid_hostname: numeric hostname: 1.2.3.4
Dec 02 08:05:41 1.2.3.4 postfix/sendmail[537]: warning: valid_hostname: numeric hostname: 1.2.3.4
Dec 02 08:05:41 1.2.3.4 aliasesdb[535]: newaliases: fatal: unable to use my own hostname
Dec 02 08:05:42 1.2.3.4 postfix[540]: warning: valid_hostname: numeric hostname: 1.2.3.4
Dec 02 08:05:42 1.2.3.4 postfix[540]: fatal: unable to use my own hostname
...

Refer meta/recipes-core/initscripts/initscripts-1.0/hostname.sh in oe-core,
add check_hostname.sh and invoke it before postfix start, if the hostname
is invalid, set "localhost" to main.cf.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-01-05 12:43:34 -05:00
Hongxu Jia
d6b93982b2 postfix.inc: do not hardcode userid and groupid
It hardcoded to assign vmail's userid and groupid with 5000,
which caused the following useradd/groupadd is increased from
5000 at do_root time. Such as 'tracing' group id is 5001
(tracing group is added in lttng-tools).

It is better to allocate it dynamically.

BTW, you may google to find the hardcoded 5000 in following site:
https://help.ubuntu.com/community/PostfixVirtualMailBoxClamSmtpHowto

In its main.cf, it also hardcoded virtual_uid_maps and virtual_gid_maps.
...
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
..

But in meta-oe's main.cf_2.0, it assigned virtual_uid_maps and
virtual_gid_maps with a search.
...
virtual_uid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 3`
virtual_gid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 4`
...

So please feel free to forget 5000.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-10-21 15:59:04 -04:00
Li xin
26ea5cbea7 postfix: 3.0.1 -> 3.0.2
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-09-08 16:18:34 +02:00
Ross Burton
c2cea10597 recipes: use class-native instead of deprecated virtclass-native.
virtclass overrides are deprecated, so use class overrides instead.

Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24 13:58:19 +02:00
Li xin
13335849c3 postfix: upgrade from 2.11.1 to 3.0.1
1.Remove postfix-add-db6-support.patch which is not needed,
since it is backported from upstream.

2.update install.patch and makedefs.patch that context changes.

3.Install smtp-sink which listens on the named host (or address) and port.
It takes SMTP messages from the network and throws them away.
Ref: http://www.postfix.org/smtp-sink.1.html

Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-07-16 11:14:40 -04:00
Richard Purdie
66ba2ede14 postfix: Add explict getVar expansion parameter
Bitbake is likely to require this parameter in future, add
the default value.

Patch generated with the command:

sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *`

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-07-15 09:10:25 -04:00
Kang Kai
51e4d5dc4a postfix: update daemon_directory in main.cf_2.0
daemon_directory is set to /usr/lib/postfix which causes daemon postfix
fails to start on 64 bits target if enable multilib. Set daemon_directory
with libexecdir to fix it.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-07-06 15:27:52 -04:00
Szombathelyi György
337717b45c Fix postfix-native on Linux 4.0
Make postfix compilable on 4.0 kernel.

Signed-off-by: Gyorgy Szombathelyi <gyurco@freemail.hu>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-06-05 21:09:56 -04:00
Joe MacDonald
8980f0d2a2 meta-networking: standardize SECTION values
SECTION has been used inconsistently throughout the recipes in this layer.
Convert them to all use the same convention.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-06-05 20:42:25 -04:00
Wenzong Fan
415a90c67f postfix: add LSB init infos
Keep compatibility with chkconfig tool.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-04-15 22:43:37 -04:00
Bian Naimeng
7f27458531 postfix: get rid of useless code
We should set group of ${localstatedir}/lib/postfix to 'nogroup' not 'postfix',
actually it's done at the below, so remove this useless code.

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-03-11 19:29:34 -04:00
Kang Kai
769ea4a473 postfix: add link file /usr/lib/sendmail
Link file /usr/lib/sendmail points to /usr/sbin/sendmail is required by
LSB core test according to Linux FHS[Ref2]: "For historical reasons,
/usr/lib/sendmail must be a symbolic link to /usr/sbin/sendmail if the
latter exists."

The linke file was provided by package lsb before, but should be
provided by packages which provides command sendmail such as msmtp,
postfix and esmtp etc.

Refs:
1 http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/normativerefs.html#STD.
2 http://www.pathname.com/fhs/pub/fhs-2.3.html#SPECIFICOPTIONS13

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-03-10 18:25:23 -04:00
Bian Naimeng
bb177c85a2 postfix: fix bug of main.cf_2.0
${exec_prefix}/libexec/${PN} => ${libexecdir}

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-02-23 14:31:30 -05:00
Bian Naimeng
710459da20 postfix: don't hard-code PATH in service file
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-02-23 13:53:32 -05:00
Bian Naimeng
2166c638b4 postfix: instead ${exec_prefix}/libexec/${PN} by ${libexecdir}
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-02-11 21:25:41 -05:00
Roy Li
fedb486a3a postfix: start the postfix daemon by default when init is systemd
postfix should be started by default, so that the root user can
receive mail, and if init is not systemd, it is started by default

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-02-11 21:25:40 -05:00
Martin Jansa
770994c2f8 postfix: Fix indentation
* we're using 4 spaces, not mix of tabs and spaces\!

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2014-11-21 16:32:50 -05:00
Jackie Huang
66be3df87d postfix.inc: Remove references to buildmachine paths in target makedefs.out
Fixed the buildpaths QA issue:
ERROR: QA Issue: File
/work/core2-64-wrs-linux/postfix/2.11.1-r0/packages-split/postfix/etc/postfix/makedefs.out
in package contained reference to tmpdir [buildpaths]

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2014-11-21 16:32:21 -05:00
Roy Li
c78eca1ea7 postfix: create or update aliases.db when using systemd
aliases.db should be created by postinstall script, but failed since
queue_directory is not includes root dir ${D}:
    ------
    |newaliases: fatal: chdir /var/spool/postfix: No such file or directory
    ------
initscript will recall newaliases before start postfix daemon, the similar
method, which run aliasesdb to create aliases.db when using systemd, is
introduced to fix this issue.

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2014-11-10 15:18:55 -05:00
Kang Kai
1ecd7bbba8 postfix: remove overriding config config_directory
postfix 2.11.1 adds overriding config check. In postinstall script, it
calls command newaliases to read configure file main.cf_2.0.
config_directory is set in config main.cf_2.0, but it is an overriding
config and warning shows when build an image:

WARNING: log_check: There is a warn message in the logfile
WARNING: log_check: Matched keyword: [warn]
WARNING: log_check: newaliases: warning:
/buildarea3/kkang/poky/qemuarm-build/tmp/work/qemuarm-poky-linux-gnueabi/core-
image-minimal/1.0-r0/rootfs/etc/postfix/main.cf, line 27: overriding
earlier entry: config_directory=/buildarea3/kkang/
poky/qemuarm-build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/postfix

Remove config_directory setting in main.cf_2.0 to avoid this warning.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2014-10-21 14:33:03 -04:00
Jackie Huang
96acc14b6c postfix: add new recipe
Postfix is Wietse Venema's mail server that started life at IBM
research as an alternative to the widely-used Sendmail program.

Postfix attempts to be fast, easy to administer, and secure.
The outside has a definite Sendmail-ish flavor, but the inside
is completely different.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2014-07-20 23:30:19 -04:00