Haineko

所属分类:Email客户端
开发工具:Perl
文件大小:370KB
下载次数:0
上传日期:2016-03-14 03:20:16
上 传 者sh-1993
说明:  电子邮件中继服务器通过HTTP接收JSON,通过SMTP发送电子邮件,将结果作为JSON响应。
(Email relay server receiving JSON via HTTP, sending email via SMTP, respond results as a JSON.)

文件列表:
.travis.yml (423, 2016-03-14)
Build.PL (1806, 2016-03-14)
Changes (7740, 2016-03-14)
LICENSE (18436, 2016-03-14)
META.json (2158, 2016-03-14)
Makefile (2431, 2016-03-14)
bin (0, 2016-03-14)
bin\hainekoctl (5228, 2016-03-14)
cpanfile (871, 2016-03-14)
eg (0, 2016-03-14)
eg\Sendmail.java (4406, 2016-03-14)
eg\email-01.json (399, 2016-03-14)
eg\email-02.json (411, 2016-03-14)
eg\sendmail.html (9191, 2016-03-14)
eg\sendmail.php (1758, 2016-03-14)
eg\sendmail.pl (1398, 2016-03-14)
eg\sendmail.py (1313, 2016-03-14)
eg\sendmail.rb (984, 2016-03-14)
eg\sendmail.sh (590, 2016-03-14)
etc (0, 2016-03-14)
etc\authinfo-example (657, 2016-03-14)
etc\haineko.cf-example (2590, 2016-03-14)
etc\mailertable-example (1560, 2016-03-14)
etc\password-example (937, 2016-03-14)
etc\recipients-example (761, 2016-03-14)
etc\relayhosts-example (717, 2016-03-14)
etc\sendermt-example (1403, 2016-03-14)
fig (0, 2016-03-14)
fig\haineko-architecture.png (109094, 2016-03-14)
fig\haineko-relay.png (107953, 2016-03-14)
lib (0, 2016-03-14)
lib\Haineko.pm (5260, 2016-03-14)
lib\Haineko (0, 2016-03-14)
lib\Haineko\CLI.pm (11145, 2016-03-14)
lib\Haineko\CLI (0, 2016-03-14)
lib\Haineko\CLI\Daemon.pm (15937, 2016-03-14)
lib\Haineko\CLI\Help.pm (5032, 2016-03-14)
... ...

