Mail » Soru ve Cevaplar

Serverdan yapılan spamı durdurmak

http://forum.whmdestek.com/

Geri git   WHM cPanel Destek Platformu » Site, Sunucu Sorunlarınız ve Çözümleri » Mail » Soru ve Cevaplar
 
Firma tanıtımı!
Firmanızın reklamını hemen yapın!
Reklamlar
Reklam Alın!
Günlük 5k tekil ve üzeri sitelerinize reklam!
Fixreklam
Türkiye' nin Webmaster Sitesi
Webmaster Araçları, Bilgi ve hizmet alışverişi
Webmaster.com.TR

Cevapla
 
LinkBack Seçenekler Stil
  #1  
Alt 14.04.08, 11:03
Sempron
 
Üyelik tarihi: Apr 2008
Mesajlar: 11
Tecrübe Puanı: 0
heroes is on a distinguished road
Serverdan yapılan spamı durdurmak

Merhabalar,

Serverımda bir kişinin spam yaptığını biliyorum. Fakat doğrudan hangi hesaın yaptığını bulamıyorum çünkü mailleri domain kullanarak göndermiyor. Direk nobody olarak gönderiyor. böylece nobody@server.com dan spam göndermiş oluyor.

Buna karşılık olarak

Prevent the user "nobody" from sending out mail to remote addresses (PHP and CGI scripts generally run as nobody if you are not using PHPSuexec and Suexec respectively.)

tweaks settingsden bu ayarı etkinleştirdim. Kişinin yaptığı spam engelledi. Bununla beraber serverdaki tüm form maillerde engellenmiş oldu. Bu durumuda istemiyorum

SuExec de on durumunda.

Bu konunun başka bir çözümü varmıdır ? Çok teşekkür ederim.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #2  
Alt 14.04.08, 12:54
sinangunay - ait Kullanıcı Resmi (Avatar)
FULL DESTEK SUNUCULAR
 
Üyelik tarihi: Jul 2007
Nerden: biLi biLi boP
Yaş: 27
Mesajlar: 1.663
Tecrübe Puanı: 1073
sinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond repute
PHP'i suexec olarak derledikten sonra CGI olarak çalıştırırsanız whmdeki o kısmı kapatabilirsiniz.
__________________
-----------------------------------------------------------------------------------------
>> LÜTFEN ÜCRETSİZ DESTEK TALEP ETMEK İÇİN MSN ADRESLERİMİZİ EKLEMEYİNİZ. HER TÜRLÜ ÜCRETSİZ DESTEK İÇİN FORUMLARIMIZI KULLANINIZ. TEŞEKKÜRLER <<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #3  
Alt 14.04.08, 13:07
Sempron
 
Üyelik tarihi: Apr 2008
Mesajlar: 11
Tecrübe Puanı: 0
heroes is on a distinguished road
İlginiz için çok teşekkür ediyorum.

Daha detaylı bir anlatım mümkün mü acaba ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #4  
Alt 11.05.08, 06:29
WHM VIP Member
 
Üyelik tarihi: Mar 2008
Mesajlar: 100
Tecrübe Puanı: 1
Cedric is on a distinguished road
Alıntı:
sinangunay yazmış Mesajı göster
PHP'i suexec olarak derledikten sonra CGI olarak çalıştırırsanız whmdeki o kısmı kapatabilirsiniz.

Kardeş, whm deki o kısım dediğin şekilde cgi ayarlanıp kapatılırsa spam sorunu çözülmüş olur mu peki? cgi olarak ayarlanınca nobody olarak mail halen gonderilebiliyorsa zaten sorun cozulmemis olur anladığım kadarıyla. Arkadasin sorusunun cevabını vermişsin ama arkadaşın sorununun çözümü de bu mu?


bu sorunun çözümünü biliyorsanız yazar mısınız? ya da bilen var mı? ben de bunun çözümünü arıyorum da
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #5  
Alt 11.05.08, 10:54
WHM VIP Member
 
Üyelik tarihi: Feb 2008
Nerden: İzmir
Yaş: 24
Mesajlar: 351
Tecrübe Puanı: 1001
darkwinter has a reputation beyond reputedarkwinter has a reputation beyond reputedarkwinter has a reputation beyond reputedarkwinter has a reputation beyond reputedarkwinter has a reputation beyond reputedarkwinter has a reputation beyond reputedarkwinter has a reputation beyond reputedarkwinter has a reputation beyond reputedarkwinter has a reputation beyond reputedarkwinter has a reputation beyond reputedarkwinter has a reputation beyond repute
Neden form maile izin veriyorsunuz ki sunucuda, gönderim limiti koyun her posta hesabına, script ile mail göndermek isteğen de pop3 kullansın. Bence tehlikeli, sürekli kontrol edemediğinize göre; sabah kaltığınızda sunucunuzun iplerinin black liste düştüğünü bile görebilirsiniz. Zaten spam yapanlarda hiç üşenmeyip sabaha karşı iş başında oluyor. DC sunucunun fişini bile çekebilir; TOS' larında bulunuyor bu madde hakları da var, zaten hazır scriptlerin çoğu destekliyor pop3 olayını. Yanlışsam düzeltin
__________________
From hell 2 heaven..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #6  
Alt 18.08.08, 22:55
iNTeRNeTCiNi - ait Kullanıcı Resmi (Avatar)
Sempron
 
