
Qpsmtpd::Plugin::Queue::HTTPRequest - Email to HTTP Request

# in /etc/qpsmtpd/plugins
Qpsmtpd::Plugin::Queue::HTTPRequest
# /etc/qpsmptd/que_httprequest.yaml
handlers:
- rcpt: '^test@example\.com'
post: 'http://localhost/api'

Qpsmtpd::Plugin::Queue::HTTPRequest is a Qpsmtpd plugin that queues a mail post as a http request.
plugin_you_like_foo plugin_you_like_bar plugin_you_like_baz Qpsmtpd::Plugin::Queue::HTTPRequest queue/you_like
handlers:
- rcpt: 'signup-.+?@example.com'
post: 'http://localhost/api'
- rcpt: 'test@example\.com'
post: 'http://localhost:3000/api'
From: =?ISO-2022-JP?B?GyRCSVpFRBsoQg==?= <tomita@cpan.org> To: test api <signup-xxxyyyzzz123@example.com> Subject: Hello =?ISO-2022-JP?B?GyRCQCQzJhsoQg==?= Cc: bar@example.com, Baz <baz@example.net> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Can you see me? こんにちは
(Note: body is encoding ISO-2022-JP in practice.)
POST 'http://localhost/api', [ sender => 'tomita@cpan.org', from => 'tomita@cpan.org', rcpt => 'signup-xxxyyyzzz123@example.com', to => 'signup-xxxyyyzzz123@example.com', cc => 'bar@example.com', cc => 'baz@example.net', source => <<'__EOF__' From: =?ISO-2022-JP?B?GyRCSVpFRBsoQg==?= <tomita@cpan.org> To: test api <signup-xxxyyyzzz123@example.com> Subject: Hello =?ISO-2022-JP?B?GyRCQCQzJhsoQg==?= Cc: bar@example.com, Baz <baz@example.net> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Can you see me? こんにちは __EOF__ , ];
(Note: source is bytes.)

testing.. we need Qpsmtpd testing framework?

similar idea: http://www.smtp2web.com/
Qpsmtpd::Plugin::EmailAddressLoose
http://coderepos.org/share/browser/lang/perl/Qpsmtpd-Plugin-Queue-HTTPRequest (repository)

Naoki Tomita <tomita@cpan.org>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.