How to sendmail to users whose mailbox is on a different server

I am a total beginner with sendmail, and am having problems getting
sendmail to send email from a web form properly. Here's the scenario:

1) Our virtual private server hosts web sites for Acme (http://
www.acme.com) and BigCo (http://www.bigco.com) [obviously, these are
made-up names]
2) Acme has its own mail server, say, Exchange; BigCo is using Google
as its mail server.
3) Each website has a form that submits client information to a CGI
script.
4) The Acme script calls sendmail to send its information to
fred [at] acme.com; the BigCo script calls sendmail to deliver its
information to joe [at] bigco.com
5) Fred and Joe never receive the mail from the web forms.

I think the problem is to convince sendmail that fred and joe are NOT
local users on the virtual private server; instead, sendmail has to
deliver the mail to Acme's server and Google's server.
jdeisenberg [ Fr, 14 September 2007 00:21 ] [ ID #1819925 ]

Re: How to sendmail to users whose mailbox is on a different server

In article <1189722095.350255.237330 [at] 19g2000hsx.googlegroups.com>,
jdeisenberg <jdavid.eisenberg [at] gmail.com> wrote:

> I am a total beginner with sendmail, and am having problems getting
> sendmail to send email from a web form properly. Here's the scenario:
>
> 1) Our virtual private server hosts web sites for Acme (http://
> www.acme.com) and BigCo (http://www.bigco.com) [obviously, these are
> made-up names]
> 2) Acme has its own mail server, say, Exchange; BigCo is using Google
> as its mail server.
> 3) Each website has a form that submits client information to a CGI
> script.
> 4) The Acme script calls sendmail to send its information to
> fred [at] acme.com; the BigCo script calls sendmail to deliver its
> information to joe [at] bigco.com
> 5) Fred and Joe never receive the mail from the web forms.
>
> I think the problem is to convince sendmail that fred and joe are NOT
> local users on the virtual private server; instead, sendmail has to
> deliver the mail to Acme's server and Google's server.

All you need to do is fix your sendmail config so that sendmail stops
considering the plain domain name to be local.

Of course, since you haven't shared any of your sendmail config or even
any hint about what OS you are running (which might provide a clue to
the default config) the exact means for doing that in your specific
environment is not at all obvious. For example, I work with a few score
machines where the lists of 'local' domain parts is a simple text file
list at /etc/mail/local-host-names (change it and restart sendmail) but
I have a strong suspicion that you system isn't configured that way.
(mine are for Very Good Reasons, but those reasons are not universal...)

One approach that MIGHT work is aliases for each user, but that is a
maintainability nuisance.

--
Now where did I hide that website...
Bill Cole [ Fr, 14 September 2007 01:20 ] [ ID #1820968 ]

Re: How to sendmail to users whose mailbox is on a different server

On Sep 13, 4:20 pm, Bill Cole <b... [at] scconsult.com> wrote:
> In article <1189722095.350255.237... [at] 19g2000hsx.googlegroups.com>,
>
>
>
> jdeisenberg <jdavid.eisenb... [at] gmail.com> wrote:
> > I am a total beginner with sendmail, and am having problems getting
> > sendmail to send email from a web form properly. Here's the scenario:
>
> > 1) Our virtual private server hosts web sites for Acme (http://
> >www.acme.com) and BigCo (http://www.bigco.com) [obviously, these are
> > made-up names]
> > 2) Acme has its own mail server, say, Exchange; BigCo is using Google
> > as its mail server.
> > 3) Each website has a form that submits client information to a CGI
> > script.
> > 4) The Acme script calls sendmail to send its information to
> > f... [at] acme.com; the BigCo script calls sendmail to deliver its
> > information to j... [at] bigco.com
> > 5) Fred and Joe never receive the mail from the web forms.
>
> > I think the problem is to convince sendmail that fred and joe are NOT
> > local users on the virtual private server; instead, sendmail has to
> > deliver the mail to Acme's server and Google's server.
>
> All you need to do is fix your sendmail config so that sendmail stops
> considering the plain domain name to be local.
>
> Of course, since you haven't shared any of your sendmail config or even
> any hint about what OS you are running (which might provide a clue to
> the default config) the exact means for doing that in your specific
> environment is not at all obvious. For example, I work with a few score
> machines where the lists of 'local' domain parts is a simple text file
> list at /etc/mail/local-host-names (change it and restart sendmail) but
> I have a strong suspicion that you system isn't configured that way.
> (mine are for Very Good Reasons, but those reasons are not universal...)
>
> One approach that MIGHT work is aliases for each user, but that is a
> maintainability nuisance.
>
> --
> Now where did I hide that website...

