[sisyphus] help with postfix-2 from daedalus on virtual domains conf

sergey ivanov =?iso-8859-1?q?seriv_=CE=C1_parkheights=2Edyndns=2Eorg?=
Ср Окт 1 18:29:25 MSD 2003


Alexei Takaseev wrote:

>On Tue, 30 Sep 2003 19:00:31 -0400
>sergey ivanov <seriv на parkheights.dyndns.org> wrote:
>
>  
>
>>Прошу помощи с этим Постфиксом из Дедалуса.
>>Согласно разным хаутушкам и манам пытался настроить виртуальный
>>домен Однако не получилось.
>>В логах постфикс пишет что-нибудь типа:
>>Sep 30 22:55:58 ivanov-sz1 postfix/virtual[22092]: fatal: open 
>>/etc/postfix/mysql_virtual_mailbox_maps.cf: No such file or
>>directory(с точностью до имени файла, в разных how-to его
>>советовали по разному называть).
>>Однако этот файл вполне существует.
>>    
>>
>
>Можно привести вывод команды postconf полностью?
>
>Я использую у себя PostgreSQL:
>main.cf:
>...
>virtual_alias_maps = pgsql:/etc/postfix/pgsql-virtual.cf
>...
>
># ls -l pgsql-virtual.cf
>-rw-r----- 1 root root 162 Май  9 19:39 pgsql-virtual.cf
>
>
>pgsql-virtual.cf:
>
>hosts = 127.0.0.1
>user = mail
>password = XXXXXXXX
>dbname = mail
>
>
>table = virtual
>select_field = dest
>where_field = alias
>
>Для mysql должно быть все похожим.
>
>  
>
Вот кусочек добавленный мной в main.cf:
......
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_base = /
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 100
virtual_uid_maps = mysql:/etc/postfix/uids.cf
virtual_gid_maps = mysql:/etc/postfix/gids.cf
virtual_transport = virtual
......
# ls -l  /etc/postfix/mysql_virtual_*
-rw-r--r--    1 root     root          140 Sep 30 18:41 
/etc/postfix/mysql_virtual_alias_maps.cf
-rw-r--r--    1 root     root          147 Sep 30 18:41 
/etc/postfix/mysql_virtual_domains_maps.cf
-rw-r--r--    1 root     root          144 Sep 30 18:39 
/etc/postfix/mysql_virtual_mailbox_maps.cf

# cat /etc/postfix/mysql_virtual_alias_maps.cf
user = postfix
password = postfix
hosts = ivanov-sz1.gtedc.gte.com
dbname = postfix
table = alias
select_field = goto
where_field = address

# cat /etc/postfix/mysql_virtual_domains_maps.cf
user = postfix
password = postfix
hosts = ivanov-sz1.gtedc.gte.com
dbname = postfix
table = domain
select_field = description
where_field = domain

# cat /etc/postfix/mysql_virtual_mailbox_maps.cf
user = postfix
password = postfix
hosts = ivanov-sz1.gtedc.gte.com
dbname = postfix
table = mailbox
select_field = maildir
where_field = username

mysql> select * from postfix.alias;
+------------------+-----------------+--------+---------------------+---------------------+--------+
| address          | goto            | domain | create_date         | 
change_date         | active |
+------------------+-----------------+--------+---------------------+---------------------+--------+
| alias на domain.ltd | user на domain.ltd |        | 0000-00-00 00:00:00 | 
0000-00-00 00:00:00 |      1 |
+------------------+-----------------+--------+---------------------+---------------------+--------+
1 row in set (0.00 sec)

mysql> select * from postfix.domain;
+------------+-------------+---------------------+---------------------+--------+
| domain     | description | create_date         | change_date         | 
active |
+------------+-------------+---------------------+---------------------+--------+
| domain.ltd | Test Domain | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 
|      1 |
+------------+-------------+---------------------+---------------------+--------+
1 row in set (0.00 sec)

mysql> select * from postfix.mailbox;
+-----------------+------------------+--------------+-----------------+--------+---------------------+---------------------+--------+
| username        | password         | name         | maildir         | 
domain | create_date         | change_date         | active |
+-----------------+------------------+--------------+-----------------+--------+---------------------+---------------------+--------+
| user на domain.ltd | 270e62442a97f94a | Mailbox User | user на domail.ltd 
|        | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 |      1 |
+-----------------+------------------+--------------+-----------------+--------+---------------------+---------------------+--------+
1 row in set (0.00 sec)

То, что в постконф относится к virtual:
......
virtual_alias_domains = $virtual_alias_maps
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_create_maildirsize = no
virtual_gid_maps = mysql:/etc/postfix/gids.cf
virtual_mailbox_base = /
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_limit_inbox = no
virtual_mailbox_limit_maps =
virtual_mailbox_limit_override = no
virtual_mailbox_lock = fcntl
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_maildir_extended = no
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn 
his diskspace quota, please try again later.
virtual_maildir_suffix =
virtual_minimum_uid = 100
virtual_overquota_bounce = no
virtual_transport = virtual
virtual_uid_maps = mysql:/etc/postfix/uids.cf
.....

Кусок из лога при старте постфикса (/var/log/maillog)
.....
Oct  1 10:24:09 ivanov-sz1 postfix/postfix-script: starting the Postfix 
mail system
Oct  1 10:24:09 ivanov-sz1 postfix/master[4390]: daemon started -- 
version 2.0.15
Oct  1 14:24:09 ivanov-sz1 postfix/qmgr[4400]: 2208922FA9: 
from=<alias на domain.ltd>, size=645, nrcpt=1 (queue active)
Oct  1 14:24:09 ivanov-sz1 postfix/virtual[4404]: fatal: open 
/etc/postfix/mysql_virtual_mailbox_maps.cf: No such file or directory
Oct  1 10:24:10 ivanov-sz1 postfix/master[4390]: warning: process 
/usr/lib/postfix/virtual pid 4404 exit status 1
Oct  1 10:24:10 ivanov-sz1 postfix/master[4390]: warning: 
/usr/lib/postfix/virtual: bad command startup -- throttling
Oct  1 14:25:10 ivanov-sz1 postfix/virtual[4436]: fatal: open 
/etc/postfix/mysql_virtual_mailbox_maps.cf: No such file or directory
Oct  1 10:25:11 ivanov-sz1 postfix/master[4390]: warning: process 
/usr/lib/postfix/virtual pid 4436 exit status 1
Oct  1 10:25:11 ivanov-sz1 postfix/master[4390]: warning: 
/usr/lib/postfix/virtual: bad command startup -- throttling
......

Нужен вывод postconf целиком?

    С уважением,
Сергей Иванов.











Подробная информация о списке рассылки Sisyphus