diff --git a/community/nmail/APKBUILD b/community/nmail/APKBUILD
index c9fbdd3eb7d00851e7e7363035b50983cf398473..c23d5a56658a66eed6c9e60f7f5afaa40285f8c1 100644
--- a/community/nmail/APKBUILD
+++ b/community/nmail/APKBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Celeste <cielesti@protonmail.com>
 maintainer="Celeste <cielesti@protonmail.com>"
 pkgname=nmail
-pkgver=5.2.2
+pkgver=5.3.5
 pkgrel=0
 pkgdesc="Terminal-based email client"
 url="https://github.com/d99kris/nmail"
@@ -25,7 +25,9 @@ makedepends="
 	xapian-core-dev
 	"
 subpackages="$pkgname-doc $pkgname-oauth::noarch"
-source="https://github.com/d99kris/nmail/archive/v$pkgver/nmail-$pkgver.tar.gz"
+source="https://github.com/d99kris/nmail/archive/v$pkgver/nmail-$pkgver.tar.gz
+	cmake-openssl.patch
+	"
 
 build() {
 	cmake -B build -G Ninja \
@@ -58,5 +60,6 @@ oauth() {
 }
 
 sha512sums="
-99a2b7c5d90e65d2a85e63b8d3529bb5aa42f5cc5d545a42df9efd3e8e2b0fc77a18fdb3be97b2b38d278d23d135fc8c473d018fd8d51f5638004636230286de  nmail-5.2.2.tar.gz
+a97ada7dcc5b238687f070c8e365dc94a0fc2860e3680b6f9cd973f37bd5ea58c979d68db2919bb977e3e6d10774c780b2502ecb295e5cae01aaf228ee8ba48f  nmail-5.3.5.tar.gz
+6283b2f4b456edd840ef2f4bdcc02ffe6c61cfd326f6526920756fd8aeb19d46c660a7c38ef75f7021075710aca9b9dc32a5c5f4d2d2ddbe47252a260838d21e  cmake-openssl.patch
 "
diff --git a/community/nmail/cmake-openssl.patch b/community/nmail/cmake-openssl.patch
new file mode 100644
index 0000000000000000000000000000000000000000..649edf4581d6a62ee87a9beccb81ff2b354d0ef4
--- /dev/null
+++ b/community/nmail/cmake-openssl.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -242,7 +242,7 @@
+ 
+ # Linking
+ target_link_libraries(nmail PUBLIC
+-                      ${CURSES_LIBRARIES} ${OPENSSL_SSL_LIBRARY} ${SQLite3_LIBRARIES}
++                      ${CURSES_LIBRARIES} ${OPENSSL_LIBRARIES} ${SQLite3_LIBRARIES}
+                       ${XAPIAN_LIBRARIES} ${LIBETPAN_LIBRARY} ${CYRUS_SASL_LIBRARY}
+                       ${MAGIC_LIBRARY} ${LIBUUID_LIBRARIES}
+                       pthread ${CMAKE_DL_LIBS})