Linux ²âÊÔsendmailÓʼþ·¢ËÍ
ÓÖÅöµ½ÓʼþÎÊÌ⣬ÔÚmagentoǰ̨ע²áÐÂÓû§£¬Ï¶©µ¥¶¼Ã»ÓÐÊÕµ½Óʼþ¡£µ«ÊÇÌáʾ¶¼ÊÇ˵Õý³£¡£
Ö±½ÓÔÚsshÖÐʹÓÃÏÂÁÐÃüÁî²âÊÔ£¬Á¬½Ó³¬Ê±£º
echo "Subject: test" | /usr/lib/sendmail -v xinhaozheng@gmail.com
Ìáʾ£º
WARNING: local host name (server) is not qualified; see cf/README: WHO AM I?
xinhaozheng@gmail.com... Connecting to [127.0.0.1] via relay...
xinhaozheng@gmail.com... Deferred: Connection timed out with [127.0.0.1]
»³ÒÉÊÇISP·âµôÁË25¶Ë¿Ú¡£¼ì²éһϷÀ»ðǽ£¬ÔÝʱ¹Øµôiptables£¬ÔÙÓÃÕâ¸öÃüÁî²âÊÔ£¬¿ÉÒÔͨ¹ý£º
WARNING: local host name (server) is not qualified; see cf/README: WHO AM I?
xinhaozheng@gmail.com... Connecting to [127.0.0.1] via relay...
220 server ESMTP Sendmail 8.13.8/8.13.8; Thu, 29 Apr 2010 03:22:42 +0200
>>> EHLO server
250-server Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL from:<root@server> SIZE=14
250 2.1.0 <root@server>... Sender ok
>>> RCPT To:<xinhaozheng@gmail.com>
>>> DATA
250 2.1.5 <xinhaozheng@gmail.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 o3T1Mg5Z016990 Message accepted for delivery
xinhaozheng@gmail.com... Sent (o3T1Mg5Z016990 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 server closing connection
Ïà¹ØÎĵµ£º
»ù±¾ÊµÓù¤¾ß£º
ls ÏÔʾÎļþÃû(list)
cat ÏÔʾÎı¾ÎļþÄÚÈÝ
rm [-i] ɾ³ýÎļþ(remove),-i´ò¿ªÑ¡Ïî
less/more ·ÖÆÁÏÔʾÎļþ
hostname ÏÔʾϵͳÃû
Îļþ²Ù×÷£º
cp SOURCEFILE DESTINATIONFILE ¸´ÖÆÎļþcopy
mv OLDNAME NEWNAME ¸ü¸ÄÎļþÃû(move)
lpr [-p] FILEN ......
ÓÃsecureCRTÁ¬½ÓLinuxʱ³öÏÖÈçÏ´íÎó£ºThe remote system refused the connection.
1¡¢²éѯsshd¹¤×÷״̬
#service sshd status
ÏÔʾstop
2¡¢ÔËÐÐ#service sshd restart
ÏÔʾPermissions 0777 for '/etc/ssh/ssh_host_rsa_key' are too openµÈһЩȨÏÞ´íÎó
3¡¢ÐÞ¸Ä/etc/sshϵÄÃÜԿȨÏÞ
#chmod 600 sshd_config
#chm ......
http://club.topsage.com/thread-1201128-1-1.html
ºÜ¶àÈ˶¼¶Ô¹ýÃüÁîÐÐÌáʾµÄÖØÒªÐÔ²»Ð¼Ò»¹Ë£¬ÉõÖÁÊÇÒ»µã¶¼²»¹ØÐÄ¡£µ«ÊÇÎÒÈ´Ò»µã¶¼²»ÕâôÈÏΪ£¬Ò»¸öºÃµÄÃüÁîÐÐÌáʾ¿ÉÒԸıäÄãʹÓÃÃüÁîµÄ·½Ê½¡£Îª´Ë£¬ÎÒÔÚinternetÉÏÕÒµ½Ò»Ð©·Ç³£ÊµÓã¬ÓÅÐ㣬²¢ÓÐȤµÄbashµÄÃüÁîÐÐÌáʾ¡£ÏÂÃæÎÒ½«ÎÒ×îϲ»¶Ê¹ÓõÄһЩÃüÁîÐÐÌáʾÂÞÁÐÈçÏ¡£
¡¡¡ ......
ÕâÊÇCµÄÔ³ÌÐò
#include <stdio.h>
#include <regex.h>
int main(int argc, char** argv)
{
regex_t reg;
regmatch_t pm[10];
char *pattern;
char buf[50];
const size_t nmatch = 10;
pattern = argv[1];
int result = regcomp(®, pattern, REG_EXTENDED);
while( fgets ......