Subject: Re: roles and smtp-server

From: Erik Parker <[email-masked]>
Date: Fri, 4 Oct 2002 00:10:01 -0500 (CDT)

> > I find myself in a situation where I would like to have several different
> > SMTP servers used depending upon the role patterns being matched. For
> > example, if the message being sent matches "From: [email-masked]" I want it
> > to use the "smtp.bar.com/user=foo" smtp server, but if it matches "From:
> > [email-masked]" then it happens to use "smtp.someplace.else.com/user=me".
>
> I would also like this, it´s because of this I digged through my
> pine-archive and found your mail from may. =)
>
> Did you or anyone else find a solution to this problem? If so, care to
> share it?

We were just looking into this at the office today..  It's also an option we'd
like to see integrated. Probably wouldn't be that hard to whip up a patch
for.. Maybe I'll look into doing just that.

---

From: Jesper Maartenson <[email-masked]>
Date: Fri, 4 Oct 2002 14:37:35 +0200 (CEST)

On Fri, 4 Oct 2002, Erik Parker wrote:

> We were just looking into this at the office today..  It's also an
> option we'd like to see integrated. Probably wouldn't be that hard to
> whip up a patch for.. Maybe I'll look into doing just that.

I´ve solved this now, using an utility called ssmtp ( can be downloaded 
from ftp://metalab.unc.edu/pub/Linux/system/mail/mta/ssmtp-2.48.tar.gz ). 

I´ve set up my .pinerc changing the sendmail-command to 
sendmail-path=./sendmymail - sendmymail contains the following:

#!/usr/bin/procmail

:0
* ^From.*the role I want to use another smtp-server for
| incoming/ssmtp-2.48/ssmtp -t

:0
| /usr/sbin/sendmail -oem -t -oi

ssmtp uses by default /etc/ssmtp/ssmtp.conf as it´s configuration-file, 
this is however easily changed in the Makefile, and you can then have 
different binaries of ssmtp which uses different configuration files, if 
you want to have several different smtp-servers depending on role.

/j

---

From: Eduardo Chappa <[email-masked]>
Date: Fri, 4 Oct 2002 11:16:32 -0700 (PDT)

*** Erik Parker ([email-masked]) wrote in the pine-info list today:

 :>  > > I find myself in a situation where I would like to have several
 :>  > > different SMTP servers used depending upon the role patterns
 :>  > > being matched. For example, if the message being sent matches
 :>  > > "From: [email-masked]" I want it to use the "smtp.bar.com/user=foo"
 :>  > > smtp server, but if it matches "From: [email-masked]" then it
 :>  > > happens to use "smtp.someplace.else.com/user=me".
 :>  >
 :>  > I would also like this, it´s because of this I digged through my
 :>  > pine-archive and found your mail from may. =)
 :>  >
 :>  > Did you or anyone else find a solution to this problem? If so, care
 :>  > to share it?
 :>
 :>  We were just looking into this at the office today..  It's also an
 :>  option we'd like to see integrated. Probably wouldn't be that hard to
 :>  whip up a patch for.. Maybe I'll look into doing just that.

Two remarks, one is that this functionality is coming in Pine4.50, the
other is that there is already a patch for it, which you can get in my web
page (address below). It's called "define your own rules...".

-- 
Eduardo
http://www.math.washington.edu/~chappa/pine/