Difference between revisions of "How to "fix" system's sendmail to use that of zimbra"

m
m
Line 8: Line 8:
 
'''This article is valid is outdated for version 8.0 and later.  The zimbra-mta package registers itself as an alternative in those versions.'''
 
'''This article is valid is outdated for version 8.0 and later.  The zimbra-mta package registers itself as an alternative in those versions.'''
  
(Supposing system has alternatives, like debian, centos, RHEL, ...)
+
For Zimbra Collaboration 8.7 and CentOS, use the next:
 +
<pre>[root@zimbra ~]#  /usr/sbin/alternatives --install /usr/sbin/sendmail mta /opt/zimbra/common/sbin/sendmail 25 \
 +
      --slave /usr/bin/mailq mta-mailq /opt/zimbra/common/sbin/mailq \
 +
      --slave /usr/bin/newaliases mta-newaliases /opt/zimbra/common/sbin/newaliases \
 +
      --slave /usr/share/man/man1/mailq.1.gz mta-mailqman /opt/zimbra/common/share/man/man1/mailq.1 \
 +
      --slave /usr/share/man/man1/newaliases.1.gz mta-newaliasesman /opt/zimbra/common/share/man/man1/newaliases.1 \
 +
      --slave /usr/share/man/man8/sendmail.8.gz mta-sendmailman /opt/zimbra/common/share/man/man1/sendmail.1 \
 +
      --slave /usr/share/man/man5/aliases.5.gz mta-aliasesman /opt/zimbra/common/share/man/man5/aliases.5 \
 +
      --initscript zimbra
 +
</pre>
  
 
First check what's there now:
 
First check what's there now:
 
 
       [root@zimbra ~]# ls -l /usr/sbin/sendmail
 
       [root@zimbra ~]# ls -l /usr/sbin/sendmail
 
       lrwxrwxrwx 1 root root 21 Jun 23 12:21 /usr/sbin/sendmail -> /etc/alternatives/mta
 
       lrwxrwxrwx 1 root root 21 Jun 23 12:21 /usr/sbin/sendmail -> /etc/alternatives/mta
Line 30: Line 38:
 
       Current `best' version is /usr/sbin/sendmail.sendmail.                 
 
       Current `best' version is /usr/sbin/sendmail.sendmail.                 
  
Then install alternative and check it:
+
Then install alternative and check it:
 
 
 
       [root@zimbra ~]# update-alternatives --install /usr/sbin/sendmail mta-sendmail /opt/zimbra/postfix/sbin/sendmail 25
 
       [root@zimbra ~]# update-alternatives --install /usr/sbin/sendmail mta-sendmail /opt/zimbra/postfix/sbin/sendmail 25
 
       [root@zimbra ~]# update-alternatives --display mta-sendmail
 
       [root@zimbra ~]# update-alternatives --display mta-sendmail
Line 39: Line 46:
 
       Current `best' version is /opt/zimbra/postfix/sbin/sendmail.
 
       Current `best' version is /opt/zimbra/postfix/sbin/sendmail.
  
If on RHEL or CentOS, use the following:
+
If on RHEL or CentOS, use the following:
  
 
       [root@zimbra ~]# /usr/sbin/alternatives --install /usr/sbin/sendmail mta /opt/zimbra/postfix/sbin/sendmail 25 \
 
       [root@zimbra ~]# /usr/sbin/alternatives --install /usr/sbin/sendmail mta /opt/zimbra/postfix/sbin/sendmail 25 \
Line 50: Line 57:
 
         --initscript zimbra
 
         --initscript zimbra
 
       [root@zimbra ~]# /usr/sbin/alternatives --config mta
 
       [root@zimbra ~]# /usr/sbin/alternatives --config mta
 
For Zimbra Collaboration 8.7 and CentOS, use the next:
 
<pre>[root@zimbra ~]#  /usr/sbin/alternatives --install /usr/sbin/sendmail mta /opt/zimbra/common/sbin/sendmail 25 \
 
      --slave /usr/bin/mailq mta-mailq /opt/zimbra/common/sbin/mailq \
 
      --slave /usr/bin/newaliases mta-newaliases /opt/zimbra/common/sbin/newaliases \
 
      --slave /usr/share/man/man1/mailq.1.gz mta-mailqman /opt/zimbra/common/share/man/man1/mailq.1 \
 
      --slave /usr/share/man/man1/newaliases.1.gz mta-newaliasesman /opt/zimbra/common/share/man/man1/newaliases.1 \
 
      --slave /usr/share/man/man8/sendmail.8.gz mta-sendmailman /opt/zimbra/common/share/man/man1/sendmail.1 \
 
      --slave /usr/share/man/man5/aliases.5.gz mta-aliasesman /opt/zimbra/common/share/man/man5/aliases.5 \
 
      --initscript zimbra
 
