Re: [web2py] Re: Email and PGP

2014-02-02 Thread horridohobbyist
Wrong version of the book. Plus, the instructions are incomplete and inadequate to arrive a working solution. On Sunday, 2 February 2014 21:18:27 UTC-5, Ovidio Marinho wrote: > > > > everything seems ok > > http://web2py.com/books/default/chapter/34/08/email-and-sms#x509-and-PGP-Encryption > >

Re: [web2py] Re: Email and PGP

2014-02-02 Thread Ovidio Marinho
everything seems ok http://web2py.com/books/default/chapter/34/08/email-and-sms#x509-and-PGP-Encryption Ovidio Marinho Falcao Neto ITJP.NET.BR ovidio...@gmail.com itjp.net...@gmail.com Brasil 2014-02-02 Alan Etkin :

Re: [web2py] Re: Email and PGP

2014-02-02 Thread Alan Etkin
> > I tried "sudo -u www-data gpg --gen-key", but I got permission denied to > access /home/richard/. > > I'd try to login as "www-data" but I don't know the password. > I don't think there is a password set for www-data. How about this? sudo -i -u www-data gpg --gen-key That fixed the permiss

Re: [web2py] Re: Email and PGP

2014-02-02 Thread horridohobbyist
I tried "sudo -u www-data gpg --gen-key", but I got permission denied to access /home/richard/. I'd try to login as "www-data" but I don't know the password. Thanks. On Sunday, 2 February 2014 05:00:51 UTC-5, Alan Etkin wrote: > > I thought about that, but I don't think there's an actual >> ww

Re: [web2py] Re: Email and PGP

2014-02-02 Thread Alan Etkin
> > I thought about that, but I don't think there's an actual > www-data:www-data user on my Linux server by virtue of installing web2py, > is there?? How would I login? > Some script installations of web2py create the user. You need to know first what user is configured to run web2py in the w

Re: [web2py] Re: Email and PGP

2014-02-01 Thread horridohobbyist
I thought about that, but I don't think there's an actual www-data:www-data user on my Linux server by virtue of installing web2py, is there?? How would I login? Thanks. On Saturday, 1 February 2014 13:14:35 UTC-5, Alan Etkin wrote: > > > Something I don't understand... >> >> If I'm sending to

Re: [web2py] Re: Email and PGP

2014-02-01 Thread Alan Etkin
> Something I don't understand... > > If I'm sending to myself (my_h...@gmail.com ), isn't my > public key the same as the recipient key? It's already in the key-ring. > > Do I have to import the public key again using 'gpg'? > No. In fact, I tried an auto-send and as you said, there is no nee

Re: [web2py] Re: Email and PGP

2014-02-01 Thread horridohobbyist
Something I don't understand... If I'm sending to myself (my_han...@gmail.com), isn't my public key the same as the recipient key? It's already in the key-ring. Do I have to import the public key again using 'gpg'? Thanks. On Saturday, 1 February 2014 06:39:02 UTC-5, Alan Etkin wrote: > > Well

Re: [web2py] Re: Email and PGP

2014-02-01 Thread Alan Etkin
> > Well, given the state of disarray that this matter is in, I'd best cut my > losses and abandon PGP email altogether. I can't wait forever for this > matter to be resolved/fixed. > I have tested the recipe in development and it works. I had to create the recipient public key which is not in

Re: [web2py] Re: Email and PGP

2014-01-31 Thread horridohobbyist
Maybe I'll try again in another couple of years. Perhaps third time will be the charm, eh? On Friday, 31 January 2014 19:20:10 UTC-5, horridohobbyist wrote: > > Well, given the state of disarray that this matter is in, I'd best cut my > losses and abandon PGP email altogether. I can't wait fore

Re: [web2py] Re: Email and PGP

2014-01-31 Thread horridohobbyist
Well, given the state of disarray that this matter is in, I'd best cut my losses and abandon PGP email altogether. I can't wait forever for this matter to be resolved/fixed. Meanwhile, perhaps the web2py book should be updated to reflect the current lack of usability of PGP email, so that other

Re: [web2py] Re: Email and PGP

2014-01-31 Thread Alan Etkin
> ...the for loop is never entered. In other words, c.op_keylist_all(sender, > 1) is empty, so c.signers_add(sigkey) is never executed. > > Does that help? > Not much, but at least we now know that pyme (the python wrapper for the pgp library) cannot find any sub-key for sender, where it sho

Re: [web2py] Re: Email and PGP

