Hello!
Please see the following:
https://www.ibm.com/docs/en/aix/7.2?topic=s-sendmail-command#sendmail__migrate_sendmail
https://www.ibm.com/docs/en/aix/7.2?topic=m-mailq-command
https://www.ibm.com/docs/en/aix/7.2?topic=files-sendmailcf-submitcf-file
..with regards to the change from AIX 7.2 pre-TL4 to TL4/5 sendmail.
I´ve solved this via an ansible job (not the nicest code but doing the job):
- name: Correct rc.tcpip, chown the aliases.db and copy our submit.cf/aliases templates.
hosts: all
become: yes
gather_facts: true
vars:
- RCTCPIP: /etc/rc.tcpip
- RCTCPIP_ANSIBORG: /etc/rc.tcpip.org.ansible
- SUBMITCFTMPL: /SCRIPTS/ANSIBLE/AIX/TEMPLATES/submit.cf
- ALIASESTMPL: /SCRIPTS/ANSIBLE/AIX/TEMPLATES/aliases
tasks:
- name: Change file ownership of aliasesDB
file:
path: /etc/mail/aliases.db
owner: root
group: smmsp
mode: '0640'
when: ansible_local.oslevel == "7200-04-04-2114"
- name: Ändern {{ RCTCPIP }} mittels sed
shell: |
grep -q sm-msp-queue {{ RCTCPIP }} ; [ $? == 1 ] && cp {{ RCTCPIP }} {{ RCTCPIP_ANSIBORG }}
grep -q sm-msp-queue {{ RCTCPIP }} ; [ $? == 1 ] && cat {{ RCTCPIP_ANSIBORG }} | sed -e 's/^#\/usr\/lib\/sendmail -q${qpi}/\/usr\/lib\/sendmail -L sm-msp-queue -Ac -q${qpi}/' > {{ RCTCPIP }}
register: rctcpip_output
when: ansible_local.oslevel == "7200-04-04-2114"
failed_when: rctcpip_output.rc > 1
- name: Copy template submit.cf and aliases to /etc/mail/
ansible.builtin.copy:
src: "{{ item }}"
dest: /etc/mail/
owner: root
group: system
mode: '0644'
backup: yes
loop:
- "{{ SUBMITCFTMPL }}"
- "{{ ALIASESTMPL }}"
when: ansible_local.oslevel == "7200-04-04-2114"
- name: Ausloesen newaliases nach Austausch /etc/mail/aliases
shell: |
newaliases
register: aliases_output
when: ansible_local.oslevel == "7200-04-04-2114"
failed_when: aliases_output.rc > 1
- name: /rc/rc.tcpip aufrufen wenn die sm-msp-queue noch nicht laeuft
shell: |
[ $(ps -fU smmsp|grep -v UID|awk '{print $1}'|wc -w) -ne 1 ] && /etc/rc.tcpip
register: rctcpip_output
when: ansible_local.oslevel == "7200-04-04-2114"
failed_when: rctcpip_output.rc > 1
HTH,
Ciao,
Steve
------------------------------
Stephan Dietl
------------------------------