postfix编译出错呀 pcre 语法错 是Makefile的错吗
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了postfix编译出错呀 pcre 语法错 是Makefile的错吗相关的知识,希望对你有一定的参考价值。
参考技术A postfix编译参数和选项选项:1.AUXLIBS2.CC
3.CCARGS
4.DEBUG
5.OPT
参数:-I ,-D, -L, -R, -r, -l。各个参数的说明如下:
-I 指明某一包的库文件所在的地方
-D The -D option provides a way to define macros at the time you compile Postfix. Add-on packages
for Postfix require that you define a particular macro to tell Postfix to include it when building. For example, if
you want to include support for mysql, you define the HAS_MYSQL macro:CCARGS='-DHAS_MYSQL'
-L 加入对某一包的额外库的支持。如:AUXLIBS='-L/usr/local/lib'
-l 和-L一块儿使用,具体到某一库。如:AUXLIBS='-L/usr/local/lib -lmysqlclient'
-R -r
The linker uses an argument to include directories in a runtime search path for dynamic libraries. The argument differs depending on your linker and platform. The GNU linker (Linux, FreeBSD) uses -rpath, as does IRIX. Solaris, on the other hand uses -R, and HP-UX uses +b. Consult the manpage for your linker, ld(1), to see which argument you should use to set the runtime library search path.
如:Using the SSL library as an example, if your libssl.so file is located in /usr/local/lib and you are building Postfix on FreeBSD or another system that uses rpath, define AUXLIBS as follows:
AUXLIBS='-L/usr/local/lib -rpath/usr/local/lib -lssl'
下面给出一个例子:可以将它保存成shell,如:install.sh文件
#
# Simple script to create a Makefile to build Postfix.
#
#
# Remember to start by cleaning up or uncomment this line
# to have this script do it every time.
#
#make tidy
#
# Specify all of our options and supporting libraries
#
make makefiles \
CCARGS='-DUSE_SASL_AUTH -DHAS_SSL -DHAS_MYSQL -DHAS_LDAP \
-I/usr/local/include/sasl -I/usr/local/ssl/include \
-I/usr/local/include/mysql -I/usr/local/include' \
AUXLIBS='-L/usr/local/lib -L/usr/local/ssl/lib \
-L/usr/local/lib/mysql -L/usr/local/lib \
-lsasl2 -lcrypto -lssl -lmysqlclient -lz -lm -lldap -llber \
-rpath /usr/local/lib/mysql -rpath /usr/local/lib \
-rpath /usr/local/ssl/lib'
To build Postfix, type:
$ sh build.sh
$ make
一个完整的编译参数,使用时请注意路径是否与你系统中的软体一至。
make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH \
-DUSE_CYRUS_SASL -I/usr/local/include/sasl -DUSE_TLS' \
'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/local/lib/sasl2 -lsasl2 -lssl -lcrypto' \,如果你使用的是cyrus认证,不要忘了-DUSE_SASL_AUTH后面的-DUSE_CYRUS_SASL,否则postfix会不支持的 sasl认证的,且maillog里会出现如下此方面的错误日志:
wintim postfix/smtpd[5950]: warning: unsupported SASL server implementation: cyrus
wintim postfix/smtpd[5950]: fatal: SASL per-process initialization failed
wintim postfix/master[31992]: warning: process /usr/libexec/postfix/smtpd pid 5950 exit status 1 参考技术B 也有可能的,我安装apache的时候就遇到同样的问题了,已经更新过了,但提示类似的错误,现在只有pkg_add那些包了,不知道能否成功的本回答被提问者采纳
Postfix的一次报错处理
配置zabbix监控时,查看/var/log/maillog日志,发现如下报错:Apr 30 22:39:09 ops-monitor-01 postfix/sendmail[346]: fatal: parameter inet_interfaces: no local interface found for ::1
初步怀疑是ipv6的问题:
# ip add list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:16:3e:0e:08:da brd ff:ff:ff:ff:ff:ff
inet 172.20.207.171/20 brd 172.20.207.255 scope global dynamic eth0
valid_lft 314283649sec preferred_lft 314283649sec
果然,阿里云上ipv6应该是关闭状态,然后我们查看下配置文件的信息:
# vim /etc/postfix/main.cf
# See also the proxy_interfaces parameter, for network addresses that
# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
inet_interfaces = localhost
# Enable IPv4, and IPv6 if supported
# inet_protocols = all
# 将接口网络协议改为下面的ipv4
inet_protocols = ipv4
最后,我们重启下服务:
systemctl restart postfix
问题得到解决
以上是关于postfix编译出错呀 pcre 语法错 是Makefile的错吗的主要内容,如果未能解决你的问题,请参考以下文章
炒股软件编辑公式中:语法错.位置--行:21;列:64;相关上下文,不知道怎么回事?
Ubuntu20.04服务器使用uwsgi部署Django时报错no internal routing support, rebuild with pcre support