Re: Mail-crypt won't encrypt emails

2019-12-01 Thread sewing via dovecot
The plugin encrypts mail to be written encrypted at rest /on/ the server, and
then decrypts the same mail when it is read /off/ the server. If it is
working correctly mails sent will arrive at their destination readable. You
need to go to the user directory where the mail is residing (example): 

/mail/vhosts//username/cur   (wherever your user mail resides)

Choose any mail (example...  
'1546546546546.Mdffgdfg535435.domain,S=4355435W=4r34534:3,S' ) will look
something like that (I have obfuscated the actual example but it will look
similar).

Now try and view it on the server using 

> postcat  '1546546546546.Mdffgdfg535435.domain,S=4355435W=4r34534:3,S'

1. If you get an error that looks something like:

*** ENVELOPE RECORDS
'1546546546546.Mdffgdfg535435.domain,S=4355435W=4r34534:3,S' ***
message_size: YPTED
postcat: fatal: invalid size record: YPTED???

OR

2. Alternatively you can try and > cat the message like a text file and at
the start of the output you will see the string:  CRYPTED

Then you will know the plugin is working.

If it shows the message in plaintext, the plugin is not active. 



--
Sent from: http://dovecot.2317879.n4.nabble.com/


Trying to install Mailcrypt, receive completely blank emails

2019-08-21 Thread sewing via dovecot
Hi - perhaps someone can help me.

Starting from a good and well-functioning mailserver setup, I have installed
MailCrypt as per the instructions (I think) to have the per-user passworded
keys setup.

dovecot.conf

/Added:/
mail_attribute_dict = file:%h/Maildir/dovecot-attributes
mail_plugins = $mail_plugins mail_crypt

dovecot-sql.conf.ext

/commented this/ #password_query = SELECT email as user, password FROM
virtual_users WHERE email='%u';
/Added this/ 
password_query = SELECT \
email as user, password, \
'%w' AS userdb_mail_crypt_private_password \
FROM virtual_users  WHERE email='%u';

90-plugin.conf

/Updated this section/
plugin {
mail_crypt_curve = secp521r1
mail_crypt_save_version = 2
/Have also tried all configurations this option set
/#mail_crypt_require_encrypted_user_key = yes
}

/The user is in the mailserver SQL database:/

| user | password   
   
| userdb_mail_crypt_private_password |
+--+++
| user@domain |
4t63ttt36tt3rt6r763r76t8998t858t4y48ht4huu4hti.76876t847t47yt4ty478yt4wgwygfwffweggwy8yey83//FElgiApZU.
| %w

/I have reissued the keys as other problem resolutions have instructed to
do, and I can see the new keys are active./
doveadm -o plugin/mail_crypt_private_password=(same password as user@domain
when created in SQL) mailbox cryptokey generate -u user@domain -UR

/I have restarted dovecot and postfix each time./

/I then send an email either from the user@domain > user@domain OR
otheruser@otherdomain > user@domain from Outlook. Authentication is fine
(POP and SMTP). 
No errors appear in any logs - the logs show the mail as being received and
I can see the mail in the user@domain /cur folder. If I try to Postcat any
of these messages I get:/

postcat '1*2.M**3.(host),S=633,W=649:2,S'
*** ENVELOPE RECORDS 1*2.M*3.(host),S=633,W=649:2,S ***
message_size: YPTED
postcat: fatal: invalid size record: YPTED???

*/Within a minute or so I receive the email in the Outlook Inbox - except it
is completely empty of anything. 
There is no TO / FROM/ SUBJECT / Body or even Routing information. See
screencaps from Outlook/*

 

 
/This happens with existing user mailboxes and new test mailboxes I create.

If I deactivate Mailcrypt all mailboxes/user-accounts work fine.

Any ideas???

I would like to get the working - thanks in advance for your expertise and
time!/

Graham







--
Sent from: http://dovecot.2317879.n4.nabble.com/