muquit / mailsend

A program to send mail via SMTP from command line
Other
295 stars 68 forks source link

Not Compiled OpenSSL Error #33

Closed muquit closed 10 years ago

muquit commented 10 years ago

From d.rikhte...@gmail.com on November 22, 2013 04:15:28

What steps will reproduce the problem? 1. I want to send email with gmail account

  1. I got this: Not Compiled OpenSSL, some auth methods will be unavailable What is the expected output? What do you see instead? # mailsend -info -port 465 -ssl -smtp smtp.gmail.com Error: '-ssl' not available, not compiled with OpenSSL

    mailsend -info -port 587 -smtp smtp.gmail.comConnecting to SMTP server: smtp.gmail.com at Port: 587

Connection timeout: 5 secs [S] 220 mx.google.com ESMTP lj19sm30965234vdb.7 - gsmtp [C] EHLO localhost [S] 250-mx.google.com at your service, [95.38.164.219] [S] 250-SIZE 35882577 [S] 250-8BITMIME [S] 250-STARTTLS [S] 250-ENHANCEDSTATUSCODES [S] 250 CHUNKING [C] STARTTLS [S] 220 2.0.0 Ready to start TLS Error: Not Compiled with OpenSSL, will not try STARTTLS What version of the product are you using? On what operating system? mailsend -V mailsend Version: @(#) mailsend v1.17b12 Not Compiled OpenSSL, some auth methods will be unavailable

mint 14-64bit

Original issue: http://code.google.com/p/mailsend/issues/detail?id=33

muquit commented 10 years ago

From d.rikhte...@gmail.com on November 22, 2013 04:12:42

I also tried to compile with openssl but no success: ./configure --with-openssl-includes=/usr/include/openssl --with-openssl-libraries=/usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines

... checking for getaddrinfo... yes checking for OpenSSL... no configure: creating ./config.status ...

muquit commented 10 years ago

From muq...@gmail.com on November 22, 2013 08:29:41

Try: ./configure --with-openssl=/usr This works on all ubuntu based linux. Tested on mint 14-32bit. If you still have problem, another solution is to compile openssl yourself and install it in a specific directory and specify that directory with --with-openssl.

Note: mailsend works fine on 64 bit systems.

Thanks.

muquit commented 10 years ago

From d.rikhte...@gmail.com on November 22, 2013 10:20:24

Hi After use your command i got this: checking for OpenSSL... yes checking whether linking with OpenSSL requires -ldl... yes checking if masterkey should be generated... no configure: creating ./config.status config.status: creating Makefile config.status: creating libs/libmsock/Makefile config.status: creating libs/libmutils/mkey.c config.status: creating libs/libmutils/Makefile config.status: creating libs/libsll/Makefile

and after install completed i got same error: mrg-Asus-L mailsend-1.17b14 # mailsend -info -port 465 -ssl -smtp smtp.gmail.com Error: '-ssl' not available, not compiled with OpenSSL

mrg-Asus-L mailsend-1.17b14 # mailsend -V mailsend Version: @(#) mailsend v1.17b14 Not Compiled OpenSSL, some auth methods will be unavailable

muquit commented 10 years ago

From muq...@gmail.com on November 22, 2013 18:45:40

That does not make any sense, clearly OpenSSL was found. Do a make clean and then make and make sure compilation succeeds. Try: ./mailsend -V to make sure it tells that it is compiled with OpenSSL. It's possible some old version was found in the path.

Thanks.

muquit commented 10 years ago

From muq...@gmail.com on November 27, 2013 16:40:56

Did you figure out the issue? If there are any compilation errors, I would like to know that.

Thanks.

muquit commented 10 years ago

From d.rikhte...@gmail.com on November 28, 2013 00:52:23

Actually No i got same error i used the mailsend inside the source folder and i'm pretty sure i didn't use previous compiled and use the version compiled with ssl it's easy to test just download (mint15-64bit) http://www.linuxmint.com/edition.php?id=136 and install on virtualbox: https://www.virtualbox.org/wiki/Downloads Test it yourself

I have another question and it is : are there any way to send email in UTF-8 encoding or without any encoding just normal html? mailsend send emails in base64 encode and some devices or mail client doesn't support base64 encode so they show the content of email in strange characters.

It's header of one of mail: --NFQ7mkR/KTdhVJqb Content-Type: text/html Content-Disposition: inline Content-Transfer-Encoding: base64

DQoJCTxkaXYgYWxpZ249ImNlbnRlciIgc3R5bGU9IndpZHRoOjEwMCU7Ij4NCgkJCTxkaXYg YWxpZ249InJpZ2h0IiBzdHlsZT0id2lkdGg6NjgwcHg7ZGlyZWN0aW9uOnJ0bDsiPg0KCQkJ CTx0YWJsZSBjZWxscGFkZGluZz0iMCIgY2VsbHNwYWNpbmc9IjAiIHN0eWxlPSJ3aWR0aDox MDAlIj4NCgkJCQkJPHRyPg0KCQkJCQkJPHRkPjxkaXYgaWQ9ImhlYWRlciI+DQoJPHRhYmxl

muquit commented 10 years ago

From muq...@gmail.com on November 30, 2013 07:16:54

Compiles and works on mint 64 bit:

$ uname -a Linux linuxmint 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/issue Linux Mint 14 Nadia

$ cd mailsend-1.17b14 $ ./configure --with-openssl=/usr ... ... checking for OpenSSL... yes checking whether linking with OpenSSL requires -ldl... yes ... $ make clean $ make

$ ./mailsend -V mailsend Version: @(#) mailsend v1.17b14 Compiled with OpenSSL: OpenSSL 1.0.1c 10 May 2012

$ ldd mailsend linux-vdso.so.1 => (0x00007fff45321000) libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f352a920000) libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f352a545000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f352a185000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3529f81000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f3529d6a000) /lib64/ld-linux-x86-64.so.2 (0x00007f352ab96000)

