Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Michael Slass <miknrene@drizzle.com>
Subject: Re: how do I modify headers in outgoing email/articles?
Date: Thu, 21 Jul 2005 09:59:30 -0700	[thread overview]
Message-ID: <m3vf34qeml.fsf@drizzle.com> (raw)
In-Reply-To: <m21x5s9nmn.fsf@seki.fr>

Sébastien Kirche <sebastien.kirche.no@spam.free.fr.invalid> writes:

>At 17:07 on Jul 21 2005, Michael Slass said :
>
>> What variable(s) can I frob so that my outgoing emails will appear to
>> originate from miknrene@drizzle.com instead of from my home machine?
>
>C-h v user-mail-address RET should help.
>
>-- 
>Sébastien Kirche


Yeah, you'd think that, but it doesn't help the message-id.  As it
turns out, the function `message-make-fqdn' gives priority to the
hostname of the machine over the domain name in your
`user-mail-address', so setting the latter doesn't help in the
composition of the message-id.

I wrote this advice to change that, and now my message ids get the
domain name from `user-mail-address'

(defadvice message-make-fqdn (around message-make-fqdn-around)
  "Give higher priority to domain from `message-user-mail-address'"
  (let* ((user-mail (message-user-mail-address))
	 (user-domain
	  (if (and user-mail
		   (string-match "@\\(.*\\)\\'" user-mail))
	      (match-string 1 user-mail))))
    (setq ad-return-value
          (if (and user-domain
                   (stringp user-domain)
                   (string-match message-valid-fqdn-regexp user-domain)
                   (not (string-match message-bogus-system-names user-domain)))
              user-domain
            (progn ad-do-it ad-return-value)))))


I'm still not sure whether I need to try to modify the code which
performs the SMTP transaction so that my computer will present itself
as the machine receiving the ssh connection, rather than as my bogus
machine name.
-- 
Mike Slass


  reply	other threads:[~2005-07-21 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-21 15:15 Michael Slass
2005-07-21 15:37 ` Sébastien Kirche
2005-07-21 16:59   ` Michael Slass [this message]
2005-07-21 17:37     ` Reiner Steib
2005-07-21 18:32       ` Michael Slass

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=m3vf34qeml.fsf@drizzle.com \
    --to=miknrene@drizzle.com \
    /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).