Prev: sender restrictions based on IP of sender
Next: private/smtp-amavis: No such file or directory helps for master.cf
From: "John A." on 12 Jul 2010 10:41 Hi. I'm trying to setup a multi-server mail architecture with a mail gateway and 2 final dest. servers hosting mailboxes, all on the same domain. I'm using virtual mailboxes wih MySQL backend (same for the 3 servers). I set up the gateway which forwards to end servers. The problem is that I can't get to send email from one end server to the other. First I tried to make the server act like if the mailbox didn't exist on the local server (with SQL where) thinking that if it doesn't exist here, the mail will be relayed to the 'relay_host', but getting "User unknown in virtual mailbox table". It is not working better with "relay_domains" directive, because it is already set in "virtual_mailbox_domains" one. I red the all nearly all documentation I found, especially the official one, but I'm missing some details. Hope I'm being clear enough. Here's the main.cf: mydomain = edatis.cam myhostname = mparis myorigin = $mydomain mydestination = $myhostname localhost.$mydomain localhost mynetworks = 127.0.0.0/8 10.0.0.0/22 #relay_domains = relayhost = [mxhub.$mydomain] inet_interfaces = all alias_maps = hash:/etc/aliases #relay_recipient_maps = proxy:mysql:/etc/postfix/mysql-users-tn.cf transport_maps = proxy:mysql:/etc/postfix/mysql-transport.cf virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-users-fr.cf proxy:mysql:/etc/postfix/mysql-aliases.cf virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-domains.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-boxes-fr.cf virtual_mailbox_base = /var/mail virtual_uid_maps = static:102 virtual_gid_maps = static:105 Thanks -- *************************** J. Amiez Administrateur système ja(a)edatis.com
From: Jeroen Geilman on 12 Jul 2010 13:10 On 07/12/2010 04:41 PM, John A. wrote: > Hi. > > I'm trying to setup a multi-server mail architecture with a mail gateway and 2 > final dest. servers hosting mailboxes, all on the same domain. > I'm using virtual mailboxes wih MySQL backend (same for the 3 servers). > > I set up the gateway which forwards to end servers. > The problem is that I can't get to send email from one end server to the > other. > ....why would you ever do that ? You send mail to the machine that holds the destination mailbox. Mailstores never send mail to each other. You should also be aware of the fact that such a setup is fully dependent on the mail gateway; if that goes down, you have no mail system left. > First I tried to make the server act like if the mailbox didn't exist on the > local server (with SQL where) thinking that if it doesn't exist here, the mail > will be relayed to the 'relay_host', but getting "User unknown in virtual > mailbox table". > It is not working better with "relay_domains" directive, because it is already > set in "virtual_mailbox_domains" one. > That won't work. You say you have user data in a SQL table; then use that to determine which backend should get what. transport_maps would work fine for this. > I red the all nearly all documentation I found, especially the official one, but > I'm missing some details. > Yes; first and foremost, you're missing the transport(5) man page: http://www.postfix.org/transport.5.html > Hope I'm being clear enough. > > > Here's the main.cf: > No , thanks. > Thanks > You're welcome :) J.
From: "John A." on 13 Jul 2010 05:16 Le lundi 12 juillet 2010 19:10:38, Jeroen Geilman a écrit : > On 07/12/2010 04:41 PM, John A. wrote: > > Hi. > > > > I'm trying to setup a multi-server mail architecture with a mail gateway > > and 2 final dest. servers hosting mailboxes, all on the same domain. > > I'm using virtual mailboxes wih MySQL backend (same for the 3 servers). > > > > I set up the gateway which forwards to end servers. > > The problem is that I can't get to send email from one end server to the > > other. > > ...why would you ever do that ? I'm upgrading my company's mail system which is working like that for years... > You send mail to the machine that holds the destination mailbox. > Mailstores never send mail to each other. > > You should also be aware of the fact that such a setup is fully > dependent on the mail gateway; if that goes down, you have no mail > system left. Indeed, but the mail gateway is actually made of 2 virtual machines for load balancing/failover, to avoid that kind of problem. > > First I tried to make the server act like if the mailbox didn't exist on > > the local server (with SQL where) thinking that if it doesn't exist > > here, the mail will be relayed to the 'relay_host', but getting "User > > unknown in virtual mailbox table". > > It is not working better with "relay_domains" directive, because it is > > already set in "virtual_mailbox_domains" one. > > That won't work. > You say you have user data in a SQL table; then use that to determine > which backend should get what. > transport_maps would work fine for this. > > > I red the all nearly all documentation I found, especially the official > > one, but I'm missing some details. > > Yes; first and foremost, you're missing the transport(5) man page: > http://www.postfix.org/transport.5.html Well, I already read that manpage several times, but I'm lacking some Postfix fundamentals... Anyway, thanks Jeroen for your answer. It is quite blur to me but I think you suggest me to create 2 different sort of transport : - One would be an "alias" to virtual delivery if the query says the user is local - The second would forward mail to remote users using the smtp delivery Correct me if I'm wrong :)
From: "John A." on 13 Jul 2010 06:42 I tried to use transport as following: transport_maps = local.cf remote.cf - local.cf contains a sql query which returns "virtual" if the "user(a)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 ? > > > Hi. > > > > > > I'm trying to setup a multi-server mail architecture with a mail > > > gateway and 2 final dest. servers hosting mailboxes, all on the same > > > domain. I'm using virtual mailboxes wih MySQL backend (same for the 3 > > > servers). > > > > > > I set up the gateway which forwards to end servers. > > > The problem is that I can't get to send email from one end server to > > > the other. > > > > ...why would you ever do that ? > > I'm upgrading my company's mail system which is working like that for > years... > > > You send mail to the machine that holds the destination mailbox. > > Mailstores never send mail to each other. > > > > You should also be aware of the fact that such a setup is fully > > dependent on the mail gateway; if that goes down, you have no mail > > system left. > > Indeed, but the mail gateway is actually made of 2 virtual machines for > load balancing/failover, to avoid that kind of problem. > > > > First I tried to make the server act like if the mailbox didn't exist > > > on the local server (with SQL where) thinking that if it doesn't exist > > > here, the mail will be relayed to the 'relay_host', but getting "User > > > unknown in virtual mailbox table". > > > It is not working better with "relay_domains" directive, because it is > > > already set in "virtual_mailbox_domains" one. > > > > That won't work. > > You say you have user data in a SQL table; then use that to determine > > which backend should get what. > > transport_maps would work fine for this. > > > > > I red the all nearly all documentation I found, especially the official > > > one, but I'm missing some details. > > > > Yes; first and foremost, you're missing the transport(5) man page: > > http://www.postfix.org/transport.5.html > > Well, I already read that manpage several times, but I'm lacking some > Postfix fundamentals... > > Anyway, thanks Jeroen for your answer. > It is quite blur to me but I think you suggest me to create 2 different > sort of transport : > - One would be an "alias" to virtual delivery if the query says the user is > local > - The second would forward mail to remote users using the smtp delivery > > Correct me if I'm wrong :)
From: Jerry on 13 Jul 2010 07:15
On Tue, 13 Jul 2010 12:42:42 +0200 John A. <ja(a)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 "user(a)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'. -- Jerry ✌ postfix-user(a)seibercom.net _____________________________________________________________________ TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail TO (UN)SUBSCRIBE see http://www.postfix.org/lists.html Do not overtax your powers. |