I needed to know, generically, if what I wanted to do was possible at
all. It's a BSD-based system, and the sendmail.cf file is pretty huge-
ish (2000 lines or so). As a matter of fact, there *is* a /etc/mail/
local-host-names, and neither acme.com nor bigco.com is listed therein.
jdeisenberg [ Fr, 14 September 2007 04:52 ] [ ID #1820970 ]

Re: How to sendmail to users whose mailbox is on a different server

In article <1189738377.669006.319770 [at] w3g2000hsg.googlegroups.com>
jdeisenberg <jdavid.eisenberg [at] gmail.com> writes:
>On Sep 13, 4:20 pm, Bill Cole <b... [at] scconsult.com> wrote:
>> In article <1189722095.350255.237... [at] 19g2000hsx.googlegroups.com>,
>>
>>
>>
>> jdeisenberg <jdavid.eisenb... [at] gmail.com> wrote:
>> > I am a total beginner with sendmail, and am having problems getting
>> > sendmail to send email from a web form properly. Here's the scenario:
>>
>> > 1) Our virtual private server hosts web sites for Acme (http://
>> >www.acme.com) and BigCo (http://www.bigco.com) [obviously, these are
>> > made-up names]
>> > 2) Acme has its own mail server, say, Exchange; BigCo is using Google
>> > as its mail server.
>> > 3) Each website has a form that submits client information to a CGI
>> > script.
>> > 4) The Acme script calls sendmail to send its information to
>> > f... [at] acme.com; the BigCo script calls sendmail to deliver its
>> > information to j... [at] bigco.com
>> > 5) Fred and Joe never receive the mail from the web forms.
>>
>> > I think the problem is to convince sendmail that fred and joe are NOT
>> > local users on the virtual private server; instead, sendmail has to
>> > deliver the mail to Acme's server and Google's server.
>>
>> All you need to do is fix your sendmail config so that sendmail stops
>> considering the plain domain name to be local.
>>
>> Of course, since you haven't shared any of your sendmail config or even
>> any hint about what OS you are running (which might provide a clue to
>> the default config) the exact means for doing that in your specific
>> environment is not at all obvious. For example, I work with a few score
>> machines where the lists of 'local' domain parts is a simple text file
>> list at /etc/mail/local-host-names (change it and restart sendmail) but
>> I have a strong suspicion that you system isn't configured that way.
>> (mine are for Very Good Reasons, but those reasons are not universal...)
>>
>> One approach that MIGHT work is aliases for each user, but that is a
>> maintainability nuisance.

>I needed to know, generically, if what I wanted to do was possible at
>all.

Absolutely yes. Are you happy with that answer?

> It's a BSD-based system, and the sendmail.cf file is pretty huge-
>ish (2000 lines or so).

You're not expected to read, understand, or directly modify it. Assuming
FreeBSD and that you're using the sendmail shipped with the OS, see
/usr/share/sendmail/cf/README and /etc/mail/Makefile. NetBSD and OpenBSD
may be different.

> As a matter of fact, there *is* a /etc/mail/
>local-host-names, and neither acme.com nor bigco.com is listed therein.

A common solution to your problem is to enable this option (from the
abovementioned README):

confDONT_PROBE_INTERFACES DontProbeInterfaces
[False] If set, sendmail will _not_
insert the names and addresses of any
local interfaces into class {w}
(list of known "equivalent" addresses).
If you set this, you must also include
some support for these addresses (e.g.,
in a mailertable entry) -- otherwise,
mail to addresses in this list will
bounce with a configuration error.
If set to "loopback" (without
quotes), sendmail will skip
loopback interfaces (e.g., "lo0").


However as Bill implies, depending on your non-sendmail config it may
not fix the issue for you.

--Per Hedeland
per [at] hedeland.org
per [ Fr, 14 September 2007 09:10 ] [ ID #1820975 ]
Miscellaneous » comp.mail.sendmail » How to sendmail to users whose mailbox is on a different server

Vorheriges Thema: Sending automatic mail
Nächstes Thema: sendmail in Solaris 10