Gnus development mailing list
 help / color / mirror / Atom feed
From: asjo@koldfront.dk (Adam Sjøgren)
To: ding@gnus.org
Subject: message-make-fqdn generating strange Message-ID
Date: Fri, 17 Feb 2017 12:03:33 +0100	[thread overview]
Message-ID: <87a89l9j0a.fsf@tullinup.koldfront.dk> (raw)

Just having switched to Gnus from GNU Emacs master, Gnus complained:

  The Message-ID looks strange: "<87lgt59kxb.fsf@tullinup>".  Really post? (y or n)

This because gethostname() on my machine returns "tullinup" and
previously message-make-fqdn caught this by matching against
message-valid-fqdn-regexp, which was removed in 762986c9d36:

  -     ((and (string-match message-valid-fqdn-regexp sysname)
  -          (not (string-match message-bogus-system-names sysname)))
  +     ((and (string-match message-bogus-system-names sysname))

(larsi fixed the "((and" to "((not" later).

Should message-make-fqdn grow a simpler check ("Is there a '.' in the
sysname"), should the order of checks in it be shuffled around, or is my
machine broken when gethostname()¹ returns just the hostname
(hostname(1) returns the fqdn when given the -f option)?

For now I have set message-user-fqdn.


  Best regards,

    Adam


¹: #include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(void) {
  char hostname[1001];
  int ret;
  
  ret=gethostname(hostname, 1000);
  printf("%d gethostname: %s\n", ret, hostname);
  exit(0);
}

prints: 0 gethostname: tullinup

-- 
 "Angels can fly because they take themselves lightly."       Adam Sjøgren
                                                         asjo@koldfront.dk




             reply	other threads:[~2017-02-17 11:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 11:03 Adam Sjøgren [this message]
2017-02-17 11:25 ` Rasmus
2017-02-17 17:48   ` Adam Sjøgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a89l9j0a.fsf@tullinup.koldfront.dk \
    --to=asjo@koldfront.dk \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).