Checkmail ohne DSmod und mit SSL von Gmail

Das ist doch schon was.

Da Dich die Ausgabe von wget sowieso nicht interessiert, kannst Du die Zeile ändern auf
Code:
wget -O /dev/null http://test.de/test/checkmail_u23demf.php
 
[Gelöst]

Vielen Dank es funktioniert jetzt...
 
Schade... Zu früh gefreut...

Folgendes steht nun (nach zwei Leerzeilen; wie löscht man die?) in der debug.cfg ganz oben:
Code:
#Mailchecker
cat > /var/tmp/mailchecker << "EOF"
while true; do
    wget http://test.de/test/checkmail_u23demf.php

    if [ "$?" != "0" ]; then
      echo 7,1 > /var/led
    else
      echo 7,3 > /var/led
    fi
    sleep 300
done
EOF

chmod a+x /var/tmp/mailchecker
/var/tmp/mailchecker

Immer, wenn die FB aus der Nachtschaltung erwacht, so hatte ich bisher vermutet weil es nur morgens plötzlich so war, blinkt die WLAN LED nur noch und es gibt keinen Empfang. Ich habe das mal mit abgeschalteter Nachtschaltung versucht, aber ohne die FB nach dieser Einstellung neu zu starten: kein Effekt. Die Nachtschaltung sollte in jedem Falle weiter funktionieren, auf die mag ich nicht verzichten...

Woran könnte es denn noch liegen? Weiss jemand Rat? :confused:
 
Zuletzt bearbeitet:
OK, der Fehler ist bseitigt, allerdings wird das Verzeichnis vom TSB LCR direkt danach überschrieben, glaube ich. (Oder wie ist das, denn die datei mailchecker taucht zwar in der prozessliste auf, aber trotz vorhandener mails blinkt nix?)

Muss ich den mailchecker jetzt ans ende der datei schreiben?

Dazu zwei Fragen:

-Wie löscht man Leerzeilen mit nvi?
-Wie springt man in nvi direkt ans ende?
 
