• Resolved 4oo4

    (@4oo4)


    I have a small VPS that has nginx/php-fpm running wordpress, and postfix running on ports 25/587 as an SMTP server with saslauthd being used for authentication. I’m pretty good with nginx but new to running email servers and am unsure how to get them to work together.

    I have wordpress using the SMTP server via the Postman plugin without any issues, but can’t seem to get the Pirate Forms plugin working with it. Whenever I try to submit anything it returns a 405 error.

    So I guess I have a couple questions:
    1) Will Pirate Forms work with Postman? I was thinking that since Postman is already replacing php_mail with SMTP that I would just leave Pirate Forms set to default rather than SMTP. If Postman won’t work, is there another SMTP plugin that will? I tried turning off Postman and using Pirate Form’s SMTP but still got the 405.

    2) What config (both nginx and postfix) do I need so that nginx can use my SMTP submission on port 587? All I could find so far was about using the mail {} directive to proxy postfix through nginx, but I’m not looking to use it as a proxy, just to use the submission port as an “upstream” to pass off the email form to postfix.

    I’ve been tailing every log I can think of (nginx access/error, php7.0-fpm.log, mail.log, syslog) while submitting the form but haven’t found any more detail about the 405 error. Anywhere else I should be looking?

    Thank you!

    • This topic was modified 7 years, 6 months ago by 4oo4.
Viewing 3 replies - 1 through 3 (of 3 total)
  • I’ll check out Pirate Forms and get back to you!

    Thread Starter 4oo4

    (@4oo4)

    I ended up finding a solution, turns out my memcached wasn’t set up to properly set up to handle 405 errors.

    In nginx.conf, I changed error_page 404 502 504 = @fallback; to error_page 404 405 502 504 = @fallback; and it started accepting the POST requests.

    Thanks for looking!

    Alexandra

    (@alexandrastan001)

    Hi,

    Glad that you got it solved and thank you for sharing your solution with us. 🙂

    Best regards,
    Alexandra

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Nginx 405 Error when Submitting Form’ is closed to new replies.