Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* pgg-default-user-id with more than one UID
@ 2009-03-29 19:57 Suno Ano
  0 siblings, 0 replies; 15+ messages in thread
From: Suno Ano @ 2009-03-29 19:57 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 968 bytes --]

hi folks,

I am with up-to-date Gnus/Emacs and I use pgg.el for signing/encrypting
email. I am on Debian sid, using GPG (GNU Privacy Guard).

I have *two* (instead of just one) OpenPGP UIDs (User IDs) which I would
like to use based on what group I am sending email from.



`pgg-default-user-id' allows me to specify only one UID which is then
applied to each email no matter what group I send it from -- right now I
do this with

 (add-hook 'message-send-hook 'mml-secure-message-sign-pgpmime)



However, I use gnus-parameters to treat different groups differently
e.g. use different sender addresses etc. I want to use gnus-parameters
for selecting my OpenPGP UIDs as well.

The info manual mentions `(VARIABLE FORM)' at (Info-goto-node "(gnus)
Group Parameters") but then I am simply to inexperienced with elisp to
come up the the solution needed to selectively apply either one of my
OpenPGP UIDs based on what group I am sending email from.


Can anyone help?


[-- Attachment #1.2: Type: application/pgp-signature, Size: 196 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
  2009-04-04  8:13             ` Daiki Ueno
@ 2009-04-04  9:53               ` Daiki Ueno
  0 siblings, 0 replies; 15+ messages in thread
From: Daiki Ueno @ 2009-04-04  9:53 UTC (permalink / raw)
  To: Richard Riley; +Cc: info-gnus-english

>>>>> In <9f699e89-9b82-4b37-8cfe-5a0b47359f58@broken.deisui.org> 
>>>>>	Daiki Ueno <ueno@unixuser.org> wrote:
> However, I see at least a major drawback of using gnus-posting-styles
> for this matter--the user cannot "preview" the signed article before
> sending using C-c RET C-p.

Ah, sorry.  This is my misunderstanding (I've never used
gnus-posting-styles seriously).
-- 
Daiki Ueno

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
  2009-04-04  6:31           ` Richard Riley
@ 2009-04-04  8:13             ` Daiki Ueno
  2009-04-04  9:53               ` Daiki Ueno
  0 siblings, 1 reply; 15+ messages in thread
From: Daiki Ueno @ 2009-04-04  8:13 UTC (permalink / raw)
  To: Richard Riley; +Cc: info-gnus-english

>>>>> In <gr6usg$k26$1@news.motzarella.org> 
>>>>>	Richard Riley <rileyrgdev@gmail.com> wrote:

> A nice example of using the standard gnus-posting-styles would be nice!

Yes, the example could also be written with gnus-posting-styles.
However, I see at least a major drawback of using gnus-posting-styles
for this matter--the user cannot "preview" the signed article before
sending using C-c RET C-p.

> I tried setting the "cover" APi variable of epa-user-id, but it doesn't
> seem to work.

???  Where epa-user-id comes from?

> Adding extra hooks seems an unnecessary complication.

Then, why not making such a feature standard (if we find it is useful)?
Daniel Dehennin is already working for this.

Regards,
-- 
Daiki Ueno

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
       [not found]         ` <mailman.4591.1238812676.31690.info-gnus-english@gnu.org>
@ 2009-04-04  6:31           ` Richard Riley
  2009-04-04  8:13             ` Daiki Ueno
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Riley @ 2009-04-04  6:31 UTC (permalink / raw)
  To: info-gnus-english


Daiki Ueno <ueno@unixuser.org> writes:

>>>>>> In <87myaxbrr1.fsf@sunoano.org> 
>>>>>>	Suno Ano <suno.ano@sunoano.org> wrote:
>
>> Daiki, do you think you could provide an example for switching keys
>> based on their key ID and using gnus-parameters? That would be awesome!
>
> Here it is:
>
> (add-hook 'message-setup-hook
> 	  (lambda ()
> 	    (if gnus-newsgroup-name
> 		(let ((signers (gnus-group-get-parameter
> 				gnus-newsgroup-name
> 				'mml2015-signers
> 				t)))
> 		  (if signers
> 		      (set (make-local-variable 'mml2015-signers)
> 			   signers))))))
>
> Then, you will be able to set your key ID for a group with "G p" and
> something like:
>
> ((timestamp 18902 50694)
>  (mml2015-signers "9549F362"))
>
> Where "9549F362" is my key ID.
>
> Regards,

A nice example of using the standard gnus-posting-styles would be nice!


I tried setting the "cover" APi variable of epa-user-id, but it doesn't
seem to work.

Adding extra hooks seems an unnecessary complication.

regards,

r.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
  2009-04-03 16:56       ` Suno Ano
  2009-04-03 17:05         ` thierry.volpiatto
@ 2009-04-04  2:37         ` Daiki Ueno
       [not found]         ` <mailman.4591.1238812676.31690.info-gnus-english@gnu.org>
  2 siblings, 0 replies; 15+ messages in thread
From: Daiki Ueno @ 2009-04-04  2:37 UTC (permalink / raw)
  To: Suno Ano; +Cc: info-gnus-english

>>>>> In <87myaxbrr1.fsf@sunoano.org> 
>>>>>	Suno Ano <suno.ano@sunoano.org> wrote:

> Daiki, do you think you could provide an example for switching keys
> based on their key ID and using gnus-parameters? That would be awesome!

Here it is:

(add-hook 'message-setup-hook
	  (lambda ()
	    (if gnus-newsgroup-name
		(let ((signers (gnus-group-get-parameter
				gnus-newsgroup-name
				'mml2015-signers
				t)))
		  (if signers
		      (set (make-local-variable 'mml2015-signers)
			   signers))))))

Then, you will be able to set your key ID for a group with "G p" and
something like:

((timestamp 18902 50694)
 (mml2015-signers "9549F362"))

Where "9549F362" is my key ID.

Regards,
-- 
Daiki Ueno

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
  2009-04-03 11:22     ` Daiki Ueno
  2009-04-03 16:56       ` Suno Ano
@ 2009-04-03 17:21       ` Leo
  1 sibling, 0 replies; 15+ messages in thread
From: Leo @ 2009-04-03 17:21 UTC (permalink / raw)
  To: info-gnus-english

On 2009-04-03 12:22 +0100, Daiki Ueno wrote:
>>>>>> In <871vsbvukg.fsf@sunoano.org> 
>>>>>>	Suno Ano <suno.ano@sunoano.org> wrote:
>
>> Thanks for your reply Richard but then still, it is not working. Here is
>> my current setup:
>
> You seem to use Emacs 23.0.91 shipped with EasyPG (aka epg), the
> successor of pgg.  Since Gnus attempts to use epg if available, pgg
> settings are ignored for PGP/MIME.  Check the value of mml2015-use.

I wish pgg be marked obsolete once 23.1 is out. 

>
> FWIW, selecting encryption key is a FAQ even for epg--I've posted an
> example setting to this list:
> http://article.gmane.org/gmane.emacs.gnus.user/8506
>
> Though this selects encryption keys by the "From:" header, it can easily
> be adapted to posting-styles.
>
> Regards,

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .: I use Emacs :.

               www.git-scm.com
    git - the one true version control system

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
  2009-04-03 16:56       ` Suno Ano
@ 2009-04-03 17:05         ` thierry.volpiatto
  2009-04-04  2:37         ` Daiki Ueno
       [not found]         ` <mailman.4591.1238812676.31690.info-gnus-english@gnu.org>
  2 siblings, 0 replies; 15+ messages in thread
From: thierry.volpiatto @ 2009-04-03 17:05 UTC (permalink / raw)
  To: info-gnus-english

Hi Suno,
if you call `epa-mail-sign' with a prefix arg, you will have an
interface to choose your key.

Suno Ano <suno.ano@sunoano.org> writes:

>  Daiki> You seem to use Emacs 23.0.91 shipped with EasyPG (aka epg), the
>  Daiki> successor of pgg.
>
> Yes, I am on Debian sid and I use the snapshot package provided by
> http://emacs.orebokech.com/ i.e.
>
> ,----[ C-h v emacs-version RET ]
> | emacs-version is a variable defined in `version.el'.
> | Its value is "23.0.91.1"
> |
> | Documentation:
> | Version numbers of this version of Emacs.
> |
> | [back]
> `----
>
>
>
>  Daiki> Since Gnus attempts to use epg if available, pgg settings are
>  Daiki> ignored for PGP/MIME. Check the value of mml2015-use.
>
> ok, here it is
>
> ,----[ C-h v mml2015-use RET ]
> | mml2015-use is a variable defined in `mml2015.el'.
> | Its value is epg
> |
> | Documentation:
> | The package used for PGP/MIME.
> | Valid packages include `epg', `pgg', `gpg' and `mailcrypt'.
> |
> | [back]
> `----
>
>
>
>  Daiki> Fwiw, selecting encryption key is a FAQ even for epg -- I've
>  Daiki> posted an example setting to this list:
>  Daiki> http://article.gmane.org/gmane.emacs.gnus.user/8506
>
>  Daiki> Though this selects encryption keys by the "From:" header, it
>  Daiki> can easily be adapted to posting-styles.
>
> Well, here is the problem, I am not exactly skilled with elisp but I
> could definitely work things out with a bit documentation on the matter.
>
> Anyways, I am glad++ you answered because a lot of folks seem to run
> into that problem but then either give up after trying numerous times to
> work it out with pgg (which is wrong as we/I know now; should be epg) or
> simply do not start signing/encrypting their messages at all even they
> know it is epg they need to look at.
>
>
> I also agree with Richard on the fact that there is no decent piece of
> docu/information about the fact
>
>  - that it is not pgg but epg one should look into plus
>  - no docu about setting up signing with epg at all; all I found is this
>    http://www.emacswiki.org/emacs/EasyPG
>
>
> Daiki, do you think you could provide an example for switching keys
> based on their key ID and using gnus-parameters? That would be awesome!
> _______________________________________________
> info-gnus-english mailing list
> info-gnus-english@gnu.org
> http://lists.gnu.org/mailman/listinfo/info-gnus-english

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
  2009-04-03 11:22     ` Daiki Ueno
@ 2009-04-03 16:56       ` Suno Ano
  2009-04-03 17:05         ` thierry.volpiatto
                           ` (2 more replies)
  2009-04-03 17:21       ` Leo
  1 sibling, 3 replies; 15+ messages in thread
From: Suno Ano @ 2009-04-03 16:56 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 1968 bytes --]


 Daiki> You seem to use Emacs 23.0.91 shipped with EasyPG (aka epg), the
 Daiki> successor of pgg.

Yes, I am on Debian sid and I use the snapshot package provided by
http://emacs.orebokech.com/ i.e.

,----[ C-h v emacs-version RET ]
| emacs-version is a variable defined in `version.el'.
| Its value is "23.0.91.1"
|
| Documentation:
| Version numbers of this version of Emacs.
|
| [back]
`----



 Daiki> Since Gnus attempts to use epg if available, pgg settings are
 Daiki> ignored for PGP/MIME. Check the value of mml2015-use.

ok, here it is

,----[ C-h v mml2015-use RET ]
| mml2015-use is a variable defined in `mml2015.el'.
| Its value is epg
|
| Documentation:
| The package used for PGP/MIME.
| Valid packages include `epg', `pgg', `gpg' and `mailcrypt'.
|
| [back]
`----



 Daiki> Fwiw, selecting encryption key is a FAQ even for epg -- I've
 Daiki> posted an example setting to this list:
 Daiki> http://article.gmane.org/gmane.emacs.gnus.user/8506

 Daiki> Though this selects encryption keys by the "From:" header, it
 Daiki> can easily be adapted to posting-styles.

Well, here is the problem, I am not exactly skilled with elisp but I
could definitely work things out with a bit documentation on the matter.

Anyways, I am glad++ you answered because a lot of folks seem to run
into that problem but then either give up after trying numerous times to
work it out with pgg (which is wrong as we/I know now; should be epg) or
simply do not start signing/encrypting their messages at all even they
know it is epg they need to look at.


I also agree with Richard on the fact that there is no decent piece of
docu/information about the fact

 - that it is not pgg but epg one should look into plus
 - no docu about setting up signing with epg at all; all I found is this
   http://www.emacswiki.org/emacs/EasyPG


Daiki, do you think you could provide an example for switching keys
based on their key ID and using gnus-parameters? That would be awesome!

[-- Attachment #1.2: Type: application/pgp-signature, Size: 196 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
  2009-04-03 11:32       ` Richard Riley
@ 2009-04-03 11:54         ` Richard Riley
  0 siblings, 0 replies; 15+ messages in thread
From: Richard Riley @ 2009-04-03 11:54 UTC (permalink / raw)
  To: info-gnus-english

Richard Riley <rileyrgdev@gmail.com> writes:

> Daiki Ueno <ueno@unixuser.org> writes:
>
>>>>>>> In <871vsbvukg.fsf@sunoano.org> 
>>>>>>>	Suno Ano <suno.ano@sunoano.org> wrote:
>>
>>> Thanks for your reply Richard but then still, it is not working. Here is
>>> my current setup:
>>
>> You seem to use Emacs 23.0.91 shipped with EasyPG (aka epg), the
>> successor of pgg.  Since Gnus attempts to use epg if available, pgg
>> settings are ignored for PGP/MIME.  Check the value of mml2015-use.
>>
>> FWIW, selecting encryption key is a FAQ even for epg--I've posted an
>> example setting to this list:
>> http://article.gmane.org/gmane.emacs.gnus.user/8506
>>
>> Though this selects encryption keys by the "From:" header, it can easily
>> be adapted to posting-styles.
>>
>> Regards,
>
> Ye gods. You're right - I hadn't noticed that as I had not
> signed/encrypted anything recently! Thanks for the heads up!

Could you point me to some docs for this? I am a tad confused between
epa and epg at this stage and few if any of the variables have a
docstring attached. Could you explain the separation?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
       [not found]     ` <mailman.4527.1238757743.31690.info-gnus-english@gnu.org>
@ 2009-04-03 11:32       ` Richard Riley
  2009-04-03 11:54         ` Richard Riley
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Riley @ 2009-04-03 11:32 UTC (permalink / raw)
  To: info-gnus-english

Daiki Ueno <ueno@unixuser.org> writes:

>>>>>> In <871vsbvukg.fsf@sunoano.org> 
>>>>>>	Suno Ano <suno.ano@sunoano.org> wrote:
>
>> Thanks for your reply Richard but then still, it is not working. Here is
>> my current setup:
>
> You seem to use Emacs 23.0.91 shipped with EasyPG (aka epg), the
> successor of pgg.  Since Gnus attempts to use epg if available, pgg
> settings are ignored for PGP/MIME.  Check the value of mml2015-use.
>
> FWIW, selecting encryption key is a FAQ even for epg--I've posted an
> example setting to this list:
> http://article.gmane.org/gmane.emacs.gnus.user/8506
>
> Though this selects encryption keys by the "From:" header, it can easily
> be adapted to posting-styles.
>
> Regards,

Ye gods. You're right - I hadn't noticed that as I had not
signed/encrypted anything recently! Thanks for the heads up!

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
  2009-04-02 17:23   ` Suno Ano
@ 2009-04-03 11:22     ` Daiki Ueno
  2009-04-03 16:56       ` Suno Ano
  2009-04-03 17:21       ` Leo
       [not found]     ` <mailman.4527.1238757743.31690.info-gnus-english@gnu.org>
  1 sibling, 2 replies; 15+ messages in thread
From: Daiki Ueno @ 2009-04-03 11:22 UTC (permalink / raw)
  To: Suno Ano; +Cc: info-gnus-english

>>>>> In <871vsbvukg.fsf@sunoano.org> 
>>>>>	Suno Ano <suno.ano@sunoano.org> wrote:

> Thanks for your reply Richard but then still, it is not working. Here is
> my current setup:

You seem to use Emacs 23.0.91 shipped with EasyPG (aka epg), the
successor of pgg.  Since Gnus attempts to use epg if available, pgg
settings are ignored for PGP/MIME.  Check the value of mml2015-use.

FWIW, selecting encryption key is a FAQ even for epg--I've posted an
example setting to this list:
http://article.gmane.org/gmane.emacs.gnus.user/8506

Though this selects encryption keys by the "From:" header, it can easily
be adapted to posting-styles.

Regards,
-- 
Daiki Ueno

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
  2009-04-02 17:58     ` Richard Riley
@ 2009-04-02 21:05       ` Suno Ano
  0 siblings, 0 replies; 15+ messages in thread
From: Suno Ano @ 2009-04-02 21:05 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 659 bytes --]


 Richard> I'm sorry about I don't know what posting-styles is. Is this
 Richard> your own version of gnus-posting-styles which I showed in the
 Richard> example?

Yes, the example (with line 25) is taken from my .emacs file.

As mentioned, I use gnus-parameters (see [0] for more information) in
order to apply settings to various groups (news, email, feeds). Now I
want to use gnus-parameters to specify which pgg UID to choose as well.

posting-style is just one keyword that can be used with gnus-parameters
which, in that case, is used to specify posting styles for a particular
group.


[0] evaluate this form: (info-goto-node "(gnus)group parameters")

[-- Attachment #1.2: Type: application/pgp-signature, Size: 196 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
       [not found]   ` <mailman.4452.1238693022.31690.info-gnus-english@gnu.org>
@ 2009-04-02 17:58     ` Richard Riley
  2009-04-02 21:05       ` Suno Ano
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Riley @ 2009-04-02 17:58 UTC (permalink / raw)
  To: info-gnus-english

Suno Ano <suno.ano@sunoano.org> writes:

> Thanks for your reply Richard but then still, it is not working. Here is
> my current setup:

I'm sorry about I don't know what posting-styles is. Is this your own
version of gnus-posting-styles which I showed in the example?

>
>
> ,----[ My basic settings for pgg ]
> | (require 'pgg)
> |
> | (setq pgg-default-scheme 'gpg)
> | (setq pgg-scheme 'gpg)
> |
> | (setq pgg-query-keyserver t)
> | (setq pgg-default-keyserver-address "subkeys.pgp.net")
> |
> | (setq gnus-message-replysign t
> |       gnus-message-replyencrypt t
> |       gnus-message-replysignencrypted t
> |       mm-verify-option 'always
> |       mm-decrypt-option 'always
> | )
> |
> | (add-hook 'message-send-hook 'mml-secure-message-sign-pgpmime)
> `----
>
>
> And the second part, the gnus-parameters; below is only *one* group
> where I try to set a particular UID in line 25:
>
>  1  (setq gnus-parameters
>  2        `(
>  3
>  4
>  5  [skipping a lot of lines ...]
>  6
>  7
>  8          (,priv-my-gmail0-mail-address-gp
>  9           ; .... spam rules ............
> 10           (spam-contents gnus-group-spam-classification-ham)
> 11           (spam-process-destination . "nnimap:m.junk")
> 12           (spam-process ((spam spam-use-blacklist)
> 13                          (ham spam-use-whitelist)     ; for ham groups only
> 14                          (ham spam-use-bogofilter)    ; for ham groups only
> 15                          (spam spam-use-bogofilter)))
> 16           ; .... agent parameters ......
> 17           (agent-predicate . true)
> 18           (agent-score . file)
> 19           ; - - agent score rule - -
> 20           ; .... posting style .........
> 21           (posting-style
> 22              (name priv-my-name)
> 23              (address priv-my-sunoano1-mail-address)
> 24              (signature-file (concat emacs-root-dir "gnus/sig/m.realname"))
> 25              (eval (setq pgg-gpg-user-id "foo@example.com"))
> 26           )
> 27           ; .... group parameters ......
> 28           (display . 20)
> 29           ; .... local variables .......
> 30          )
> 31
> 32
> 33  [skipping a lot of lines ...]
> 34
> 35
> 36         )
> 37  )
>
>
> The odd thing is that no matter what I do, I am always prompted for one
> and only one UID even if I set the second one as shown above in line 25.
>
>        (as an example, this post is signed with my first UID, the one
>        that always pops up with pinentry no matter what)
>
>
> If I try to send a mail from the group specified above and then check
> (in the article buffer) with "C-h v pgg-gpg-user-id RET" the correct UID
> shows (the one given in line 25) but when I hit C-c C-c to ship of the
> mail, pinentry asks me for the other UID i.e. not the one specified in
> line 25 and shown with C-h v in the article buffer.
>
> Does anyone know what is going on here? All I want is to chose among my
> two GPG (GNU Privacy Guard) keys for signing, depending on which group I
> send mail from ...
>

-- 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
  2009-03-29 20:27 ` Richard Riley
@ 2009-04-02 17:23   ` Suno Ano
  2009-04-03 11:22     ` Daiki Ueno
       [not found]     ` <mailman.4527.1238757743.31690.info-gnus-english@gnu.org>
       [not found]   ` <mailman.4452.1238693022.31690.info-gnus-english@gnu.org>
  1 sibling, 2 replies; 15+ messages in thread
From: Suno Ano @ 2009-04-02 17:23 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 2689 bytes --]


Thanks for your reply Richard but then still, it is not working. Here is
my current setup:


,----[ My basic settings for pgg ]
| (require 'pgg)
|
| (setq pgg-default-scheme 'gpg)
| (setq pgg-scheme 'gpg)
|
| (setq pgg-query-keyserver t)
| (setq pgg-default-keyserver-address "subkeys.pgp.net")
|
| (setq gnus-message-replysign t
|       gnus-message-replyencrypt t
|       gnus-message-replysignencrypted t
|       mm-verify-option 'always
|       mm-decrypt-option 'always
| )
|
| (add-hook 'message-send-hook 'mml-secure-message-sign-pgpmime)
`----


And the second part, the gnus-parameters; below is only *one* group
where I try to set a particular UID in line 25:

 1  (setq gnus-parameters
 2        `(
 3
 4
 5  [skipping a lot of lines ...]
 6
 7
 8          (,priv-my-gmail0-mail-address-gp
 9           ; .... spam rules ............
10           (spam-contents gnus-group-spam-classification-ham)
11           (spam-process-destination . "nnimap:m.junk")
12           (spam-process ((spam spam-use-blacklist)
13                          (ham spam-use-whitelist)     ; for ham groups only
14                          (ham spam-use-bogofilter)    ; for ham groups only
15                          (spam spam-use-bogofilter)))
16           ; .... agent parameters ......
17           (agent-predicate . true)
18           (agent-score . file)
19           ; - - agent score rule - -
20           ; .... posting style .........
21           (posting-style
22              (name priv-my-name)
23              (address priv-my-sunoano1-mail-address)
24              (signature-file (concat emacs-root-dir "gnus/sig/m.realname"))
25              (eval (setq pgg-gpg-user-id "foo@example.com"))
26           )
27           ; .... group parameters ......
28           (display . 20)
29           ; .... local variables .......
30          )
31
32
33  [skipping a lot of lines ...]
34
35
36         )
37  )


The odd thing is that no matter what I do, I am always prompted for one
and only one UID even if I set the second one as shown above in line 25.

       (as an example, this post is signed with my first UID, the one
       that always pops up with pinentry no matter what)


If I try to send a mail from the group specified above and then check
(in the article buffer) with "C-h v pgg-gpg-user-id RET" the correct UID
shows (the one given in line 25) but when I hit C-c C-c to ship of the
mail, pinentry asks me for the other UID i.e. not the one specified in
line 25 and shown with C-h v in the article buffer.

Does anyone know what is going on here? All I want is to chose among my
two GPG (GNU Privacy Guard) keys for signing, depending on which group I
send mail from ...

[-- Attachment #1.2: Type: application/pgp-signature, Size: 196 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pgg-default-user-id with more than one UID
       [not found] <mailman.4214.1238356815.31690.info-gnus-english@gnu.org>
@ 2009-03-29 20:27 ` Richard Riley
  2009-04-02 17:23   ` Suno Ano
       [not found]   ` <mailman.4452.1238693022.31690.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 15+ messages in thread
From: Richard Riley @ 2009-03-29 20:27 UTC (permalink / raw)
  To: info-gnus-english

Suno Ano <suno.ano@sunoano.org> writes:

> hi folks,
>
> I am with up-to-date Gnus/Emacs and I use pgg.el for signing/encrypting
> email. I am on Debian sid, using GPG (GNU Privacy Guard).
>
> I have *two* (instead of just one) OpenPGP UIDs (User IDs) which I would
> like to use based on what group I am sending email from.
>
>
>
> `pgg-default-user-id' allows me to specify only one UID which is then
> applied to each email no matter what group I send it from -- right now I
> do this with
>
>  (add-hook 'message-send-hook 'mml-secure-message-sign-pgpmime)
>
>
>
> However, I use gnus-parameters to treat different groups differently
> e.g. use different sender addresses etc. I want to use gnus-parameters
> for selecting my OpenPGP UIDs as well.
>
> The info manual mentions `(VARIABLE FORM)' at (Info-goto-node "(gnus)
> Group Parameters") but then I am simply to inexperienced with elisp to
> come up the the solution needed to selectively apply either one of my
> OpenPGP UIDs based on what group I am sending email from.
>
>
> Can anyone help?
>
>

(setq gnus-posting-styles
      `(
	(
	 ,(rx(or "group name match"))
	 (from "My Name <myemail>")
	 (name "My Name")
	 (eval (setq pgg-gpg-user-id "myui123"))
	 )
	)
      )



-- 

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-04-04  9:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-29 19:57 pgg-default-user-id with more than one UID Suno Ano
     [not found] <mailman.4214.1238356815.31690.info-gnus-english@gnu.org>
2009-03-29 20:27 ` Richard Riley
2009-04-02 17:23   ` Suno Ano
2009-04-03 11:22     ` Daiki Ueno
2009-04-03 16:56       ` Suno Ano
2009-04-03 17:05         ` thierry.volpiatto
2009-04-04  2:37         ` Daiki Ueno
     [not found]         ` <mailman.4591.1238812676.31690.info-gnus-english@gnu.org>
2009-04-04  6:31           ` Richard Riley
2009-04-04  8:13             ` Daiki Ueno
2009-04-04  9:53               ` Daiki Ueno
2009-04-03 17:21       ` Leo
     [not found]     ` <mailman.4527.1238757743.31690.info-gnus-english@gnu.org>
2009-04-03 11:32       ` Richard Riley
2009-04-03 11:54         ` Richard Riley
     [not found]   ` <mailman.4452.1238693022.31690.info-gnus-english@gnu.org>
2009-04-02 17:58     ` Richard Riley
2009-04-02 21:05       ` Suno Ano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).