I found this webpage:
http://download.gna.org/hpr/fetchmail/FAQ/gmail-pop-howto.html
that explains how to enter to gmails pop3 server with ssl (go directly to step #7):
Code:
[COLOR="Blue"]C:\Openssl\openssl s_client -connect pop.gmail.com:995 -quiet[/COLOR]
Loading 'screen' into random state - done
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc./CN=pop.gmail.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc./CN=pop.gmail.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc./CN=pop.gmail.com
verify error:num=21:unable to verify the first certificate
verify return:1
+OK Gpop ready for requests from xyzxyzxyzxyzxyz
[COLOR="Blue"]user fakeusername[/COLOR]
+OK send PASS
[COLOR="Blue"]pass fakepassword[/COLOR]
+OK Welcome.
[COLOR="Blue"]stat[/COLOR]
+OK 3 8094
[COLOR="Blue"]quit[/COLOR]
+OK Farewell.
read:errno=0
and from there you can enter normal pop3 commands like "user, pass, stat, list, uidl"....

but unfortunately fritzbox doesn't have an openssl program !! can something be done for this? is there a way to build openssl?
 
Zuletzt bearbeitet:
And there is no way to integrate the ssl into the checkmaild? i'm not much of c developer but from what i saw the only difference is that instead of opening a cleartext connection to a server, you need to open an ssl connection, the rest of the syntax is the same. (in windows, instead of telnet server.com 25, i used the above command to connect with openssl s_client)

it would be great to have it check gmail (and other ssl mail servers) without risking showing passwords to anybody else though php hacks or access without encryption....
 
Of course there is a way to integrate ssl into checkmaild. You can do it yourself or you can ask someone else to do it for you.

I just wonder why you come up with "openssl s_client" again although you know that it is not what you want.

And unless you intend to port checkmaild to Windows, it won't help you to know that it is possible to connect with "openssl s_client" on Windows.
 
i found a trick to make it work, which is to use stunnel to make a tunnel to gmail-s pop3 ssl server and provide to checkmaild a normal pop3 access, here is the code of the stunnel config file:
Code:
[pop3s]
client=yes
accept = 127.0.0.1:1109
connect = pop.gmail.com:995

and in checkmaild set pop3 server as 127.0.0.1:1109

but this is not enough, as checkmaild will make led always blink because gmail leaves pop3 mail there


(ps. currently i translated checkmaild interface in english, i will post changes to correct thread)
 
Zuletzt bearbeitet:
how do you connect to gmail? (Imap or Pop)
 
Yes, simple pop3 access with no ssl, but i tried it only from checkmaild, which worked and downloaded messages.
the problem is that gmail leaves all email on server, so the pop3 will always see all messages, and led will be blinking all the time, not just when new mail arrives.

some got to be done to solve this issue, i am already checking for alternative method, as gmail is my primary email.....
 
no I meant, how do you normaly recieve your mail?
Webinterface, Pop or Imap?

Normal Pop is an Protocol where you download and often delete your downloaded messages from the server.

Now Gmail makes it like this:
Gmail leaves all your messages in your inbox, when you download then, even if you tell you pop-client to delete them. But under Gmail you can choose from when you what to download your messages.
In your setings under pop-Settings you can choose to recieve all messages from now for example. Then all masseges you can from now, you can recieve via pop, when you download your messages via pop(for example with thunderbird) gmail saves this time and sets it to "last connection", from now you can only recieve die mail from this time.
this happens every time you download messages from gmail.

So if your checkmail connects to gmail and sees that there are some messages, it makes the LED blink. But checkmail does not download the messges, it only looks for messages, i think. So now you can download your message via thunderbird for example, after that gmail will say, there are no messages avialable und checkmail will realize that and the led will stop blinking, i think.

I hope you can understand, what i was trying to say.
So if you check your mail via the webinterface and not pop, i think you will have 2 oppotunities:
1 - every time you recieve new mail and you have read them, you have to go into your settings under pop and klick "Enable POP for mail that arrives from now on" so that checkmail thinks there are no new messages.

2- i can try to get checkmail connected to gmail via imap. Over Imap i think checkmail can differenciate between old and new messages and will realize on its own that you have read your mail

So the question ist how do you read your mails?
 
I checked the source of checkmaild.c, and from what i understood it gets the sum of new and old messages in 2 separate variables, and if either of them is > 0 the notification action is activated, so even if new mails are 0 but old are > 0, it will start blinking.

anyway, i check mainly through web interface, so pop will always say there are new mails.

alternatives are to make another gmail checker plugin that gets data from webinterface of gmail, like this when you read through web interface it stops blinking, a base could be the freepops project, in which i participated by making the lua script to check for gmail before gmail provided the pop access. it's opensource and already have been ported to various linux dists, including mipsel arch for OpenWRT !!!!
 
hey,

ok you are right. Some minutes ago, I tryed it out my self to check Gmail via stunnel and imap, but it reacts also on unread mails on an imap server.
And I think you could have found the right place in the source, why it does so.
But why this is so, we should ask olistudent, because he wrote it.
Therefor using checkmail will be no option for you, i think.

your alternative with checking it through the webinterface using the base of freepops, could be possible and i think mipsel is the right architecture, but i'm not really into crosscompiling and this stuff.


I am using an other opportunity, which was discussed here earlier, but in german, so i don't know if you could understand it.
Do you have the oppotunity for runing a php-page?

I will try if stunnel + checkmail(pop) will work with gmail, when receiving the mails thunderbird via pop afterwards. (I want to know it for myself :) )
 
I am using an other opportunity, which was discussed here earlier, but in german, so i don't know if you could understand it.
Do you have the oppotunity for runing a php-page?

