Re: mutt with GPG and S/Mime

2015-07-01 Thread Niels Kobschaetzki

On 30/06 16:47, Jon LaBadie wrote:

On Tue, Jun 30, 2015 at 10:11:53PM +0200, jonas hedman wrote:

On 15-06-30 22:00:27, Niels Kobschaetzki wrote:
 Hi,

 is it possible to use with one account PGP and S/Mime? I found a how-to
 for using S/Mime or using mutt with one account with PGP and one account
 S/Mime. But I want to use my main account with both and would like to
 choose on a per user basis whether I encrypt via PGP or S/Mime. I know
 people who use only PGP and others only S/Mime.
 So: is this possible in mutt? If yes, how - any how-tos you can
 recommend?

 Thanks,
 Niels

Hi!

I use send-hooks for this for examples
send-hook someonewhoperfersinlinecry...@mail.com set pgp_autoinline; set 
pgp_autoencrypt

While I have S/Mime as standard in my default crypto settings.



For configuration ease, so as not to have lots of send-hooks,
could you do something like:

set my_PersonsWhoUsePGP = \
   pers...@email1.com,\
   pers...@email2.com,\
 ...
   pers...@emailn.com

send-hook $my_PersonsWhoUsePGP set pgp_autoinline; set pgp_autoencrypt


Thanks a lot. Your suggestions look really good :)

Niels


Re: mutt with GPG and S/Mime

2015-07-01 Thread Cameron Simpson

On 01Jul2015 20:12, Ian Zimmerman i...@buug.org wrote:

On 2015-07-02 12:20 +1000, Cameron Simpson wrote:

I keep a little maildb which assigns group names to addresses, and
autogenerate mutt aliases formed like the above from it. Why the
maildb?  Because my mail filing also uses these groups in its rules.


Excuse my ignorance, but what is a maildb?  Just a Berkeley DB file or
similar with emails and groups?  Or?


Ah, sorry, it is a thing of my own. But any external-to-mutt db might do if it 
lets you tag or group addresses. Mine is a particular flavour of CSV, with an 
associated tool and some handy edit tools. My mailfiler knows how to consult 
it, so I get to use these groups in mail filing and also in mutt config.


Cheers,
Cameron Simpson c...@zip.com.au

It looked good-natured, she thought;  Still it had very long claws and a
great many teeth, so she felt it ought to be treated with respect.


Re: mutt with GPG and S/Mime

2015-07-01 Thread Ian Zimmerman
On 2015-07-02 12:20 +1000, Cameron Simpson wrote:

 I keep a little maildb which assigns group names to addresses, and
 autogenerate mutt aliases formed like the above from it. Why the
 maildb?  Because my mail filing also uses these groups in its rules.

Excuse my ignorance, but what is a maildb?  Just a Berkeley DB file or
similar with emails and groups?  Or?

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.



Re: mutt with GPG and S/Mime

2015-07-01 Thread Cameron Simpson

On 30Jun2015 16:47, Jon LaBadie mut...@jgcomp.com wrote:

On Tue, Jun 30, 2015 at 10:11:53PM +0200, jonas hedman wrote:

On 15-06-30 22:00:27, Niels Kobschaetzki wrote:
 is it possible to use with one account PGP and S/Mime? I found a how-to
 for using S/Mime or using mutt with one account with PGP and one account
 S/Mime. But I want to use my main account with both and would like to
 choose on a per user basis whether I encrypt via PGP or S/Mime. I know
 people who use only PGP and others only S/Mime.
 So: is this possible in mutt? If yes, how - any how-tos you can
 recommend?

I use send-hooks for this for examples
send-hook someonewhoperfersinlinecry...@mail.com set pgp_autoinline; set 
pgp_autoencrypt
While I have S/Mime as standard in my default crypto settings.


For configuration ease, so as not to have lots of send-hooks,
could you do something like:

set my_PersonsWhoUsePGP = \
   pers...@email1.com,\
   pers...@email2.com,\
 ...
   pers...@emailn.com

send-hook $my_PersonsWhoUsePGP set pgp_autoinline; set pgp_autoencrypt


A cleaner solution might be to reframe the above like this:

 alias -group pgpers pgpers pers...@email1.com, pers...@email2.com, ...

 send-hook '%C pgpers' 'set pgp_autoinline; set pgp_autoencrypt'

I suggest this for two reasons. First, address groups seem a much cleaner 
system for talking about groups of addresses and second, I use them 
aggressively!  I keep a little maildb which assigns group names to addresses, 
and autogenerate mutt aliases formed like the above from it. Why the maildb?  
Because my mail filing also uses these groups in its rules.


As a real world example, I use this in my muttrc for HTML:

 message-hook . 'unalternative_order *; alternative_order text/plain text/html'
 # Apple Mail embeds attachments in the HTML part instead of outside the 
multipart/mixed
 message-hook '~h X-Mailer: Apple Mail ~X 1-' 'unalternative_order *; 
