PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > comp.mail.sendmail > How to setup multiple mail hosts in sendmail
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.mail.sendmail Configuring and using the BSD sendmail agent.

How to setup multiple mail hosts in sendmail

Réponse
 
LinkBack Outils de la discussion
Vieux 25/10/2006, 16h11   #1
Voltaire
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to setup multiple mail hosts in sendmail

I'm trying to configure my sendmail to use a different mail host (relay
host) depending
on what the destination address is. The reason for this has to do with
our internal
security setup. I'm on a solaris 9 platform.

So if I have mail to send to xxx@abc.com I would like to use
mailhost1, and if I have
mail for xxx@anythingelse.com I would like to use mailhost2.

Do I have to modify the sendmail.cf manually by creating a private
Ruleset which modifies
the macro setting for what the mailhost is?

thanks for any .

  Réponse avec citation
Vieux 25/10/2006, 19h35   #2
Michael Vilain
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to setup multiple mail hosts in sendmail

In article <1161789082.301900.14600@i3g2000cwc.googlegroups.c om>,
"Voltaire" <neil_s_chopra@yahoo.com> wrote:

> I'm trying to configure my sendmail to use a different mail host (relay
> host) depending
> on what the destination address is. The reason for this has to do with
> our internal
> security setup. I'm on a solaris 9 platform.
>
> So if I have mail to send to xxx@abc.com I would like to use
> mailhost1, and if I have
> mail for xxx@anythingelse.com I would like to use mailhost2.
>
> Do I have to modify the sendmail.cf manually by creating a private
> Ruleset which modifies
> the macro setting for what the mailhost is?
>
> thanks for any .


I think what the other posters are saying is that the rules are static
and you can't change them on the fly, which you'd have to do with each
piece of mail. Sendmail can use different relays depending on the
domain of origin, but not what you want to do.

Use another MTA or perhaps enhance sendmail to do what you want (good
luck with that).

--
DeeDee, don't press that button! DeeDee! NO! Dee...



  Réponse avec citation
Vieux 25/10/2006, 19h55   #3
Doug McIntyre
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to setup multiple mail hosts in sendmail

"Voltaire" <neil_s_chopra@yahoo.com> writes:
>I'm trying to configure my sendmail to use a different mail host
>(relay host) depending on what the destination address is. The
>reason for this has to do with our internal security setup. I'm on a
>solaris 9 platform.


>So if I have mail to send to xxx@abc.com I would like to use
>mailhost1, and if I have mail for xxx@anythingelse.com I would like
>to use mailhost2.


pkgrm sendmail. Add in Postfix, and use its transports table.

abc.com smtp:[mailhost1]

then set your normal relay host to mailhost2 in your main.cf

If you want to do TLS outbound connections, it can be controlled per
site in your tls_per_site config file.
  Réponse avec citation
Vieux 25/10/2006, 21h32   #4
tunla
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to setup multiple mail hosts in sendmail


Voltaire wrote:
> I'm trying to configure my sendmail to use a different mail host (relay
> host) depending
> on what the destination address is. The reason for this has to do with
> our internal
> security setup. I'm on a solaris 9 platform.
>
> So if I have mail to send to xxx@abc.com I would like to use
> mailhost1, and if I have
> mail for xxx@anythingelse.com I would like to use mailhost2.
>
> Do I have to modify the sendmail.cf manually by creating a private
> Ruleset which modifies
> the macro setting for what the mailhost is?
>
> thanks for any .




PLEASE upgrade to Sendmail 8.13.6 before doin anything else

You will need to add a LOCAL_RULESET_0
in the M4 macro configuration. (
/usr/lib/mail/cf/cf/your_mc_file.mc )
note that there must be one TAB to separate the LEFT most string from
the the rest of the line.

--------------

LOCAL_RULESET_0

R$+<@abc.com.> $#esmtp $@[192.168.111.11] $:$1<@abc.com.>

----------------


in this example 192.168.111.11 is your MTA for sending mail to
abc.com


Then you can build the sendmail.cf file with your_mc_file.mc M4
macro as usual.

//Lars

  Réponse avec citation
Vieux 25/10/2006, 21h46   #5
Voltaire
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to setup multiple mail hosts in sendmail

Wow, seems like there are several ways to solve this configuration
setup.
Thanks for the guidance......

