Postfix - PCRE

Issues related to applications and software problems and general support
Post Reply
uberkuhl
Posts: 3
Joined: 2019/12/08 03:50:33

Postfix - PCRE

Post by uberkuhl » 2019/12/08 04:00:11

I am presently working on migrating from CentOS 7 to CentOS 8. Under CentOS 7, I had check_sender_access pcre:/etc/postfix/reject_domains.

In my logs, I see "error: unsupported dictionary type: pcre". It seems like CentOS 8 is missing the postfix-pcre library.

RHEL 8.0 documentation seems to suggest there is postfix-pcre package (ref. https://access.redhat.com/documentation ... el_8/index). Is this not available under CentOS 8?

Thanks for reading.

uberkuhl
Posts: 3
Joined: 2019/12/08 03:50:33

Re: Postfix - PCRE also no postgrey

Post by uberkuhl » 2019/12/08 12:40:58

I was able to convert the PCRE to REGEXP, so have a work-around to move forward at least.

It seems postgrey is also not yet available via EPEL.

u297b
Posts: 13
Joined: 2019/10/06 17:04:29

Re: Postfix - PCRE

Post by u297b » 2019/12/10 13:21:26

Personally, these types of issues are why I am moving many of my services over to podman containers.

Its a bit of front-end work to get everything in the container working, but once that work is done you are effectively protected against host OS issues in the future. For me, I'm spinning up lots of my container images using debian:buster-slim image (although you certainly could use centos7).

If you want to proceed in this route, my advice is to try to separate the various pieces of a complete mail server into its various sub-services and create a container for each (ie. postfix, dovecot, postgresql, roundcube, etc) then place all of these into same 'pod' so they can all share networking.

Once you get everything working it becomes trivial to move servers in the future.

uberkuhl
Posts: 3
Joined: 2019/12/08 03:50:33

Re: Postfix - PCRE

Post by uberkuhl » 2019/12/10 15:39:45

Thanks for suggesting an alternative approach. I am not familiar with podman containers, so will do some reading.

I must admit that I find the process of migrating and configuring a series of services (autofs, postfix, dovecot, postgrey, apache, nextcloud, ssl certs, php, mariadb, etc.) a bit tedious.

Thanks again for the tip. I will check it out.

User avatar
KernelOops
Posts: 428
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: Postfix - PCRE

Post by KernelOops » 2019/12/17 16:05:25

For some weird reason, someone in his infinite wisdom, decided to remove PCRE from RHEL 8 and thus from CentOS 8.

A temporary solution, is to convert your postfix configuration to use REGEXP lookups, which work in the same way but are slightly slower.

I'm managing many large email servers, running CentOS 7 at the moment and I am testing CentOS 8 as a future upgrade, but so far there are a lot of missing EPEL packages :( hopefully 8.1 will be better prepared.
--
R.I.P. CentOS :cry:
--

maamo
Posts: 1
Joined: 2020/02/18 04:50:00

Re: Postfix - PCRE

Post by maamo » 2020/02/18 04:59:32

There is a postfix-pcre when you build the SRPM package.
I don't know why it is not in the standard repository, but ... :shock:

----

dnf update -y
dnf group install 'Development Tools' -y
dnf install dnf-utils cyrus-sasl-devel libdb-devel openldap-devel \
pcre-devel sqlite-devel mariadb-connector-c-devel libicu-devel \
libnsl2-devel postgresql-devel tinycdb-devel --enablerepo=PowerTools -y

cd /tmp
curl -LO http://vault.centos.org/8.1.1911/BaseOS ... l8.src.rpm

rpmbuild --rebuild /tmp/postfix-3.3.1-9.el8.src.rpm
rpm -ivh /root/rpmbuild/RPMS/x86_64/postfix-pcre-3.3.1-9.el8.x86_64.rpm

----


# ls -1 /root/rpmbuild/RPMS/x86_64/
postfix-3.3.1-9.el8.x86_64.rpm
postfix-cdb-3.3.1-9.el8.x86_64.rpm
postfix-cdb-debuginfo-3.3.1-9.el8.x86_64.rpm
postfix-debuginfo-3.3.1-9.el8.x86_64.rpm
postfix-debugsource-3.3.1-9.el8.x86_64.rpm
postfix-ldap-3.3.1-9.el8.x86_64.rpm
postfix-ldap-debuginfo-3.3.1-9.el8.x86_64.rpm
postfix-mysql-3.3.1-9.el8.x86_64.rpm
postfix-mysql-debuginfo-3.3.1-9.el8.x86_64.rpm
postfix-pcre-3.3.1-9.el8.x86_64.rpm
postfix-pcre-debuginfo-3.3.1-9.el8.x86_64.rpm
postfix-perl-scripts-3.3.1-9.el8.x86_64.rpm
postfix-pgsql-3.3.1-9.el8.x86_64.rpm
postfix-pgsql-debuginfo-3.3.1-9.el8.x86_64.rpm
postfix-sqlite-3.3.1-9.el8.x86_64.rpm
postfix-sqlite-debuginfo-3.3.1-9.el8.x86_64.rpm


----

# postconf -m
btree
cidr
environ
fail
hash
inline
internal
memcache
nis
pcre
pipemap
proxy
randmap
regexp
socketmap
static
tcp
texthash
unionmap
unix

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Postfix - PCRE

Post by TrevorH » 2020/02/18 12:06:37

https://bugzilla.redhat.com/show_bug.cgi?id=1745321 says
Fixed In Version: postfix-3.3.1-10.el8
Doc Type: Bug Fix
Doc Text: .PCRE, CDB, and SQLite can now be used with Postfix

In RHEL 8, the `postfix` package has been split into multiple subpackages, each subpackage providing a plug-in for a specific database. Previously, RPM packages containing the `postfix-pcre`, `postfix-cdb`, and `postfix-sqlite` plug-ins were not distributed. Consequently, databases with these plug-ins could not be used with Postfix. This update adds RPM packages containing the PCRE, CDB, and SQLite plug-ins to the AppStream repository. As a result, these plug-ins can be used after the appropriate RPM package is installed.
So according to that, it's in the next, currently unreleased version of the package (current is 3.3.1-9, fix in 3.3.1-10). No idea if that will be released as an errata or if it willneed to wait for 8.2.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply