I'm running a perl script which wil create weekly report in CSV format. I want this report be emailed to the manager.
hence I am trying to configure Sendmail on my RHEL 5.6 server so that I can write a bash script to send this report as an attachment.
But I am not able to do that. I have done below entry in the senmail.mc file:
define(`SMART_HOST', `<my_smtp_server>')dnl
where is my companies mail server and I removed the name for brevity.
Then I restarted the sendmail service and tried sending email with "mail" command but i did not receive it.
Am I missing any other steps in send mail configuration ?
Thanks for the help in advance.
@adamo, Please find the sendmail information:
# ps -eaf | grep sendmail
root 3612 3560 0 03:58 pts/0 00:00:00 grep sendmail
root 32176 1 0 Jul31 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/mqueue
smmsp 32186 1 0 Jul31 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
# netstat -anp | grep 25
# netstat -anp | grep sendmail
unix 2 [ ] DGRAM 2027690 32186/sendmail: Que
unix 2 [ ] DGRAM 2027675 32176/sendmail: Que
# egrep -v "^dnl|^$" /etc/mail/sendmail.mc
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
#
the 128.0.0.1 is there in my fedora as well and it works fine. thanks for your time.