ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: sergey ivanov <seriv@parkheights.dyndns.org>
To: sisyphus@altlinux.ru
Subject: Re: [sisyphus] help with postfix-2 from daedalus on virtual domains conf
Date: Wed, 01 Oct 2003 10:29:25 -0400
Message-ID: <3F7AE4C5.1020406@parkheights.dyndns.org> (raw)
In-Reply-To: <20031001220802.1562c989.taf@altlinux.ru>

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 целиком?

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










  reply	other threads:[~2003-10-01 14:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-29 15:14 [sisyphus] postfix rebuild problem sergey ivanov
2003-09-29 15:21 ` Dmitry V. Levin
2003-09-30 13:20 ` Alexei Takaseev
2003-09-30 15:52   ` sergey ivanov
2003-09-30 23:00   ` [sisyphus] help with postfix-2 from daedalus on virtual domains conf sergey ivanov
2003-10-01  6:27     ` Епифанов Сергей
2003-10-01  6:53       ` Епифанов Сергей
2003-10-01 14:03       ` sergey ivanov
2003-10-02  6:55         ` Епифанов Сергей
2003-10-01 13:08     ` Alexei Takaseev
2003-10-01 14:29       ` sergey ivanov [this message]
2003-10-02 12:42     ` Klimchev Konstantin
2003-10-02 14:44       ` sergey ivanov
2003-10-02 15:06         ` Alexei Takaseev
2003-10-03  4:27         ` Klimchev Konstantin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F7AE4C5.1020406@parkheights.dyndns.org \
    --to=seriv@parkheights.dyndns.org \
    --cc=sisyphus@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git