Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Conditionally point to a different IMAP server (home/work)
@ 2004-12-24 14:37 Sébastien Vauban
  2004-12-28  2:34 ` Reiner Steib
  0 siblings, 1 reply; 2+ messages in thread
From: Sébastien Vauban @ 2004-12-24 14:37 UTC (permalink / raw)


Hello,

I'd like help to conditionally configure the address of my IMAP
server, depending on the fact I'm at work or at the office (they
have a different address through the use of VPN and NAT).

I already tried the following, but without any success!

    ,----
    | (setq gnus-secondary-select-methods '(
    |       (nnml "")
    | 
    |       (nnimap ""
    |               (nnimap-address
    |                 (cond ((string= (upcase (system-name)) "PC3701")
    |                            "169.51.86.39")
    |                        (t
    |                            "mail.mywork.com")))
    | )))
    `----


Currently, I'm using different "back-ends", but I dislike it (as
it breaks some configuration of default groups where to put sent
messages - GCc -, etc., as the names are different)...

    ,----
    | (setq gnus-secondary-select-methods '(
    |       (nnml "")
    |
    |       (nnimap ""
    |               (nnimap-address "mail.mywork.com")
    |
    |       (nnimap "home"
    |               (nnimap-address "169.51.86.39")
    | ))))
    `----

Can you help me?

Merry Christmas!!!
  Sébastien

-- 
Sébastien Vauban


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

* Re: Conditionally point to a different IMAP server (home/work)
  2004-12-24 14:37 Conditionally point to a different IMAP server (home/work) Sébastien Vauban
@ 2004-12-28  2:34 ` Reiner Steib
  0 siblings, 0 replies; 2+ messages in thread
From: Reiner Steib @ 2004-12-28  2:34 UTC (permalink / raw)


On Fri, Dec 24 2004, Sébastien Vauban wrote:

> I'd like help to conditionally configure the address of my IMAP
> server, depending on the fact I'm at work or at the office (they
> have a different address through the use of VPN and NAT).
>
> I already tried the following, but without any success!

You want backquote ` and comma , (see (info "(elisp)Backquote") for
details):

(setq gnus-secondary-select-methods
      `((nnml "")
	(nnimap ""
		(nnimap-address
		 ,(cond ((string= (upcase (system-name)) "PC3701")
			 "169.51.86.39")
			(t
			 "mail.mywork.com"))))))

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/


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

end of thread, other threads:[~2004-12-28  2:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-24 14:37 Conditionally point to a different IMAP server (home/work) Sébastien Vauban
2004-12-28  2:34 ` Reiner Steib

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