From owner-freebsd-questions@FreeBSD.ORG Thu Oct 8 02:06:20 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1E01106566B for ; Thu, 8 Oct 2009 02:06:20 +0000 (UTC) (envelope-from freebsd@optimis.net) Received: from mail.optimis.net (mail.optimis.net [69.104.191.124]) by mx1.freebsd.org (Postfix) with ESMTP id 6716F8FC18 for ; Thu, 8 Oct 2009 02:06:20 +0000 (UTC) Received: from marvin.optimis.net (marvin.optimis.net [192.168.1.3]) by mail.optimis.net (8.14.3/8.14.2) with ESMTP id n9826JHI001805 for ; Wed, 7 Oct 2009 19:06:19 -0700 (PDT) (envelope-from freebsd@optimis.net) Received: from marvin.optimis.net (localhost [127.0.0.1]) by marvin.optimis.net (8.14.3/8.14.3) with ESMTP id n9826Jm7040356 for ; Wed, 7 Oct 2009 19:06:19 -0700 (PDT) (envelope-from freebsd@optimis.net) Received: (from george@localhost) by marvin.optimis.net (8.14.3/8.14.3/Submit) id n9826JLN040355 for freebsd-questions@freebsd.org; Wed, 7 Oct 2009 19:06:19 -0700 (PDT) (envelope-from freebsd@optimis.net) Date: Wed, 7 Oct 2009 19:06:19 -0700 From: George Davidovich To: freebsd-questions@freebsd.org Message-ID: <20091008020619.GB38899@marvin.optimis.net> References: <4d7dd86f0910071502n4164fd6eu26693ed03cb3cbee@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4d7dd86f0910071502n4164fd6eu26693ed03cb3cbee@mail.gmail.com> User-Agent: Mutt/1.5.19 (2009-01-05) Subject: Re: Daily report cannot be emailed to a jailed mail server X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2009 02:06:20 -0000 On Thu, Oct 08, 2009 at 09:02:50AM +1100, David N wrote: > FreeBSD 7.2-R box with 10 jails. > > The mail server (actually its a mail filter) is hosted on the same > server inside a jail. > > I can't seem to get the main server reports to be sent to the mail > filter inside the jail inside the same box. > > so.. root@localhost tries to send an email to > someone@anotherdomain.com.au > > The MX entry for anotherdomain.com.au points to the mailfilter on the > server (jailed). > > I've changed my /etc/mail/aliases to have > root: someone@anotherdomain.com.au > and ran newaliases. It's been already pointed out that you aren't providing much information to go on, so here's my WAG of what is happening. Changing the root alias root could work, but consider the case of mail from the jailhost being rejected by the jailed mailserver. The bounce message will be addressed to POSTMASTER on the jailhost, which points to root on the jailhost, which points back to the jailed mailserver trying to send the bounce, which points to ... You can examine the scenario for yourself either by listening to a married couple on the verge of divorce argue with one another, or more specifically, by running [root@jailhost] sendmail -bv root [root@jail] sendmail -bv postmaster@jailhost.server.net > When i try to send an email i get > in /var/log/messages > sm-mta[94682]: n97LeeOw094682: Losing ./qfn97LeeOw094682: savemail panic > Oct 8 08:40:40 server sm-mta[94682]: n97LeeOw094682: SYSERR(root): > savemail: cannot save rejected email anywhere > Oct 8 08:42:30 server sm-mta[94713]: n97LgTYg094713: Losing > ./qfn97LgTYg094713: savemail panic > Oct 8 08:42:30 server sm-mta[94713]: n97LgTYg094713: SYSERR(root): > savemail: cannot save rejected email anywhere > Oct 8 08:47:07 server sm-mta[95130]: n97Ll7VV095129: SYSERR(root): MX > list for anotherdomain.com.au. points back to server.net The jailed mailserver is rejecting the mail and is then trying to send a bounce and can't because it's caught in a loop that ends when Sendmail says "Look this isn't an argument ... it's just contradiction!" and bails out. Why the jailed mailserver is rejecting the mail is a separate issue. > In /var/log/maillog > n97Ll7VV095129: to=someone@anotherdomain.com.au, > ctladdr= (0/0), delay=00:00:00, xdelay=00:00:00, > mailer=esmtp, pri=30715, relay=anotherdomain.com.au., dsn=5.3.5, > stat=Local configuration error > Oct 8 08:47:07 server sm-mta[95130]: n97Ll7VV095129: n97Ll7VV095130: > DSN: Local configuration error That's from the maillog on the jailhost. More relevant to why the jailed mailserver has rejected the mail would be the jail's maillog entries (or whatever logging was done by the "filter" installed there). Either way, for the interim I'd suggest undoing your changes, rebuilding your aliases and consider implementing an alternate approach. For anyone to figure out conclusively what's happening, you'll have to provide more information. -- George