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
------------------------------
Original Message:
Sent: Mon February 21, 2022 06:40 AM
From: Dieter Mosbach
Subject: mutt fails as user
When trying to send mails as a user with mutt it fails with:
Program mode requires special privileges, e.g., root or TrustedUser.
Error sending message, child exited 78 ().
Could not send the message.
/var/log/mail:
Feb 21 12:28:12 sps98321 mail:crit sendmail[11534816]: NOQUEUE: SYSERR(mosbdi): can not chdir(/var/spool/mqueue/): Permission denied
drwxrwx--- 2 root system 256 Feb 21 12:28 /var/spool/mqueue/
newest mutt on newest AIX:
root@sps:/root# rpm -qi mutt
Name : mutt
Version : 2.1.3
Release : 1
Architecture: ppc
Install Date: Mon Feb 21 12:27:39 CET 2022
Group : Unspecified
Size : 9277381
License : GPLv2+ and Public Domain
Signature : (none)
Source RPM : mutt-2.1.3-1.src.rpm
Build Date : Thu Sep 30 13:49:22 CEST 2021
Build Host : pokndd10.pok.stglabs.ibm.com
Packager : IBM AIX Toolbox <https://ibm.biz/AIXToolbox>
URL : http://www.mutt.org
Bug URL : https://ibm.biz/aixoss_forum
Summary : A text mode mail user agent
Description :
Mutt is a small but very powerful text-based MIME mail client. Mutt
is highly configurable, and is well suited to the mail power user with
advanced features like key bindings, keyboard macros, mail threading,
regular expression searches and a powerful pattern matching language
for selecting groups of messages.
root@sps:/root# oslevel -s
7200-05-03-2148
root@sps:/root# id smmsp
uid=207(smmsp) gid=14(smmsp) groups=1(staff)
How can we fix that?
------------------------------
Dieter Mosbach
------------------------------
#AIXOpenSource