• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Mail Configuration Error - Library missing - Postfix

Jay LAne

New Pleskian
Hi, first time post, relatively new to Plesk slightly less new to Linux.

I'm having a problem with send mail from web forms.

My platform:
OS ‪CentOS Linux 7.2.1511 (Core)‬
Plesk version 12.5.30

I'm using postfix for mail with odin antivirus.

Mail forwarding is currently not working and as yet, after looking at different posts, I cannot seem to resolve it.
I've switched to Qmail and back again, installed missing libraries see this link https://kb.plesk.com/en/120923

Here is an excerpt of the mail log (domains have been edited)


Code:
Jul  4 23:16:33 nxcloud postfix/cleanup[6640]: 6B1D12286598: message-id=<[email protected]>
Jul  4 23:16:33 nxcloud /usr/lib64/plesk-9.0/psa-pc-remote[6340]: handlers_stderr: SKIP
Jul  4 23:16:33 nxcloud /usr/lib64/plesk-9.0/psa-pc-remote[6340]: SKIP during call 'check-quota' handler
Jul  4 23:16:33 nxcloud journal: spf filter[6643]: Starting spf filter...
Jul  4 23:16:33 nxcloud /usr/lib64/plesk-9.0/psa-pc-remote[6340]: handlers_stderr: SKIP
Jul  4 23:16:33 nxcloud /usr/lib64/plesk-9.0/psa-pc-remote[6340]: SKIP during call 'spf' handler
Jul  4 23:16:33 nxcloud postfix/qmgr[1830]: 6B1D12286598: from=<[email protected]>, size=793, nrcpt=1 (queue active)
Jul  4 23:16:33 nxcloud postfix-local[6645]: postfix-local: [email protected], [email protected], dirname=/var/qmail/mailnames
Jul  4 23:16:33 nxcloud postfix/smtpd[6637]: disconnect from unknown[109.228.46.215]
Jul  4 23:16:33 nxcloud spamd[2448]: spamd: connection from nxcloud.umsys.co.uk [::1]:44105 to port 783, fd 6
Jul  4 23:16:33 nxcloud spamd[2448]: spamd: using default config for [email protected]: /var/qmail/mailnames/somedomain.com/hello/.spamassassin/user_prefs
Jul  4 23:16:33 nxcloud spamd[2448]: spamd: processing message <[email protected]> for [email protected]:30
Jul  4 23:16:33 nxcloud spamd[2448]: spamd: clean message (-1.0/7.0) for [email protected]:30 in 0.1 seconds, 878 bytes.
Jul  4 23:16:33 nxcloud spamd[2448]: spamd: result: . -1 - ALL_TRUSTED scantime=0.1,size=878,[email protected],uid=30,required_score=7.0,rhost=nxcloud.umsys.co.uk,raddr=::1,rport=44105,mid=<[email protected]>,autolearn=ham autolearn_force=no
Jul  4 23:16:33 nxcloud dovecot: service=lda, [email protected], ip=[]. msgid=<[email protected]>: saved mail to INBOX
Jul  4 23:16:33 nxcloud spamd[1634]: prefork: child states: II
Jul  4 23:16:33 nxcloud journal: plesk sendmail[6651]: handlers_stderr: SKIP
Jul  4 23:16:33 nxcloud journal: plesk sendmail[6651]: SKIP during call 'check-quota' handler
Jul  4 23:16:33 nxcloud journal: plesk sendmail[6653]: sendmail unsuccessfully finished with exitcode 127
Jul  4 23:16:33 nxcloud postfix-local[6645]: Unable to forward original message. sendmail status: 127
Jul  4 23:16:33 nxcloud postfix-local[6645]: Unable to send mail for: [email protected]
Jul  4 23:16:33 nxcloud postfix/pipe[6644]: 6B1D12286598: to=<[email protected]>, relay=plesk_virtual, delay=0.28, delays=0.1/0.01/0/0.18, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/sbin/sendmail: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory plesk sendmail[6653]: sendmail unsuccessfully finished with exitcode 127 4.2.1 Message can not be delivered at this time )

I'm just very stuck at the moment and as my Linux/Plesk knowledge is underdeveloped I would value some guidance.

Many thanks.
 
Hello,

Well I did attempt the solution from the article '126528', followed it through using the rpm2cpio command.
At this time still no positive resolution.

I've discovered that fasthosts switched on smtp 25 blocking for NX cloud servers May 18th - so will be questioning them about this

Just to mention, mail forwarding is definitely not working such as the options set up through a subscription email addresses page in Plesk control panel (see image).

Again the mail log provides this error

Code:
Jul 12 03:34:48 nxcloud postfix/pipe[59169]: 5A3C72132C21: to=<[email protected]>, relay=plesk_virtual, delay=197905, delays=197905/0.02/0/0.24, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/sbin/sendmail: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory plesk sendmail[59192]: Writing to output stream failed. plesk sendmail[59192]: Unable to send message content to MTA 4.2.1 Message can not be delivered at this time )