$ file mailsend mailsend: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x42e460444e71ab600f6aefe92c548e71bc5cd168, not stripped

muquit commented 10 years ago

From muq...@gmail.com on December 03, 2013 17:34:16

If you follow the steps I mentioned above, what kind of errors are you getting?

muquit commented 10 years ago

From d.rikhte...@gmail.com on December 04, 2013 00:13:18

Hi dude yeah it worked

Thanks My os is Mint-15 -64 bit

But on my debian server:

uname -a

Linux debian 2.6.32-5-amd64 #1 SMP Mon Sep 23 22:14:43 UTC 2013 x86_64 GNU/Linux

cat /etc/issue

Debian GNU/Linux 6.0 \n \l

root@server:~/mailsend-1.17b14# ./configure --with-openssl=/usr ... checking for getaddrinfo... yes checking for OpenSSL... no configure: creating ./config.status config.status: creating Makefile ...

make

... MKSTEMP=1 -DHAVE_GETADDRINFO=1 -DUNIX -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MATH_H=1 main.o smtp.o utils.o setget.o -o mailsend ./libs/libmsock/libmsock.a ./libs/libsll/libsll.a ./libs/libmutils/libmutils.a -L/usr//lib -lssl -lcrypto -lresolv -lnsl /usr/bin/ld: error: cannot find -lssl /usr/bin/ld: error: cannot find -lcrypto collect2: ld returned 1 exit status make: *\ [mailsend] Error 1

it didn't compile

maybe something is not installed ? but as i know everything installed because i have apache with port 443 or postfix with ssl port

Any idea?

muquit commented 10 years ago

From muq...@gmail.com on December 04, 2013 06:00:59

You have to install openssl dev package. sudo apt-get install libssl-dev

muquit commented 10 years ago

From d.rikhte...@gmail.com on December 05, 2013 23:26:44

Solved

muquit commented 10 years ago

From muq...@gmail.com on December 06, 2013 12:02:41

Status: Done