From owner-freebsd-questions@FreeBSD.ORG Fri Jul 29 08:48:55 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E811616A41F for ; Fri, 29 Jul 2005 08:48:55 +0000 (GMT) (envelope-from nullpt@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FC8343D48 for ; Fri, 29 Jul 2005 08:48:55 +0000 (GMT) (envelope-from nullpt@gmail.com) Received: by wproxy.gmail.com with SMTP id i4so577323wra for ; Fri, 29 Jul 2005 01:48:54 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sGLAe9aJbKiRsRwXk1Db5qucKRxqmw03/In+ayjrXmqddsNtXQiOefpc8Jnyesgyi/j9rUFjVxoZgWwQAdmbUPmOBce/yKNblV603xjlYOKGnnSc0rdnrrsQ1I5RYz8xSqYnaQvtHaXX0WFxU0e3Po3fwM5SYQ5OsjE1AyyKlRg= Received: by 10.54.42.38 with SMTP id p38mr1177647wrp; Fri, 29 Jul 2005 01:48:54 -0700 (PDT) Received: by 10.54.124.11 with HTTP; Fri, 29 Jul 2005 01:48:54 -0700 (PDT) Message-ID: <755cb9fc05072901482a22540c@mail.gmail.com> Date: Fri, 29 Jul 2005 09:48:54 +0100 From: Alexandre Vieira To: freebsd-questions@freebsd.org In-Reply-To: <6.1.0.6.2.20050729003728.06268da0@cobalt.antimatter.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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> Subject: Re: Sendmail help needed X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexandre Vieira List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2005 08:48:56 -0000 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 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 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 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