Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Tim X <timx@nospam.dev.null>
Subject: Re: More mail questions
Date: Sat, 28 Oct 2006 18:25:28 +1000	[thread overview]
Message-ID: <87odrw3kzr.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: <87lkn2rzfj.fsf@gmail.com>

Hadron Quark <hadronquark@gmail.com> writes:


> But this still begs the question : how to configure gnus to
> (preferably using procmail rules) palm off emails destined to local users
> and NOT to send them off to the smtp server I am using from smtpmail.
>

I don't use gnus for mail, but rather VM. With vm, there is an add-on
package called vm-pcrisis, which I *think* allows vm to use different
smtp servers based on criteria like the from address being used or the
domain mail is being sent to. The main objective of this package is to
allow you to use one configuration to represent yourself as different
people (i.e. different mail addresses). 

It might be worth having a look at this package to get some ideas. 

Off the top of my head -

- Write a function which will set the smtpmail-smtp-server variable to
an appropriate server based on the recipient address i.e. if it is
localhost or does not have a domain attached, use the local smtp
server, otherwise send it to the remote smtp server. 

- Have this function then call the smtp-mail-send-it function as its
last form. 

- Set this function as the value for message-sned-mail-function

Another alternative would be to use defadvice around smtpmail-send-it
using the 'before form to set the smtpmail-smtp-server variable before
the function proper is called. This would have the possible advantage
of working regardless of the mail sending interface used (i.e.
send-mail-function or message-send-mail-function). 

HTH

Tim

-- 
tcross (at) rapttech dot com dot au

  reply	other threads:[~2006-10-28  8:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-26 22:09 Hadron Quark
2006-10-27  6:38 ` Tim X
2006-10-27  7:27   ` Hadron Quark
2006-10-28  8:25     ` Tim X [this message]
2006-12-04  6:58   ` Gernot Hassenpflug

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=87odrw3kzr.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    /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).