Anton, <br><br>Thanks for your replies,<br>They are most useful (and you will be credited in the wiki entry)<br><br>Let me try these now and come back to you.<br><br>best regards<br><br><br><div class="gmail_quote">On Fri, Apr 3, 2009 at 11:51 PM, Anton Yuzhaninov <span dir="ltr">&lt;<a href="mailto:citrin@citrin.ru">citrin@citrin.ru</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">Atif Ghaffar wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear all,<br>
<br>
For pop and imap its pretty clear and I have documented on the wiki.<br>
<br>
<br>
Can someone please state a short example on how nginx smtp proxy works with a smtp server.<br>
The documentation on this is very sparse, If you can forward me to the right direction, I will write myself the documentation on the wiki.<br>
<br>
<br>
Withougt authenticatin (MX)<br>
<br>
* Is it possible to mutiplex to different real smtp servers (If not, its fine, LVS can do that job)<br>
</blockquote>
<br></div>
Nginx send request by http to defined in config server and this server can return ip of differend upstreams. So load balancing can be done by this &quot;auth&quot; server.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
* Is is possible to do something with the header before forwarding the request to the real smtp sever. (How can real smtp server do RBL checks if the IP address is local)<br>
</blockquote>
<br></div>
Nginx can say to real smtp server about client&#39;s ip via XCLIENT command:<br>
<a href="http://www.postfix.org/XCLIENT_README.html" target="_blank">http://www.postfix.org/XCLIENT_README.html</a><br>
xclient also can be used with patched exim:<br>
<a href="http://cebka.pp.ru/blog/patch-exim-xclient" target="_blank">http://cebka.pp.ru/blog/patch-exim-xclient</a><br>
<br>
Also RBL check can be performed by nginx+http server.<br>
Example of such server is:<br>
<a href="http://cebka.pp.ru/hg/nginx-smtp-policy" target="_blank">http://cebka.pp.ru/hg/nginx-smtp-policy</a><br>
(works with pathed libevent: <a href="http://cebka.pp.ru/blog/libevent_txt.patch" target="_blank">http://cebka.pp.ru/blog/libevent_txt.patch</a>)<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
* What can nginx do before sending the connection the the smtp server (Can it change/add some headers, can in pass the mail through a filter)?<br>
</blockquote>
<br></div>
No, nginx can&#39;t change message.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
With Authentication<br>
Same questions as above. A short example (even in pseudo code) will be very helpful.<br>
</blockquote>
<br></div>
Auth server works as for pop3/smtp. Additional header in response can be added for bad replays - Auth-Status - it used as smtp error code.<br>
<br>
May be the main reason to use nginx as smtp auth proxy - to share auth server with pop3/imap.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
What to look out on the real  smtp server?<br>
Does the actual IP goes to the real smtp server?<br>
<br>
</blockquote>
<br></div>
MTA can know client&#39;s IP also from XCLIENT command.<br>
<br>
-- <br><font color="#888888">
 Anton Yuzhaninov<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>best regards<br>Atif Ghaffar<br>