2014-01-31 Thread horridohobbyist
Thanks. Here's what I found... In send(), after this code fragment: c = core.Context() c.set_armor(1) c.signers_clear() for sigkey in c.op_keylist_all(sender, 1): ...the for loop is never entered. In other words, c.op_keylist_all(sender, 1) is empty, so c.signers_add(sigkey) is

Re: [web2py] Re: Email and PGP

2014-01-30 Thread Jonathan Lundell
On 30 Jan 2014, at 8:16 PM, horridohobbyist wrote: > Whoops, I goofed! I didn't realize that Python is interpreted into byte code > files (.pyc). So the changes I made in tools.py didn't actually get run. I > don't know how to convert tools.py into .pyc. Just restart web2py, and then check that

[web2py] Re: Email and PGP

2014-01-30 Thread horridohobbyist
Whoops, I goofed! I didn't realize that Python is interpreted into byte code files (.pyc). So the changes I made in tools.py didn't actually get run. I don't know how to convert tools.py into .pyc. On Thursday, 30 January 2014 15:36:24 UTC-5, horridohobbyist wrote: > > As a web2py newbie, I shou

[web2py] Re: Email and PGP

2014-01-30 Thread horridohobbyist
As a web2py newbie, I shouldn't be tinkering with foundation source code, but I tried forcing the key entry to be added at line 497 of gluon/tools.py. Made no difference–I'm still getting "No key for signing [my_han...@gmail.com]". Thanks. On Thursday, 30 January 2014 12:45:14 UTC-5, Alan Etk

[web2py] Re: Email and PGP

2014-01-30 Thread Alan Etkin
> - The key was found but the can_sign property is set to False > > but I can't find how to set it... :( > You mean the o.s. command to enable signing? (wathever it is)? What if one forces the test to True at tools.py (so the key entry is added)? The problem about pyme is the lack of documen

[web2py] Re: Email and PGP

2014-01-30 Thread szimszon
I think the problem here is - The key was found but the can_sign property is set to False but I can't find how to set it... :( 2014. január 30., csütörtök 11:55:39 UTC+1 időpontban Alan Etkin a következőt írta: > > Okay, looks like nobody can help me. I guess not that many people use PGP >>

[web2py] Re: Email and PGP

2014-01-30 Thread Alan Etkin
> > Okay, looks like nobody can help me. I guess not that many people use PGP > email from web2py. Probably because it's so gnarly. > Apparently, you get that error message because one of this reasons: - A search for the signing key returned a void set - The key was found but the can_sign prope

[web2py] Re: Email and PGP

2014-01-29 Thread horridohobbyist
Okay, looks like nobody can help me. I guess not that many people use PGP email from web2py. Probably because it's so gnarly. This has been my second attempt to get PGP email working. My first attempt was 2 years ago, and at that time I had to give up for lack of support. I shall have to give u

[web2py] Re: Email and PGP

2014-01-29 Thread horridohobbyist
Yes, I can successfully sign a txt file. Works like a charm. So this means my key files are good, right? Thanks. On Wednesday, 29 January 2014 11:05:18 UTC-5, szimszon wrote: > > Can you sign some txt from command line with web2py's user? > > gpg --sign --default-key my_h...@gmail.com x.txt > >

[web2py] Re: Email and PGP

2014-01-29 Thread horridohobbyist
It says "gpg: gpg-agent is not available in this session". What does that mean? On Wednesday, 29 January 2014 11:05:18 UTC-5, szimszon wrote: > > Can you sign some txt from command line with web2py's user? > > gpg --sign --default-key my_h...@gmail.com x.txt > > > ? > > 2014. január 29., szerda

[web2py] Re: Email and PGP

2014-01-29 Thread szimszon
Can you sign some txt from command line with web2py's user? gpg --sign --default-key my_han...@gmail.com x.txt ? 2014. január 29., szerda 16:12:43 UTC+1 időpontban horridohobbyist a következőt írta: > > It says "expires: never" and "trust: ultimate" and "validity: ultimate", > and "usage: SC"

[web2py] Re: Email and PGP

2014-01-29 Thread szimszon
You must have a public key for the recipient. Web2py can send only encrypted mails if the recipient's public key is known. 2014. január 29., szerda 16:12:43 UTC+1 időpontban horridohobbyist a következőt írta: > > It says "expires: never" and "trust: ultimate" and "validity: ultimate", > and "us

[web2py] Re: Email and PGP

