Hi Kevin,
Looking at the errors that you are getting it looks like a DNS
problem to me. Try and ping your smtp mail server by name from your
firewall
ping mail.atl.bellsouth.net
I tried to ping mail.atl.bellsouth.net and mail.alt.bellsouth.net
from my computer and got a "couldn't resolve address" error. Make
sure the spelling is correct in lrp.conf. If the ping by name
doesn't work substitute the ip address in the lrp_MAIL_SERVER
variable in lrp.conf if you know it.
Good Luck,
Robert Williams
>I get this error message when issuing the mail command, and it takes ctrl-Z
>to stop.
>
>amberton: -root-
># mail -s "Logs" [EMAIL PROTECTED] </var/log/messages.0
>hostname: Unknown host
>error: Unknown response.
>%1 Stopped
>
>When I tried the -d option I get the following error:
>
>amberton: -root-
># mail -s "Logs" -d bellsouth.net -h mail.atl.bellsouth.net
>[EMAIL PROTECTED] </var/log/messages.0
>Illegal option -d
>hostname: Unknown host
>error: Unknown response.
>%2 Stopped
>
>Here is the output of mail:
>
>amberton: -root-
>/usr/sbin # mail
>Usage: /usr/sbin/mail [-s subject] [-c cc[,...]] [-b bcc[,...]] to[,...]
>
>Again, I do not have a file called POSIXness.conf in the /etc folder. This
>is all files listed using Putty:
>
>mtab nsswitch.conf ae.rc ipfilter.conf
>bootptab checksecurity.conf cron.daily cron.monthly
>cron.weekly crontab default diphosts
>exports fstab ftpusers iproute2
>group gshadow host.conf hostname
>hosts hosts.allow hosts.deny hosts.equiv
>inetd.conf init.d inittab ioctl.save
>issue issue.net multicron-p login.access
>localtime motd networks passwd
>pcnfsd.conf profile protocols rc.boot
>rc0.d rc1.d rc2.d rc3.d
>rc4.d rc5.d rc6.d resolv.conf
>rpc securetty services shadow
>shells syslog.conf terminfo wtmplock
>group- gshadow- passwd- shadow-
>rcS.d cron.d network.conf tzvalue
>lrp.conf adjtime resolv.conf-bak psdevtab
>dns_floods modules chatscripts ppp
>dhcpd.conf dnscache portsentry.conf psentryd.conf
>sh-httpd.conf sh-httpd.mime weblet.conf ssh
>junkbuster oidentd.users
>
>I do have a mail file in /usr/sbin/mail, that starts out with:
>
>#!/bin/ash
>#
>#POSIXness v0.20 19990529
>#GPL2 -- Dave 'Kill a Cop' Cinege <[EMAIL PROTECTED]>
>[SNIP]
>mail () { #usr/sbin
>
>data=$1
>fout="/tmp/smtpout.$$"
>fin="/tmp/smtpin.$$"
>fdata="/tmp/smtpdata.$$"
>fbody="/tmp/mailbody.$$"
>
>usage () { echo "Usage: $(basename) [-s subject] [-c cc[,...]] [-b
>bcc[,...]] to
>[,...]"; }
>
>[ -e $fin ] && eecho "Bad in file" && exit 1
>[ -e $fout ] && eecho "Bad out file" && exit 1
>[ -e $fdata ] && eecho "Bad temp file" && exit 1
>[ -e $fbody ] && eecho "Bad temp file" && exit 1
>
>mknod $fout p; mknod $fin p; : > $fdata; : > $fbody
>chmod 600 $fout $fin $fdata $fbody
>
> while getopts b:c:s: opt ; do
> case "$opt" in
> b) bcc="$OPTARG" ;;
> c) cc="$OPTARG" ;;
> esac
> done
>
> shift $(($OPTIND - 1))
>
> [ $# -lt 1 ] && usage && exit 1
>
> while read line; do
> echo $line
> done >$fbody
>
>to="$@"
>
>IFS=","
>
>allto="$to,$cc,$bcc"
>envelopes="$( for str in $allto; do
> echo $str
> done | sed 's/^.*[< ]\(.*\)$/\1/;s/>$//' )"
>IFS=$OIFS
>
>fqdn="$(hostname -f)"
>
> { echo "RSET"
> echo "HELO $fqdn"
> echo "MAIL FROM:<$USER@$fqdn>"
>
> for rcpt in $envelopes; do
> echo "RCPT TO:<$rcpt>"
> done
>
> echo "DATA"
>
> echo "From: $USER@$fqdn"
> echo "Subject: $subject"
> [ "$to" ] && echo "To: $to"
> [ "$cc" ] && echo "cc: $cc"
> [ ! "$to" ] && echo "Bcc: "
> echo ''
>
> cat $fbody
>
> echo '';echo '.'
> echo 'QUIT'
>
> } >$fdata
>
> smtp-out $fin $fdata > $fout &
>
> ( mnc ${lrp_MAIL_SERVER:-mail} $(getservbyname smtp) <$fout ) |
> while read nrep vrep; do
> echo "$nrep" >$fin
> done
>
> qt rm -f $fout; qt rm -f $fin; qt rm -f $fdata; qt rm -f $fbody
>
>}
>
>[SNIP]
>
>The mail code section was modified as Charles states on his web site.
>
>When I issue getservbyname smtp:
>
>amberton: -root-
>/usr/sbin # getservbyname smtp
>25
>
>Anything else needed to help troubleshoot?
>
>-----Original Message-----
>From: Robert Williams [mailto:[EMAIL PROTECTED]]
>Sent: Saturday, November 24, 2001 3:00 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [Leaf-user] The script to send log files
>
>
>Hi Kevin,
>The first thing to do is to make sure that the command
>mail -s "Logs" [EMAIL PROTECTED] </var/log/messages.0
>works from the command line. If it doesn't you will get more
>meaningful error messages here. Also make sure that the line in
>crontab is all on one line and that there is an empty line after it.
>If the command doesn't work from the command line you may have to
>specify a couple of options.
>
>Usage: /usr/bin/basename options to[,...]
>Options: [-s subject] [-c cc[,...]] [-b bcc[,...]]
> [-a attachment[,...]] [-d domain] [-h smptserver]
>
>Mail settings are in /etc/POSIXness.conf
>-a attach text file(s)
>-d specify from FQDN, overriding local domain
>-h specify SMTP server, overriding the MAIL_SERVER setting
>
>The -d option makes the network think that mail is coming from their
>network. For example my isp won't accept mail from private.network so
>by specifying -d pacbell.net it works. This option is not set in
>lrp.conf. I set this up in /etc/POSIXness.conf but it works just as
>well from the command line.
>
>For example, you might try:
>mail -s "Logs" -d bellsouth.net -h mail.atl.bellsouth.net
>[EMAIL PROTECTED] </var/log/messages.0
>all on one line.
>
>Let me know how it goes.
>Robert Williams
>
>
>
>_______________________________________________
>Leaf-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/leaf-user
_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user