Code Monkey home page Code Monkey logo

gpg-mailgate.py's People

Contributors

ovpn-to avatar

Watchers

 avatar

gpg-mailgate.py's Issues

Unable to send messages BCC

What steps will reproduce the problem?
1. Send an email with only a Bcc recipient

What is the expected output? What do you see instead?
Mail should send along as normal, but instead it bounces back.

The problem is that the email being passed to gpg-mailgate doesn't contain Bcc 
information. Here's an example email that was sent Bcc to 
[email protected]:

Received: from [0.0.0.0] (localhost [127.0.0.1])
        by mydomain.foo (Postfix) with ESMTP id 4EA12512BB1
        for <[email protected]>; Wed,  7 Mar 2012 22:18:41 +0000 (UTC)
Message-ID: <[email protected]>
Date: Wed, 07 Mar 2012 15:18:58 -0700
From: Me <[email protected]>
MIME-Version: 1.0
To: undisclosed-recipients:;
Subject: test bcc email
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

test bcc email


Ok, so maybe we could look at the Received header to determine the Bcc list? 
Wrong. Here's what happens when you have multiple Bcc recipients, you get 
multiple emails like this:

Received: from [0.0.0.0] (localhost [127.0.0.1])
        by mydomain.foo (Postfix) with ESMTP id 60D7D51A9E8;
        Wed,  7 Mar 2012 22:25:06 +0000 (UTC)
Message-ID: <[email protected]>
Date: Wed, 07 Mar 2012 15:25:41 -0700
From: Me <[email protected]>
MIME-Version: 1.0
To: undisclosed-recipients:;
Subject: bcc test2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

bcc test2


Now there is *no way* for gpg-mailgate to know the recipients of this email 
because it's not being passed at all. Without being sent a Final-Recipient or 
Original-Recipient header by Postfix, gpg-map can't handle Bcc emails. I don't 
have enough knowledge of Postfix to determine a solution.

Original issue reported on code.google.com by [email protected] on 7 Mar 2012 at 10:30

GPG silently fails, returns blank message

What steps will reproduce the problem?
0. Assume an empty keyring
1. Add key from keyserver as normal, in this example: [email protected]
2. Test with this command pulled from the GnuPG library: echo 'test' | sudo -u 
nobody /usr/bin/gpg --homedir /var/gpg/.gnupg --batch --yes --pgp7 
--no-secmem-warning -a -e -r [email protected]

What is the expected output? What do you see instead?
Expectation is that 'test' becomes encrypted with the public key.
What actually happens is:
 gpg: XXXXXXXX: There is no assurance this key belongs to the named user
 gpg: [stdin]: encryption failed: unusable public key


What version of the product are you using? On what operating system?
gpg (GnuPG) 1.4.11 on Ubuntu 11.04

Please provide any additional information below.
Adding the following command-line argument in the GnuPG library fixed it for me:
--trust-model

Original issue reported on code.google.com by [email protected] on 11 Feb 2012 at 1:38

Blank message on NON plain text email.

What steps will reproduce the problem?
1. Sending of any non plain text mail. 
2.
3.

What is the expected output? What do you see instead?
Expected output is encrypted message.  Instead blank message. 

What version of the product are you using? On what operating system?
Debian Wheezy. Latest download of gpg-mailgate. 


Please provide any additional information below.
1. No errors anywhere.  Both in mailgate log and in postfix log. 
2. Patched __init__.py according to previous issue. 
3. Header is added. 
4. Tried on multiple mail clients to be sure. 
5. Plain text works perfectly. 
6. Python version is 2.7.3



Original issue reported on code.google.com by [email protected] on 2 Sep 2013 at 1:20

script fails with emails with To: headers as "email" <email>

What steps will reproduce the problem?
1. set the To: header in a message as "[email protected]" <[email protected]>
2. send message to the mailgate script
3. mailgate fails with the following error

What is the expected output? What do you see instead?

No message is encrypted, script fails with:

Traceback (most recent call last):
  File "/usr/local/bin/gpg-mailgate.py", line 94, in <module>
    send_msg( raw_message, gpg_to_smtp )
  File "/usr/local/bin/gpg-mailgate.py", line 39, in send_msg
    smtp.sendmail( from_addr, recipients, message.as_string() )
  File "/usr/lib/python2.6/smtplib.py", line 709, in sendmail
    raise SMTPRecipientsRefused(senderrs)
smtplib.SMTPRecipientsRefused: {}


What version of the product are you using? On what operating system?

Latest

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 24 Apr 2012 at 4:31

owner of /var/gpg

please point out that /var/gpg has to belong to the user placed in 
/etc/postfix/master.cf

Thanks
Hans

Original issue reported on code.google.com by [email protected] on 19 Oct 2011 at 6:02

Multi-part messages fail to encrypt

What steps will reproduce the problem?
1. Set up an address who's messages will be encrypted
2. Send yourself a multi-part message, such as an email from Twitter
3. Message will not be received

What is the expected output? What do you see instead?
This is the error message I see in my postfix logs:
postfix/pipe[6798]: XXXXXXXXX: to=<[email protected]>, relay=gpg-mailgate, 
delay=0.44, delays=0.34/0.01/0/0.09, dsn=5.3.0, status=bounced (Command died 
with status 1: "/usr/local/bin/gpg-mailgate.py". Command output: Traceback 
(most recent call last):   File "/usr/local/bin/gpg-mailgate.py", line 98, in 
<module>     gpg.update( get_msg(raw_message) )   File 
"/usr/local/bin/gpg-mailgate.py", line 53, in get_msg     return '\n\n'.join( 
message.get_payload() ) TypeError: sequence item 0: expected string, instance 
found )

What version of the product are you using? On what operating system?
Ubuntu 10.04.3

Please provide any additional information below.
I modified get_msg(), this seems to work (sorry, my Python-foo is weak, I know 
it could be done in fewer lines):

def get_msg( message ):
        if not message.is_multipart():
                return message.get_payload()
        ret = ''
        for i in message.get_payload():
                ret = ret + str(i.get_payload()) + '\n\n'
        return ret

Original issue reported on code.google.com by [email protected] on 14 Feb 2012 at 11:14

INSTALL step 4 : Place the GnuPG directory ....

Hi,

First thanks for the efforts on this project!

I can't get it working, did all the steps descripted in the INSTALL but think i 
did step 4 wrong. I placed the provided __init__.py in 
/usr/local/lib/python2.6/site-packages/GnuPG/

When sending out a mail postfix gives the error:

<[email protected]> (expanded from <username>): Command died with status 1:
    "/usr/local/bin/gpg-mailgate.py". Command output: Traceback (most recent
    call last):   File "/usr/local/bin/gpg-mailgate.py", line 5, in <module>
    import GnuPG ImportError: No module named GnuPG

Maybe you can tell me what i did wrong?

TIA
Kees

Original issue reported on code.google.com by [email protected] on 26 Nov 2010 at 10:19

Index Error on filter.

I get this:

File "/usr/bin/gpg-mailgate.py", line 48, in <module>     keys = 
GnuPG.public_keys( cfg['gpg']['keyhome'] )   File 
"/usr/lib64/python2.5/GnuPG/__init__.py", line 11, in public_keys     key = 
line.split('<')[1].split('>')[0] IndexError: list index out of range 

I checked the command being used to fetch the keys, and it returns with out 
issue.  I am not a python person, so I don't know how to check to see what the 
script is getting back or what the array looks like. 

The gpg and keyhome are set correctly as well.



Original issue reported on code.google.com by [email protected] on 16 Aug 2013 at 10:15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.