Jails and Amavisd
galtsev at kicp.uchicago.edu
Thu Jan 25 17:53:42 UTC 2018
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
> 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 at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
> # uname -n
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
root at maia:/ # uname -n
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:
host.hostname = "maia.uchicago.edu";
ip4.addr = 22.214.171.124;
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-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.
> So what is the error actually telling me?
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
More information about the freebsd-questions