Страница 1 из 1

Dovecot + autocreate plugin

Добавлено: 2008-12-12 19:11:55
Oloremo
Схожая тема на форуме уже закрыта - создал новую.

Я пытаюсь собрать этот плагин для Dovecot 1.1.7 в FreeBSD 7.0-p6 и у меня ничего не выходит.
Вот такая ошибка:

Код: Выделить всё

mx# sh -x patch.sh
+ export DOVECOT=/usr/ports/mail/dovecot/work/dovecot-1.1.7
+ gcc -fPIC -shared -g -Wall -I/usr/ports/mail/dovecot/work/dovecot-1.1.7 -I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib -I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib-storage -I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib-mail -I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib-imap -DHAVE_CONFIG_H autocreate-plugin.c -o autocreate_plugin.so
In file included from /usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib/lib.h:24,
                 from autocreate-plugin.c:22:
/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib/compat.h:55:29: error: sys/sysmacros.h: No such file or directory
+ cp autocreate_plugin.so /usr/local/lib/dovecot/imap/autocreate_plugin.so
cp: autocreate_plugin.so: No such file or directory
mx# 
Самое смешное что в Debian Etch я делая всё так же собрал его без проблем.

У кого-нибудь есть идеи?

Re: Dovecot + autocreate plugin

Добавлено: 2008-12-12 21:12:04
Alex Keda
линк на закрытую дайте?
что именно вы собираете?

Re: Dovecot + autocreate plugin

Добавлено: 2008-12-13 13:29:04
Oloremo
http://forum.lissyara.su/viewtopic.php? ... ate+plugin

