Send a message via command line without sendmail daemon.
Hi,
Is it possible to send a message via command line in script,
for instance:
sendmail -t name@[xxx.xxx.xxx.xxx] < file.txt
One thing is important - sendmail does not run as a daemon!!!
It seems, it does not work and error message is:
Nov 14 01:50:09 server sendmail[27519]: jAE0o7od027519: from=root, size=73970, class=0, nrcpts=1, msgid=<200511140050.jAE0o7od027519@server.firm.com>, relay=root@localhost
Nov 14 01:50:09 ns sendmail[27519]: jAE0o7od027519: to=name@[XXX.XXX.XXX.XXX], ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=2103970, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
There runs daemon named on this server and when I start
sendmail as a daemon the file "file.txt" is sent without problems,
of course.
I have done configuration:
/etc/mail/access
/etc/mail/sendmail.cf
/etc/hosts
/etc/sysconfig/network
/etc/resolv.conf
/etc/hosts.allow
Be so kind and get me direction there I can find mistakes in configuration.
Thank you.
Sonenberk
|