Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Readme
smtp2zope
is a script that takes an email as input, does some
transformation, and submits it to a backend server using a url.
Traditionally, Zope is expected to be the receiving server, hence the
name, but should work fine for other servers too.
Originally, the code here comes from the MailBoxer_ product for Zope.
.. _MailBoxer: http://www.iungo.org/products/MailBoxer
When installing this package, a smtp2zope
script is generated.
The script reads from standard input and expects a url and optional
maximum number of bytes as arguments::
smtp2zope URL [MAXBYTES]
URL:
call this URL with the email as a post-request. Authentication can be included in URL: http://username:password@example.org/some-page
MAXBYTES:
optional: only forward mails with a size of less than MAXBYTES to the URL
So a test run could look like this::
cat testmail.txt > /path/to/smtp2zope http://admin:secret@example.org/my-mail-handler
Mail comes in through a mail server. So when you want mail for
mailme@example.org
to be handled by smtp2zope and sent to your web
server, you should add an alias in your smtp server configuration.
Something like this probably works (there might be slight differences
depending on which mail server you use)::
mailme@example.org "|/path/to/smtp2zope http://admin:secret@example.org/my-mail-handler 1000000"
The number at the end restricts the maximum size of a message; this is optional, but highly recommended.
Please note: output is logged to maillog per default on unices. See
your maillog (e.g. /var/log/mail.log
) to debug problems with the setup.
If you like setting up your project with zc.buildout (I myself do),
this simple snippet is enough to create the bin/smtp2zope
script::
[script] recipe = zc.recipe.egg eggs = smtp2zope
Original implementation: Maik Jablonski
Packaging: Maurits van Rees
Use a better way to determine the basic authentication information
that is passed in the url so the logic does not fail when the url
has an @
sign somewhere else.
[maurits]
Fixed error "local variable 'AUTHORIZATION' referenced before assignment" when not using basic authentication (http://user:pw@example.com). [maurits]
FAQs
Read an email from stdin and forward it to a url
We found that smtp2zope demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.