Advertisement
Guest User

Untitled

a guest
Apr 9th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. # -------
  2. # p-alias
  3. # -------
  4. hosts=10.0.0.123
  5. port=6432
  6. dbname=mail
  7. user=user1
  8. password=password
  9. query=SELECT destination FROM v_alias WHERE source = '%s'
  10.  
  11. console:~$ postmap -q test@testy.net pgsql:/etc/postfix/p-alias
  12.  
  13. tester.mc_testy_tester@test_email_address.com
  14.  
  15. console:~$ cp /etc/postfix/p-alias /etc/postfix/p-alias2
  16. console:~$ vi /etc/postfix/p-alias2
  17.  
  18. # -------
  19. # p-alias2
  20. # -------
  21. hosts=localhost
  22. port=6432
  23. dbname=mail
  24. user=user1
  25. password=password
  26. query=SELECT destination FROM v_alias WHERE source = '%s'
  27.  
  28. console:~$ postmap -q test@testy.net pgsql:/etc/postfix/p-alias2
  29.  
  30. postmap: warning: connect to pgsql server localhost: could not connect to server: Connection refused??
  31. Is the server running on host "localhost" (::1) and accepting??
  32. TCP/IP connections on port 5432??
  33. could not connect to server: Connection refused??
  34. Is the server running on host "localhost" (127.0.0.1) and accepting??
  35. TCP/IP connections on port 5432??
  36. postmap: fatal: table pgsql:/etc/postfix/p-alias2: query error: Operation now in progress
  37.  
  38. client = yes
  39. pid = /var/run/stunnel.pid
  40. cert = /etc/stunnel/stnl.pem
  41. [pgbouncer]
  42. protocol = pgsql
  43. accept = 6433
  44. connect = 10.0.0.123:6434
  45.  
  46. pid = /var/run/stunnel.pid
  47. cert = /etc/stunnel/stnl.pem
  48.  
  49. ...
  50.  
  51. [pgbouncer]
  52. protocol = pgsql
  53. accept = 6434
  54. connect = 5432
  55.  
  56. # -------
  57. # p-alias3
  58. # -------
  59. hosts=127.0.0.1
  60. port=6433
  61. dbname=mail
  62. user=user1
  63. password=password
  64. query=SELECT destination FROM v_alias WHERE source = '%s'
  65.  
  66. console:~$ postmap -q test@testy.net pgsql:/etc/postfix/p-alias3
  67. postmap: warning: connect to pgsql server 127.0.0.1: could not connect to server: Connection refused??
  68. Is the server running on host "127.0.0.1" and accepting??
  69. TCP/IP connections on port 5432??
  70. postmap: fatal: table pgsql:/etc/postfix/p-alias3: query error: Operation now in progress
  71.  
  72. # -------
  73. # p-alias4
  74. # -------
  75. hosts=10.0.0.123
  76. port=6434
  77. dbname=mail
  78. user=user1
  79. password=password
  80. query=SELECT destination FROM v_alias WHERE source = '%s'
  81.  
  82. console:~$ postmap -q test@testy.net pgsql:/etc/postfix/p-alias4
  83. tester.mc_testy_tester@test_email_address.com
  84.  
  85. [databases]
  86.  
  87. ; ...
  88. ;mail = host=localhost port=6433 dbname=mail
  89. mail = host=10.0.0.123 port=5432 dbname=mail
  90.  
  91. [pgbouncer]
  92.  
  93. listen_addr = *
  94. listen_port = 6432
  95.  
  96. ; ...
  97.  
  98. auth_type = md5
  99.  
  100. auth_file = /etc/pgbouncer/userlist.txt
  101.  
  102.  
  103. pool_mode = transaction
  104.  
  105. server_reset_query = DISCARD ALL
  106.  
  107. server_check_query = SELECT 1
  108.  
  109. server_check_delay = 30
  110.  
  111. ; ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement