[Mailman-Users] Postfix + MySQL + Mailman

Nils Vogels nivo+mailman-users at yuckfou.org
Fri May 16 10:25:00 CEST 2003


On Thu, May 15, 2003 at 06:23:49PM -0300, Flávio Brito (FvB) wrote:
FvB> Dear List
FvB> 
FvB> Yesterday I migrate my mail server (to postix + mysql ). My Mailman lists 
FvB> stopped.  How can I put postfix + mysql + mailman?
FvB> 
FvB> I tried
FvB> 
FvB> INSERT INTO aliases VALUES ('linuxrj', 'linuxrj at gral.org.br');
FvB> INSERT INTO aliases VALUES ('linuxrj-owner at gral.org.br', 'linuxrj-admin');
FvB> INSERT INTO aliases VALUES ('linuxrj-admin at gral.org.br', 'linuxrj-admin');
FvB> INSERT INTO aliases VALUES ('linuxrj at gral.org.br','"|/var/mailman/mail/wrapper 
FvB> post linuxrj"');
FvB> 
FvB> my  list address is linuxrj at gral.org.br, but postfix answer me with: 
FvB> 
FvB>  unknown USER
FvB> 
FvB> How can I fix it?

This is more a question for the postfix list, but OK, who's counting :)

1) list your mysql configfile in alias_maps. example:
	alias_maps = mysql:/usr/local/etc/postfix/aliases.mysql.cf
2) Put in the file mentioned above the following values:

#
# mysql config file for alias lookups on postfix
# comments are ok.
#

# the user name and password to log into the mysql server
user = someone
password = some_password

# the database name on the servers
dbname = customer_database

# the table name
table = mxaliases

#
select_field = forw_addr
where_field = alias

# you may specify additional_conditions here
additional_conditions = and status = 'paid'

# the above variables will result in a query of
# the form:
# select forw_addr from mxaliases where alias = '$lookup' and status = 'paid'
# ($lookup is escaped so if it contains single quotes or other odd
# characters, it will not cause a parse error in the sql).
#
# the hosts that postfix will try to connect to
# and query from (in the order listed)
# specify unix: for unix-domain sockets, inet: for TCP connections (default)
hosts = host1.some.domain host2.some.domain unix:/file/name

# end mysql config file

3) Kick postfix: postfix reload
4) If problem persists, contact postfix-users at postfix.org with postconf output
and logging of errors.




More information about the Mailman-Users mailing list