Add "Received:" header to email msg in correct position?

Discussion in 'Python' started by Grant Edwards, May 5, 2014.

  1. Does procmail implement the server-side of SMTP?
    Grant Edwards, May 7, 2014
    1. Advertisements

  2. Grant Edwards

    Burak Arslan Guest

    Seeing how discussion is still going on about this, I'd like to state
    once more what I said above in other words: You just need to do this:

    "Received: blah\r\n" + message.to_string()

    or better:

    socket.write("Received: blah\r\n")

    And again, this is not a hack, this is how it's supposed to work.

    Burak Arslan, May 7, 2014
    1. Advertisements

  3. Yes, that method does work... if you're taking it in and sending it
    right out again. But it means you have to hang onto two pieces of data
    - the message and the new Received header - until you write it to a

    (By the way, side point: I tend to avoid calling a socket "socket", as
    that's the name of the module. I'd use "sock" in examples. Otherwise
    someone's liable to go digging for a top-level method "write" in the
    "socket" module, and get confused. And then think that sockets are
    confusing, which they're not!)

    Chris Angelico, May 7, 2014
  4. Grant Edwards

    Ian Kelly Guest

    Ian Kelly, May 7, 2014
  5. Nevermind, I originally hadn't thought things completly through.
    Antoon Pardon, May 8, 2014
    Grant Edwards, May 8, 2014
  7. Grant Edwards

    Ethan Furman Guest

    Some filtering of your sigs would be appreciated.
    Ethan Furman, May 8, 2014
  8. That would be correct, fwiw.

    Chris Angelico, May 8, 2014
  9. Skip Montanaro, May 8, 2014
  10. Yep. I've removed a few of them from the file over the years because
    some people were offended by them. And I'll continue to do so...
    Grant Edwards, May 8, 2014
  11. Grant Edwards

    Tim Chase Guest

    I'm kinda disappointed having the curtain pulled back like that. I'd
    just assumed it was some nifty tool that turned a GPG/PGP signature
    into MadLibsâ„¢-style fill-in-the-blank and then flowed into various
    templates, allowing Grant to confirm/deny message authorship based on
    the unspoofability of the signature with any other message-body.

    Sounds like a fun weekend project ;-)

    Tim Chase, May 8, 2014
  12. Grant Edwards

    Ethan Furman Guest

    Thanks, much appreciated.
    Ethan Furman, May 9, 2014
  13. That would be cool...
    Grant Edwards, May 9, 2014
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.