However, our system does not have the sendmail.mc file we have a
main.mc and
main.m4 file and all the other m4 files as well in the
/etc/lib/mail/feature dir.


thanks again.

  Réponse avec citation
Vieux 25/10/2006, 22h25   #6
tunla
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to setup multiple mail hosts in sendmail


Voltaire wrote:
> Wow, seems like there are several ways to solve this configuration
> setup.
> Thanks for the guidance......
>
> However, our system does not have the sendmail.mc file we have a
> main.mc and
> main.m4 file and all the other m4 files as well in the
> /etc/lib/mail/feature dir.
>
>
> thanks again.



Please upgrade to sendmail 8.13.6 first.
this is SUN Patch 113575-7 for solaris 9


you can start with the " main.mc" file as a template
these four lines are the bare minimum for an MC file
copy these four lines to myfile.mc to begin with.

OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl

SUN has added a few lines extra in their main.mc file to make
sendmail always add the local domain name and to
make mail to be sent to a host with the alias mailhost

that makes sense as a default config.

run

# cd /usr/lib/mail/cf/cf
# /usr/ccs/bin/m4 ../cf/m4.cf myfile.mc > sendmail.cf

to produce the sendmail.cf file from myfile.mc MACRO file.

The documentation that comes with the source code is here:

http://www.sendmail.org/doc/


For more info you really really really really need the BAT book.

http://www.oreilly.com/catalog/sendmail3/

( since I wont retype the 1000+ pages of info )

//Lars

  Réponse avec citation
Vieux 25/10/2006, 23h31   #7
Per Hedeland
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to setup multiple mail hosts in sendmail

In article <vilain-EDB1EC.11354025102006@comcast.dca.giganews.com>
Michael Vilain <vilain@spamcop.net> writes:
>In article <1161789082.301900.14600@i3g2000cwc.googlegroups.c om>,
> "Voltaire" <neil_s_chopra@yahoo.com> wrote:
>

[description of typical mailertable usage snipped]

>I think what the other posters are saying is that the rules are static
>and you can't change them on the fly, which you'd have to do with each
>piece of mail.


No, the other posters are saying to use the mailertable, which is a
standard feature in the sendmail config. Static rules (using external
tables in this case, but that's not necessary) are just the thing you
want to be able to say "mail to domain foo should be relayed to host
bar, mail to domain baz should be relayed to...", right?

> Sendmail can use different relays depending on the
>domain of origin, but not what you want to do.


Actually for *that* there is no standard feature - you can write your
own rules or find a third-party feature on the net.

--Per Hedeland
per@hedeland.org
  Réponse avec citation
Vieux 25/10/2006, 23h35   #8
Per Hedeland
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to setup multiple mail hosts in sendmail

In article <453fb33d$0$47431$892e0abb@auth.newsreader.octanew s.com> Doug
McIntyre <merlyn@geeks.org> writes:
>
>pkgrm sendmail. Add in Postfix, and use its transports table.
>
>abc.com smtp:[mailhost1]


There may be valid reasons to replace sendmail with Postfix, but being
able to put the exact same information, with the exact same syntax, in
the "transports table" instead of the "mailertable" surely isn't one of
them. (Gee, wonder where Wietse got that idea...)

--Per Hedeland
per@hedeland.org
  Réponse avec citation
Vieux 26/10/2006, 02h02   #9
ynotssor
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to setup multiple mail hosts in sendmail

"tunla" <lars.tunkrans@bredband.net> wrote in message
news:1161808364.877549.97780@m7g2000cwm.googlegrou ps.com

> PLEASE upgrade to Sendmail 8.13.6 before doin anything else


What have you got against 8.13.8 ?
  Réponse avec citation
Vieux 26/10/2006, 16h10   #10
tunla
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to setup multiple mail hosts in sendmail


ynotssor wrote:
> "tunla" <lars.tunkrans@bredband.net> wrote in message
> news:1161808364.877549.97780@m7g2000cwm.googlegrou ps.com
>
> > PLEASE upgrade to Sendmail 8.13.6 before doin anything else

>
> What have you got against 8.13.8 ?


Oh nothing , but the OP would have to compile it from source
which doesn't seem to be within his present capability

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h09.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16272 seconds with 18 queries