msmtp im embedded system

msmtp im embedded system
網站:http://msmtp.sourceforge.net/

1. msmtp is an SMTP client.
2. Authentication methods PLAIN, LOGIN, CRAM-MD5, DIGEST-MD5, GSSAPI, and NTLM.
3. TLS/SSL both in SMTP-over-SSL mode and in STARTTLS mode. Full certificate trust checks can be performed. A client certificate can be sent.

編譯需要下列 Libraries
GnuTLS, 可用 OpenSSL 代替
GNU SASL (Using the GNU SASL library adds support for the GSSAPI, DIGEST-MD5, and NTLM authentication methods. (The methods PLAIN, LOGIN, and CRAM-MD5 are always supported).)
GNU Libidn (Support for Internationalized Domain Names (IDN) is available if you have GNU Libidn installed.)

1. OpenSSL 1.0.0c
tar -xf openssl-1.0.0c.tar.gz
cd openssl-1.0.0c
./Configure linux-generic32 no-asm shared --prefix=`pwd`/install --openssldir=`pwd`/install
打開 Makefile 找到 CC= gcc 修改為 CC= arm-linux-gcc
make
make install

將 install/include/ install/lib/ 兩個目錄複製到 arm-linux-gcc 的 include 和 lib 裡面
( example: /opt/crosstool/arm-linux/gcc-3.4.4-glibc-2.3.5/arm-linux/arm-linux/ )
cp -rf install/include/ install/lib/ /opt/crosstool/arm-linux/gcc-3.4.4-glibc-2.3.5/arm-linux/arm-linux/
將 install/lib/libssl.so.1.0.0 移至 target board 的 /lib/
將 install/lib/libcrypto.so.1.0.0 移至 target board 的 /lib/

2. GNU Libidn 1.19
tar -zxf libidn-1.19.tar.gz
cd libidn-1.19
./configure -q --prefix=`pwd`/install --host=arm-linux --build=i686-linux-gnu
make
make install

將 install/include/ install/lib/ 兩個目錄複製到 arm-linux-gcc 的 include 和 lib 裡面
( example: /opt/crosstool/arm-linux/gcc-3.4.4-glibc-2.3.5/arm-linux/arm-linux/ )
cp -rf install/include/ install/lib/ /opt/crosstool/arm-linux/gcc-3.4.4-glibc-2.3.5/arm-linux/arm-linux/
將 install/lib/libidn.so.11.6.2 移至 target board 的 /lib/libidn.so.11

3. GNU SASL 1.6.0
tar -zxf libgsasl-1.6.0.tar.gz
cd libgsasl-1.6.0
./configure -q --prefix=`pwd`/install --host=arm-linux --build=i686-linux-gnu
make
make install

將 install/include/ install/lib/ 兩個目錄複製到 arm-linux-gcc 的 include 和 lib 裡面
cp -rf install/include/ install/lib/ /opt/crosstool/arm-linux/gcc-3.4.4-glibc-2.3.5/arm-linux/arm-linux/
將 install/lib/libgsasl.so.7.8.5 移至 target board 的 /lib/libgsasl.so.7

4. msmtp 1.4.23
tar -jxf msmtp-1.4.23.tar.bz2
cd msmtp-1.4.23
./configure -q --prefix=`pwd`/install --host=arm-linux --build=i686-linux-gnu --with-ssl=openssl

確認下面的 library 使否可以使用
TLS/SSL support ........ : yes (Library: OpenSSL)
GNU SASL support ....... : yes
GNU Libidn support ..... : yes
NLS support ............ : yes

make
make install
將 install/bin/msmtp target board 的 /bin

這樣 msmtp 就完成了

留言

  1. 請問如何實現在CodeSourcery的toolchain,
    我的結果永遠是
    TLS/SSL support ........ : no (Library: none)
    GNU SASL support ....... : no
    GNU Libidn support ..... : no
    NLS support ............ : yes
    GNOME Keyring support .. : no
    MacOS X Keychain support : no

    回覆刪除
    回覆
    1. sudo apt-get install openssl
      sudo apt-get install libgsasl7
      sudo apt-get install libidn11

      刪除

張貼留言

這個網誌中的熱門文章

NMEA標準格式 -- GPS

網路 Transformer 的用途

cut,sed,awk 字串處理