mailforwarding.png

Any further thoughts would be great.

Many thanks
 
Last edited:
I just put mlocate on the server and then ran the command "locate libsasl2.so"

As you might expect the output was

'locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory'

Just as a point to mention, this server was setup April 18th, it was an import from a VPS using the plesk import function. The old server was Centos 6, the new server is Centos 7.

Old server plesk was 11.5, new server plesk 12.5
 
HI Jay LAne.

'locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory'

pls. keep in mind, that "mlocate" needs a database to function. To update this database ( and to generate it at first start ), you need to perform the command "updatedb".
Tip: Setup a root - crontab, which updates the database regulary ( recommendation is every hour ), so you don't have to care about missing files/folders in the mlocate - database, which may cause missing results with the "locate" - command . ;)
 
okay so after running the updatedb command the output was

Code:
/usr/lib64/libsasl2.so.3
/usr/lib64/libsasl2.so.3.0.0
/var/www/vhosts/chroot/usr/lib64/libsasl2.so.3

The file extension has a .3 on the end and not .2 which is what the process is looking for.
 
Hi Jay LAne,

your current answer brings us now back to @IgorG 's suggestion ( => #2 ), because you can see, that you got the wrong library. Can you pls. desribe in detail, HOW you replaced sendmail, as suggested in the mentioned KB - article? Did you choose the CORRECT for your environment?
 
Thanks for the response,

I recall originally I could not locate a package for Centos 7 Plesk 12.5, so I tried the last version I could find which was the one shown on the second screenshot



no-post-fix-driver-centos7-plesk12_5.png


post-fix-drivers_plesk-12_5_centos-6.png
 
Followed instructions below: (did this again )

uploaded package to temp folder in /root/postfixtemp/

extracted package using

Code:
rpm2cpio postfix-2.11.5-centos6.15081418.x86_64.rpm
| cpio -ivd

navigated to /root/postfixtemp/usr/sbin

located sendmail.postfix

moved it to /usr/bin/sendmail.postfix-bin (overwrote existing file [y])

used 'chmod +x /usr/bin/sendmail.postfix-bin' to set permission to execute (755)

As per instructions (see screenshot)
description-postfix.png
 
Hi Jay LAne,

I recall originally I could not locate a package for Centos 7 Plesk 12.5, so I tried the last version I could find which was the one shown on the second screenshot

Well, you have to wait for an answer from a Plesk-Team-Member, who is able to answer the question, IF your used version is compatible with your current system ( CentOS 7 ). In most cases, this is not the case... sorry to say that ... that's the reason, why there are different download - locations and packages. ;)
 
Plesk on CentOS7 uses OS vendor's postfix package:

# plesk version
Product version: 12.5.30 Update #40
Update date: 2016/07/19 03:32
Build date: 2016/06/08 10:00
OS version: CentOS 7.1.1503
Revision: 344620
Architecture: 64-bit
Wrapper version: 1.2

[root@a10-52-63-116 ~]# rpm -qf /usr/sbin/sendmail
postfix-2.10.1-6.el7.x86_64

[root@a10-52-63-116 ~]# rpm -qi postfix
Name : postfix
Epoch : 2
Version : 2.10.1
Release : 6.el7
Architecture: x86_64
Install Date: Wed 03 Feb 2016 01:31:40 PM NOVT
Group : System Environment/Daemons
Size : 12773475
License : IBM and GPLv2+
Signature : RSA/SHA256, Fri 04 Jul 2014 11:33:15 AM NOVT, Key ID 24c6a8a7f4a80eb5
Source RPM : postfix-2.10.1-6.el7.src.rpm
Build Date : Tue 10 Jun 2014 08:39:36 AM NOVT
Build Host : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem <http://bugs.centos.org>
Vendor : CentOS
 
Hi Igor,

Followed your command structure and this was the output, the only difference appeared to be the install date.


Code:
[root@nxcloud ~]# plesk version
Product version: 12.5.30 Update #40
    Update date: 2016/07/12 13:05
     Build date: 2016/06/08 10:00
     OS version: CentOS 7.2.1511
       Revision: 344620
   Architecture: 64-bit
Wrapper version: 1.2
[root@nxcloud ~]#

[root@nxcloud ~]# rpm -qf /usr/sbin/sendmail
postfix-2.10.1-6.el7.x86_64

[root@nxcloud ~]# rpm -qi postfix
Name        : postfix
Epoch       : 2
Version     : 2.10.1
Release     : 6.el7
Architecture: x86_64
Install Date: Mon 06 Oct 2014 09:57:52 AM BST
Group       : System Environment/Daemons
Size        : 12773475
License     : IBM and GPLv2+
Signature   : RSA/SHA256, Fri 04 Jul 2014 05:33:15 AM BST, Key ID 24c6a8a7f4a80eb5
Source RPM  : postfix-2.10.1-6.el7.src.rpm
Build Date  : Tue 10 Jun 2014 02:39:36 AM BST
Build Host  : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://www.postfix.org
Summary     : Postfix Mail Transport Agent
Description :
Postfix is a Mail Transport Agent (MTA), supporting LDAP, SMTP AUTH (SASL),
TLS

