The statistics are now sent to the designated person every day.
Use the original manual way to send a lot of trouble every day, so want to change to a scheduled task, let the server automatically send.
Technology told me that he had written a script for SendMail.
I tried to use it, and when I found the service SendMail status, there was always something like this. I don't know if it was my mistake that caused the message to be sent blocked.
OCT 5 07:00:01 sgadmin sendmail[30731]: u94n01ey030730:to=<[email protected]>, ctladdr=<[email Protected]> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=138838, dsn=2.0.0, stat=SentOct 5 07:00:34 Sgad Min sendmail[30736]: My unqualified host name (sgadmin) unknown; Sleeping for retryoct 5 07:01:34 sgadmin sendmail[30736]: Unable to qualify my own domain name (sgadmin) – Using short n Ameoct 5 08:00:01 sgadmin sendmail[30736]: U94n1yki030736:from=root, size=446, class=-60, Nrcpts=1, MSGID=<[EMAIL&NB Sp;protected]>, [email protected]oct 5 08:00:01 sgadmin sendmail[31179]: u950017d031179:from=<[email protected]>, size=667, class=-60, Nrcpts=1, Msgid=<[email protected]>, Proto=ESMTP, Daemon=MTA, Relay=localhost [127.0.0.1]oct 5 08:00:01 sgadmin sendmail[30736]: U94n1yki030736:to=root, Ctladdr=root (0/0), delay=00 : 58:27, xdelay=00:00:00, Mailer=relay, pri=138446, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=sent (U950017d031179 Message accepted for delivery)
Then I let the SendMail service restart. It's not going to be right.
1. Startup time is very long (time is estimated because of the cause of the error)
2. Error after startup
To view the log log (Cat/var/log/maillog), the error message is as follows
Oct7 A:xx: GenevaSgadmin sendmail[10425]: U97401jn010424:to=<[email protected]>, Ctladdr=<[email protected]> (0/0), delay=xx:xx: on, xdelay=xx:xx:xx, Mailer=local, pri=138838, dsn=2.0.0, stat=sentoct7 A:xx: *Sgadmin sendmail[10430]: My Unqualified host name (sgadmin) unknown; Sleeping forretryoct7 A: on: *Sgadmin sendmail[10430]: Unable to qualify my own domain name (sgadmin)--using Shortnameoct7 A: +: theSgadmin sendmail[10653]: My Unqualified host name (sgadmin) unknown; Sleeping forretryoct7 A: A: theSgadmin sendmail[10653]: Unable to qualify my own domain name (sgadmin)--using Shortnameoct7 A: A: theSgadmin sendmail[10660]: Starting Daemon (8.14.7): [Email protected] on:xx:xxOct7 A: A: theSgadmin sm-msp-queue[10673]: My Unqualified host name (sgadmin) unknown; Sleeping forretryoct7 A: at: theSgadmin sm-msp-queue[10673]: Unable to qualify my own domain name (sgadmin)--using Shortnameoct7 A: at: theSgadmin sm-msp-queue[10678]: Starting Daemon (8.14.7): [Email protected] on:xx:xxOct7 A: $: +Sgadmin sendmail[10877]: My Unqualified host name (sgadmin) unknown; Sleeping forretryoct7 A:Panax Notoginseng: +Sgadmin sendmail[10877]: Unable to qualify my own domain name (sgadmin)--using Shortnameoct7 A:Panax Notoginseng: +Sgadmin sendmail[10882]: Starting Daemon (8.14.7): [Email protected] on:xx:xxOct7 A:Panax Notoginseng: +Sgadmin sm-msp-queue[10894]: My Unqualified host name (sgadmin) unknown; Sleeping forretryoct7 A: -: +Sgadmin sm-msp-queue[10894]: Unable to qualify my own domain name (sgadmin)--using Shortnameoct7 A: -: +Sgadmin sm-msp-queue[10912]: Starting Daemon (8.14.7): [Email protected] on:xx:xx
The error is obvious. Consciousness is unable to find sgadmin this domain name.
So I thought about modifying the/etc/hosts file
Add IP sgadmin After restart SendMail service, still report the same error
This makes me very puzzled ah, I have added Ah, did not say that the effective?
Then found an article, the article said that the FQDN of the domain name must be used "." End
So I once again modified the hosts Italian IP sgadmin. Sgadmin this way.
Then restart the SendMail service, everything is OK, the boot speed is also very fast, it is estimated that less time to find domain
Post Address: http://blog.csdn.net/taolinke/article/details/4496316
In fact, I still have questions here. That technology has not been added to the hosts in the Sgadmin this domain name, why he can send the normal mail???
We will continue to study it for the moment.
Use SendMail to send mail under Linux