dk/Net-Eboks

Windows desktop

Closed this issue · 49 comments

I have installed strawberry and the module.
The readme says that I should open a command prompt and type eboks-install-win32. However, if I just open a CMD command prompt, there is nothing in path that recognizes eboks-install-win32 - so where should I execute this?

dk commented

Apparently something went wrong there, try to locate the source code of the module or just download the script for fresh from https://raw.githubusercontent.com/dk/Net-Eboks/master/bin/eboks-install-win32 , and run "perl eboks-install-win32", see if that works.

Ok, I pulled the code and seemingly succesfully run the perl script. I am not sure how to check that the local POP3 server is running though? I tried to connect to it and that seems to work, but no mails are there. Also, during the "installation", I was not prompted to sign in using nemid

dk commented
  1. you can check it in general by running f.ex. "telnet localhost 8110" from cmd, it will fail if it's not running, but if it is, after connected just type QUIT.

  2. You won't be prompted automatically to sign in with nemid, you need to to do that yourself (see docs).

I'd be glad to help to streamline windows user experience - if there are problems do ask!

ok, I got most of it working.. I think. I have no items in the POP3 account. Does it only fetch new messages and not historical ones?

dk commented

Hmm no actually, it reads them all. For the troubleshooting you can run 'eboks-dump' that does just it, downloads everything you have into a mailbox file ; it's not useful other than just check it out with mutt or some other mail reader though.

I get this when trying to run perl eboks-dump:
C:\git\Net-Eboks\bin>perl eboks-dump Enter cpr code: 'stty' is not recognized as an internal or external command, operable program or batch file.

dk commented

That's just a warning. If it bothers get the latest script from https://raw.githubusercontent.com/dk/Net-Eboks/master/bin/eboks-dump .

ok, now it is fetching files - it seems to be working. Nice :-) Is it correct that the "dump" will be the form of a mailbox file instead of the actual files themselves? Wouldn't it be "easy" to make a dump version that saves each file to disk? Also, does it only get data from the main user and not the associated accounts that have been given access to (like postboks does)?

dk commented

It's just a dump for very simple use, and there are lots of programs that can read that, f.ex. http://www.mutt.org/ that I use. Anything more complicated than this is supposed to be accessed via the POP3 proxy. As for associated accounts I don't think I have access to any of those so I cannot test it. If there is any kind of guide how do I create or modify my account for this, or some test account, I could use that to address this.

Instead of getting associated accounts, is there a way of connecting multiple eboks accounts separately? so that for each of the, the nemid registration is done once, and then the messages for each account get forwarded to their own POP3 account running?

dk commented

Yes there is, by design. Check out the documentation

dk commented

You register each account, then connect to them with their own POP3 credentials

ah so each cpr number - or whatever is used to login (for companies it might not be a cpr number) gets their account on the POP3 server? Great :)

dk commented

yes that is exactly how it works

wonderful :) thanks for writing this piece of software!

Sorry, I am still a bit confused about the daily flow. I start the eboks2pop perl script and it should fetch new messages from e-boks? Or does it only host a pop3 server that I can connect to and something else fetches the actual messages? I tried the dump script and that worked. But I dont want to do a dump every day. Now when I run the eboks2pop script, it just tells me: no messages (not even the ones that earlier were there from the dump). Also, it confuses me a bit that the perl script says: listening on 0.0.0.0:110 and the documentation says localhost with port 8110 ? I am running windows, and the examples for daily fetch are for linux

dk commented

eboks2pop is a server, no automatic fetching is done. You don't want dumping every day, you need a mail reader for Windows, Outlook or something similar - check out README for scenarios and links.

There's no text similar to "no messages" in the module, must be something else.

As for 8110, indeed should run there. If it doesn't check out the .cmd file in your windows user startup it should contain something like "eboks2pop ... -p 8110". If it doesn't it's probably a bug in the code, try to fix it manually (it's possible to do the full github update and win32 reinstallation but this should be just easier).

OTOH the worst can happen it is not a big deal for Windows to listen on 110, you can just change the mail reader server POP3 port to 110 and that's it.

if eboks2pop does not do the fetching, who does and how?

dk commented

Your mail reader does (Outlook or Thunderbird or whatever)

