From 6d4527e3c8746308af044e482aa3d438090d5fab Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Thu, 18 Jun 2015 14:35:48 +0000 Subject: [PATCH] Setup postfix for taiga.cloud.fp.o. --- roles/taiga/files/aliases | 91 ++++++++++++++++++++++++++++++++++ roles/taiga/tasks/main.yml | 14 +++++- roles/taiga/templates/local.py | 16 +++--- 3 files changed, 111 insertions(+), 10 deletions(-) create mode 100644 roles/taiga/files/aliases diff --git a/roles/taiga/files/aliases b/roles/taiga/files/aliases new file mode 100644 index 0000000000..193cf3f4a7 --- /dev/null +++ b/roles/taiga/files/aliases @@ -0,0 +1,91 @@ +# +# Aliases in this file will NOT be expanded in the header from +# Mail, but WILL be visible over networks or from /bin/mail. +# +# >>>>>>>>>> The program "newaliases" must be run after +# >> NOTE >> this file is updated for any changes to +# >>>>>>>>>> show through to sendmail. +# + +# Basic system aliases -- these MUST be present. +mailer-daemon: postmaster +postmaster: sysadmin-main + +# General redirections for pseudo accounts. +bin: root +daemon: root +adm: root +lp: root +sync: root +shutdown: root +halt: root +mail: root +#news: root +uucp: root +operator: root +games: root +gopher: root +ftp: root +#nobody: root +radiusd: root +nut: root +dbus: root +vcsa: root +canna: root +wnn: root +rpm: root +nscd: root +pcap: root +apache: root +webalizer: root +dovecot: root +fax: root +quagga: root +radvd: root +pvm: root +amanda: root +privoxy: root +ident: root +named: root +xfs: root +gdm: root +mailnull: root +postgres: root +sshd: root +smmsp: root +postfix: root +netdump: root +ldap: root +squid: root +ntp: root +mysql: root +desktop: root +rpcuser: root +rpc: root +nfsnobody: root +notifications: root + +ingres: root +system: root +toor: root +manager: root +dumper: root +abuse: root +nagios: root + +newsadm: news +newsadmin: news +usenet: news +ftpadm: ftp +ftpadmin: ftp +ftp-adm: ftp +ftp-admin: ftp + +# trap decode to catch security attacks +decode: root + +# Person who should get root's mail +root: sysadmin-main + +pagure: /dev/null +reply: /dev/null diff --git a/roles/taiga/tasks/main.yml b/roles/taiga/tasks/main.yml index da023b1928..f6fe65bc18 100644 --- a/roles/taiga/tasks/main.yml +++ b/roles/taiga/tasks/main.yml @@ -6,6 +6,8 @@ - yum: name={{item}} state=present with_items: + - postfix + - nginx - libsemanage-python - postgresql-server @@ -27,6 +29,16 @@ - user: name=taiga comment="Taiga System Account" tags: taiga +### Real quick, let's setup postfix for mail on the side. +### if we ever move this internally, we'll just use bastion. +- name: Add the /etc/aliases file + copy: src=aliases dest=/etc/aliases owner=root mode=644 + notify: restart postfix + tags: taiga +- name: Set postfix to run on boot + service: name=postfix state=running enabled=yes + tags: taiga + ### FIRST, there is a lot of postgres db stuff to setup ### - name: Initialize postgres if necessary command: /usr/bin/postgresql-setup initdb @@ -65,8 +77,6 @@ - name: Set postgresql-server to run on boot service: name=postgresql state=running enabled=yes - ignore_errors: true - notify: restart postgresql tags: taiga # Make sure we have db users diff --git a/roles/taiga/templates/local.py b/roles/taiga/templates/local.py index 08bbc72fdd..c117a9ce5f 100644 --- a/roles/taiga/templates/local.py +++ b/roles/taiga/templates/local.py @@ -31,11 +31,11 @@ REST_FRAMEWORK['EXCEPTION_HANDLER'] = "taiga_contrib_fas_openid_auth.services.ex #CELERY_RESULT_BACKEND = 'redis://localhost:6379/0' #CELERY_ENABLED = True -## Uncomment and populate with proper connection parameters -## for enable email sending. -#EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" -#EMAIL_USE_TLS = False -#EMAIL_HOST = "localhost" -#EMAIL_HOST_USER = "" -#EMAIL_HOST_PASSWORD = "" -#EMAIL_PORT = 25 +# Uncomment and populate with proper connection parameters +# for enable email sending. +EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" +EMAIL_USE_TLS = False +EMAIL_HOST = "localhost" +EMAIL_HOST_USER = "" +EMAIL_HOST_PASSWORD = "" +EMAIL_PORT = 25