Üyelik tarihi: Aug 2008
Mesajlar: 11
Tecrübe Puanı: 0
iNTeRNeTCiNi has much to be proud ofiNTeRNeTCiNi has much to be proud ofiNTeRNeTCiNi has much to be proud ofiNTeRNeTCiNi has much to be proud ofiNTeRNeTCiNi has much to be proud ofiNTeRNeTCiNi has much to be proud ofiNTeRNeTCiNi has much to be proud ofiNTeRNeTCiNi has much to be proud of
hmm bunu çözmek için aslında kolay yolu var ama ben plesk kullandigim için whm kullanmadim plesk admin olduktan sonra panelin için mail ayarlari var spam ekle diye oraya domain adını yaz 1 daha o domain brak maili 1 tane mesaj atamsin direk blackliste ekliyor spamdan kurtulmanın en kolay yolu
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #7  
Alt 18.08.08, 23:12
baracuda - ait Kullanıcı Resmi (Avatar)
SysAdmin
 
Üyelik tarihi: Jun 2008
Mesajlar: 291
Tecrübe Puanı: 2021
baracuda has a reputation beyond reputebaracuda has a reputation beyond reputebaracuda has a reputation beyond reputebaracuda has a reputation beyond reputebaracuda has a reputation beyond reputebaracuda has a reputation beyond reputebaracuda has a reputation beyond reputebaracuda has a reputation beyond reputebaracuda has a reputation beyond reputebaracuda has a reputation beyond reputebaracuda has a reputation beyond repute
Selam,

Bu işine yarar;

Stop PHP nobody Spammers

Update: May 25, 2005:
- Added Logrotation details
- Added Sample Log Output

PHP and Apache has a history of not being able to track which users are sending out mail through the PHP mail function from the nobody user causing leaks in formmail scripts and malicious users to spam from your server without you knowing who or where.

Watching your exim_mainlog doesn't exactly help, you see th email going out but you can't track from which user or script is sending it. This is a quick and dirty way to get around the nobody spam problem on your Linux server.

If you check out your PHP.ini file you'll notice that your mail program is set to: /usr/sbin/sendmail and 99.99% of PHP scripts will just use the built in mail(); function for PHP - so everything will go through /usr/sbin/sendmail =)

Requirements:
We assume you're using Apache 1.3x, PHP 4.3x and Exim. This may work on other systems but we're only tested it on a Cpanel/WHM Red Hat Enterprise system.

Time:
10 Minutes, Root access required.

Step 1)
Login to your server and su - to root.

Step 2)
Turn off exim while we do this so it doesn't freak out.
/etc/init.d/exim stop

Step 3)
Backup your original /usr/sbin/sendmail file. On systems using Exim MTA, the sendmail file is just basically a pointer to Exim itself.
mv /usr/sbin/sendmail /usr/sbin/sendmail.hidden

Step 4)
Create the spam monitoring script for the new sendmail.
pico /usr/sbin/sendmail

Paste in the following:


#!/usr/local/bin/perl

# use strict;
use Env;
my $date = `date`;
chomp $date;
open (INFO, ">>/var/log/spam_log") || die "Failed to open file ::$!";
my $uid = $>;
my @info = getpwuid($uid);
if($REMOTE_ADDR) {
print INFO "$date - $REMOTE_ADDR ran $SCRIPT_NAME at $SERVER_NAME n";
}
else {

print INFO "$date - $PWD - @infon";

}
my $mailprog = '/usr/sbin/sendmail.hidden';
foreach (@ARGV) {
$arg="$arg" . " $_";
}

open (MAIL,"|$mailprog $arg") || die "cannot open $mailprog: $!n";
while (<STDIN> ) {
print MAIL;
}
close (INFO);
close (MAIL);


Step 5)
Change the new sendmail permissions
chmod +x /usr/sbin/sendmail

Step 6)
Create a new log file to keep a history of all mail going out of the server using web scripts
touch /var/log/spam_log

chmod 0777 /var/log/spam_log

Step 7)
Start Exim up again.
/etc/init.d/exim start

Step 8)
Monitor your spam_log file for spam, try using any formmail or script that uses a mail function - a message board, a contact script.
tail - f /var/log/spam_log

Sample Log Output

Mon Apr 11 07:12:21 EDT 2005 - /home/username/public_html/directory/subdirectory - nobody x 99 99 Nobody / /sbin/nologin

Log Rotation Details
Your spam_log file isn't set to be rotated so it might get to be very large quickly. Keep an eye on it and consider adding it to your logrotation.

pico /etc/logrotate.conf

FIND:
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}

ADD BELOW:

# SPAM LOG rotation
/var/log/spam_log {
monthly
create 0777 root root
rotate 1
}



Notes:
You may also want to chattr + i /usr/sbin/sendmail so it doesn't get overwritten.

Enjoy knowing you can see nobody is actually somebody =)


Saygılar.
__________________
Bir kişinin ki yardımcısı Allah ola, Var kıyas eyle ol ne şah ola!.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
Cevapla


Seçenekler
Stil

Yetkileriniz
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-KodlarıKapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık

Benzer Konular
Konu Konuyu Başlatan Forum Cevap Son Mesaj
WHM de ilk yapılan ayarlar serefgorgulu Soru ve Cevaplar 3 15.07.07 04:44


Sign up for PayPal and start accepting credit card payments instantly.

Navigasyon
Menü