muttrc配置文件: gedit /usr/local/mutt/etc/muttrc
msmtp配置文件:gedit /usr/local/msmtp/etc/msmtprc
測msmtp:
/usr/local/msmtp/bin/msmtp [email protected]
測mutt和msmtp:
echo "test"|/usr/local/mutt/bin/mutt -s "first_test" [email protected]
用 $msmtp --host=smtp.gmail.com --serverinfo 測試gmail是否支持TLS加密
PC編譯openssl:
1)./config shared --prefix=/usr/local/openssl
2)make
3)make install
2,交叉編譯openssl:
1)./config no-sse2 no-asm shared --prefix=/usr/local/openssl
*一定要編譯成共享庫,openssl 默認編譯成靜態庫,而MSMTP默認去找動態庫的。
2)修改Makefile, 將CC AR RANLIB 改爲你的cross compile 工具:
/opt/staging_dir/usr/bin/arm-linux-uclibcgnueabi-gcc
*buildtool 中可以編譯openssl
編譯MSMTP
1)在BUILDTOOL中安裝GETTEST庫
2)./configure --prefix=/home/shelley/msmtp --with-ssl=openssl --with-libssl-prefix=/usr/local/openssl
*編譯時使用GCC編譯的openssl庫,即設置--with-libssl-prefix指向GCC的openssl庫。
3)修改MSMTP中GUNLIB目錄的MAKEFILE。
A)修改CC
B)修改庫的指向路徑,用實際的庫路徑修改--with-libssl- prefix指向的路徑
4)編譯MSMTP中的GUNLIB的靜態庫
5)編譯MSMTP中的SRC
A)修改CC
B)修改庫的指向路徑,用實際的庫路徑修改--with-libssl- prefix指向的路徑
C)SRC中的c文件可以正常編譯通過,但找不到gettest庫,
用命令:info gettext //查看gettext需要什麼庫,
將庫libintl加入MAKEFILE,如:LIBINTL=-lintl
編譯MUTT
1)./configure --prefix=/home/shelley/ARM9/mutt
2)修改Makefile
./configure --prefix=/home/shelley/ARM9/mutt CC=/opt/staging_dir/usr/bin/arm-linux-uclibcgnueabi-gcc LDFLAGS=/opt/staging_dir/usr CPPFLAGS=/opt/staging_dir/usr