help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS X (or other OS's): how to get a fully-qualified domain name?


From: Kevin Rodgers
Subject: Re: OS X (or other OS's): how to get a fully-qualified domain name?
Date: Mon, 26 Jul 2004 17:11:22 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

John Owens wrote:
> Greetings, I'm using emacs 21.3.50 (built from CVS) on OS X 10.3. I
> would like it to use a fully-qualified domain name when sending
> mail. Instead, it uses system-name, which appears to just use my
> "computer name" (which is no way fully-qualified).
>
> What would be ideal is if I could use the system-name function to
> dynamically return where I am (since if I run emacs at home, then go
> to work, plug it in, and use emacs there, I'd like emacs to use the
> work machine's domain name, not the one from home). I figure that OS X
> knows its domain name (I can see it in the logs if I ssh somewhere,
> for instance), but I don't know how to get that information nor do I
> know how to make emacs use it.

C-h v user-mail-address
C-h v mail-host-address

To get the domain name in Emacs on Unix, try this:

(shell-command-to-string "awk '/^domain/ {printf $2}' /etc/resolv.conf")

--
Kevin Rodgers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]