URL: https://www.opennet.me/cgi-bin/openforum/vsluhboard.cgi
Форум: vsluhforumID8
Нить номер: 6623
[ Назад ]

Исходное сообщение
"CentOS + Dbmail"

Отправлено Inviseble_Demon , 22-Ноя-09 17:09 
Приветствую.
Имеем
[root@user]# cat /etc/redhat-release
CentOS release 5.4 (Final)

[root@user dbmail-2.2.11-rc4]# ./configure --with-mysql

This is dbmail's GNU configure script.
It's going to run a bunch of strange tests to hopefully
make your compile work without much twiddling.

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to provide manual pages... yes
checking for mysql_config... /usr/bin/mysql_config
checking MySQL headers... -I/usr/include/mysql  -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv
checking MySQL libraries... -rdynamic -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for pkg-config... /usr/bin/pkg-config
checking GLib headers... -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
checking GLib libraries... -L/usr/local/lib -lglib-2.0
checking GModule headers... -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
checking GModule libraries... -Wl,--export-dynamic -L/usr/local/lib -lgmodule-2.0 -ldl -lglib-2.0
checking for pkg-config... /usr/bin/pkg-config
checking GMime headers... Package gmime-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gmime-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gmime-2.0' found
no
configure: error: Unable to locate gmime development files

При этом

[root@user dbmail-2.2.11-rc4]# rpm -qa | grep gm
gmp-4.1.4-10.el5
gmime-2.2.10-5.el5.centos
[root@user dbmail-2.2.11-rc4]#

