Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Centos 7 sendmail command line using alternatives
  •  
markham

Messages: 2
Karma: 0
Send a private message to this user
I know there are some install instructions around that tell how to copy the Kerio sendmail binary so you can use software that tries to use the sendmail command. However,on Centos 7 (and probably Red Hat 7) there is a nice way to use that binary without copying anything.

alternatives --install /usr/sbin/sendmail mta /opt/kerio/mailserver/sendmail 120 --slave /lib/libktcrypto.so.1.0.0 mta-libktcrypto /opt/kerio/mailserver/libktcrypto.so.1.0.0 --slave /lib/libkticonv.so.2 mta-libkticonv /opt/kerio/mailserver/libkticonv.so.2 --slave /lib/libktssl.so.1.0.0 mta-libktssl /opt/kerio/mailserver/libktssl.so.1.0.0 --slave /lib/libktz.so.1 mta-libktz /opt/kerio/mailserver/libktz.so.1


This command will add the Kerio sendmail binary as an alternative mta. It will also set it well above the 30 priority that the postfix sendmail binary comes set at so it will activate immediately unless you have manually set the mta alternative to something else.

Using this method you will not need to worry about copying a new binary if you do an upgrade to Kerio and one of the libraries have changed or something. Just remember to have Kerio allow relaying from 127.0.0.1 and you are good to go.

One other note. You may need to do an ldconfig command to reload the libraries you have linked in with the above alternatives command. I don't remember if I had to do that or not.
  •  
clan

Messages: 231
Karma: 21
Send a private message to this user
I tried this on an Ubuntu test installation with Connect 8.4.0.

It seems to work using update-alternatives, which seems to support the same options as Centos alternatives. Ubuntu does not seem to use the mta target, so I did not see any need to use the --slave switches to override the other targets as well.

While this seems to work, I suspect, that, since Ubuntu doesn't seem to use alternatives for the mta, an accidental installation of another mailserver will destroy the link. Changing the Ubuntu package to provide mail-transport-agent should at least prohibit accidental installs of other servers.

  •  
markham

Messages: 2
Karma: 0
Send a private message to this user
On Centos, update-alternatives is just a link to alternatives so as you suggest it is probably the same. Centos uses the mta group name for mail servers. Ubuntu may use something different or it may not have a standardized group for mail servers. It depends on if they think you may want to use different mail servers. On Centos you can use several different mtas depending on what you are comfortable with and it is possible to have more than one mta installed. Thus the need for alternatives. Smile

Depending on your version of update-alternatives you may be able to use the --list to see what groups you have.

update-alternatives --list


Or you can always go and look in the /etc/alternatives directory.

I added the slaves so that when the Kerio sendmail binary is the active alternative the libraries that the Kerio knowledge base said it requires are also there. If you already have those libraries in your operating system you may not need them. Or, the documentation I saw may be old and it may no longer require those libraries. However, if that were the case, I don't think the libraries would still be included. Or, you may have actually used the real sendmail binary. You can check that by watching the mail logs in the Kerio gui when you use the Kerio sendmail binary. It will show the messages it's sendmail binary sends.
  •  
clan

Messages: 231
Karma: 21
Send a private message to this user
Our Kerio server has no other MTA installed, and I did check the logs, so I am quite sure I used the Kerio sendmail.

The trouble with Kerios Ubuntu package really is, that Provides: mail-transport-agent is missing from it, so that installation of any package requiring sendmail will pull in exim or postfix.

The other problem is, that Ubuntu, and possibly Debian, don't seem to believe in having more than one MTA installed, so installing a second MTA will remove the first one.

This also explains why there is no mta (or similar) group registered with alternatives on Ubuntu/Debian servers.


Previous Topic: Using Kerio as an archive destination
Next Topic: Two questions about 8.4
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Mon Jun 26 19:27:19 CEST 2017

Total time taken to generate the page: 0.00395 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.