Article Title: how to solve the security problem of the Sendmail server ?. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Author: ideal
Sendmail is the most widely used email sending/receiving proxy in Unix environments. Because the Sendmail mail server is powerful and complex, the following work is required to ensure the security of Sendmail.
1. Set S
email will be sent. My goal is to: if sdate, date even 100 rows of data, as long as the current time is consistent with the e-mail.
{
Require ("phpmailer/class.phpmailer.php");
$mail = new Phpmailer ();
$address = $row [1];
$mail->issmtp (); Set Mailer to use SMTP
$mail->host = "mail.aaa.com.cn"; Specify main and Backup server
$mail->smtpauth = true; Turn on SMTP authentication
$mail->username = "Josh"; SMTP username
$mail->password = "Password";
stability of the program you call. Therefore, it is an optional email sending method.
3. Use the phpmailer class
Is an open source mail class, main site: http://phpmailer.sourceforge.net
There are two files, one is class. SMTP. php, and the other is class. phpmailer. php. The usage can be found in the following article:
Http://blog.jianqing.net/2005/05/02/201-phpmailer
In addition, the use of the official website is as follows:Examples using phpmailer1. advanced example
This demonstrates sendi
PHPmailer failed to send emails online! Error message:
SMTP Error: cocould not connect to SMTP host. Mailer Error (9475@qq.com) SMTP Error: cocould not connect to SMTP host.
An error occurs when the local test is uploaded to the server normally.
When I put the functions in the class
Public function IsSMTP ()
{
$ This-> Mailer = 'smtp '; // change it to $ this-> Ma
process will take some time.[Email protected]:/var/www/html$ pwd/var/www/html[email protected]:/var /www/html$ lshello. html index.html info. PHP phpmailer[email protected]:/var/www/html$ cd phpmailer/[email protected]:/ varrequire phpmailer/phpmailerAfter the download is complete, we can see some more files in the directory, we create a new file mailer.php to send the file.[Email protected]:/var/www/html/phpmailer$ pwd/var/www/html/Phpmailer[email Protected]:/var/www/html/phpmailer$ lscom
convenient for the trouble of friends. Phpmailer Download: Http://xiazai.jb51.net/201304/yuanma/PHPMailer_jb51net.rar
In addition, the contents of the problem included at that time were sorted as follows:
1, error:could not connect to SMTP host
Reason 1: Do not mail system requirements of the SMTP request is not the same, but all allow uppercase, some do not support lowercase, such as NetEase, Tencent's mailbox. (As for this, I have not tested, anyway, to uppercase, also does not affect)
Wor
this pipeline is relatively low-level, depending on the stability of the program you are calling. So it's an optional way to send a message.
3. Using the Phpmailer class
is an open source Send mail class, main station: http://phpmailer.sourceforge.net
There are two files, one is class.smtp.php, and the other is class.phpmailer.phpPlus the official website usage:Examples using Phpmailer1. Advanced Examplethis demonstrates sending out multiple email messages and binary attachments from a MySQL
important thing is I am more familiar with Python easy to debug. The Ubuntu I use installs the Subversion-tools after the subversion, and this bag has a/usr/share/subversion/hook-scripts/mailer/mailer.py Used to compare two versions of the library and send mail to the specified mailing list person.
$ cd $repo/hooks
$ cp post-commit.tmpl post-commit
$ chmod a+x post-commit
$ cp/usr/lib/subversion/ Hook-scripts/mai
The last feature to implement is the editing and sending of messages. This part of the functionality is provided by the email_list.asp file, and its interface is shown in Figure 6. Next we'll analyze the file.
Email_list.asp's internal work process is similar to Edit_record.asp's. The administrator writes the message in the form and submits it, and the system selects all records with the Mail_list field value "Yes" and sends a copy of the new message to the Guest_mail address in those records.
sends an I/O Request, JVM sets the thread to blocking. when the sleep () status times out and the join () waits for the thread to terminate or times out or the I/O processing is completed, the thread re-transfers10: Synchronous function lock
Public class Demon {// 1. static Method synchronization function public static synchronized void method1 () {}// 2. non-static method synchronization public synchronized void method2 () {}// 3. this method can be
in the class name.
The code is as follows:
Final class BaseClass {
The code is as follows:
// Define an interfaceInterface ICanEat {Public function eat ($ food );}
We can see that there is no specific implementation of the method in the interface, but there must be a method!
Then, the following is: "Humans will eat"
// Specific object, connected to the interface class Human implements ICanEat {public function eat ($ food) {echo "Human eating". $ food .".";}}$ Obj = new Human (); $ obj-> e
About the use of osgi.net online also have a lot of information, recently in the use of osgi.net development plug-in, encountered such a bug, resulting in plug-ins and even the entire project can not start, the specific message of the exception is as follows:Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "UIShell.iOpenWorks.WinForm.Properties.Resources.resources" is correctly embedded or linked into assembly " Configfileconvert "At compile ti
Test instructions: There is a few gods and demons living on an island, and the number of gods and demons known, and now known that God is always telling the truth, demons are always telling lies, there are N questioning, asking a certain God or demon (identity unknown), the question is whether a god or a demon, according to their answer, ask if you can determine which is God andFor these problems, we only n
"
specific objects, connecting to interfacesClass Human implements icaneat{Public function Eat ($food) {echo "Human eating". $food. ".";}}
$obj =new Human ();$obj->eat ("shit");
Please ignore the "food" I gave.
Note that extends is no longer used, but implements. Then, the same method name is exactly the same. Then, the object must/best implement the method.
Go on
Interface icaneat{Public function eat ($food);}
specific objects, connecting to interfacesClass Human implements icaneat{Public func
protection.The object of pity: Huashan faction disciple, in the hate anjohibe inside and sad heartbroken war,, seriously wounded.Kangyue: Wudang Faction Master, the top ten of the two.Blood blade: The Blood knife Door master, the name of Zhuge Liang, the voice is very thick brawny. Give a person a heroic feeling, if not deadliest, certainly give a kind of heroic feeling. Formerly known as GE Niu.Feeling clothing: Emei faction master. The top ten. Fine eyebrow big eye, oval face shape, beauty st
Determines whether an object is connected to an interface.
Var_dump ($ objInstanceofICanEat );
Returns a boolean value.
-- More chestnuts
Interface ICanPee extends ICanEat {Public function pee ();}
Class Demon implements ICanPee {Public function pee (){Echo "Can demon pee? ";}Public function eat ($ food ){Echo "Can demon eat". $ food;}}
$ Ghost = new
"God evil" after the last Test has been a period of time, do not know how many small partners miss the game in the small Demon spirit, today's small series on the "God of evil" demon spirit professional skills to do a detailed introduction, come and see it!Don't think I'm too young to bully!Powerful eruption with control of the Mage, this is the demon spirit.Demo
, connecting to interfacesClass Human implements icaneat{Public function Eat ($food) {echo "Human eating". $food. ".";}}
$obj =new Human ();$obj->eat ("shit");
Please ignore the "food" I gave.
Note that extends is no longer used, but implements. Then, the same method name is exactly the same. Then, the object must/best implement the method.
Go on
Interface icaneat{Public function eat ($food);}
specific objects, connecting to interfacesClass Human implements icaneat{Public function Eat ($food) {
! But now, you are so timid, are you afraid ?"Teng Qingshan's face sank, turning his head> to that ten thousand days."Brother Wan. Does this matter to you ?" Li Yi opened her eyes. Shouted.......There is an open ground in front of the palace. Because the first God will be more advanced than ever. They are all big voices. It has attracted many people."What happened before ?""I heard that the first God will challenge a call and land. That call and. But the legendary
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.