Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] Message-ID hostname should be simple.
@ 2023-04-17 11:39 Byung-Hee HWANG
  2023-04-17 17:03 ` Bob Newell
  2023-05-06  6:57 ` Byung-Hee HWANG
  0 siblings, 2 replies; 6+ messages in thread
From: Byung-Hee HWANG @ 2023-04-17 11:39 UTC (permalink / raw)
  To: soyeomul; +Cc: Byung-Hee HWANG, ding

Most people know that the meaning of localhost/localdomain. So i prefer
localdomain to long line explanation. Long time ago, i saw some
message's localdomain screenshot at LKML:

<quote>
X-X-Sender: torvalds@localhost.localdomain
</quote>

Reference:
https://lore.kernel.org/all/alpine.LFD.2.00.0901111248060.6528@localhost.localdomain/raw

Sincerely, Byung-Hee

---
 lisp/gnus/message.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 8d3fe010af4..735ad00e0ea 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -6143,7 +6143,7 @@ give as trustworthy answer as possible."
       user-domain)
      ;; Default to this bogus thing.
      (t
-      (concat sysname ".mail-host-address-is-not-set")))))
+      (concat sysname ".localdomain")))))
 
 (defun message-make-domain ()
   "Return the domain name."
-- 
2.30.2



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Message-ID hostname should be simple.
  2023-04-17 11:39 [PATCH] Message-ID hostname should be simple Byung-Hee HWANG
@ 2023-04-17 17:03 ` Bob Newell
  2023-04-18 11:28   ` Byung-Hee HWANG
  2023-05-06  6:57 ` Byung-Hee HWANG
  1 sibling, 1 reply; 6+ messages in thread
From: Bob Newell @ 2023-04-17 17:03 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]


This is not 100% related, but I like to play around the with
the Message-ID, specifically I randomize the domain and then
the user agent.  Sometimes I don't want to reveal my "home"
domain.

This works with many email providers, but there are some
forwarding or bulk services that rewrite the Message ID.
Naughty of them.

My code is below.  Please realize I'm not exactly the No. 1
elisp coder --- but it does work in my environment.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB


[-- Attachment #2: munger.el --]
[-- Type: text/plain, Size: 1647 bytes --]

;;; Fully anonymize/randomize FQDN.

(defun munge-message-id (orig-fun &rest args)
  "Make a random FQDN and User Agent"
  (let* ((nice-id (apply orig-fun args))
         (nice-split (split-string nice-id "@"))
	 (alpha "abcdefghijklmnopqrstuvwxyz")
	 (domain '("com" "org" "net" "info" "us"))
	 (part1 "")
	 (part2 "")
	 (part3 "")
	 (part4 "")
	 num0 num1 num2 num3)
;;; Temporary.  Not in right place at all.
    (munge-user-agent)
;;; FQDN.
    ;;; Front half.
    (setq num0 (+ 4 (random 6)))
    (while (> num0 0)
      (setq num1 (random 25))
      (setq part1 (concat part1 (substring alpha num1 (+ 1 num1))))
      (setq num0 (- num0 1))
      )
    ;;; Back half.
    (setq num0 (+ 4 (random 6)))
    (while (> num0 0)
      (setq num2 (random 25))
      (setq part2 (concat part2 (substring alpha num2 (+ 1 num2))))
      (setq num0 (- num0 1))
      )
    ;;; Sub for 'fsf'.
    (setq num0 (+ 4 (random 6)))
    (while (> num0 0)
      (setq num3 (random 25))
      (setq part3 (concat part3 (substring alpha num3 (+ 1 num3))))
      (setq num0 (- num0 1))
      )
    ;;; TLD.
    (setq part4 (nth (random 4) domain))
;;; Build the message-id.
    (concat (replace-regexp-in-string "fsf" part3 (nth 0 nice-split)) "@" part1 "." part2 "." part4 ">")
    )
  )
(advice-add 'message-make-message-id :around #'munge-message-id)

;;; Semi-randomize User-Agent.

(defun munge-user-agent ()
 "Change user-agent to semi-random string"
 (let* ( (agents '("Mozilla" "Chrome" "Safari" "Brave" "Vivaldi"))
	 (versions '("5.0" "5.5" "6.0" "6.5" "4.5"))) 
    (setq gnus-user-agent (concat (nth (random 4) agents) "/" (nth (random 4) versions)))))

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Message-ID hostname should be simple.
  2023-04-17 17:03 ` Bob Newell
@ 2023-04-18 11:28   ` Byung-Hee HWANG
  0 siblings, 0 replies; 6+ messages in thread
From: Byung-Hee HWANG @ 2023-04-18 11:28 UTC (permalink / raw)
  To: The Gnus

Bob Newell <bobnewell@bobnewell.net> writes:

> This is not 100% related, but I like to play around the with
> the Message-ID, specifically I randomize the domain and then
> the user agent.  Sometimes I don't want to reveal my "home"
> domain.
>
> This works with many email providers, but there are some
> forwarding or bulk services that rewrite the Message ID.
> Naughty of them.
>
> My code is below.  Please realize I'm not exactly the No. 1
> elisp coder --- but it does work in my environment.

I saw your codes. Random User-Agent is very exciting!

<quote>
User-Agent: Safari/6.0
</quote>

You rocks! Bob^^^

Sincerely,

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Message-ID hostname should be simple.
  2023-04-17 11:39 [PATCH] Message-ID hostname should be simple Byung-Hee HWANG
  2023-04-17 17:03 ` Bob Newell
@ 2023-05-06  6:57 ` Byung-Hee HWANG
  2023-05-06  7:11   ` Emanuel Berg
  1 sibling, 1 reply; 6+ messages in thread
From: Byung-Hee HWANG @ 2023-05-06  6:57 UTC (permalink / raw)
  To: The Gnus

Please never mind before my mail, it was not important thing.

Byung-Hee HWANG <soyeomul@doraji.xyz> writes:

> Most people know that the meaning of localhost/localdomain. So i prefer
> localdomain to long line explanation. Long time ago, i saw some
> message's localdomain screenshot at LKML:
>
> <quote>
> X-X-Sender: torvalds@localhost.localdomain
> </quote>
>
> Reference:
> https://lore.kernel.org/all/alpine.LFD.2.00.0901111248060.6528@localhost.localdomain/raw
>
> Sincerely, Byung-Hee
>
> ---
>  lisp/gnus/message.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
> index 8d3fe010af4..735ad00e0ea 100644
> --- a/lisp/gnus/message.el
> +++ b/lisp/gnus/message.el
> @@ -6143,7 +6143,7 @@ give as trustworthy answer as possible."
>        user-domain)
>       ;; Default to this bogus thing.
>       (t
> -      (concat sysname ".mail-host-address-is-not-set")))))
> +      (concat sysname ".localdomain")))))
>  
>  (defun message-make-domain ()
>    "Return the domain name."

Sincerely, Byung-Hee (Gnus fan)

-- 
^고맙습니다 _布德天下_ 감사합니다_^))//


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Message-ID hostname should be simple.
  2023-05-06  6:57 ` Byung-Hee HWANG
@ 2023-05-06  7:11   ` Emanuel Berg
  2023-05-06 10:25     ` Byung-Hee HWANG (黃炳熙)
  0 siblings, 1 reply; 6+ messages in thread
From: Emanuel Berg @ 2023-05-06  7:11 UTC (permalink / raw)
  To: ding

Byung-Hee HWANG wrote:

> Please never mind before my mail, it was not
> important thing.

Is it important? Is it not important? It is activity.

-- 
underground experts united
https://dataswamp.org/~incal



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Message-ID hostname should be simple.
  2023-05-06  7:11   ` Emanuel Berg
@ 2023-05-06 10:25     ` Byung-Hee HWANG (黃炳熙)
  0 siblings, 0 replies; 6+ messages in thread
From: Byung-Hee HWANG (黃炳熙) @ 2023-05-06 10:25 UTC (permalink / raw)
  To: ding

2023-05-06 (토), 09:11 +0200, Emanuel Berg:
> Byung-Hee HWANG wrote:
> 
> > Please never mind before my mail, it was not
> > important thing.
> 
> Is it important? Is it not important? It is activity.
> 

Thanks Emanuel,

Sincerely, Byung-Hee from South Korea

-- 
^고맙습니다 _布德天下_ 감사합니다_^))//


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-06 10:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17 11:39 [PATCH] Message-ID hostname should be simple Byung-Hee HWANG
2023-04-17 17:03 ` Bob Newell
2023-04-18 11:28   ` Byung-Hee HWANG
2023-05-06  6:57 ` Byung-Hee HWANG
2023-05-06  7:11   ` Emanuel Berg
2023-05-06 10:25     ` Byung-Hee HWANG (黃炳熙)

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).