</pre>
 
  
 
  This will fix logwatch and any other locallly generated emails on RHEL/CentOS systems.
 
  This will fix logwatch and any other locallly generated emails on RHEL/CentOS systems.

Revision as of 08:52, 4 October 2017

How to fix system's sendmail to use that of Zimbra

   KB 2570        Last updated on 2017-10-4  




0.00
(0 votes)


This article is valid is outdated for version 8.0 and later. The zimbra-mta package registers itself as an alternative in those versions.

For Zimbra Collaboration 8.7 and CentOS, use the next:

[root@zimbra ~]#  /usr/sbin/alternatives --install /usr/sbin/sendmail mta /opt/zimbra/common/sbin/sendmail 25 \
       --slave /usr/bin/mailq mta-mailq /opt/zimbra/common/sbin/mailq \
       --slave /usr/bin/newaliases mta-newaliases /opt/zimbra/common/sbin/newaliases \
       --slave /usr/share/man/man1/mailq.1.gz mta-mailqman /opt/zimbra/common/share/man/man1/mailq.1 \
       --slave /usr/share/man/man1/newaliases.1.gz mta-newaliasesman /opt/zimbra/common/share/man/man1/newaliases.1 \
       --slave /usr/share/man/man8/sendmail.8.gz mta-sendmailman /opt/zimbra/common/share/man/man1/sendmail.1 \
       --slave /usr/share/man/man5/aliases.5.gz mta-aliasesman /opt/zimbra/common/share/man/man5/aliases.5 \
       --initscript zimbra

First check what's there now:

     [root@zimbra ~]# ls -l /usr/sbin/sendmail
     lrwxrwxrwx 1 root root 21 Jun 23 12:21 /usr/sbin/sendmail -> /etc/alternatives/mta
     [root@zimbra ~]# update-alternatives --display mta
     mta - status is auto.                             
      link currently points to /usr/sbin/sendmail.sendmail
     /usr/sbin/sendmail.sendmail - priority 90            
      slave mta-mailq: /usr/bin/mailq.sendmail            
      slave mta-newaliases: /usr/bin/newaliases.sendmail  
      slave mta-rmail: /usr/bin/rmail.sendmail            
      slave mta-sendmail: /usr/lib/sendmail.sendmail      
      slave mta-pam: /etc/pam.d/smtp.sendmail             
      slave mta-sendmailman: /usr/share/man/man8/sendmail.sendmail.8.gz
      slave mta-mailqman: /usr/share/man/man1/mailq.sendmail.1.gz      
      slave mta-newaliasesman: /usr/share/man/man1/newaliases.sendmail.1.gz
      slave mta-aliasesman: /usr/share/man/man5/aliases.sendmail.5.gz      
     Current `best' version is /usr/sbin/sendmail.sendmail.                

Then install alternative and check it:

     [root@zimbra ~]# update-alternatives --install /usr/sbin/sendmail mta-sendmail /opt/zimbra/postfix/sbin/sendmail 25
     [root@zimbra ~]# update-alternatives --display mta-sendmail
     mta-sendmail - status is auto.
      link currently points to /opt/zimbra/postfix/sbin/sendmail
     /opt/zimbra/postfix/sbin/sendmail - priority 25
     Current `best' version is /opt/zimbra/postfix/sbin/sendmail.

If on RHEL or CentOS, use the following:

     [root@zimbra ~]# /usr/sbin/alternatives --install /usr/sbin/sendmail mta /opt/zimbra/postfix/sbin/sendmail 25 \
       --slave /usr/bin/mailq mta-mailq /opt/zimbra/postfix/sbin/mailq \
       --slave /usr/bin/newaliases mta-newaliases /opt/zimbra/postfix/sbin/newaliases \
       --slave /usr/share/man/man1/mailq.1.gz mta-mailqman /opt/zimbra/postfix/man/man1/mailq.1 \
       --slave /usr/share/man/man1/newaliases.1.gz mta-newaliasesman /opt/zimbra/postfix/man/man1/newaliases.1 \
       --slave /usr/share/man/man8/sendmail.8.gz mta-sendmailman /opt/zimbra/postfix/man/man1/sendmail.1 \
       --slave /usr/share/man/man5/aliases.5.gz mta-aliasesman /opt/zimbra/postfix/share/man/man5/aliases.5 \
       --initscript zimbra
      [root@zimbra ~]# /usr/sbin/alternatives --config mta
This will fix logwatch and any other locallly generated emails on RHEL/CentOS systems.
Verified Against: Unknown Date Created: 8/20/2008
Article ID: https://wiki.zimbra.com/index.php?title=How_to_%22fix%22_system%27s_sendmail_to_use_that_of_zimbra Date Modified: 2017-10-04



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search