В чем трабла !?
Второй день уже бьюсь ((


Содержание

Сообщения в этом обсуждении
"CentOS + Dbmail"
Отправлено admin218 , 22-Ноя-09 17:47 
Может быть установить gmime-devel ?
yum install gmime-devel

"CentOS + Dbmail"
Отправлено Inviseble_Demon , 22-Ноя-09 18:00 
>Может быть установить gmime-devel ?
>yum install gmime-devel

Да... Спасибо теперь вроде собрался ! ))
Но make непроходит (

[root@user dbmail-2.2.11-rc4]# make
make  all-recursive
make[1]: Entering directory `/tmp/dbmail-2.2.11-rc4'
Making all in modules
make[2]: Entering directory `/tmp/dbmail-2.2.11-rc4/modules'
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..   -I/usr/include/mysql  -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv     -g -O2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include/gmime-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -W -Wall -Wpointer-arith -Wstrict-prototypes -MT dbmysql.lo -MD -MP -MF ".deps/dbmysql.Tpo" -c -o dbmysql.lo dbmysql.c; \
        then mv -f ".deps/dbmysql.Tpo" ".deps/dbmysql.Plo"; else rm -f ".deps/dbmysql.Tpo"; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -g -O2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gmime-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -W -Wall -Wpointer-arith -Wstrict-prototypes -MT dbmysql.lo -MD -MP -MF .deps/dbmysql.Tpo -c dbmysql.c  -fPIC -DPIC -o .libs/dbmysql.o
In file included from ../dbmail.h:30,
                 from dbmysql.c:28:
../config.h:99:1: warning: "_GNU_SOURCE" redefined
<command line>:1:1: warning: this is the location of the previous definition
dbmysql.c:29:19: error: mysql.h: No such file or directory
dbmysql.c:74: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'conn'
dbmysql.c:75: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
dbmysql.c:76: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'last_row'
dbmysql.c: In function 'db_connect':
dbmysql.c:150: warning: implicit declaration of function 'mysql_init'
dbmysql.c:150: error: 'conn' undeclared (first use in this function)
dbmysql.c:150: error: (Each undeclared identifier is reported only once
dbmysql.c:150: error: for each function it appears in.)
dbmysql.c:169: warning: implicit declaration of function 'mysql_real_connect'
dbmysql.c:171: warning: comparison between pointer and integer
dbmysql.c:172: warning: implicit declaration of function 'mysql_error'
dbmysql.c:172: warning: format '%s' expects type 'char *', but argument 7 has type 'int'
dbmysql.c: In function 'db_num_rows':
dbmysql.c:187: error: 'res' undeclared (first use in this function)
dbmysql.c:190: warning: implicit declaration of function 'mysql_num_rows'
dbmysql.c: In function 'db_num_fields':
dbmysql.c:195: error: 'res' undeclared (first use in this function)
dbmysql.c:198: warning: implicit declaration of function 'mysql_num_fields'
dbmysql.c: In function 'db_free_result':
dbmysql.c:203: error: 'res' undeclared (first use in this function)
dbmysql.c:204: warning: implicit declaration of function 'mysql_free_result'
dbmysql.c: In function 'db_get_result':
dbmysql.c:214: error: 'res' undeclared (first use in this function)
dbmysql.c:224: warning: implicit declaration of function 'mysql_data_seek'
dbmysql.c:225: error: 'last_row' undeclared (first use in this function)
dbmysql.c:225: warning: implicit declaration of function 'mysql_fetch_row'
dbmysql.c: In function 'db_disconnect':
dbmysql.c:251: error: 'res' undeclared (first use in this function)
dbmysql.c:253: warning: implicit declaration of function 'mysql_close'
dbmysql.c:253: error: 'conn' undeclared (first use in this function)
dbmysql.c: In function 'db_check_connection':
dbmysql.c:259: warning: implicit declaration of function 'mysql_ping'
dbmysql.c:259: error: 'conn' undeclared (first use in this function)
dbmysql.c: In function 'db_insert_result':
dbmysql.c:271: warning: implicit declaration of function 'mysql_insert_id'
dbmysql.c:271: error: 'conn' undeclared (first use in this function)
dbmysql.c: In function 'db_query':
dbmysql.c:289: warning: implicit declaration of function 'mysql_real_query'
dbmysql.c:289: error: 'conn' undeclared (first use in this function)
dbmysql.c:290: warning: format '%s' expects type 'char *', but argument 7 has type 'int'
dbmysql.c:293: error: 'res' undeclared (first use in this function)
dbmysql.c:296: warning: implicit declaration of function 'mysql_store_result'
dbmysql.c: In function 'db_escape_string':
dbmysql.c:304: warning: implicit declaration of function 'mysql_real_escape_string'
dbmysql.c:304: error: 'conn' undeclared (first use in this function)
dbmysql.c: In function 'db_get_length':
dbmysql.c:335: error: 'res' undeclared (first use in this function)
dbmysql.c:349: error: 'last_row' undeclared (first use in this function)
dbmysql.c:354: warning: implicit declaration of function 'mysql_fetch_lengths'
dbmysql.c:354: error: subscripted value is neither array nor pointer
dbmysql.c: In function 'db_get_affected_rows':
dbmysql.c:359: warning: implicit declaration of function 'mysql_affected_rows'
dbmysql.c:359: error: 'conn' undeclared (first use in this function)
dbmysql.c: In function 'db_get_result_set':
dbmysql.c:364: error: 'res' undeclared (first use in this function)
dbmysql.c: In function 'db_set_result_set':
dbmysql.c:369: error: 'res' undeclared (first use in this function)
dbmysql.c:369: error: 'MYSQL_RES' undeclared (first use in this function)
dbmysql.c:369: error: expected expression before ')' token
dbmysql.c:367: warning: unused parameter 'the_result_set'
make[2]: *** [dbmysql.lo] Error 1
make[2]: Leaving directory `/tmp/dbmail-2.2.11-rc4/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/dbmail-2.2.11-rc4'
make: *** [all] Error 2
[root@user dbmail-2.2.11-rc4]#

Чет его неустраивает в MySQL


"CentOS + Dbmail"
Отправлено admin218 , 22-Ноя-09 18:03 
mysql-devel стоит?

rpm -q mysql-devel


"CentOS + Dbmail"
Отправлено Inviseble_Demon , 22-Ноя-09 18:22 
>mysql-devel стоит?
>
>rpm -q mysql-devel

Конечно же нет ))
Поставил но всеравно

[root@user dbmail-2.2.11-rc4]# make
make  all-recursive
make[1]: Entering directory `/tmp/dbmail-2.2.11-rc4'
Making all in modules
make[2]: Entering directory `/tmp/dbmail-2.2.11-rc4/modules'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/dbmail-2.2.11-rc4/modules'
Making all in man
make[2]: Entering directory `/tmp/dbmail-2.2.11-rc4/man'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/dbmail-2.2.11-rc4/man'
make[2]: Entering directory `/tmp/dbmail-2.2.11-rc4'
/bin/sh ./libtool --tag=CC --mode=link gcc  -g -O2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include/gmime-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -W -Wall -Wpointer-arith -Wstrict-prototypes -export-dynamic  -L/lib -lglib-2.0   -Wl,--export-dynamic -L/lib -lgmodule-2.0 -ldl -lglib-2.0   -L/lib -lgmime-2.0 -lz -lnsl -lgobject-2.0 -lglib-2.0   -o dbmail-smtp  main.o libdbmail.la
gcc -g -O2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gmime-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -W -Wall -Wpointer-arith -Wstrict-prototypes -Wl,--export-dynamic -o .libs/dbmail-smtp main.o -Wl,--export-dynamic  -L/lib -lgmodule-2.0 -ldl -lgmime-2.0 -lz -lnsl -lgobject-2.0 -lglib-2.0 ./.libs/libdbmail.so -Wl,--rpath -Wl,/usr/local/lib/dbmail
/usr/local/lib/libgthread-2.0.so.0: undefined reference to `g_mem_init'
./.libs/libdbmail.so: undefined reference to `crypt'
/usr/local/lib/libgthread-2.0.so.0: undefined reference to `g_mutex_init'
/usr/local/lib/libgthread-2.0.so.0: undefined reference to `g_messages_init'
collect2: ld returned 1 exit status
make[2]: *** [dbmail-smtp] Error 1
make[2]: Leaving directory `/tmp/dbmail-2.2.11-rc4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/dbmail-2.2.11-rc4'
make: *** [all] Error 2
[root@user dbmail-2.2.11-rc4]#


Как перенаправить вывод от rpm -qa в файл ?
Я тогда смогу листинг всех приложений сообщить.


"CentOS + Dbmail"
Отправлено admin218 , 22-Ноя-09 18:35 
rpm -qa > files.txt

rpm -q openssl-devel ?


"CentOS + Dbmail"
Отправлено Inviseble_Demon , 22-Ноя-09 18:54 
>rpm -qa > files.txt
>
>rpm -q openssl-devel ?

[root@user dbmail-2.2.11-rc4]# rpm -q openssl-devel
openssl-devel-0.9.8e-12.el5

[root@user dbmail-2.2.11-rc4]# rpm -qa > log.txt
http://inviseble-demon.ru/log.txt (вставлять 260 строк не стал :D)


"CentOS + Dbmail"
Отправлено Inviseble_Demon , 22-Ноя-09 20:24 
>>rpm -qa > files.txt
>>
>>rpm -q openssl-devel ?
>
>[root@user dbmail-2.2.11-rc4]# rpm -q openssl-devel
>openssl-devel-0.9.8e-12.el5
>
>[root@user dbmail-2.2.11-rc4]# rpm -qa > log.txt
>http://inviseble-demon.ru/log.txt (вставлять 260 строк не стал :D)

PS. Готов заплотить за устоновку !


"CentOS + Dbmail"
Отправлено Inviseble_Demon , 22-Ноя-09 21:35 
>[оверквотинг удален]
>>>
>>>rpm -q openssl-devel ?
>>
>>[root@user dbmail-2.2.11-rc4]# rpm -q openssl-devel
>>openssl-devel-0.9.8e-12.el5
>>
>>[root@user dbmail-2.2.11-rc4]# rpm -qa > log.txt
>>http://inviseble-demon.ru/log.txt (вставлять 260 строк не стал :D)
>
>PS. Готов заплотить за устоновку !

http://linux-admin.net.ru/content/1073
Все )) Собрал поставил настроил! ППЦ Ебогу без бубна никуда !


