According to postfix's Official Release Notes
Postfix stable release 2.11.0 is available. This release ends support for Postfix 2.7.
I see
Let's check the default and remi packages.
$ postconf | grep mail_version
mail_version = 2.6.6
remi
remi
$ yum install postfix --enablerepo=remi
Package Arch Version Repository Size
=========================================================================================================
Updating:
postfix x86_64 2:2.6.6-6.el6_5 updates 2.0 M
It's 2.6.6 so install 2.11.0 in source
.
├── files
│ ├── main.cf
│ ├── postfix
│ └── postfix-2.11.0.tar.gz
├── handlers
│
├── tasks
│ └── main.yml
├── templates
│
└── vars
└── main.yml
vars/main.yml
postfix_file: postfix-2.11.0
task/main.yml
#stop postfix
- name: "Operation | be sure postfix is stopped"
service: name=postfix state=stopped
#Remove the pre-installed postfix
- name: "Remove | pre installed postfix"
yum: name="postfix" state=absent
#Install the required packages
- name: "Install | dependent package"
yum: name={{ item }} state=installed enablerepo=remi
with_items:
- db4*-devel
- mysql
- mysql-devel
- pcre-devel
- cyrus-sasl-devel
- openldap-devel
#Install postfix source
- name: "Install | put postfix src file"
copy: src=roles/postfix/files/{{ postfix_file }}.tar.gz dest=/usr/local/src
- name: "Install | unpack postfix src [need 'make install' at the remote server]"
shell: cd /usr/local/src; tar zxvf {{ postfix_file }}.tar.gz; cd {{ postfix_file }}; make
#Install postfix as a package
- name: "Install | postfix package [Don't need to install this when did from src]"
yum: name=postfix state=installed enablerepo=remi
#Added postfix user
- name: "Setup | add postfix user and group"
user: name=postfix system=yes createhome=no home=/var/spool/postfix shell=/sbin/nologin
#Set up postfix conf
- name: "Setup | put postfix conf"
copy: src=roles/postfix/files/main.cf dest=/etc/postfix mode=644
#postfix startup file installation
- name: "Setup | put postfix init file"
copy: src=roles/postfix/files/postfix dest=/etc/init.d mode=755
# (Inadvertently install/usr/local/Set a symbolic link (because I made it sbin)
- name: "Setup | create symlink"
file: src=/usr/local/sbin/{{ item }} dest=/usr/sbin/{{ item }} state=link
with_items:
- postconf
- postlog
- postalias
- postcat
- postdrop
- postkick
- postlock
- postmap
- postmulti
- postqueue
- postsuper
#Postfix startup, autostart settings
- name: "Setup | be sure postfix is running and enabled"
service: name=postfix state=running enabled=yes
Most of them are finished by doing make and make install after extracting the source, but when make install with postfix, the console asks the installation directory etc. with CUI.
Therefore, if you try to do it with the above ansible, the processing will not proceed endlessly while waiting for input. I want to know what to do in such a case (because it seems to be usable in another case). .. ..
Since the mail server is not so clustered, for now, I made install on each server, but I want to enjoy it too.
Recommended Posts