From: Charles on
How can I explicitly set the mail server that I want smtp mail to go
to using sendmail? In this case I want to send notifications to users
from a web server (PHP). The server never needs to send outside of my
company's private WAN. The server is an Ubuntu 10.04 LAMP server. We
want email to go straight to our Domino server which will recognize
the smtp address and deliver it. Instead it is going out to the
Internet and coming back in through our firewall. I have tried

1. adding our-domain.com ESMTP:[nn.nnn.nn] to the mailertable
2. running makemap hash /etc/mail/mailertable.db < /etc/mail/
mailertable
3. adding our-domain.com to the /etc/mail/relay-domains file

restarted sendmail. No change. I've done the same thing on a RedHat
server and it works fine.
From: mikea on
Charles <vanlinez(a)gmail.com> wrote in <93358871-e702-47ff-8a06-813349dd2b1a(a)m1g2000yqo.googlegroups.com>:
> How can I explicitly set the mail server that I want smtp mail to go
> to using sendmail? In this case I want to send notifications to users
> from a web server (PHP). The server never needs to send outside of my
> company's private WAN. The server is an Ubuntu 10.04 LAMP server. We
> want email to go straight to our Domino server which will recognize
> the smtp address and deliver it. Instead it is going out to the
> Internet and coming back in through our firewall. I have tried
>
> 1. adding our-domain.com ESMTP:[nn.nnn.nn] to the mailertable
> 2. running makemap hash /etc/mail/mailertable.db < /etc/mail/
> mailertable
> 3. adding our-domain.com to the /etc/mail/relay-domains file
>
> restarted sendmail. No change. I've done the same thing on a RedHat
> server and it works fine.

I use this to force mail from our inbound mailfilter to go to our
corporate Domino server. It may work for your purpose, too. In the .mc
file for that sendmail, add something rather like

define(`MAIL_HUB', `relay:[your_mailhub_IP_address]')dnl
define(`SMART_HOST', `relay:[your_mailhub_IP_address]')dnl
define(`LOCAL_RELAY', `relay:[your_mailhub_IP_address]')dnl

or

define(`MAIL_HUB', `relay:your.mail.hub')dnl
define(`SMART_HOST', `relay:your.mail.hub')dnl
define(`LOCAL_RELAY', `relay:your.mail.hub')dnl

The "[]" around the IP address disable MX lookups for that address,
which may be useful.

--
Mike Andrews, W5EGO
mikea(a)mikea.ath.cx
Tired old sysadmin
From: Charles on
On Aug 5, 4:25 pm, mikea <mi...(a)mikea.ath.cx> wrote:
> Charles <vanli...(a)gmail.com> wrote in <93358871-e702-47ff-8a06-813349dd2....(a)m1g2000yqo.googlegroups.com>:
>
> > How can I explicitly set the mail server that I want smtp mail to go
> > to using sendmail?  In this case I want to send notifications to users
> > from a web server (PHP).  The server never needs to send outside of my
> > company's private WAN.  The server is an Ubuntu 10.04 LAMP server.  We
> > want email to go straight to our Domino server which will recognize
> > the smtp address and deliver it.  Instead it is going out to the
> > Internet and coming back in through our firewall.  I have tried
>
> > 1.  adding our-domain.com ESMTP:[nn.nnn.nn] to the mailertable
> > 2.  running makemap hash /etc/mail/mailertable.db < /etc/mail/
> > mailertable
> > 3.  adding our-domain.com to the /etc/mail/relay-domains file
>
> > restarted sendmail.  No change.  I've done the same thing on a RedHat
> > server and it works fine.
>
> I use this to force mail from our inbound mailfilter to go to our
> corporate Domino server. It may work for your purpose, too. In the .mc
> file for that sendmail, add something rather like
>
> define(`MAIL_HUB', `relay:[your_mailhub_IP_address]')dnl
> define(`SMART_HOST', `relay:[your_mailhub_IP_address]')dnl
> define(`LOCAL_RELAY', `relay:[your_mailhub_IP_address]')dnl
>
> or
>
> define(`MAIL_HUB', `relay:your.mail.hub')dnl
> define(`SMART_HOST', `relay:your.mail.hub')dnl
> define(`LOCAL_RELAY', `relay:your.mail.hub')dnl
>
> The "[]" around the IP address disable MX lookups for that address,
> which may be useful.
>
> --
> Mike Andrews, W5EGO
> mi...(a)mikea.ath.cx
> Tired old sysadmin

I forgot to say thanks. I added the lines to the .mc file and regened
the .cf with m4. Went OK with no errors. Then I restarted sendmail
with /etc/init.d/sendmail restart
From: Charles on
On Aug 6, 8:23 am, Charles <vanli...(a)gmail.com> wrote:
> On Aug 5, 4:25 pm, mikea <mi...(a)mikea.ath.cx> wrote:
>
>
>
>
>
> > Charles <vanli...(a)gmail.com> wrote in <93358871-e702-47ff-8a06-813349dd2...(a)m1g2000yqo.googlegroups.com>:
>
> > > How can I explicitly set the mail server that I want smtp mail to go
> > > to using sendmail?  In this case I want to send notifications to users
> > > from a web server (PHP).  The server never needs to send outside of my
> > > company's private WAN.  The server is an Ubuntu 10.04 LAMP server.  We
> > > want email to go straight to our Domino server which will recognize
> > > the smtp address and deliver it.  Instead it is going out to the
> > > Internet and coming back in through our firewall.  I have tried
>
> > > 1.  adding our-domain.com ESMTP:[nn.nnn.nn] to the mailertable
> > > 2.  running makemap hash /etc/mail/mailertable.db < /etc/mail/
> > > mailertable
> > > 3.  adding our-domain.com to the /etc/mail/relay-domains file
>
> > > restarted sendmail.  No change.  I've done the same thing on a RedHat
> > > server and it works fine.
>
> > I use this to force mail from our inbound mailfilter to go to our
> > corporate Domino server. It may work for your purpose, too. In the .mc
> > file for that sendmail, add something rather like
>
> > define(`MAIL_HUB', `relay:[your_mailhub_IP_address]')dnl
> > define(`SMART_HOST', `relay:[your_mailhub_IP_address]')dnl
> > define(`LOCAL_RELAY', `relay:[your_mailhub_IP_address]')dnl
>
> > or
>
> > define(`MAIL_HUB', `relay:your.mail.hub')dnl
> > define(`SMART_HOST', `relay:your.mail.hub')dnl
> > define(`LOCAL_RELAY', `relay:your.mail.hub')dnl
>
> > The "[]" around the IP address disable MX lookups for that address,
> > which may be useful.
>
> > --
> > Mike Andrews, W5EGO
> > mi...(a)mikea.ath.cx
> > Tired old sysadmin
>
> I forgot to say thanks.  I added the lines to the .mc file and regened
> the .cf with m4.  Went OK with no errors.  Then I restarted sendmail
> with /etc/init.d/sendmail restart

Well I found why the change didn't take effect. When I search the
sendmail.cf for the IP address of the Domino server it is not there.
Unless I am misunderstanding how this works, the change did not take
effect. Are there any error logs for the m4 command?