Thank you for your questions. I hope I can give you the needed answers on what we try to do :-)
- We do have a Wordpress-Site for our association set up.
- There we put a html-Snippet for the visitors to be able to subscribe for a mailing list (newsletter).
- This snippet has been with Mailman2 (2.1.23):
<form method="POST" action="https://$domain/mailman/subscribe/$short_listname"> <input name="email" value="" type="text"><br> <input name="email-button" value="Subscribe" type="submit"> </form>
We wanted to do the same with Mailman3 (Docker, 3.3.3, Postorius 1.3.4):
<form method="POST" action="https://$domain/postorius/lists/$short_lisname.$domain/anonymous_subscribe"> <input name="email" value="" type="text"><br> <input name="email-button" value="Anmelden" type="submit"> </form>
When I now enter a mailaddress, the quoted error occurs.
Checking another answer directly to me, there seems to be another hint :-)
I believe you are attempting to use the MM Core API via http GET/POST, rather than via Postorius? That you have tried and get the CSRF error reported?
Typically this is because you need to add a token to the request to indicate to the MM Core that your request isn't a forgery. Typically this token is requested from Core and then presented with subsequent requests. Have you tried this?
Therefor it is needed to send also a token!? Or use another URL, not postorius in order to subscribe!? How can I submit such a token?
Still wondering if there is something sorresponding to this documentation!? If not, I'm also willing to write some lateron, if somebody could lead me the way on how to achieve this :-)
https://wiki.list.org/DOC/4.33%20How%20do%20I%20put%20a%20subscribe%20form%2...
Thanks already a lot!
Am 21.06.21 um 17:23 schrieb Stephen J. Turnbull:
Jens Günther writes:
(forbidden 403 - CSRF-verification failed. Request aborted.)
I think you need to tell us more about what you're trying to do (the obvious way to implement a "website subscribe form" is "run Postorius" which should just work), the configuration you now have, and exactly what actions you take in the browser to get this response.
It would also be helpful to tell us what operating system(s) you're using and their versions, and the versions of Mailman 2 and 3.
Steve