Git Product home page Git Product logo

Comments (6)

jordan-wright avatar jordan-wright commented on August 14, 2024

Hi @vdvm, sorry for the delay in getting back to you! I have tagged this as an enhancement, since I'd like to do some research regarding not only the best way to format the message id, but also the speediest way to create one.

I'll get back in touch with this soon!

from email.

vdvm avatar vdvm commented on August 14, 2024

Hi @jordan-wright,

No problem. I'm glad you are willing to look into it :)

After sending a mail to my google account i looked at the source and it showed [email protected] in the Message-Id header. So i went to investigate. It seems that, according to the RFC, a mail client should add a Message-Id header. I did not know that so i checked some mailer programs (like Thunderbird, swift, etc.) and they all add a Message-Id header.
(A possible workaround is telling your MTA to add missing headers but then your DKIM breaks)

Regarding the Message-Id, i'm not sure what solution is best. Maybe UUID.date.time@hostname will do.

from email.

 avatar commented on August 14, 2024

According to RFC 822 and 2822 every email should have unique message-id in their header. I am a mutt user, I sort email by message-id which helps me sorting emails. suggestion made to have uuid-datetime@host-fqdn would be better or even we can use uuid-datetime-go-email@host-fqdn. I would love adding this feature

from email.

jordan-wright avatar jordan-wright commented on August 14, 2024

Looks like this one got put on the back-burner, but it shouldn't be hard to implement. Let me see what I can do.

from email.

jordan-wright avatar jordan-wright commented on August 14, 2024

After reviewing some options, I believe I will go with a format similar to that provided by Python's email package:

def make_msgid(idstring=None):
    """Returns a string suitable for RFC 2822 compliant Message-ID, e.g:

    <142480216486.20800.16526388040877946887@nightshade.la.mastaler.com>

    Optional idstring if given is a string used to strengthen the
    uniqueness of the message id.
    """
    timeval = int(time.time()*100)
    pid = os.getpid()
    randint = random.getrandbits(64)
    if idstring is None:
        idstring = ''
    else:
        idstring = '.' + idstring
    idhost = socket.getfqdn()
    msgid = '<%d.%d.%d%s@%s>' % (timeval, pid, randint, idstring, idhost)
    return msgid

The difference will be that, from what I can tell, there is no easy way to get the FQDN of the local host. With this being the case, I'll opt to use the hostname for now.

from email.

jordan-wright avatar jordan-wright commented on August 14, 2024

Ok, this should be good to go as of b359bc6. If you could please confirm, then I will consider this closed out.

If this still isn't working for you, please let me know and I'll re-open the issue.

Thanks for the great suggestion!

from email.

Related Issues (20)

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.