2014-01-29 Thread horridohobbyist
It says "expires: never" and "trust: ultimate" and "validity: ultimate", and "usage: SC" for "pub" and "usage: E" for "sub". Looks good, I think. Just for the purpose of testing, I want to do one thing at a time. So first, I want to send an encrypted email. I don't care whether the receiver can

[web2py] Re: Email and PGP

2014-01-29 Thread szimszon
It could be that the key is not trusted. What is the status of the key if you look at: gpg --edit-key my_han...@gmail.com you can mark it as trusted with the trust command at gpg's cli. As I see in pgpme the problem is that there is no *suitable* key for signing rater than no key at all. Firs

[web2py] Re: Email and PGP

2014-01-29 Thread horridohobbyist
Absolutely. The private (and public) keys are there for "my_han...@gmail.com". Re: the receiver's public key, where do I put it and how do I incorporate it into the code that sends the email? (Excuse me for not understanding how PGP email works.) This second question is lower priority. Right no

[web2py] Re: Email and PGP

2014-01-29 Thread szimszon
If you list your private keys is there a key for 'my_han...@gmail.com'? (gpg --list-secret-keys) And yes you need to have receiver's public key before you could send encrypted messages to him/her. 2014. január 28., kedd 22:27:44 UTC+1 időpontban horridohobbyist a következőt írta: > > GnuPG see

[web2py] Re: Email and PGP

2014-01-28 Thread horridohobbyist
GnuPG seems to be intimately tied to the user account on Linux. It always, always expects .gnupg to be in /home/richard/. I can't seem to give it an alternate location. Thinking that it might be a file ownership problem, I chown'd .gnupg and everything in it to www-data:www-data, but this gave

[web2py] Re: Email and PGP

2014-01-28 Thread horridohobbyist
The error message is "No key for signing [my_han...@gmail.com]". I did create the key files with gpg for sender "my_han...@gmail.com". By default, they're created in my home directory, so I moved the .gnupg folder to /home/www-data/ and chown'd it and its contents to "www-data:www-data". I don'

[web2py] Re: Email and PGP

2014-01-28 Thread szimszon
Sorry, mail.error :-o my bad. 2014. január 28., kedd 14:35:55 UTC+1 időpontban horridohobbyist a következőt írta: > > AttributeError: 'Mail' object has no attribute 'err' > > > On Tuesday, 28 January 2014 08:25:43 UTC-5, szimszon wrote: >> >> Could you please print mail.err after the failed send?

[web2py] Re: Email and PGP

2014-01-28 Thread horridohobbyist
AttributeError: 'Mail' object has no attribute 'err' On Tuesday, 28 January 2014 08:25:43 UTC-5, szimszon wrote: > > Could you please print mail.err after the failed send? > > 2014. január 28., kedd 14:22:59 UTC+1 időpontban horridohobbyist a > következőt írta: >> >> As per the web2py book, I'

[web2py] Re: Email and PGP

2014-01-28 Thread szimszon
Could you please print mail.err after the failed send? 2014. január 28., kedd 14:22:59 UTC+1 időpontban horridohobbyist a következőt írta: > > As per the web2py book, I've installed python-pyme and created the key > files (for sender 'my_h...@gmail.com '). I have the > following code: > >

[web2py] Re: Email and PGP

2014-01-27 Thread Niphlod
a little clear-up: You posted a snippet of code that required the gpgme package. Web2py Mail are only compatible with python-pyme package you don't need to do any import in the models because it's imported directly by web2py https://github.com/web2py/web2py/blob/master/gluon/tools.py#L481

[web2py] Re: Email and PGP

2014-01-27 Thread horridohobbyist
Oh, wait a sec...there are two references in my Google search for the web2py book, one of which is probably an older version. This confused me. On Monday, 27 January 2014 16:25:52 UTC-5, horridohobbyist wrote: > > From the web2py book: > > It is possible to send PGP encrypted emails. First of al

[web2py] Re: Email and PGP

2014-01-27 Thread horridohobbyist
>From the web2py book: It is possible to send PGP encrypted emails. First of all you need to install the *python-pyme* package. Then you can use GnuPG (GPG) to create the key-files for the sender (take the email-address from mail.settings.sender) and put the files pubring.gpg and secring.gpg in

[web2py] Re: Email and PGP

2014-01-27 Thread Niphlod
you need the gpgme package, not the python-pyme one On Monday, January 27, 2014 8:42:33 PM UTC+1, horridohobbyist wrote: > > As per the web2py book, I installed the python-pyme package in Ubuntu > Server and inserted the following into db.py: > > from gpgme import pgp > mail.settings.cipher_type