2009年6月23日 星期二

gdb遇到SIG32中斷

遇到的問題:
Program received signal SIG32, Real time event 32
解決方法:
1. handle SIG32 nostop noprintf
2. 設定breakpoint, 然後在cont

2009年6月3日 星期三

利用msmp來送Gmail e-mail

  • What is msmtp
msmtp is an SMTP client, and, in the default mode, it transmits a mail to an SMTP server ( for example at a free mail provider ) which does the delivery.
  • How to compiler msmtp on ARM platform
CC=arm-linux-gcc ./configure --host=arm-linux --with-ssl=openssl --with-libssl-prefix=openssl-0.9.7g
  • How to use msmtp
假設利用xxxx@gmail.com送一封e-mail給abcd@1234.com

1. 產生msmtprc檔案在/usr/local/etc/下
#imple for a user configuration file
# Set default values for all following accounts.
defaults
tls on
tls_certcheck off
logfile ~/.msmtp.log

# A freemail service
account gmail
host smtp.gmail.com
from YourMailAddress (xxxx@gmail.com)
auth on
user YourUserName (xxxx@gmail.com)
password YourPassword

account default : gmail
紅色的部份請填自己的資訊

2. 產生要送的mail資訊,假設為message,內容如下
Subject: my subject

body starts here
line 2
end of body

3. 執行msmtp
#./msmtp abcd@1234.com <>

--你會看到以下資訊--
<-- 220 mx.google.com ESMTP g14sm2915275rvb.22
--> EHLO localhost
<-- 250-mx.google.com at your service, [220.130.189.174]
<-- 250-SIZE 35651584
<-- 250-8BITMIME
<-- 250-STARTTLS
<-- 250-ENHANCEDSTATUSCODES
<-- 250 PIPELINING
--> STARTTLS
<-- 220 2.0.0 Ready to start TLS
TLS certificate information:
    Owner:
        Common Name: smtp.gmail.com
        Organization: Google Inc
        Locality: Mountain View
        State or Province: California
        Country: US
    Issuer:
        Common Name: Thawte Premium Server CA
        Organization: Thawte Consulting cc
        Organizational unit: Certification Services Division
        Locality: Cape Town
        State or Province: Western Cape
        Country: ZA
    Validity:
        Activation time: Mon Jul 30 00:00:00 2007
        Expiration time: Thu Jul 29 23:59:59 2010
    Fingerprints:
        SHA1: 5E:F7:E8:CE:1A:BE:D8:94:F2:77:45:5D:ED:38:46:4F:5D:D1:97:61
        MD5:  F1:D3:DE:59:9D:9C:E2:31:EA:AA:2C:A0:FC:AD:9A:61
--> EHLO localhost
<-- 250-mx.google.com at your service, [220.130.189.174]
<-- 250-SIZE 35651584
<-- 250-8BITMIME
<-- 250-AUTH LOGIN PLAIN
<-- 250-ENHANCEDSTATUSCODES
<-- 250 PIPELINING
--> AUTH PLAIN AGJpbGx3dTA3MjZAZ21haWwuY29tAGExYjJjM2Q0
<-- 235 2.7.0 Accepted
--> MAIL FROM:
--> RCPT TO:
--> DATA
<-- 250 2.1.0 OK g14sm2915275rvb.22
<-- 250 2.1.5 OK g14sm2915275rvb.22
<-- 354  Go ahead g14sm2915275rvb.22
--> Subject: my subject
-->
--> body starts here
--> line 2
--> end of body
--> .
<-- 250 2.0.0 OK 1244020638 g14sm2915275rvb.22
--> QUIT
<-- 221 2.0.0 closing connection g14sm2915275rvb.22

2009年6月2日 星期二

在 mips下 cross compiler OpenSSL

1. ./Configure linux-mips -DB_ENDIAN linux:'  mips_lexra_fp_be-gcc'
2. make