On Tue, Aug 19, 2014, at 07:47 AM, Wietse Venema wrote:
> In that case, it should be possible to submit an email mesage (whether
> it delivers properly depends on correct configuration in
> /usr/local/etc/postfix):
Thorugh this entire biz, I've been able to submit/deliver mail. Just the logs'
permission complaints are what started this.
> Once this delivers mail as expected, you need to configure the
> system to use the Postfix sendmail command instead of exim.
>
> This should be some automated procedure, for example, see "man
> alternatives", "man mailwrapper", etc.
>
> The result will be, among other things, that:
>
> /usr/sbin/sendmail -> /usr/local/sbin/sendmail
> /usr/lib/sendmail -> /usr/local/sbin/sendmail
>
> And perhaps some other configuration that depends on the details
> of your specific distribution.
I'm sort-of there.
Get rid of the 'big' system mail stuff, and a couple of pkgs that require a
sendmail equivalent
rpm -e --nodeps lsb google-chrome-stable postfix exim sendmail
Prevent re-install of the mail stuff
cat << EOF > /etc/zypp/locks
type: package
match_type: exact
solvable_name: sendmail
solvable_name: postfix
solvable_name: exim
EOF
Install one of the sendmail-requiring apps
zypper in --force google-chrome-stable
It installs a lightweight alternative, msmtp, into system paths
The following 5 NEW packages are going to be installed:
google-chrome-stable libgsasl7 lsb msmtp msmtp-mta
Which 'takes over' /usr/sbin/sendmail
ls -al /usr/sbin/sendmail
lrwxrwxrwx 1 root root 12 Aug 19 07:51 /usr/sbin/sendmail ->
../bin/msmtp*
There's no sendmail 'alternative' by default
update-alternatives --get-selections | egrep -i "mail|postfix|exim|smtp"
(nothing)
So create one, pointing to 'my' Postfix install
update-alternatives --install "/usr/sbin/sendmail" "sendmail"
"/usr/local/sbin/sendmail" 1000
and force 'manual mode'
update-alternatives --set sendmail /usr/local/sbin/sendmail
update-alternatives --get-selections | egrep -i "mail|postfix|exim|smtp"
sendmail manual /usr/local/sbin/sendmail
Now
ls -al /usr/sbin/sendmail
lrwxrwxrwx 1 root root 26 Aug 19 08:02 /usr/sbin/sendmail ->
/etc/alternatives/sendmail*
ls -al /etc/alternatives/sendmail
lrwxrwxrwx 1 root root 24 Aug 19 08:02
/etc/alternatives/sendmail -> /usr/local/sbin/sendmail*
Try to clobber it. Will it?
zypper in --force exim
...
The following NEW package is going to be installed:
exim
The following package is going to be REMOVED:
msmtp-mta
...
It half-does
ls -al /usr/sbin/sendmail
lrwxrwxrwx 1 root root 4 Aug 19 08:06 /usr/sbin/sendmail ->
exim*
ls -al /etc/alternatives/sendmail
lrwxrwxrwx 1 root root 24 Aug 19 08:02
/etc/alternatives/sendmail -> /usr/local/sbin/sendmail*
The alternative is still set
update-alternatives --get-selections | egrep -i "mail|postfix|exim|smtp"
sendmail manual
/usr/local/sbin/sendmail
What I don't know is do apps that 'use sendmail' look specifically for
/usr/sbin/sendmail, or do they (first/only) look for and use the
/etc/alternative -> /usr/local/sbin/sendmail ?
If the former, then either I need to figure out how to get the installer to NOT
clobber the bin path when an alternative is defined/set, or simply reset the
alternative on boot.
If the latter, I think I'd be OK ...
Terry