repleo.postfix

repleo.postfix - SSLとスパムフィルタサポートを備えたPostfix SMTPをインストールするためのAnsibleロール

ビルドステータス Ansible Galaxy

Postfixを管理するためのAnsibleロールです。このロールを使用することで、TLS/SSLとSTARTSSLをサポートした完全なSMTPサーバーを構築できます。また、スパムフィルタとしてSpamassassinもインストールされ、10年のスパムデータを含むベイジアンデータベースが付属しています。

必要条件

現時点ではUbuntuとDebianでのみテストされています。

変数

postfix_enabled: yes # ロールを有効にする

postfix_smtpd_use_tls: yes
postfix_myhostname: "{{inventory_hostname}}"
postfix_myorigin: $myhostname
postfix_smtp_sasl_auth_enable:
postfix_smtp_tls_cafile: "/etc/ssl/certs/Thawte_Premium_Server_CA.pem"
postfix_smtp_use_tls: yes

postfix_mailbox_size: 0
postfix_message_size: 50240000

# postfix_smtpd_auth_sasl_enable

postfix_relayhost:
postfix_mynetworks: "127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128"
postfix_inet_interfaces: loopback-only
postfix_mydestination: $mydomain, $myhostname, localhost.$mydomain, localhost
postfix_local_recipient_map: ""
postfix_relay_domains:

postfix_generic_maps: ""

# メール配送オプション
postfix_use_maildrop: no
postfix_use_procmail: no

# postfix_spfをインストールし、SPFを使用するように設定
postfix_spf: no

# opendkimをインストールし、DKIMを使用するように設定
postfix_dkim: no
postfix_dkim_domains:
postfix_dkim_key_bits: 2048

# opendmarcをインストールし、DMARCを使用するように設定
postfix_dmarc: no
postfix_dmarc_host:
postfix_dmarc_domains:

# ローカルユーザー(例えば、rootやcron)へのすべてのメールを別のメールアドレスに転送
postfix_local_user_relay_address: ""

# 他のSMTPサーバーを使う場合に便利です。
postfix_rewrite_sender_address: ""

# Postfixの設定変更時にこのアドレスにテストメールを送信
postfix_send_test_mail_to: ""

postfix_smtp_sasl_user: "{{ansible_ssh_user}}"
postfix_smtp_sasl_password: ""

# キュー
bounce_queue_lifetime: 1h
maximal_queue_lifetime: 1h
maximal_backoff_time: 15m
minimal_backoff_time: 5m
queue_run_delay: 5m

postfix_tls_generate: False
postfix_ssl_subject: ""
postfix_tls_cert_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem"
postfix_tls_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key"

使用方法

repleo.postfixをロールに追加し、プレイブックファイルで変数を設定してください。

例:


- hosts: all

  roles:
    - repleo.postfix

  vars:
    # gmailの設定例
    postfix_relayhost: "[smtp.gmail.com]:587"
    postfix_smtp_sasl_user: [email protected]
    postfix_smtp_sasl_password: mypassword
 - { role: repleo.postfix,
     postfix_mydestination: "repleo.nl, $mydomain, $myhostname, localhost.$mydomain, localhost",
     postfix_mynetworks: "127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128",
     postfix_inet_interfaces: all,
     postfix_use_maildrop: yes,
     postfix_smtpd_use_tls: yes,
     postfix_tls_key_file: /etc/postfix/tls/smtp.repleo.nl.key,
     postfix_tls_cert_file: /etc/postfix/tls/smtp.repleo.nl_chain.pem,
     postfix_smtpd_auth_sasl_enable: yes,
     postfix_send_test_mail_to: [email protected]
   }

ライセンス

MITライセンスの下で提供されています。詳細はLICENSEファイルを参照してください。

フィードバック、バグ報告、リクエスト...

歓迎します!

プロジェクトについて

Ansible role for installing postfix SMTP with spamassassin

インストール
ansible-galaxy install repleo.postfix
ライセンス
mit
ダウンロード
240
所有者
Continuous delivery and software development experts