Email on Linux
DocOrigin supports the _sendmail function on Linux. This support is accomplished through the use of the extremely popular curl facility. In general, Linux OSes include curl in their distributions. curl supports many different protocols. For sending mail, the smtp protocol must be supported. The version of curl installed on your Linux OS may or may not include support for the smtp protocol. If it does not, you will need to update your version of curl to a version that does support smtp.
At the time of this writing, RHEL 6 (Red Hat Enterprise Linux 6) shipped curl version 7.19.7, and that does not include support for smtp. At present, the current version of curl is 7.37.0. curl has supported smtp as far back as version 7.21. RHEL 7 ships a curl (7.29) that does support smtp.
curl is available for free from The curl Download site.
curl is available for many platforms. The most popular Linux platform for DocOrigin is commercially supported Red Hat or its community-supported mirror: CentOS.
Nothing remains static. Linux variations and feature development are constant. DocOrigin cannot distribute curl and the libraries it uses for every platform and version. Distribution licensing is also very complicated, but curl is free for you to download, install and use.
At the curl download site, you can use the Download Wizard or search the long table for your OS. At least for RHEL6/CentOS6, this will lead you to another page with an incredibly long list of versions available for download.
CAUTION
If you are after the latest version, 7.37.0, for RHEL6, 64-bit you will arrive at:
http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/curl-7.37.1-3.0.cf.rhel6.x86_64.rpm
Download it, or use wget to fetch it to your target system.
On the same page is the corresponding version of libcurl:
http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/libcurl-7.37.1-3.0.cf.rhel6.x86_64.rpm
Download it, or use wget to fetch it to your target system.
The comments at the top of this page of links inform you that curl needs some additional libraries: c-ares, libidn, libmetalink, and libssh2. And it gives you a location to fetch those libraries:
http://mirror.city-fan.org/ftp/contrib/libraries/
When you go to that page you can find the RHEL6, x86_64 versions of those libraries. Note libidn versions stop at RHEL5. That's because as of RHEL6, that library is included with the OS. But the rest are available as:
http://mirror.city-fan.org/ftp/contrib/libraries/c-ares-1.10.0-3.0.cf.rhel6.x86_64.rpm
http://mirror.city-fan.org/ftp/contrib/libraries/libmetalink-0.1.2-6.rhel6.x86_64.rpm
http://mirror.city-fan.org/ftp/contrib/libraries/libssh2-1.4.3-15.0.cf.rhel6.x86_64.rpm
There are lots of other libraries. Try not to get distracted. As time moves on, depending on your OS and its version, you will likely need to select slightly different rpm files.
Having downloaded the required rpm files, you now need to install them. This will require root privileges as it does install into /usr/bin and /usr/lib64.
cd /tmp wget http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/curl-7.37.1-3.0.cf.rhel6.x86_64.rpm wget http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/libcurl-7.37.1-3.0.cf.rhel6.x86_64.rpm wget http://mirror.city-fan.org/ftp/contrib/libraries/c-ares-1.10.0-3.0.cf.rhel6.x86_64.rpm wget http://mirror.city-fan.org/ftp/contrib/libraries/libmetalink-0.1.2-6.rhel6.x86_64.rpm wget http://mirror.city-fan.org/ftp/contrib/libraries/libssh2-1.4.3-15.0.cf.rhel6.x86_64.rpm # sudo rpm -Uvh c-ares*.rpm sudo rpm -Uvh libmetalink*.rpm sudo rpm -Uvh libssh2*.rpm sudo rpm -Uvh curl*.rpm libcurl*.rpm
Of course, you will have to pay attention to all messages. Perhaps it will report the need for other libraries which you will have to resolve for your OS and version. At the end of it all, you should have a /usr/bin/curl. Perhaps you will get a message about an installed library being incompatible. One recourse is to uninstall (erase) it. But that's at your risk. E.g.
sudo yum erase libcurl-devel-7.19.7-37.el6_4.x86_64 --assumeyes
A good test is to run:
/usr/bin/curl --version
and to look at the version of curl and the supported protocols that it supports.
Once curl is installed, please cd to wherever you have DocOrigin Merge installed. Typically, /var/DocOrigin/DO/Bin
but that may vary depending on your version of DocOrigin. If you have an older version of DocOrigin, then you must:
cd the-location-of-DocOrigin-Merge rm -f curl rm -f libcurl* ln -s /usr/bin/curl curl
That will provide a symbolic link to the just installed curl and it will remove older, local DocOrigin versions of libcurl, if any exist.
At that point, you should be able to use the DocOrigin _sendmail function. If you have a post 3.0.003.15 version of DocOrigin installed you may wish to run the email.sh
shell script that is in .../DO/Bin for it to do some checking on your email support via curl.
Updating cURL via yum
The posting at http://serverfault.com/questions/321321/upgrade-curl-to-latest-on-centos provides a potentially easier way. But again, things change. Use this as only a solution that worked 'at one time'. By using yum you don't have to worry about dependencies; it's all worked out for you.
sudo yum clean all cd /etc/yum.repos.d sudo gedit city-fan.repo
Put in the following content, but do update that baseurl. Perhaps you use rhel5
, for example/
[CityFan] name=City Fan Repo baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/ enabled=1 gpgcheck=0
Save.
sudo yum install curl
And it loads and installs whatever is necessary. Booyah!