Hi Pierre,
I had my config screwed up... I'll outline what i have woking now and
the config files it took to get there. Using postfix on debian
sarge(testing) with dbmail 2 Release Candidate 8. I have still got to
get a few things working.... I'll outline that later:
Postfix recieves mail, looks up a mysql table postfix.transport, finds
the domain.com domain and returns 'dbmail:' as the transport, postfix
looks up the dbmail.dbmail_aliases table to find [EMAIL PROTECTED] is a
valid user, then fires the email thru to dbmail which does its stuff.
The config files are as follows:
/etc/postfix/main.cf:
myhostname = host.domain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
relayhost = outgoing.domain.com
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
mydestination = mysql:/etc/postfix/mysql-transport.cf
local_recipient_maps = mysql:/etc/postfix/mysql-localusers1.cf
transport_maps = mysql:/etc/postfix/mysql-transport.cf
/etc/postfix/master.cf (has this line at the bottom):
dbmail unix - n n - - pipe
flags= user=dbmail:dbmail argv=/usr/sbin/dbmail-smtp -d ${recipient}
Note here: The instructions have the path to dbmail-smtp incorrect for
v2/debian. Check that in your config. I also dont know if it needs to be
on two lines or not.
/etc/postfix/mysql-transport.cf:
user = postfix
password = postfix
dbname = postfix
table = transport
hosts = 192.168.1.200
select_field = transport
where_field = domain
Note here: the IP of the server is 192.168.1.200, i could not get
'localhost' to work. There are two ways of doing this, either use the IP
address as above, or move the mysql.sock file into the postfix dir. I
have detailed instructions for this if you want.
/etc/postfix/mysql-localusers1.cf:
user = postfix
password = postfix
dbname = dbmail
hosts = 192.168.1.200
table = dbmail_aliases
select_field = alias
where_field = alias
With this - it works sweet. Here is the postfix.transport table:
mysql> select * from transport;
+----+---------------------+-----------+--------------------+
| id | domain | transport | comment |
+----+---------------------+-----------+--------------------+
| 4 | localhost | dbmail: | Localhost |
| 5 | host.domain.com | dbmail: | |
| 9 | domain.com | dbmail: | |
+----+---------------------+-----------+--------------------+
3 rows in set (0.00 sec)
Hopefully this helps. I still would like postfix to send error mail,
such as invalid user etc... But for some reason this is not happening.
Regards,
Simon
[EMAIL PROTECTED] wrote:
Hello Simon,
I'm having the exact same problem as you described. Could you please let me
know what you have done to fix your problem ?
Thanks,
Pierre