Forum: NGINX sending mail with nginx

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B3ecd14ae91c10433678cad8e68f7a53?d=identicon&s=25 Liam Morley (Guest)
on 2008-10-28 22:11
(Received via mailing list)
I've been using nginx to proxy to rails apps, and this has been quite
successful (thanks). But now I need to host a client's site which has a
very
simple mail contact form (previously written in coldfusion running on
IIS).
Now that I have to port this contact form to linux, the natural thought
was
to use CGI. FastCGI is really overkill, I don't need a persistent
process
just waiting for someone to send mail through a webform. A FAQ entry on
"How
to use nginx as SMTP proxy with a postfix backend?" looked promising,
though
documentation was empty and I imagine that nginx probably couldn't pass
parameters in a neat format if at all (though I'd love to be proven
wrong-
how does fastmail.fm send mail?). The other option I've seen is to proxy
to
something else like thttpd and have thttpd execute a CGI script, though
this
doesn't seem to be any better than FastCGI, and I'd really prefer the
light
footprint of CGI, which only runs when asked (which, for this particular
client, will not be very often). As I don't have a separate mail server,
I
don't need authentication, postfix will only send mail when the request
is
on the same host.

Can anybody clue me in to some best practices in this case?

Thanks very much-
Liam Morley
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2008-10-28 23:58
(Received via mailing list)
Hello!

On Tue, Oct 28, 2008 at 04:27:12PM -0400, Liam Morley wrote:

> I've been using nginx to proxy to rails apps, and this has been quite
> successful (thanks). But now I need to host a client's site which has a very
> simple mail contact form (previously written in coldfusion running on IIS).
> Now that I have to port this contact form to linux, the natural thought was
> to use CGI. FastCGI is really overkill, I don't need a persistent process
> just waiting for someone to send mail through a webform.

Since nginx has no CGI support, you should either use backend
server that handles CGI, or set up some FastCGI wrapper for this.

> A FAQ entry on "How
> to use nginx as SMTP proxy with a postfix backend?" looked promising, though
> documentation was empty and I imagine that nginx probably couldn't pass
> parameters in a neat format if at all (though I'd love to be proven wrong-
> how does fastmail.fm send mail?).

This is completely different beast.  With mail module, nginx can
be used to proxy smtp/pop3/imap - but this is needed only if you
run [huge] mail server, and has nothing to do with http and html
forms.

[...]

Maxim Dounin
57badfb3e8a4e8a81536f7dc6e47b812?d=identicon&s=25 Joe Van Dyk (Guest)
on 2008-11-01 19:15
(Received via mailing list)
On Tue, Oct 28, 2008 at 3:51 PM, Maxim Dounin <mdounin@mdounin.ru>
wrote:
>
> Since nginx has no CGI support, you should either use backend
> server that handles CGI, or set up some FastCGI wrapper for this.

What would you recommend for a backend server that does only CGI?
This topic is locked and can not be replied to.