web-education.postfix-dkim

ansible-dkim

在Debian上配置Postfix的opendkim的Ansible角色

示例剧本

---
- name: 安装和配置Postfix和opendkim
  hosts: mail
  remote_user: root
  vars_files: ['var_mail.yml']
  pre_tasks:
    - name: 确保 /etc/opendkim/keys 目录存在
      file: path=/etc/opendkim/keys state=directory 

    - name: 推送DKIM私钥
      copy: src=keys/{{ item.key }} dest=/etc/opendkim/keys mode=0400
      with_items: "{{ dkim_domains }}"
  roles:
  - { role: ansible-dkim }

var_mail.yml:

---
admin_email: '[email protected]'
postfix_myhostname: 'mailing.domain.com' # ehlo 主机名
dkim_domains: 
  - domain: 'domain1.com'
    selector: 'domain1'
    key: 'domain1.private'
  - domain: 'domain2.fr'
    selector: 'domain2'
    key: 'domain2.private'
关于项目

A role to install and configure Postfix and OpenDKIM for multiple domains with multiple domain keys

安装
ansible-galaxy install web-education.postfix-dkim
许可证
bsd-3-clause
下载
81
拥有者
Startup EdTech, notre vocation est de concevoir des solutions qui font évoluer les pratiques pédagogiques et favorisent la réussite scolaire