Le mardi 13 juillet 2010 14:12:22, John A. a écrit : > > On Tue, 13 Jul 2010 12:42:42 +0200 > > > > John A. <j...@edatis.com> articulated: > > > I tried to use transport as following: > > > > > > transport_maps = local.cf remote.cf > > > - local.cf contains a sql query which returns "virtual" if the > > > "u...@domain" matches. > > > - remote.cf contains a sql query which return "smtp:[mail.gateway]" if > > > the domain matches. > > > > > > Did this according to TABLE SEARCH ORDER section of transport(5), but > > > it still doesn't work. > > > Local users are finely delivered but I get "Recipient address rejected: > > > User unknown in virtual mailbox table" for remote users. > > > > > > As I said, I'm still not (yet :)) very familiar with Postfix. > > > Could somebody tell what am I missing ? > > > > Well, for starters you are 'top posting'. If you are not sure what that > > means, Google for it. > > > > Did you read the information at: > > <http://www.postfix.org/DEBUG_README.html> > > > > In particular, post the output of 'postconf -n'. > > Oups, sorry for top posting, I'm quite a mailing list newbie! > > Here is my postconf -n (don't pay attention to the domain name, it's > testing) alias_maps = hash:/etc/aliases > append_dot_mydomain = no > biff = no > config_directory = /etc/postfix > inet_interfaces = all > mydestination = $myhostname localhost.$mydomain localhost > mydomain = edatis.cam > myhostname = mparis > mynetworks = 127.0.0.0/8 10.0.0.0/22 192.168.2.69 > myorigin = $mydomain > relayhost = [mxhub.$mydomain] > smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) > transport_maps = proxy:mysql:/etc/postfix/mysql-transport-fr.cf > proxy:mysql:/etc/postfix/mysql-transport-tn.cf > virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-users-fr.cf > proxy:mysql:/etc/postfix/mysql-aliases.cf > virtual_gid_maps = static:105 > virtual_mailbox_base = /var/mail > virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-domains.cf > virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-boxes-fr.cf > virtual_uid_maps = static:102 > > I put the smtpd service in verbose mode and I notice several things: > After the RCPT TO, I can see this: > > resolve_clnt: `' -> `...@edatis.cam' -> transp=`smtp' > host=`[mxhub.edatis.cam]' rcpt=...@edatis.cam' flags= class=virtual > > -> "sk" is a user of the remote server and the transport is properly set to > the mail gateway => GOOD > > But, after there is the ">>> CHECKING RECIPIENT MAPS <<<" step, which fails > to find a matching entry for the address. > > I don't know why the mail is not directly relayed after the transport > match. > > To be continued :)
I forgot to say that: When I use the "mail" command from the server, email is delivered correctly to the destination server through the gateway. However, when I telnet to the server (or use my desktop's kmail), I get the User unknown error. And sorry for top posting my sig again...