alternative_order text/html multipart/mixed text/plain'
 message-hook '%f htmlers | ~f @no-re...@cc.yahoo-inc.com | ~f @outlook.com | 
~f live.com | ~f @facebookmail.com' 'unalternative_order *; alternative_order 
text/html text/plain'

That final message-hook selects HTML in preference for messages from people in 
my htmlers mutt group.


Cheers,
Cameron Simpson c...@zip.com.au

When Microsoft Office is your only hammer, pretty much everything begins to
look like a nail. Or a thumb. - Rob Pegoraro


Re: mutt with GPG and S/Mime

2015-06-30 Thread jonas hedman
On 15-06-30 22:00:27, Niels Kobschaetzki wrote:
 Hi,
 
 is it possible to use with one account PGP and S/Mime? I found a how-to
 for using S/Mime or using mutt with one account with PGP and one account
 S/Mime. But I want to use my main account with both and would like to
 choose on a per user basis whether I encrypt via PGP or S/Mime. I know
 people who use only PGP and others only S/Mime.
 So: is this possible in mutt? If yes, how - any how-tos you can
 recommend?
 
 Thanks,
 Niels

Hi!

I use send-hooks for this for examples
send-hook someonewhoperfersinlinecry...@mail.com set pgp_autoinline; set 
pgp_autoencrypt

While I have S/Mime as standard in my default crypto settings.

/jonas


signature.asc
Description: Digital signature


Re: mutt with GPG and S/Mime

2015-06-30 Thread Jon LaBadie
On Tue, Jun 30, 2015 at 10:11:53PM +0200, jonas hedman wrote:
 On 15-06-30 22:00:27, Niels Kobschaetzki wrote:
  Hi,
  
  is it possible to use with one account PGP and S/Mime? I found a how-to
  for using S/Mime or using mutt with one account with PGP and one account
  S/Mime. But I want to use my main account with both and would like to
  choose on a per user basis whether I encrypt via PGP or S/Mime. I know
  people who use only PGP and others only S/Mime.
  So: is this possible in mutt? If yes, how - any how-tos you can
  recommend?
  
  Thanks,
  Niels
 
 Hi!
 
 I use send-hooks for this for examples
 send-hook someonewhoperfersinlinecry...@mail.com set pgp_autoinline; set 
 pgp_autoencrypt
 
 While I have S/Mime as standard in my default crypto settings.
 

For configuration ease, so as not to have lots of send-hooks,
could you do something like:

set my_PersonsWhoUsePGP = \
pers...@email1.com,\
pers...@email2.com,\
  ...
pers...@emailn.com

send-hook $my_PersonsWhoUsePGP set pgp_autoinline; set pgp_autoencrypt

I don't have that need, but I'm curious for other similar purposes.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (703) 935-6720 (C)


mutt with GPG and S/Mime

2015-06-30 Thread Niels Kobschaetzki

Hi,

is it possible to use with one account PGP and S/Mime? I found a how-to
for using S/Mime or using mutt with one account with PGP and one account
S/Mime. But I want to use my main account with both and would like to
choose on a per user basis whether I encrypt via PGP or S/Mime. I know
people who use only PGP and others only S/Mime.
So: is this possible in mutt? If yes, how - any how-tos you can
recommend?

Thanks,
Niels


Re: mutt with GPG and S/Mime

2015-06-30 Thread Peter P.
* Jon LaBadie mut...@jgcomp.com [2015-06-30 16:53]:
 On Tue, Jun 30, 2015 at 10:11:53PM +0200, jonas hedman wrote:
  On 15-06-30 22:00:27, Niels Kobschaetzki wrote:
   Hi,
   
   is it possible to use with one account PGP and S/Mime? I found a how-to
   for using S/Mime or using mutt with one account with PGP and one account
   S/Mime. But I want to use my main account with both and would like to
   choose on a per user basis whether I encrypt via PGP or S/Mime. I know
   people who use only PGP and others only S/Mime.
   So: is this possible in mutt? If yes, how - any how-tos you can
   recommend?
   
   Thanks,
   Niels
  
  Hi!
  
  I use send-hooks for this for examples
  send-hook someonewhoperfersinlinecry...@mail.com set pgp_autoinline; set 
  pgp_autoencrypt
  
  While I have S/Mime as standard in my default crypto settings.
  
 
 For configuration ease, so as not to have lots of send-hooks,
 could you do something like:
 
 set my_PersonsWhoUsePGP = \
 pers...@email1.com,\
 pers...@email2.com,\
   ...
 pers...@emailn.com
 
 send-hook $my_PersonsWhoUsePGP set pgp_autoinline; set pgp_autoencrypt
 
 I don't have that need, but I'm curious for other similar purposes.
Thank you, this is a great contribution!

I am also curious if the above solution would be able to distinguish
between mails that are sent to the pers...@email1.com (who uses PGP)
only and exclusively, and between mails that get sent to others in CC:
as well.

best, 
P