thanks to google translate and php syntax i understood it, but the 2 hostings i have: 1 is windows with php and doesn't support imap_open and the other just goes into timeout waiting to open the connection.
anyway, i don't like the method of putting my password somewhere public :)

will be studying th freepops method...
 
Ok, i can understand your concerns, I also had them at first, but I was told that You can not seen the sourcecode of a PHP-Page, because when you connect to the webserver and ask for a php-page, the server runs the PHP-Code by the the Php-interpreter, which generates the HTML-Output(As long as PHP ist activated, otherwise you can see it, because it is treated as a textfile). So there for it is ok to check it this way, i think.

I have made some Tests today and i have to says that I judged to soon, but let us start from the top.

[Test: Stunnel + Pop]
STunnel-Config:
Code:
[gmail-pop3s]
client=yes
accept = 127.0.0.1:1109
connect = pop.gmail.com:995
Checkmail-Config:
Code:
POP-Server: 127.0.0.1:1109
Name: **
PW: **
Result:
I discibed how the POP-Server from gmail worked befor. And Checkmail sees all messages (does not matter whether old or new) as new messages, which are inside the Pop-Server. So after recieving them with Thunderbird(for examble) they aren't anymore inside the Gmail-Popserver and Checkmail notices that there are no mail anymore

-> Works for all, who recieve their Mail normals via POP (for example with thunderbird or outlook).



[Test: Stunnel + Imap]
STunnel-Config
Code:
[gmail-imaps]
client=yes
accept = 127.0.0.1:1110
connect = imap.gmail.com:993
Checkmail-Config:
Code:
Imap-Server: 127.0.0.1:1110
Name: **
PW: **
Result:
Here is where I judged to soon.
At first checkmail recieves all mails as new (this can take a while with 500 mails :) ) and the LED starts to blink, but when checkmail checks again for new mails it notices that all mails are read. And the LED stops blinking. (I know, before I said it won't, but I had not waited long enough) When I have recieved a new mail checkmail recognizes this and after i marked it as seen the LED stops blinking.
So this is like it should.
(But during my test I had problems with that, after restarting checkmail, because after some restarts checkmail didn't recognized that the mail are marked as seen, but after a reboot(of the box) it worked)

-> This is the possibility for all, who recieve their mail through IMAP or the Webinterface.

So i will test it a bit longer to see how it reacts in the long run, but i hope it will be ok

will be studying th freepops method...
How exactly will you use freepops to check for new mails? Because I think it is not possible to use the normal gmail extension, because freepops provides a pop access to gmail, but as I said befor, checkmail(as any other mailclient) can not differentiate between read und unread mail through the pop-protokoll, because this is not part of the pop-protocol. So checkmail will see all your mails and treat them as new -> blinking LED
So you will have to wirte a new extension, which only puts new Mail(from the webinterface) into the pop3folder.
 
You've done great testing here .... keep us informed about this imap one, which seems interesting.

So you will have to wirte a new extension, which only puts new Mail(from the webinterface) into the pop3folder.

this is exactly what i had in mind, write special FreePOPs lua plugins to report only new mail :)
 
I tested it(Imap) all day, and I think it is working all right.
@ramik: I think as long as your freepops plugin is not ready you could take this.

Yust do the config like I said it:
STunnel-Config
Code:
[gmail-imaps]
client=yes
accept = 127.0.0.1:1110
connect = imap.gmail.com:993
Checkmail-Config:
Code:
Imap-Server: 127.0.0.1:1110
Name: **
PW: **

At first it will say you all new mail, then after some minutes it will stop blinking and then it will work just fine.
(new Mail -> Starts blinking
no new mail -> Stops blinking)

I think you should try it and report your results.

The good think about this Imap configuration is, that Imap recognizes all changes and new set Flags( SEEN-Flag ), so it will recognize when you have read the mail via WebInterface.
 
Kostenlos!

Statistik des Forums

Themen
248,923
Beiträge
2,305,172
Mitglieder
378,646
Neuestes Mitglied
fusionK