![]() | [ google | mail | ip | ov | reg | tv | cnn ] [ man | chr | en-en | nl-en | en-nl | h4 ] [ pub-cvs | ic-cvs | blog | scratch | py ] [ comp | prog | ele | gen | trav | ecs ] |
email my.personal.mailgate@gmail.com test
$ fetchmail --help|grep ssl
--ssl enable ssl encrypted session
--sslkey ssl private key file
--sslcert ssl client certificate
--sslcertck do strict server certificate check (recommended)
--sslcertpath path to ssl certificates
--sslfingerprint fingerprint that must match that of the server's cert.
--sslproto force ssl protocol (SSL2/SSL3/TLS1)
$ fetchmail --ssl -u 'my.personal.mailgate@gmail.com' -m 'cat' -p POP3 pop.gmail.com Enter password for my.personal.mailgate@gmail.com@pop.gmail.com: fetchmail: Server certificate verification error: unable to get local issuer certificate fetchmail: Server certificate verification error: certificate not trusted fetchmail: Server certificate verification error: unable to verify the first certificate fetchmail: No mail for my.personal.mailgate@gmail.com at pop.gmail.com $
1 : $ fetchmail --ssl -u 'my.personal.mailgate@gmail.com' -m 'cat' -p POP3 pop.gmail.com 2 : Enter password for my.personal.mailgate@gmail.com@pop.gmail.com: 3 : fetchmail: Server certificate verification error: unable to get local issuer certificate 4 : fetchmail: Server certificate verification error: certificate not trusted 5 : fetchmail: Server certificate verification error: unable to verify the first certificate 6 : 1 message for my.personal.mailgate@gmail.com at pop.gmail.com (687 octets). 7 : Delivered-To: my.personal.mailgate@gmail.com 8 : Received: from gmail-pop.l.google.com [66.249.93.111] 9 : by roy.LAN with POP3 (fetchmail-6.3.8) 10 : for <michai@localhost> (single-drop); Mon, 30 Jul 2007 21:09:41 +0200 (CEST) 11 : Received: by 10.141.91.18 with SMTP id t18cs71929rvl; 12 : Mon, 30 Jul 2007 12:09:18 -0700 (PDT) 13 : Received: by 10.90.81.14 with SMTP id e14mr2420270agb.1185822558437; 14 : Mon, 30 Jul 2007 12:09:18 -0700 (PDT) 15 : Received: by 10.90.86.2 with HTTP; Mon, 30 Jul 2007 12:09:18 -0700 (PDT) 16 : Message-ID: <4f8bd7300707301209j55d3915xcdb913793f8b4749@mail.gmail.com> 17 : Date: Mon, 30 Jul 2007 21:09:18 +0200 18 : From: "Michai Ramakers" <m.ramakers@gmail.com> 19 : To: my.personal.mailgate@gmail.com 20 : Subject: test subject 21 : MIME-Version: 1.0 22 : Content-Type: text/plain; charset=ISO-8859-1 23 : Content-Transfer-Encoding: 7bit 24 : Content-Disposition: inline 25 : 26 : test contents 27 : reading message my.personal.mailgate@gmail.com@gmail-pop.l.google.com:1 of 1 (687 octets) flushed 28 : $
email my.personal.mailgate@gmail.com this is another test
1 : $ fetchmail --ssl -u 'my.personal.mailgate@gmail.com' -m 'cat' -p POP3 pop.gmail.com 2 : Enter password for my.personal.mailgate@gmail.com@pop.gmail.com: 3 : fetchmail: Server certificate verification error: unable to get local issuer certificate 4 : fetchmail: Server certificate verification error: certificate not trusted 5 : fetchmail: Server certificate verification error: unable to verify the first certificate 6 : 1 message for my.personal.mailgate@gmail.com at pop.gmail.com (1133 octets). 7 : reading message my.personal.mailgate@gmail.com@gmail-pop.l.google.com:1 of 1 (1133 octets).Delivered-To: my.personal.mailgate@gmail.com 8 : Received: from gmail-pop.l.google.com [66.249.93.111] 9 : by roy.LAN with POP3 (fetchmail-6.3.8) 10 : for <michai@localhost> (single-drop); Mon, 30 Jul 2007 21:19:24 +0200 (CEST) 11 : Received: by 10.141.91.18 with SMTP id t18cs72065rvl; 12 : Mon, 30 Jul 2007 12:18:32 -0700 (PDT) 13 : Received: by 10.86.63.19 with SMTP id l19mr4126602fga.1185823111840; 14 : Mon, 30 Jul 2007 12:18:31 -0700 (PDT) 15 : Return-Path: <+31612345678@sms.orange.nl> 16 : Received: from mailer.gin.nl (mailer.gin.nl [194.165.79.90]) 17 : by mx.google.com with ESMTP id f19si1149602fka.2007.07.30.12.18.31; 18 : Mon, 30 Jul 2007 12:18:31 -0700 (PDT) 19 : Received-SPF: neutral (google.com: 194.165.79.90 is neither permitted nor denied by best guess record for domain of +31612345678@sms.orange.nl) 20 : Received: from orange.gin.nl ([194.165.79.82]) 21 : by mailer.gin.nl (8.12.10/8.12.10) with SMTP id l6UJIUmp087042 22 : for <my.personal.mailgate@gmail.com>; Mon, 30 Jul 2007 21:18:30 +0200 (CEST) 23 : Message-Id: <200707301918.l6UJIUmp087042@mailer.gin.nl> 24 : Date: Mon, 30 Jul 2007 21:18:29 +0200 25 : From: +31612345678@sms.orange.nl 26 : Organization: Orange GSM Email 27 : To: my.personal.mailgate@gmail.com 28 : Subject: Email van een mobiele telefoon 29 : (msg: this is another test) 30 : 31 : >--- Begin bericht --- 32 : 33 : this is another test 34 : 35 : >--- Einde bericht --- 36 : 37 : 38 : 39 : 40 : 41 : 42 : 43 : 44 : 45 : 46 : 47 : 48 : 49 : flushed 50 : $
1 : $ su 2 : Password: 3 : # cd /usr/libexec 4 : # ls -l poll_phone_cmds 5 : -rwx------ 1 root wheel 840 Jul 29 22:05 poll_phone_cmds 6 : # sed 's/^/> /' < poll_phone_cmds 7 : > #!/bin/bash 8 : > 9 : > PHONE_CMD=/tmp/phone_cmd.txt 10 : > 11 : > ### poll until we have received a new message 12 : > while ( true ); do 13 : > expect - << HERE > /dev/null 2>&1 14 : > spawn fetchmail --ssl -p POP3 -u my.personal.mailgate@gmail.com -m "cat > $PHONE_CMD" pop.gmail.com 15 : > expect "Enter password" 16 : > send "MySecretPassword\r" 17 : > expect eof 18 : > HERE 19 : > if [ -f $PHONE_CMD ]; then 20 : > FROMLINE=`grep '^From: ' < $PHONE_CMD | sed -n '1p'` 21 : > if [ "$FROMLINE" = "From: +31612345678@sms.orange.nl" ]; then 22 : > CMDLINE=`grep '^cmd: ' < $PHONE_CMD | sed -n 1p` 23 : > if [ -n "$CMDLINE" ]; then 24 : > CMD=`echo $CMDLINE | sed 's/^cmd: \(.*\) *$/\1/'` 25 : > # 26 : > # HERE: we have the command string in "$CMD", happy hacking :-) 27 : > # 28 : > fi 29 : > fi 30 : > rm $PHONE_CMD 31 : > fi 32 : > sleep 10 33 : > done 34 : > 35 : > 36 : #
email my.personal.mailgate@gmail.com cmd: foo bar baz