メールを受け取ったら自動でperlスクリプトを実行するまでの環境構築のメモ。 postfixのインストール 次のコマンドを実行 sudo aptitude install postfix virtualの設定 postfixを複数ドメインで使い分けるには、virtualの設定が必要です。 まず/etc/postfix/main.cfに以下を追記。 virtual_alias_maps = hash:/etc/postfix/virtual 次に/etc/postfix/virtualに以下を追加。この設定をすることで@test.example.com宛のメッセージがtestuserに配送されるようになります。 test.example.com anything @test.example.com testuser 最後にvirtualの反映 sudo postmap /etc/postfi