EG If I am sending from st...@fred.org, I have to use their relay to send
the mail out. I cannot use sendmail to send direct as I have a dynamic IP
address, and other SMTP server wont relay as I might be spamming.
How can I configure sendmail or another system so that it uses the senders
address to route the message. That way all mail can be spooled off line,
and sent in one go.
Hence what I want is
Mail from account *@fred.org to route via mail.fred.org
and from account *@jim.net to route via mail.jim.net
Does anyone know if this is possible??
Thanks
Steve
It is available for some time and nobody has
complained that it does not work :-)
[ I do not use it myself ]
--
Andrzej (Andrew) A. Filip -- IT Consultant
http://www.bigfoot.com/~anfi
Private: an...@bigfoot.com Business: sa...@impaq.com.pl
I NO LONGER USE an...@polbox.com
Posting history (all addresses):
http://www.dejanews.com/profile.xp?author=Andrzej%20Filip&ST=PS
Although I can reach http://www.bigfoot.com, I can't reach
http://www.bigfoot.com/~anfi
Maybe that's why no one complains it doesn't work? :)
Bob L.
> --
> Andrzej (Andrew) A. Filip -- IT Consultant
> http://www.bigfoot.com/~anfi
> Private: an...@bigfoot.com Business: sa...@impaq.com.pl
> I NO LONGER USE an...@polbox.com
> Posting history (all addresses):
> http://www.dejanews.com/profile.xp?author=Andrzej%20Filip&ST=PS
>
> Steven Ellis wrote:
>
> > Due to restrictions on various mail accounts I have, I can only send mail
> > for a particular account via a particular relay
> >
> > EG If I am sending from st...@fred.org, I have to use their relay to send
> > the mail out. I cannot use sendmail to send direct as I have a dynamic IP
> > address, and other SMTP server wont relay as I might be spamming.
> >
> > How can I configure sendmail or another system so that it uses the senders
> > address to route the message. That way all mail can be spooled off line,
> > and sent in one go.
> >
> > Hence what I want is
> >
> > Mail from account *@fred.org to route via mail.fred.org
> > and from account *@jim.net to route via mail.jim.net
> >
> > Does anyone know if this is possible??
> >
> > Thanks
> >
> > Steve
--
Robert Lynch-Berkeley CA USA-r...@best.com
http://www.best.com/~rmlynch/
> Andrzej Filip wrote:
> >
> > On my home page http://www.bigfoot.com/~anfi you may
> > find recipe how to make sendmail select smart host
> > based on envelope sender address.
> >
> > It is available for some time and nobody has
> > complained that it does not work :-)
> > [ I do not use it myself ]
>
> Although I can reach http://www.bigfoot.com, I can't reach
> http://www.bigfoot.com/~anfi
>
> Maybe that's why no one complains it doesn't work? :)
>
> Bob L.
http://www.bigfoot.com/~anfi is a redirect to
http://homestead.dejanews.com/user.anfi (it may change)
Why it is not accessible I do not know.
Below is the document
(I am not sure if it is the latest version)
-------------------------------------->
Smart Host Table
Abstract
The document describes how to modify your sendmail
configuration to allow smart host selection based
on full sender address or sender's domain.
Usage
smarttable [/etc/mail/smrttable]:
te...@mike.com.hk lesspopular.mailhub.com
@mike.com.hk popular.mailhub.com
It should send email from te...@mike.com.hk
(envelope sender) via smarthost lesspopular.mailhub.com,
all other senders from mike.com.hk will be served by
popular.mailhub.com
Expected problems:
* local addresses may be looked for without domain name added
TESTED:
tested only via sendmail -bv on sendmail 8.8.7
Required Changes (*.mc file)
LOCAL_CONFIG
# smarthost selection based on sender
Ksmarttable hash /etc/mail/smarttable
LOCAL_NET_CONFIG
# smarttable rules
# format
# smart_host $| sender $| recipient
R$* $: $| $(dequote "" $&f $) $| $1
# check sender in smarttable as it is (with domain part)
R$| $+ $| $* $: $(smarttable $1 $: $) $| $1 $| $2
# check user part of sender address in smarttable
R$| $+@$+ $| $* $: $(smarttable @$2 $: $) $| $1@$2 $| $3
# smartable found smart host
R$+ $| $* $| $* $: $1 $| $2 $| $>95 <$1> $3
# clenup
R$* $| $* $| $* $: $3
The original posting
Subject: Re: How to relay the mail according to the sender domain
Date: 1999-02-05
From: Andrzej Filip <an...@polbox.com>
Newsgroups: comp.mail.sendmail
Copyright (c) 1999 Andrzej Filip
In short: you can do whatever you want with this,
but don't blame me!
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<--------------------------------------
Does anyone have a more simple example of this that only requires
modifying the sendmail.cf file, and an example of the smarttable file. I
have a working modified sendmail.cf, and i'd rather not mess around with
the m4 macros.
Steve
--
------------------------------------------------------------------------------
If you listen very carefully you can sometimes hear the dolphins
sing.
Email: steven...@pmail.net
If you want to modify you sendmail.cf directly
[comments left] than:
0) copy sendmail.cf to sendmail1.cf
1) edit only sendmail1.cf
2) Put Ksmarrtable line just after any K line
Ksmarttable hash /etc/mail/smarttable
3) locate in your sendmail .cf the place in which
smart host is used (look for $S)
Put the following lines just before the above mentioned lines
# smarttable rules
# format
# smart_host $| sender $| recipient
R$* $: $| $(dequote "" $&f $) $| $1
# check sender in smarttable as it is (with domain part)
R$| $+ $| $* $: $(smarttable $1 $: $) $| $1 $| $2
# check user part of sender address in smarttable
R$| $+@$+ $| $* $: $(smarttable @$2 $: $) $| $1@$2 $| $3
# smartable found smart host
R$+ $| $* $| $* $: $1 $| $2 $| $>95 <$1> $3
# clenup
R$* $| $* $| $* $: $3
4) sample smartable (do not forget to compile it - makemap)
The entries should work
5) test it (all names can be used as they are)
TEST1: -- check where sendmail would send (try second test anyway)
#sendmail -C /etc/sendmail1.cf -bv -f spa...@polbox.com spa...@friko.onet.pl
TEST2: -- check where sendmail sends
#sendmail -C /etc/sendmail1.cf -v -f spa...@polbox.com spa...@friko.onet.pl
If your sendmail tries to deliver it via something with polbox in it
than smarttable works (Wow!!!!)
If you see onet -- than no success
WARNING: the current version does not play well with
mailertable. (mailertable is looked before)
6) If it works than replace sendmail.cf with sendmail1.cf
and restart sendmail
(do not forget to put more useful entries in smarttable)
--
Andrzej (Andrew) A. Filip