"CentOS + Dbmail"
Отправлено Inviseble_Demon , 23-Ноя-09 01:27 
Так и не могу заставить подключиться к базе ((
Все блин ОК и такая опа...

# dbmail-users -a mail@inviseble-demon.ru -w 123
Opening connection to database...
Failed. Could not connect to database (check log)
Command failed.

И хоть лопни...
Пользователь создан, пробывал через myphpadmin - все робит
Я даже под рутом пробывал :D
В чем может быть трабла !?

# $Id: dbmail.conf 1539 2004-12-27 21:41:07Z paul $
# (c) 2000-2002 IC&S, The Netherlands
#
# Configuration file for DBMAIL
# This configuration file needs to be run through dbmail-config to be effective
# after that, changes are effective inmediatly

/etc/dbmail.conf (может файл не тот ? O_o)
[DBMAIL]
# Database settings
host=localhost                   # host for database, set to localhost if database is om
                        # the same host as dbmail and you want to use a local socket
                        # for connecting.
sqlport=3306                # if you want to use TCP/IP for connecting to the database,
                        # and have the database running on a non-standard port.
sqlsocket=/var/lib/mysql/mysql.sock              # when using a local socket connection to the database, fill
                        # in the path to the socket here (e.g. /var/run/mysql.sock)
user=dbmail                   # user to connect as to database
pass=dbmail-123                   # password for user to database
db=dbmail                     # name of database
POSTMASTER=postmaster        # postmaster's email address.
# trace level for dbmail-util    
TRACE_LEVEL=2      

[SMTP]
SENDMAIL=/usr/sbin/sendmail    # sendmail executable for forwarding mail
AUTO_NOTIFY=no
AUTO_REPLY=no
TRACE_LEVEL=2

[LMTP]
EFFECTIVE_USER=nobody          # the user that dbmail-lmtpd will run as (need to be root to bind to a port<1024)
EFFECTIVE_GROUP=nogroup           # the group that dbmail-lmtpd will run as
BINDIP=*          # the ipaddress the dbmail-lmtpd server has to bind
              # to, * for all adresses. Use 127.0.0.1 to only
              # bind to localhost.
PORT=24               # the port number the dbmail-lmtpd server has to bind to.
NCHILDREN=20              # default number of LMTP handlers (each is a process)
MAXCHILDREN=10              # max. number of LMTP handlers
MINSPARECHILDREN=2
MAXSPARECHILDREN=4
MAXCONNECTS=10000          # the maximum number of connections a default childs makes
TIMEOUT=300              # the time (s) before the dbmail-lmtpd should shutdown a connection which is being idle.
RESOLVE_IP=yes                    # if yes, the lmtp daemon resolves IP numbers to DNS names in the log
TRACE_LEVEL=2
MAX_ERRORS=500

[POP]
EFFECTIVE_USER=dbmail          # the user that dbmail-pop3d will run as (need to be root to bind to a port<1024)
EFFECTIVE_GROUP=mail           # the group that dbmail-pop3d will run as
BINDIP=*              # the ipaddress the dbmail-pop3d server has to bind to, * for all addresses
PORT=110               # the port number the dbmail-pop3d server has to bind to.
NCHILDREN=10              # default number of POP3 handlers (each is a process)
MAXCHILDREN=20              # mac. number of POP3 handlers
MINSPARECHILDREN=2
MAXSPARECHILDREN=4
MAXCONNECTS=100          # the maximum number of connections a default childs makes
TIMEOUT=300              # the time (s) before the dbmail-pop3d should shutdown a connection which is being idle.
RESOLVE_IP=yes                    # if yes, the pop daemon resolves IP numbers to DNS names in the log
POP_BEFORE_SMTP=no
TRACE_LEVEL=2

[IMAP]
EFFECTIVE_USER=nobody
EFFECTIVE_GROUP=nogroup
BINDIP=*
PORT=143
NCHILDREN=50
MAXCHILDREN=200              # mac. number of IMAPD handlers
MINSPARECHILDREN=2
MAXSPARECHILDREN=4
MAXCONNECTS=10000          # the maximum number of connections a default childs makes
TIMEOUT=4000              # the time (s) before the dbmail-imapd should shutdown a connection which is being idle.
RESOLVE_IP=yes                    # if yes, the imap daemon resolves IP numbers to DNS names in the log
IMAP_BEFORE_SMTP=no
TRACE_LEVEL=2

# end of configuration file



"CentOS + Dbmail"
Отправлено ACCA , 23-Ноя-09 09:55 
[...]

>Failed. Could not connect to database (check log)
>Command failed.
>
>И хоть лопни...
>Пользователь создан, пробывал через myphpadmin - все робит
>Я даже под рутом пробывал :D
>В чем может быть трабла !?

Он тебе сказал - логи проверить?

Сначала у dbmail, если не поможет - у mysql. Логи mysql нужно читать с помощью mysqlbinlog, либо в /etc/my.cnf выключить log_bin и включить log. Не забудь поставить назад после отладки.


"CentOS + Dbmail"
Отправлено Inviseble_Demon , 24-Ноя-09 00:25 
>[оверквотинг удален]
>>И хоть лопни...
>>Пользователь создан, пробывал через myphpadmin - все робит
>>Я даже под рутом пробывал :D
>>В чем может быть трабла !?
>
>Он тебе сказал - логи проверить?
>
>Сначала у dbmail, если не поможет - у mysql. Логи mysql нужно
>читать с помощью mysqlbinlog, либо в /etc/my.cnf выключить log_bin и включить
>log. Не забудь поставить назад после отладки.

Да... Так и сделал )) Проблема была в кодеровке базы :D
Теперь новая проблема ))немогу заставить перенапровлять письма для несуществующих..
Postfix:
    luser_relay = vasia@pupkin.org
Или, для виртуального домена в virtual, перенаправим всю почту для домена

Postfix:
    luser_relay = vasia@pupkin.org
Или, для виртуального домена в virtual, перенаправим всю почту для домена
Собрал все на postfix  luser - неробит (((


"CentOS + Dbmail"
Отправлено Inviseble_Demon , 27-Ноя-09 00:13 
В итоге все решилось так:

http://www.hilik.org.ua/dbmail-%D0%BF%D0%.../

http://www.hilik.org.ua/dbmail-%D0%BF%D1%.../ только во второй секцию

Для этого находим такую строку в /usr/local/etc/postfix/main.cf:
local_recipient_maps = proxy:unix:passwd.byname $alias_maps

и заменяем их на:
local_recipient_maps = mysql:/usr/local/etc/postfix/dbmail-aliases.cf mysql:/usr/local/etc/postfix/dbmail-recip.cf

заменить на virtual