Also ran a plesk repair mail command this was the output

Code:
[root@nxcloud ~]# plesk repair mail -v

Repairing the mail server configuration

  Reconfigure all domains and mailboxes? [Y/n] y
    Reconfiguring all domains and mailboxes ......................... [2016-07-
0 10:01:50] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/mchk
] with exit code [1]
[FAILED]
    - mchk failed:

Error messages: 0; Warnings: 0; Errors resolved: 0


exit status 1
 
Try to re-install this package.
Or try to switch to Qmail and then back to Postfix MTA.
 
I did try the switch to qmail and postfix once before, have done it again just now, still have mail forwarding issue.

The error code is 127 and it does say that it is looking for libsasl2.so.2, in the server folder I see the file libsasl2.so.3 but not the libsasl2.so.2
 
Hi Jay LAne,

I investigated again your issue and came to a workaround ( untested, because I don't have access to a CentOS 7 server ):

Let's assume, that the command:

Code:
yum whatprovides libsasl2.so.2
will result in
Code:
No matches found

... you could consider to test, if a symlink may help:

Code:
ln -s /usr/lib64/libsasl2.so.3.X /usr/lib64/libsasl2.so.2
Pls. make sure to replace the ".X" with the ACTUAL EXISTENT libsasl2.so* - file(s) at "/usr/lib64/".
Afterwards, restart postfix and try to reproduce the former issue, while inspecting the mail.log again. If you experience issues as before, or any other one, pls. consider to post again the current issue from your log and I will try to think about another solution. :D
 
okay so I set the symlink -

Code:
ln -s /usr/lib64/libsasl2.so.3.0.0 /usr/lib64/libsasl2.so.2

Here is the output, there are some comments I've added in the log denoted with // and /* */

Code:
Jul 21 14:27:07 nxcloud postfix-local[17763]: Unable to forward original message. sendmail status: 127
Jul 21 14:27:07 nxcloud postfix-local[17763]: Unable to send mail for: [email protected]  // this is where the mail should forward to
Jul 21 14:27:07 nxcloud postfix/pipe[17771]: 0CB382216931: to=<[email protected]>, relay=plesk_virtual, delay=92413, delays=92413/0.02/0/0.04, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/sbin/sendmail: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory plesk sendmail[17792]: sendmail unsuccessfully finished with exitcode 127 4.2.1 Message can not be delivered at this time )
Jul 21 14:27:07 nxcloud postfix/pipe[17762]: 8F37F2167D9C: to=<[email protected]>, /* this is the domain that the mail is sent to and has a forward option set in plesk mailbox */ relay=plesk_virtual, delay=142914, delays=142914/0.02/0/0.06, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/sbin/sendmail: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory plesk sendmail[17793]: sendmail unsuccessfully finished with exitcode 127 4.2.1 Message can not be delivered at this time )
Jul 21 14:27:07 nxcloud postfix/pipe[17764]: 855FA22830C7: to=<[email protected]>, relay=plesk_virtual, delay=159610, delays=159610/0.02/0/0.05, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/sbin/sendmail: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory plesk sendmail[17800]: sendmail unsuccessfully finished with exitcode 127 4.2.1 Message can not be delivered at this time )
Jul 21 14:27:07 nxcloud postfix/pipe[17739]: B4BF621673DC: to=<[email protected]>, relay=plesk_virtual, delay=0.72, delays=0.65/0.01/0/0.07, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/sbin/sendmail: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory plesk sendmail[17805]: sendmail unsuccessfully finished with exitcode 127 4.2.1 Message can not be delivered at this time )
 
Igor, UFHH01

My server provider company 'Fasthosts' raised a support ticket with Odin (Plesk)

It is as suspected, a mailq issue related to missing library files.
The output before amended symlinks, see below :-

Code:
# mailq
mailq: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
mailq: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
mailq: error while loading shared libraries: libdb-4.7.so: cannot open shared object file: No such file or directory

Correcting the missing library files using symlinks see below:

Code:
[root@nxcloud yum.repos.d]# ln -s /usr/lib64/libpcre.so.1 /usr/lib64/libpcre.so.0
[root@nxcloud yum.repos.d]# ln -s /usr/lib64/mysql/libmysqlclient.so.18 /usr/lib64/libmysqlclient.so.16
[root@nxcloud yum.repos.d]# ln -s /usr/lib64/libdb-5.3.so /usr/lib64/libdb-4.7.so

For others with the same problem - include this first symlink that was mentioned in UFHH01's response

Code:
ln -s /usr/lib64/libsasl2.so.3.0.0 /usr/lib64/libsasl2.so.2

The mail forwarding and web form posting issues are now both resolved.

The plesk post https://kb.plesk.com/en/120923 talks about this issue, and yet I could see the resolution through this.
 
Back
Top