I am sorry to be so stupid here. I can do a telnet localhost 8110 just fine. However, I cannot seem to get thunderbird to recognize the local POP3 server:

image

Also, I am still trying to understand how data is fetched from eboks. The POP3 client (eg thunderbird) connects to the POP3 server to see if there are any messages. Does your perl code then respond to this request by connecting to eboks and fetching potential new messages? In your documentation, you are mentioning cron jobs to regularly fetch data from nets, but nothing for windows.

I managed to get Windows Mail to connect to the POP3 server. It starts out with "no emails" (they were there after I did a dump earlier) but now gone, not sure why. When trying to refresh/fetch mails, it hangs for a very long time (maybe forever, it is still trying)
image

Ok, I might have been confusing myself here, maybe I have never had emails in the pop3-server, I think I just opened the mbox and that way saw all the eboks-messages.

dk commented

I'm not versatile on windows clients, but there's one, ultimative test to take to see that the pop3 works. Here's how it looks on my side, bold is me typing in, rest the server answers:

$ telnet localhost 8110
Trying 185.59.228.109...
Connected to karasik.eu.org.
Escape character is '^]'.
+OK POP3 server ready
user 0101010202
+OK hello
pass mypassword
+OK Welcome Dmitry Karasik
list
224 22635
225 21387
226 23501
.
retr 226
... bla bla message encoded as base 64
quit
+OK bye
Connection closed by foreign host.

Thunderbird probings should be ignored I think. Just type in localhost and port 8110 and plain auth without ssl

thank you for your patience with me. It works now. Thunderbird apparently requires an SMTP server to be setup even though we dont care about it in this setting.

oh, I was so happy that I got it working. But here is the problem: I have several business accounts and they do not individually support the mobile access. Instead, it is possible to give a person privileges to access these associated accounts from their personal account (the one with CPR no). The version that Ole Gammelgaard has written (which unfortunately does not (yet?) solve the nemid issue) takes this into account so that when I sync with my personal account, I also get my associated business accounts. I wonder how we go about combining the excellent solutions that you two have written? I wish I could just give you access to my business account, but there are too much sensitive information in there....

dk commented

Great to know that it is working!

As for the business accounts, for starters I'd like to know how your eboks is structured. I'm guessing that the associates have their own folders? F.ex. in my own eboks there is Inbox, Sent items, Deleted etc. Is that correct?

dk commented

Also, I've created a gist https://gist.github.com/dk/069e880cb3146b3e35bf4929f8addb99 that is basically a modified eboks_dump. If you could run it, it creates a file shares.txt; if it doesn't contain sensitive information you're welcome to send it to me.

Sure. I just tried, however, I get the same error as before:
Enter cpr code: 'stty' is not recognized as an internal or external command,
operable program or batch file.

dk commented

Ah crap that was from the old version, please try to re-download it again

works now - where do I send the file to?

dk commented

you can create gist on https://gist.github.com or send it to dmitry@karasik.eu.org

dk commented

I think I managed to add multishare support. Check out the new version from here (it's not on CPAN yet, so you'll need to download/clone in, then run perl Makefile.PL, then make install, then restart eboks2pop). Also check out the latest docs, in the very bottom, about two ways of using shared folders. Select the one that suits you best and see if that works for you

dk commented

Hmm they may use something else, that's right .. try gmake instead?

dk commented

No, make/gmake/dmake whatever comes with Strawberry perl. I just checked that mine 5.30 comes with gmake. Check out if it is in the path? Should be close to where perl.exe lives

dk commented

If you can't connect then eboks2pop has trouble starting.. try to start it manually and see if it dies or something. Also, 'gmake install' should probably be done while eboks2pop is stopped

dk commented

8 digits? It should be 10

dk commented

Strange... does it work without :* ?

dk commented

also, what does eboks-dump -l prints? (you need to enter CPR there, without :*)

dk commented

That means you didn't upgrade properly, you still have the old version of Eboks.pm somewhere. Try gmake install again and see if there are any errors during that

im trying to get this to work but i need some explanation on how to set it up in thunderbird i cant get it to accept localhost

dk commented

I think you need to use the advanced config and don't let thunderbird to run the simple one - it insists on checking mail sending with smtp which is not needed here, and fails. Or configure a duplicate of some existing account and then edit pop3 settings manually..

okay i will try thanks