[![Build Status](https://travis-ci.org/azumakuniyuki/Haineko.svg?branch=master)](https://travis-ci.org/azumakuniyuki/Haineko) [![Coverage Status](https://img.shields.io/coveralls/azumakuniyuki/Haineko.svg)](https://coveralls.io/r/azumakuniyuki/Haineko) _ _ _ _ | | | | __ _(_)_ __ ___| | _____ | |_| |/ _` | | '_ \ / _ \ |/ / _ \ | _ | (_| | | | | | __/ < (_) | |_| |_|\__,_|_|_| |_|\___|_|\_\___/ HTTP API into ESMTP What is Haineko ? | Hainekoとは何か? ==================================== Haineko is an HTTP API server for sending email from a browser or any HTTP client. It is implemented as a web server based on Plack and relays an email posted by HTTP client as JSON to other SMTP server or external email cloud services. Haineko runs on the server like following systems which can execute Perl 5.10.1 or later and Plack. * OpenBSD * FreeBSD * NetBSD * Mac OS X * Linux Haineko(はいねこ)はフラウサやcurl等HTTPクライアントからJSONてメールを送信する為 のリレーサーハとして、Perl+Plack/PSGIアフリケーションとして実装されています。 Hainekoに対してJSONて記述されたメールのテータをHTTP POSTて送信すれは、外部のSMTP サーハやメールクラウト等にリレーする事か可能てす。 HainekoはPerl 5.10.1以上かインストールされている上記のOSて動作します。 Supported email clouds to relay using API | APIに対応しているメールクラウト --------------------------------------------------------------------------- * [SendGrid](http://sendgrid.com) - Haineko/SMTPD/Relay/SendGrid.pm * [Amazon SES](http://aws.amazon.com/ses/) - Haineko/SMTPD/Relay/AmazonSES.pm * [Mandrill](http://mandrill.com) - Haineko/SMTPD/Relay/Mandrill.pm How to build, configure and run | 必要な環境と構築方法について ============================================================== System requirements | 動作環境 ------------------------------ * Perl 5.10.1 or later Dependencies | 依存するPerlモシュール ------------------------------------- Haineko relies on: * Archive::Tar (core module from v5.9.3) * __Authen::SASL__ * __Class::Accessor::Lite__ * __Email::MIME__ * Encode (core module from v5.7.3) * File::Basename (core module from v5) * File::Copy (core module from v5.2) * File::Temp (core module from v5.6.1) * __Furl__ * Getopt::Long (core module from v5) * IO::File (core module from v5.3.7) * IO::Pipe (core module from v5.3.7) * __IO::Socket::SSL__ * IO::Zlib (core module from v5.9.3) * __JSON::Syck__ * MIME::Base*** (core module from v5.7.3) * Module::Load (core module from v5.9.4) * __Net::DNS__ * Net::SMTP (core module from v5.7.3) * __Net::SMTPS__ * __Net::CIDR::Lite__ * __Parallel::Prefork__ * __Path::Class__ * __Plack__ * __Router::Simple__ * Scalar::Util (core module from v5.7.3) * __Server::Starter__ * Sys::Syslog (core module from v5) * Time::Piece (core module from v5.9.5) * __Try::Tiny__ Hainekoは上記のモシュールに依存しています: Dependencies with Basic-Auth | リレー時にBASIC認証を使用する場合 ---------------------------------------------------------------- Haineko with Basic Authentication at sending an email relies on the following modules: * __Crypt::SaltedHash__ * __Plack::MiddleWare::Auth::Basic__ Hainekoにメールテータを渡す前にBASIC認証を必要とする場合は上記のモシュールも必要 になります。 Dependencies with AmazonSES | AmazonSESにAPIてリレーする場合 ------------------------------------------------------------ If you will use `Haineko::SMTPD::Relay::AmazonSES`, please install the following modules. * __XML::Simple__ 2.20 or later もしもHaineko::SMTPD::Relay::AmazonSESを使う場合は上記のモシュールもインストール してくたさい。 A. Build and install from CPAN using cpanm | CPANからインストール ----------------------------------------------------------------- $ sudo cpanm Haineko ... $ export HAINEKO_ROOT=/opt/haineko $ sudo hainekoctl setup --dest $HAINEKO_ROOT * debug1: Destination directory = /opt/haineko * debug1: Temporary directory = /tmp/BusBTj3MUz * debug1: Archive file = /tmp/BusBTj3MUz/haineko-setup-files.tar.gz * debug1: Extracted directory = /tmp/BusBTj3MUz/haineko-setup-files * debug1: [MAKE] /opt/haineko/bin * debug1: [COPY] /opt/haineko/bin/hainekoctl * debug1: [PERM] 0755 /opt/haineko/bin/hainekoctl * debug1: [MAKE] /opt/haineko/etc * debug1: [COPY] /opt/haineko/etc/authinfo * debug1: [PERM] 0600 /opt/haineko/etc/authinfo * debug1: [COPY] /opt/haineko/etc/haineko.cf * debug1: [COPY] /opt/haineko/etc/mailertable * debug1: [COPY] /opt/haineko/etc/password * debug1: [COPY] /opt/haineko/etc/recipients * debug1: [COPY] /opt/haineko/etc/relayhosts * debug1: [COPY] /opt/haineko/etc/sendermt * debug1: [MAKE] /opt/haineko/libexec * debug1: [COPY] /opt/haineko/libexec/haineko.psgi * debug1: [DONE] hainekoctl --dest /opt/haineko $ cd $HAINEKO_ROOT $ vi ./etc/haineko.cf And edit other files in etc/ directory if you needed. 必要ならetc/ティレクトリ以下のファイルも編集して下さい。 Run by the one of the followings: $ plackup -o '127.0.0.1' -p 2794 -a $HAINEKO_ROOT/libexec/haineko.psgi $ $HAINEKO_ROOT/bin/hainekoctl start --devel 上記のコマントのいすれかて起動てきます。 B. Run at the source directory | ソースコートのティレクトリて直接実行 --------------------------------------------------------------------- $ cd ./Haineko $ sudo cpanm --installdeps . $ ./bin/hainekoctl setup --dest . $ vi ./etc/haineko.cf And edit other files in etc/ directory if you needed. 必要ならetc/ティレクトリ以下のファイルも編集して下さい。 Run by the one of the followings: $ plackup -o '127.0.0.1' -p 2794 -a libexec/haineko.psgi $ ./bin/hainekoctl start --devel 上記のコマントのいすれかて起動てきます。 Starting Haineko server | Hainekoサーハの起動 --------------------------------------------- ### Use plackup command | plackupコマントを使う $ cd $HAINEKO_ROOT $ plackup -o 127.0.0.1 -p 2794 -a libexec/haineko.psgi ### Use wrapper script | ラッハースクリフト(hainekoctl)を使う $ cd $HAINEKO_ROOT $ bin/hainekoctl start --devel -a libexec/haineko.psgi The following command shows other options of bin/hainekoctl: 下記のコマントを実行するとhainekoctlて利用可能なオフションか表示されます。 $ cd $HAINEKO_ROOT $ bin/hainekoctl help Configuration files in /usr/local/haineko/etc | 設定ファイルについて -------------------------------------------------------------------- Please have a look at the complete format description in each file listed at the followings. These files are read from Haineko as a YAML-formatted file. Hainekoの動作に必要な設定ファイルについてはこの節て確認してくたさい。いすれの ファイルもYAML形式てす。 ### etc/haineko.cf __Main configuration file for Haineko.__ If you want to use other configuration file, set `$HAINEKO_CONF` environment variable like `export HAINEKO\_CONF=/etc/neko.cf`. __Hainekoの設定ファイルてす。__起動時に別の設定ファイルを使用したい場合は、環境 変数`HAINEKO_CONF`にそのPATHを設定してくたさい。 ### etc/mailertable Defines "mailer table": Recipient's domain part based routing table like the same named file in Sendmail. This file is taken precedence over the routing table defined in etc/sendermt for deciding the mailer. 宛先メールアトレスのトメイン部分によってリレー先SMTPサーハを決定する為のファイル てす。Sendmailの/etc/mail/mailertableと同し働きをします。同しような働きをする sendermtファイルよりも先に評価されます。 ### etc/sendermt Defines "mailer table" which decide the mailer by sender's domain part. 発信者アトレスのトメイン部分によって、リレー先のSMTPサーハを決定する為のファイル てす。前述のmailertableの後に評価されます。 ### etc/authinfo Provide credentials for client side authentication information. Credentials defined in this file are used at relaying an email to external SMTP server. __This file should be set secure permission: The only user who runs haineko server can read this file.__ SMTPサーハやEメールクラウトへリレーする時に必要な認証情報を定義する為のファイル てす。主にSMTP認証に必要なユーサ名とハスワート、Eメールクラウト用のAPIキー等を 記述します。 __ハスワートをそのまま記述する必要かあるのて、Hainekoサーハを実行するユーサ以外 は読めないようにハーミッションの設定にこ注意下さい。__ ### etc/relayhosts Permitted hosts or network table for relaying via /submit. Hainekoに対してメールテータをPOSTてきる接続元IPアトレスやネットワークを定義する ファイルてす。このファイルに定義されていないIPアトレスからの接続は拒否されます。 ### etc/recipients Permitted envelope recipients and domains for relaying via /submit. Hainekoかリレーする事か出来る宛先メールアトレスやトメインを定義するファイルてす。 このファイルに定義されていないアトレス宛のメールは拒否されます。 ### etc/password Username and password pairs for basic authentication. Haineko require an username and a password at receiving an email if `HAINEKO_AUTH` environment variable was set. The value of `HAINEKO_AUTH` environment variable is the path to password file. __This file should be set secure permission: The only user who runs haineko server can read this file.__ HainekoにメールテータをPOSTする前に行うBASIC認証のユーサ名とハスワートを定義 します。`hainekoctl -A`て起動するか、環境変数`HAINEKO_AUTH`にハスワートファイル の位置を設定した場合に限り、BASIC認証か必要になります。 __ハスワートはハッシュを記述しますか、安全の為にHainekoサーハを実行するユーサ 以外は読めないようにハーミッションの設定にこ注意下さい。__ ### Configuration data on the web | フラウサて確認出来る設定ファイルの内容 `/conf` display Haineko configuration data but it can be accessed from 127.0.0.1 フラウサて`/conf`にアクセスすると起動中のHainekoか読込んている設定ファイルの内容 かJSONて表示されます。このURLにアクセス出来るのは127.0.0.1からのみてす。 Environment Variables | 環境変数 -------------------------------- r## HAINEKO_ROOT Haineko decides the root directory by `HAINEKO_ROOT` or the result of `pwd` command, and read haineko.cf from `$HAINEKO_ROOT/etc/haineko.cf` if `HAINEKO_CONF` environment variable is not defined. `HAINEKO\_ROOT`は設定ファイルのティレクトリてあるetc/や、アフリケーション本体 てあるlibexec/haineko.psgiの位置を決定するのに使用されます。 環境変数`HAINEKO_CONF`か未定義てある場合、`$HAINEKO_ROOT/etc/haineko.cf`か 設定ファイルとして使用されます。 ### HAINEKO_CONF The value of `HAINEKO_CONF` is the path to __haineko.cf__ file. If this variable is not defined, Haineko finds the file from `HAINEKO_ROOT/etc` directory. This variable can be set with `-C /path/to/haineko.cf` at bin/hainekoctl script. `HAINEKO_CONF`は設定ファイル__haineko.cf__の位置を定義します。設定ファイルはなく ても起動は出来ますか、リレー先サーハの定義ファイルなとの位置を決定するのに必要て す。この環境変数か定義されていない場合、環境変数`$HAINEKO_ROOT/etc/haineko.cf` か設定ファイルとして使用されます。 `bin/hainekoctl -C /path/to/haineko.cf`て環境変数を定義せすに起動する事も可能 てす。 ### HAINEKO_AUTH Haineko requires Basic-Authentication at connecting Haineko server when `HAINEK_AUTH` environment variable is set. The value of `HAINEKO_AUTH` should be the path to the password file such as `export HAINEKO_AUTH=/path/to/password`. This variable can be set with `-A` option of bin/hainekoctl script. HainekoにメールテータをPOSTする前のBASIC認証て使用するハスワートファイルの位置を 定義します。この環境変数を設定した場合、あるいは`bin/hainekoctl -A`て起動した 場合のみ、BASIC認証か必要になります。 ### HAINEKO_DEBUG Haineko runs on debug(development) mode when this variable is set. `-d, --devel`,and `--debug` option of bin/hainekoctl turns on debug mode. When Haineko is running on developement mode, you can send email data using GET method. Hainekoを開発モートて起動します。環境変数を設定せす`bin/hainekoctl -d, --devel` て起動してもよいてす。開発モートて起動している時はGETてメールテータを渡す事かて きます。 SAMPLE CODE IN EACH LANGUAGE | 各言語てのサンフルコート ------------------------------------------------------- Sample codes in each language are available in eg/ directory: Perl, Python Ruby, PHP, Java script(jQuery) and shell script. Perl, Python, Ruby, PHP, Java Script(jQuery) シェルスクリフトてのサンフルコート をソースコートの eg/ティレクトリに同梱しています。 REPOSITORY | リホシトリ ----------------------- https://github.com/azumakuniyuki/Haineko AUTHOR | 開発者 --------------- azumakuniyuki LICENSE | ライセンス -------------------- This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

近期下载者

相关文件


收藏者