Я уже разобрался благодаря автору поста.
Обновил wiki dovecot`та дописав решение:

http://wiki.dovecot.org/Plugins/Autocreate

Re: Dovecot + autocreate plugin

Добавлено: 2008-12-18 14:56:30
andryu
Может кому-то пригодиться. На http://wiki.dovecot.org/Plugins/Autocreate не особо понятно как на FreeBSD этот плагин собрать. Сам долго парился.
Собираем в портах.

Код: Выделить всё

root@freemail# cd /usr/ports/mail/dovecot
root@freemail# make extract
root@freemail# make configure
root@freemail# cd work/dovecot-1.1.7/
root@freemail# fetch http://www.dovecot.org/patches/1.1/autocreate-plugin.c
root@freemail# pwd
/usr/ports/mail/dovecot/work/dovecot-1.1.7
root@freemail# export DOVECOT=/usr/ports/mail/dovecot/work/dovecot-1.1.7
root@freemail# gcc -fPIC -shared -g -Wall -I$DOVECOT -I$DOVECOT/src/lib \
-I$DOVECOT/src/lib-storage -I$DOVECOT/src/lib-mail \
 -I$DOVECOT/src/lib-imap -DHAVE_CONFIG_H \
autocreate-plugin.c -o autocreate_plugin.so
root@freemail# cp autocreate_plugin.so /usr/local/lib/dovecot/imap/
root@freemail# cd /usr/ports/mail/dovecot
root@freemail# make clean
Ну и в dovecot.conf прописать настройки для плагина.

Код: Выделить всё

Example:

protocol imap {
  mail_plugins = autocreate
}
plugin {
  autocreate = Trash
  autocreate2 = Spam
  #autocreate3 = ..etc..
  autosubscribe = Trash
  autosubscribe2 = Spam
  #autosubscribe3 = ..etc..
}

Re: Dovecot + autocreate plugin

Добавлено: 2008-12-18 15:12:42
Oloremo
Достаточно сделать

Код: Выделить всё

cd /usr/ports/mail/dovecot
make extract
make configure
и потом патчить.

Re: Dovecot + autocreate plugin

Добавлено: 2008-12-18 15:20:35
andryu
Действительно так быстрее и не делаются лишние операции. Исправляю предыдущий пост. Век живи век учись!

Re: Dovecot + autocreate plugin

Добавлено: 2008-12-18 16:47:20
Oloremo
Ну для красоты ещё бы wget на родной fetch поменять в вашем примере. ;-)

Re: Dovecot + autocreate plugin

Добавлено: 2009-07-22 12:05:28
Гость
Скажите плиз а как прикрутить папки с русскими именами...
Пишу:

Код: Выделить всё

  autocreate = хЯУНДЪЫХЕ
  autocreate2 = нРОПЮБКЕММШЕ
  autocreate3 = Spam
  autosubscribe = хЯУНДЪЫХЕ
  autosubscribe2 = нРОПЮБКЕММШЕ
  autosubscribe3 = Spam
Папки создаются в как У клиента отображаются по русски, но при попытке скопировать в такую папочку получаю ошибку:

Код: Выделить всё

Mailbox doesn't exist...
При этом в папку названную по английски письма копируются без проблем.

Re: Dovecot + autocreate plugin

Добавлено: 2009-07-22 12:08:38
Oloremo
Я думаю что если бы всё было в UTF8 этой проблемы бы не возникло. %-)
А что с коями делать не совсем понятно.

Re: Dovecot + autocreate plugin

Добавлено: 2009-07-22 12:32:26
uHk
папки нужно создавать в UTF7-IMAP

Код: Выделить всё

  autocreate = '&BCcENQRABD0EPgQyBDgEOgQ4-'		#Drafts
  autocreate2 = SPAM					#for spamassasin
  autocreate3 = '&BB4EQgQ,BEAEMAQyBDsENQQ9BD0ESwQ1-'	#Sent
  autocreate4 = '&BBoEPgRABDcEOAQ9BDA-' 		#Trash
  autosubscribe = '&BCcENQRABD0EPgQyBDgEOgQ4-'
  autosubscribe2 = SPAM
  autosubscribe3 = '&BB4EQgQ,BEAEMAQyBDsENQQ9BD0ESwQ1-'
  autosubscribe4 = '&BBoEPgRABDcEOAQ9BDA-'

Re: Dovecot + autocreate plugin

Добавлено: 2010-11-07 12:03:41
Lex_old
Всем привет!
Выручите пожалуйста.
Система Ubuntu server 8.04 LTS
Проблема следующая, пытаюсь скомпилировать plugin autocreate для Dovecot
делаю все по ману http://wiki.dovecot.org/Plugins/Autocreate
но компилелр на не находит библиотеку как видно из логов.
Сам лог:
autocreate-plugin.c:22:17: error: lib.h: No such file or directory
autocreate-plugin.c:23:34: error: mail-storage-private.h: No such file or directory
autocreate-plugin.c:25:21: error: stdlib.h: No such file or directory
autocreate-plugin.c:28: warning: ‘struct mail_storage’ declared inside parameter list
autocreate-plugin.c:28: warning: its scope is only this definition or declaration, which is probably not what you want
autocreate-plugin.c:30: error: ‘PACKAGE_VERSION’ undeclared here (not in a function)
autocreate-plugin.c:33: warning: ‘struct mail_storage’ declared inside parameter list
autocreate-plugin.c:35: warning: ‘struct mail_storage’ declared inside parameter list
autocreate-plugin.c: In function ‘autocreate_mailboxes’:
autocreate-plugin.c:42: warning: implicit declaration of function ‘getenv’
autocreate-plugin.c:42: warning: assignment makes pointer from integer without a cast
autocreate-plugin.c:43: error: ‘NULL’ undeclared (first use in this function)
autocreate-plugin.c:43: error: (Each undeclared identifier is reported only once
autocreate-plugin.c:43: error: for each function it appears in.)
autocreate-plugin.c:44: warning: implicit declaration of function ‘mail_storage_mailbox_create’
autocreate-plugin.c:44: error: ‘FALSE’ undeclared (first use in this function)
autocreate-plugin.c:45: warning: implicit declaration of function ‘i_snprintf’
autocreate-plugin.c:46: warning: assignment makes pointer from integer without a cast
autocreate-plugin.c: At top level:
autocreate-plugin.c:50: warning: ‘struct mail_storage’ declared inside parameter list
autocreate-plugin.c: In function ‘autosubscribe_mailboxes’:
autocreate-plugin.c:57: warning: assignment makes pointer from integer without a cast
autocreate-plugin.c:58: error: ‘NULL’ undeclared (first use in this function)
autocreate-plugin.c:59: warning: implicit declaration of function ‘mail_storage_set_subscribed’
autocreate-plugin.c:59: error: ‘TRUE’ undeclared (first use in this function)
autocreate-plugin.c:61: warning: assignment makes pointer from integer without a cast
autocreate-plugin.c: At top level:
autocreate-plugin.c:65: warning: ‘struct mail_storage’ declared inside parameter list
autocreate-plugin.c: In function ‘autocreate_mail_storage_created’:
autocreate-plugin.c:67: error: ‘NULL’ undeclared (first use in this function)
autocreate-plugin.c:68: warning: passing argument 1 of ‘autocreate_next_hook_mail_storage_created’ from incompatible pointer type
autocreate-plugin.c:70: error: dereferencing pointer to incomplete type
autocreate-plugin.c:70: error: ‘MAIL_STORAGE_FLAG_SHARED_NAMESPACE’ undeclared (first use in this function)
autocreate-plugin.c:71: warning: passing argument 1 of ‘autocreate_mailboxes’ from incompatible pointer type
autocreate-plugin.c:72: warning: passing argument 1 of ‘autosubscribe_mailboxes’ from incompatible pointer type
autocreate-plugin.c: In function ‘autocreate_plugin_init’:
autocreate-plugin.c:81: warning: assignment from incompatible pointer type
autocreate-plugin.c:82: warning: assignment from incompatible pointer type
autocreate-plugin.c: In function ‘autocreate_plugin_deinit’:
autocreate-plugin.c:87: warning: assignment from incompatible pointer type

Третий день бьюсь, гугл ничего внятного не дает. подскажите куда копать че далеть?
За ранее огромное спасиба! за любую подсказку!

Re: Dovecot + autocreate plugin

Добавлено: 2010-11-08 10:24:12
blade_007

Код: Выделить всё

autocreate-plugin.c:22:17: error: lib.h: No such file or directory
autocreate-plugin.c:23:34: error: mail-storage-private.h: No such file or directory
autocreate-plugin.c:25:21: error: stdlib.h: No such file or directory
Это как бы намекает, что у вас не установлены некоторые dev-пакеты, например, dovecot-dev.

Re: Dovecot + autocreate plugin

Добавлено: 2014-11-26 13:55:46
schizoid
Народ,а умеет ли плагин создавать структуру папок при первом входящем сообщении для юзера?
При первом логине все создается, а вот если юзер еще не заходил и на него упало письмо, оно не доставляется, т.к. папок еще нету.
Возможно ли такое настроить или не парить моск?
Используется exim4+dovecot, доставка dovecot-lda.

Re: Dovecot + autocreate plugin

Добавлено: 2014-12-02 0:41:03
xM
Вообще, лично у меня Dovecot2 сам создаёт Inbox при получении первого письма вновь созданному юзеру. Остальные папки автоматом по мере начала работы создаются. Видимо, клиентским софтом (в моём случае Roundcube).
Без плагина.

Re: Dovecot + autocreate plugin

Добавлено: 2014-12-02 12:40:04
schizoid
ага. снкс. буду искать, что у мну не так.