From owner-freebsd-questions@freebsd.org Thu Jan 25 17:53:42 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 807A8EC2D7C for ; Thu, 25 Jan 2018 17:53:42 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from kicp.uchicago.edu (kicp.uchicago.edu [128.135.20.70]) by mx1.freebsd.org (Postfix) with ESMTP id 0828B6937A for ; Thu, 25 Jan 2018 17:53:40 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from point.uchicago.edu (point.uchicago.edu [128.135.52.6]) by kicp.uchicago.edu (Postfix) with ESMTP id 5F05D71803D; Thu, 25 Jan 2018 11:53:40 -0600 (CST) Subject: Re: Jails and Amavisd To: byrnejb@harte-lyne.ca, freebsd-questions@freebsd.org References: <1870a6827ca3544e6eb86a8fcb62b690.squirrel@webmail.harte-lyne.ca> From: Valeri Galtsev Message-ID: Date: Thu, 25 Jan 2018 11:53:40 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1870a6827ca3544e6eb86a8fcb62b690.squirrel@webmail.harte-lyne.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2018 17:53:42 -0000 On 01/25/18 11:34, James B. Byrne via freebsd-questions wrote: > We are trying to set up a remote MX service hosted in a FreeBSD-11 > (ez)jail. We have postfix running but we are having trouble with > getting amavisd to start. Rnning it as a service gives this result: > > service amavisd start > Starting amavisd. > /usr/local/etc/rc.d/amavisd: WARNING: failed to start amavisd > > > The log entry made in /var/log/messages says this: > > Jan 25 12:26:55 hllmx150 root: /usr/local/etc/rc.d/amavisd: WARNING: > failed to start amavisd > > Which provides no clue as to what has gone wrong. There are no > entries made in /var/log/amavis/amavisd.log respecting this failure. > > If we run amavisd from the command line then we see this: > > # amavisd > > The value of variable $myhostname is "hllmx150", but should have been > a fully qualified domain name; perhaps uname(3) did not provide such. > You must explicitly assign a FQDN of this host to variable $myhostname > in amavisd.conf, or fix what uname(3) provides as a host's network > name! > > However, uname -a shows this: > > # uname -a > FreeBSD hllmx150 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1 #0: Wed Aug > 9 11:55:48 UTC 2017 > root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > > # uname -n > hllmx150 I do not know about ezjail, I set up jails "by the book", i.e. by just following FreeBSD HandBook (this way I feel in control of everything... and it doesn't take much effort). Anyway, here is what one of my jails reports: root@maia:/ # uname -n maia.uchicago.edu which _is_ FQDN. I'm sure, this comes from "host.hostname" line in jail configuration. The following is the portion of /etc/jail.conf (on host sytem) defining that particular jail: maia { host.hostname = "maia.uchicago.edu"; ip4.addr = 128.135.20.83; devfs_ruleset=7; // integer number of devfsrules_jail_bpf ruleset // in /etc/devfs.rules persist; // Required because there are no processes exec.start = "/etc/rc.d/cron start; /etc/rc.d/syslogd start; /usr/local/etc/rc.d/clamav-freshclam start; /usr/local/etc/rc.d/clamav-clamd start; /usr/local/etc/rc.d/sa-spamd start; /usr/local/etc/rc.d/maiad start; /usr/local/etc/rc.d/apache24 start"; exec.stop = "/usr/local/etc/rc.d/clamav-freshclam stop; /usr/local/etc/rc.d/clamav-clamd stop; /usr/local/etc/rc.d/sa-spamd stop; /usr/local/etc/rc.d/maiad stop; /usr/local/etc/rc.d/apache24 stop; /etc/rc.d/syslogd stop; /bin/sh /etc/rc.shutdown"; } The very first line in configuration must be the one defining it. (I'm still attempting to set up /usr/ports/security/maia software - in jail - which gives users ability to tweak their individual spam settings, including white/black lists, hence the origin of hostname... didn't succeed yet, though still making small progress steps every time when I have chance to work on it...) There may be something similar in ezjail configuration. I hope, this helps. Valeri > > So what is the error actually telling me? > > -- ++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++