Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2005 09:48:54 +0100
From:      Alexandre Vieira <nullpt@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Sendmail help needed
Message-ID:  <755cb9fc05072901482a22540c@mail.gmail.com>
In-Reply-To: <6.1.0.6.2.20050729003728.06268da0@cobalt.antimatter.net>
References:  <755cb9fc05072815171ac8003@mail.gmail.com> <6.1.0.6.2.20050728153729.156ff2d0@cobalt.antimatter.net> <755cb9fc050729003050edf7ef@mail.gmail.com> <6.1.0.6.2.20050729003728.06268da0@cobalt.antimatter.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello Glenn,

The odds of the reporting system are not of my fully knowledge, I just
know how and what mails go from where to who.

Imagine that a script on a reporting machine does this:

# mailx -s ERROR_FOUND_IN_PROC_SYNC syncproj

It will try to deliver the mail locally, as suposed to. If I define a
central hub or a Smart host it will deliver the mail I exampled to
syncproj@mailhub and it works fine. The problem is that it won't
lookup the mailhub MX record, It will send it directly to mailhub:25.
Now imagine that mailhub is down? There is a backup server listed as
an MX record for the mailhub domain with a higher pref that would take
the work while mailhub prefered MX is down.

I've been reading a little more and I think there is some kind of
feature/option that force a MX lookup on the mailhub host.

Thank you

On 7/29/05, Glenn Dawson <glenn@antimatter.net> wrote:
> At 12:30 AM 7/29/2005, you wrote:
> >Hello,
> >
> >Thanks for the help.
> >
> >The thing is that our main mailserver is not able to work with reports
> >from only one address. It has a db with some "names" that match
> >name@ourinternaldomain.tld and then send the reports to the respective
> >persons/mailing lists.
> >So the basics of the question is: Is it possible to get every mail
> >(including local mail) redirected to one domain with MX lookup? I've
> >been reading about LUSER_RELAY, LOCAL_RELAY, stickyhost, but I don't
> >know if this will solve the problem.
>=20
> ok, lets see if I understand this correctly...
>=20
> You have an existing mail server that handles mail for you local network.
> Some of the mail sent to that server is compared to a database which has
> entries that look like somename@internaldomain.com.  If a match is found,
> the message is redistributed to some list of email addresses.  So far so
> good? hope so...
>=20
> The addresses that are looked at for a match, are they the from address o=
r
> the to address?
>=20
> For example, I send an email to you mail server using the address
> user@foo.com.  Since I sent the email, it looks like it came from
> glenn@antimatter.net.  One of those two addresses are compared to a
> database to decide what to do with the message.  From your description, i=
t
> sounds like the To: address is the one being looked at by the mail server=
.
>=20
> "Local" mail is normally considered to be mail between two addresses whic=
h
> are on the same machine.  The from and to addresses for the local mail ca=
n
> have only account names, or, one or both could have a domain associated
> with it.  Potentially, mail between the following pairs of addresses coul=
d
> all be local:
>=20
> From:                   To:
> foo                     bar
> foo@internal.com        bar
> foo                     bar@internal.com
>=20
>  From your description above, it sounds like you're looking at mail that =
is
> always delivered to the same address on the mail server, and then you're
> using the address the mail was from to decide what to do with it.  Is tha=
t
> correct?
>=20
>  From the description below (from the original email) it sounds like the
> scripts in question are running on machines that are not the mail server,
> and they're only specifying the username to deliver to, and not adding an=
y
> domain name or hostname to the recipient.  Depending on what else is
> happening on the machines that have the scripts that generate the mail, i=
t
> sounds like building a null client is probably the simplest thing to
> do.  Other options are using some of the masquerading features, or by usi=
ng
> LOCAL_RELAY to force unqualified names to be send to a central server whi=
ch
> will figure out what to do with them.
>=20
> Hope some of that helps...Let me know if I can clarify anything, I'll be
> around for at least another few hours...
>=20
> -Glenn
>=20
>=20
> >On 7/28/05, Glenn Dawson <glenn@antimatter.net> wrote:
> > > At 03:17 PM 7/28/2005, Alexandre Vieira wrote:
> > > >Hello folks,
> > > >
> > > >I'm trying to get past a standard in sendmail which is very simple.
> > > >
> > > >I have several machines reporting mails trough local MTA's (sendmail=
)
> > > >in each one of the boxes to our main mailserver. The thing is, I did
> > > >not developed the scripts and they are using "mailx -s <subj> user"
> > > >which normally would try to deliver it to a local account in the
> > > >machine. So the question is: Can I, in any way, define that every
> > > >"user" passed on the mailx in every script gets resolved to
> > > >user@somedomain.tld and not to a local system account? We have
> > > >hundreds of "names" in the scripts, so aliasing doesn't work for me.
> > >
> > > If you don't _ever_ want things to be delivered locally, you can crea=
te
> > > what sendmail calls a null client.  That will send all mail to the ad=
dress
> > > you specify.  You can get more details from /usr/share/sendmail/cf/RE=
ADME
> > >
> > > -Glenn
> > >
> > >
> > > >My current hack is defining DR and DS in the sendmail.cf to a static
> > > >hostname but that takes redundancy to our mail system since if the
> > > >main mailserver is down the backup mail server (higher MX) won't tak=
e
> > > >any effect.
> > > >
> > > >Any help apreciated
> > > >Cheers
> > > >_______________________________________________
> > > >freebsd-questions@freebsd.org mailing list
> > > >http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > > >To unsubscribe, send any mail to
> > "freebsd-questions-unsubscribe@freebsd.org"
> > >
> > >
> >
> >Thanks
> >_______________________________________________
> >freebsd-questions@freebsd.org mailing list
> >http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.=
org"
>=20
>=20


--=20
Alexandre Vieira - nullpt@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?755cb9fc05072901482a22540c>