Jeff Schroeder wrote:
On Tue, Aug 4, 2009 at 3:38 PM, Michael DeHaan<mdehaan@redhat.com> wrote:
  
On 08/04/2009 06:24 PM, Paul Company wrote:

what does the maillog on the cobbler server say


/var/log/maillog is empty.

cobbler must not be usind sendmail, because mail is being logged,
because if I run

# sendmail -C /etc/mail/sendmail.cf -t -v paul@mydomain.com < /etc/motd

Then,
# cat /var/log/maillog

Aug  4 15:17:07 cobbler sendmail[22837]: n74MH7v0022837: from=root,
size=682, class=0, nrcpts=1
, msgid=<200908042217.n74MH7v0022837@cobbler.mydomain.com>,
relay=root@localhost
Aug  4 15:17:07 cobbler1 sendmail[22837]: STARTTLS=client,
relay=mail.mydomain.com., vers
ion=TLSv1/SSLv3, verify=FAIL, cipher=AES256-SHA, bits=256/256
Aug  4 15:17:07 cobbler sendmail[22837]: n74MH7v0022837:
to=paul@mydomain.com, ctla
ddr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay,
pri=30682, relay=mail.mydomain.com. [10.230.6.21], dsn=2.0.0,
stat=Sent (OK id=1MYSJf-0007Xw-G3)
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler


reading the code, here are some relevant snippets... if they don't spark
anything, I'm not sure, it's probably a mail setup thing.

Jeff S may also be able to shed some light on things ... this is based on a
refactoring of his original script.
    

Sorry I'm a bit confused. What is trying to be accomplished and what
have you done to troubleshoot? Email works when using sendmail, but
not using cobbler? Is this for the build reporting email snippet I
submitted? /var/log/messages won't show anything as that snippet sends
the email straight from python to the smtp server you configure.

Perhaps you just have the settings wrong? Note that the
build_reporting_email directive HAS to be a python list or the script
will flip out. This is important.

# grep build /etc/cobbler/settings
build_reporting_enabled: 1
build_reporting_sender: "ourteam@ourcompany.com"
build_reporting_email: [ "ourteam@ourcompany.com" ]
build_reporting_smtp_server: "localhost"
build_reporting_subject: "Host Build Report"

Also what cobbler version are you using? Then I can look at the code
in git you are using. Our local copy might be a bit customized.

  

I am running into the same issue:

== settings ==
# Email out a report when cobbler finishes installing a system.
# enabled: set to 1 to turn this feature on
# sender: optional
# email: which addresses to email
# smtp_server: used to specify another server for an MTA
# subject: use the default subject unless overridden

build_reporting_enabled: 1
build_reporting_sender: "cobbler@dmain"
build_reporting_email: [ "yacketrj@potsdam.edu" ]
build_reporting_smtp_server: "SMTP"
build_reporting_subject: "Cobbler Host Build Report"

=== version ==

 cobbler version
cobbler 1.6.6

build date  : Fri Jun 12 16:22:03 2009

Copyright (C) 2006-2008 Red Hat, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Michael DeHaan.

=== ks ==
# Kickstart file automatically generated by anaconda.

#version=DEVEL
install
url --url http://some.ip
lang en_US.UTF-8
keyboard us
skipx
reboot
text
network --device eth0 --bootproto dhcp --noipv6
rootpw  --iscrypted MY_ENCRYPTED_PASSWORD_HERE
firewall --ssh
authconfig --enableshadow --passalgo=sha512
selinux --disable
timezone --utc America/New_York
zerombr
bootloader --location=mbr --append="rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --all --initlabel

%include /tmp/partinfo

%pre
# Determine how many drives we have
set $(list-harddrives)
let numd=$#/2
d1=$1
d2=$3


cat << EOF > /tmp/partinfo
part /boot --fstype ext3 --size=200 --ondisk=$d1
part pv.2 --size=1024 --grow --ondisk=$d1
volgroup VolGroup00 --pesize=32768 pv.2
logvol swap --fstype swap --name=swap --vgname=VolGroup00 --size=1024 --grow --maxsize=2048
#logvol /var --fstype ext3 --name=var --vgname=VolGroup00 --size=10240
logvol / --fstype ext3 --name=root --vgname=VolGroup00 --size=1024 --grow
EOF
%end


%packages --nobase
acpid
crontabs
dos2unix
eject
file
ftp
gnupg
iptables
grub
logrotate
mailx
man
man-pages
net-snmp
nmap
ntp
openldap
openldap-clients
openssh
openssh-clients
openssh-server
openssl
passwd
pciutils
psacct
psmisc
rootfiles
rpm
rsync
schedutils
screen
setarch
slocate
sudo
symlinks
tcpdump
time
traceroute
unzip
vim-enhanced
vim-common
vixie-cron
wget
which
yum
zlib
lsof
ltrace
patch
patchutils
ncurses-devel
strace
bind-utils
rdate
dhclient
stunnel
telnet
urw-fonts
vconfig
bridge-utils
perl
%end

%pre
(

wget -O /tmp/anamon "http://some.ip/cblr/aux/anamon"
python /tmp/anamon --name "f11-i386" --server "some.ip" --port "80"

) 2>&1 | tee  /root/pre-install.log

%post
(
echo "Post-Install section begins.."
sleep 15
wget -O /usr/local/sbin/anamon "http://some.ip/cblr/aux/anamon"
wget -O /etc/rc.d/init.d/anamon "http://some.ip/cblr/aux/anamon.init"

chmod 755 /etc/rc.d/init.d/anamon /usr/local/sbin/anamon
test -d /selinux && restorecon /etc/rc.d/init.d/anamon /usr/local/sbin/anamon

chkconfig --add anamon

cat << __EOT__ > /etc/sysconfig/anamon
COBBLER_SERVER="some.ip"
COBBLER_PORT="80"
COBBLER_NAME="f11-i386"
LOGFILES="/var/log/boot.log /var/log/messages /var/log/dmesg"
__EOT__



echo "Post-Install section ends.."
) 2>&1 | tee  /root/post-install.log


Looks like I might be missing a trigger or something seeing that the built in report trigger is never fired.  Thoughts?