Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

relaying mail to differnet smtp servers

31 views
Skip to first unread message

jerry....@weizmann.ac.il

unread,
May 9, 2013, 5:44:29 PM5/9/13
to
Hi:

I have a sendmail smtp server which receives mails from many domains.
All outgoing mails should be sent out via a mailgate (mg). Internal mails should be
routed to the proper smtp server.

I solve this by declaring the mailgate as a SMART HOST, and configuring
the mailertable to route incoming mails to many local domains. I do have one problem however. In one particular local domain
I have users whose mail should go through the mailgates and other users (from the same domain) whose
mail should go directly to the smtp server and not use the mailgates.

Can someone advise me how to handle this.
I tried using virtualusertable but it did not do the trick.


With Blessings, always,

Jerry

Andrzej Adam Filip

unread,
May 9, 2013, 7:39:50 PM5/9/13
to
Consider using FEATURE(`ldap_routing')

It can select delivery host with or without recipient rewrite.
It can be use with standard sendmail maps (hash/btree/...) instead of
LDAP lookups as posted a few times in the group.

--
Andrzej A. Filip

jerry....@weizmann.ac.il

unread,
May 10, 2013, 3:54:24 AM5/10/13
to
thanks, but is there an easier way? I really dont want to setup a LDAP server.

Best,
Jerry
On Friday, May 10, 2013 2:39:50 AM UTC+3, Andrzej Adam Filip wrote:

Andrzej Adam Filip

unread,
May 10, 2013, 5:02:17 AM5/10/13
to
> thanks, but is there an easier way? I really dont want to setup a LDAP
> server.

As I wrote ldap_routing may be used *WITHOUT* LDAP.

https://groups.google.com/groups/search?q=group%3Acomp.mail.sendmail+ldad+hash+null&btnG=Search

--
Andrzej A. Filip

Carl Byington

unread,
May 10, 2013, 11:44:12 AM5/10/13
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 09 May 2013 14:44:29 -0700, jerry.mersel wrote:

> In one particular local domain I have users
> whose mail should go through the mailgates and other users (from the
> same domain) whose mail should go directly to the smtp server and not
> use the mailgates.

> Can someone advise me how to handle this.
> I tried using virtualusertable but it did not do the trick.

in sendmail.mc:

VIRTUSER_DOMAIN_FILE(`/etc/mail/virtual-host-domains')

in virtual-host-domains:

example.com

in mailertable:

example.com ESMTP:[mail.example.com]

in virtusertable:

# add exceptions here that do NOT go to the main server
us...@example.com somea...@gmail.com
us...@example.com localuser2name




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEARECAAYFAlGNFYYACgkQL6j7milTFsH4jQCfb3chgSIXwIDkInic0G19GIM1
0/UAn15/IQ1Q742AGSI9Cn/6VonhUg6x
=ZvOy
-----END PGP SIGNATURE-----
0 new messages