Gentoo Archives: gentoo-user

From: kashani <kashani-list@××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Postfix + mySQL
Date: Fri, 12 Dec 2008 19:14:07
Message-Id: 4942B7F6.6080109@badapple.net
In Reply to: [gentoo-user] Postfix + mySQL by "Federico J. Fernández"
1 Federico J. Fernández wrote:
2 > Hi List,
3 >
4 > I've been configuring a mail server with
5 > Postfix+mySQL+Courier+Squirrelmail according to [1]. Courier IMAP is
6 > working with the mySQL authentication, but I can't send mails via
7 > postfix. When I send an email I get an "unkwon user" error. I suspect
8 > that postfix is not using the defined mySQL table for some reason.
9 >
10 > I tried to see the virtual map with postmap but I get a strange error:
11 >
12 > server postfix # postmap mysql:/etc/postfix/mysql-virtual-maps.cf
13 > postmap: fatal: unsupported map type: mysql
14
15 I think the syntax you need is
16 postmap -q "string" mysql:/etc/postfix/mysql-virtual-maps.cf
17
18 However looking at the mail logs is far simpler. If nothing jumps out at
19 you in the logs post the output of postconf -n and cat
20 /etc/postfix/mysql-virtual-maps.cf (minus user/passwd of course).
21
22 FWIW the Gentoo Virtual How-To is very unfancy and requires you to enter
23 all virtual domains manually into the main.cf within
24 virtual_mailbox_domains. If you do not do this, Postfix doesn't know
25 that the domain exists.
26
27 I suggest doing something like this where it's a db call and you should
28 never need to touch your main.cf. IIRC this will work if you added the
29 optional mysql-transport table.
30 virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-transport.cf
31
32 I also recommend ditching the Gentoo How-to and using PostfixAdmin which
33 is light years better in schema and administration.
34
35 kashani