先装的postfix,后装的mysql,除了重新编译postfix,还有别的办法没有

发布于 2022-10-15 05:34:52 字数 99 浏览 25 评论 0

我先装的postfix,后装的mysql,现在提示unsupport directory type mysql,
除了重新用-with-mysql编译postfix,还有别的办法没有??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

时光瘦了 2022-10-22 05:34:52

这个只能重新编译postfix了

作死小能手 2022-10-22 05:34:52

本帖最后由 nullbert 于 2011-06-12 16:36 编辑

怎样编译?
./config  -with-mysql=/usr/local/mysql
??

心的憧憬 2022-10-22 05:34:52

怎样编译?
./config  -with-mysql=/usr/local/mysql
??
nullbert 发表于 2011-06-10 18:16

编译安装postfix,试试下面命令,支持Mysql,Cyrus-sasl,openssl,把目录换成你自己的目录.

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 -I/usr/include/openssl' \
'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/local/lib/sasl2 -lsasl2 -lssl -lcrypto'

make

make insatll

newaliases

西瓜 2022-10-22 05:34:52

不需要config 吗?

野却迷人 2022-10-22 05:34:52

#bash-3.2 : make
......

gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/local/include/mysqlAUXLIBS=-L/usr/local/lib/mysql -lmysqlclient -lz -lm -Dstrcasecmp=fix_strcasecmp           -Dstrncasecmp=fix_strncasecmp -DHAS_PCRE -g -O -I. -I../../include -DSUNOS5 -c smtp_map11.c
gcc: -lmysqlclient: linker input file unused because linking not done
gcc: -lz: linker input file unused because linking not done
gcc: -lm: linker input file unused because linking not done

......

In file included from dict_mysql.c:173:
/usr/include/mysql.h:70:21: typelib.h: No such file or directory
/usr/include/mysql.h:72:70: my_list.h: No such file or directory
/usr/include/mysql.h:142:22: my_alloc.h: No such file or directory

复制/usr/mysql-5.0.45/include/目录下的 typelib.h   my_list.h   my_alloc.h 到 /usr/include目录下
好像有个/usr/include/prtc/prtc.h 也要复制到/usr/include目录下

另外,一直提示:
gcc: -lmysqlclient: linker input file unused because linking not done
gcc: -lz: linker input file unused because linking not done
gcc: -lm: linker input file unused because linking not done
是啥意思?

樱桃奶球 2022-10-22 05:34:52

本帖最后由 nullbert 于 2011-06-16 18:33 编辑

Jun 16 16:27:14 opensolaris postfix/trivial-rewrite[2533]: [ID 947731 mail.warning] warning: mysql query failed: Table 'extmail.alias' doesn't exist
Jun 16 16:27:14 opensolaris postfix/trivial-rewrite[2533]: [ID 947731 mail.crit] fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem

alias表不存在呀,怎么办?所有的表都没有,数据库也是我自己手工创建的,表也需要手工添加吗?我是按资料介绍的:

================

第十 ;配置postfix 支持虚拟域和虚拟用户

   1 在postfix的主配置文件的尾部添加以下内容
#################Virtual Mailbox Settings ######################
virtual_mailbox_base = /var/spool/mail
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_uid_maps = static:2525
virtual_gid_maps = static:2525
virtual_transport = virtual
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
######################QUOTA Settings########################
message_size_limit = 14336000
virtual_mailbox_limit = 20971520
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please Tidy your mailbox and try again later.
virtual_overquota_bounce = yes

  2  添加支持虚拟域和虚拟用户所需要的配置文件
     创建/etc/postfix/mysql_virtual_alias_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = alias
select_field = goto
where_field = address
创建/etc/postfix/mysql_virtual_domains_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = domain
select_field = description
where_field = domain

创建/etc/postfix/mysql_virtual_mailbox_limit_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = quota
where_field = username

创建/etc/postfix/mysql_virtual_mailbox_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = maildir
where_field = username

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文