Jump to content
daun828

Camana Nak Elak Daripada Di Samar?

Recommended Posts

Aku buat melform guna coding bawah ni dan aku hantar guna valid emel adress..

Jadi, aku perasan kalu aku ganti someone tu dgn emel adress org lain... dan hantar guna emel orang lain (emel kawan aku contohnya) .... maka someone tu akan ingat kawan aku yg hantar emel kat die...

Cam ne nak elakkan perkara ni daripada berlaku? Atau supaya penerima boleh tau yg emel tu mgkin dihantar oleh sesape je...

<html>
<body>
<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
  {
  //send email
  $email = $_REQUEST['email']; 
  $subject = $_REQUEST['subject'];
  $message = $_REQUEST['message'];
  mail( "[email protected]", "Subject: $subject",
  $message, "From: $email" );
  echo "Thank you for using our mail form";
  }
else
//if "email" is not filled out, display the form
  {
  echo "<form method='post' action='mailform.php'>
  Email: <input name='email' type='text' /><br />
  Subject: <input name='subject' type='text' /><br />
  Message:<br />
  <textarea name='message' rows='15' cols='40'>
  </textarea><br />
  <input type='submit' />
  </form>";
  }
?>
</body>
</html>

Share this post


Link to post
Share on other sites

Aku buat melform guna coding bawah ni dan aku hantar guna valid emel adress..

Jadi, aku perasan kalu aku ganti someone tu dgn emel adress org lain... dan hantar guna emel orang lain (emel kawan aku contohnya) .... maka someone tu akan ingat kawan aku yg hantar emel kat die...

Cam ne nak elakkan perkara ni daripada berlaku? Atau supaya penerima boleh tau yg emel tu mgkin dihantar oleh sesape je...

<html>
<body>
<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
  {
  //send email
  $email = $_REQUEST['email']; 
  $subject = $_REQUEST['subject'];
  $message = $_REQUEST['message'];
  mail( "[email protected]", "Subject: $subject",
  $message, "From: $email" );
  echo "Thank you for using our mail form";
  }
else
//if "email" is not filled out, display the form
  {
  echo "<form method='post' action='mailform.php'>
  Email: <input name='email' type='text' /><br />
  Subject: <input name='subject' type='text' /><br />
  Message:<br />
  <textarea name='message' rows='15' cols='40'>
  </textarea><br />
  <input type='submit' />
  </form>";
  }
?>
</body>
</html>

aku tak fikir kita boleh tipu walaupun pakai email orang lain.

sebabbya dalam yahoo mail, ko boleh kesan email tu datang

dari website mana.

aku pun terperanjat ada dapat satu email.

rasanya macam pernah nampak tapi dimana yer.

sekali aku tengok full header

rupanya datang dari website aku daa

hehehe. siap bagi tau lagi lokasi fail yg ada mail() tu.

jadi ....

Share this post


Link to post
Share on other sites

Hemm.. tu mungkin pasal koding utk kod ko tu dah disecurekan...

Cube try dulu kod mailform.php yg aku amik dari w3schools tu...

Dan check sendiri result die kat emel ko...

Edited by daun828

Share this post


Link to post
Share on other sites

tp biasanya kalo x guner smtp, ada reply-to dkt header....

nak selamat, guna stmp seperti cade syorkan

kalau guna mail() memang boleh tipu

tapi kan ko yang control kod php tu

susah rasanya kalau orang nak godam

melainkan kalau dia dapat masuk website ko tu???

Share this post


Link to post
Share on other sites

Configure email server dan enable SMTP authentication, setiap user yang nak sent email keluar (tak kira la guna Outlook ke? PHP atau ASP) perlu melalui authentication untuk identify diri dulu. Atau configure mail server untuk accept guna satu specific domain (cth: @microsoft.com).

Dengan cara ni programmer-programmer kat dlm network tu tak boleh suka-suka hantar spoofed mail.

Harap membantu.

Share this post


Link to post
Share on other sites

nak selamat, guna stmp seperti cade syorkan

kalau guna mail() memang boleh tipu

tapi kan ko yang control kod php tu

susah rasanya kalau orang nak godam

melainkn kalau dia dapat masuk website ko tu???

Tu memg betul... tapi macam mana kalu tuan punye website tu sendiri yg nak pedajal orang?

*NULL, betul ke apa yg aku paham ni... maknanya hanya tokey server je yg boleh solvekan problem ni??

Share this post


Link to post
Share on other sites

*NULL, betul ke apa yg aku paham ni... maknanya hanya tokey server je yg boleh solvekan problem ni??

Dah tu? hang tanya bagi pihak siapa? Spammer? :unsure: It's all about ethics la, kalau hang admin network, hang kena bertanggunjawab ke atas keselamatan network, once IP masuk dalam spamhaus.. susahkan diri sendiri jugak kan?

Kalau hang programmer, lepastu guna network company untuk hantar spoof mail, tambah lagi satu kerja admin server nak kena clearkan list.

Kalau hang website owner sewa hosting, once IP kena blacklist, terus satu server tak boleh hantar email keluar. Susahkan diri dan susahkan user-user lain yang kongsi dalam satu server.

Kalau hang home user pakai dynamic IP guna SMTP TMnet, bersedialah untuk menerima surat cinta dari TM Abuse Admin

So, takde saper yang akan menang dalam spamming ni.. baik server dalam network ataupun server dari network lain..

Bagi menjawab soalan, sebenarnya masalah mail spoofing adalah salah satu major "loophole" terdapat dalam SMTP server dari dulu sampai sekarang. Sebab tu mail spam tetap wujud sampai sekarang. Server admin cuma boleh slow it down je dengan cara tukar port "25", buat authentication etc. Kalau nak solvekan terus, agak impossible.

So, bila server port dah bertukar dan perlukan authentication.. coding yang hang post kat atas tu dah tak releven lagi.

Harap membantu.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...