Send Mail

All posts in the Send Mail category

Send mail via telnet / test for open relay

Published September 22, 2009 by Siva

First, determine the MX for the domain in question:

nslookup
set type=mx
mydomain.com

should return something like:Server: ns2.mydom.com
Address: 192.168.1.254
mydomain.com preference = 10, mail exchanger = mx.mydomain.com
mydomain.com nameserver = ns.mydomain.com
mx.mydomain.com.com internet address = 1.1.1.1
mx2.mydomain.com internet address = 1.1.1.2

The last two lines tell you about the mail server (MX = Mail Exchange). In this case, 1.1.1.1 and 1.1.1.2.

So, armed with this knowledge,

telnet 1.1.1.1 25

Server responds with: 220 mx.mydomain.com SMTP
HELO

Server responds with: 250 OK
MAIL FROM:user@mydomain.com

Server responds with: 250 Address Ok.
RCPT TO:user@otherdomain.com

Server responds with: 250 user@otherdom.com OK
DATA

Server Responds (or may not): 354 Enter Mail
Enter message, then on a new line,
.

exit

The message should now be sent. By modifying the MAIL FROM and RCPT TO lines, you can test for open relay.

How to limit mail attachment size for Sendmail

Published September 8, 2009 by Siva

This little document is going to briefly show how to limit the size of incoming mail attachments. In order to this you are going to have to be familiar with Vi editing (see Basic Vi editing for an introduction).

First off telnet on to your mail server and log on as root or su. Next change to /etc directory. In that directory you should find a file called sendmail.cf (if you can’t find it, try typing whereis sendmail.cf, this should return a list of files with the word sendmail in it and hence you should be able to locate it that way). Prior to editing it, make a backup copy of it. Now you can type vi sendmail.cf.

Now scroll down this file until you find an entry that looks something like this:
# maximum message size
# 0 MaxMessageSize=1000000
In order to limit the size of messages simply uncomment the last line so that it reads:
0 MaxMessageSize=1000000
Furthermore you can specify the maximum message size by editing the value bit. Once done, save the changes and exit.

The final step involves stopping and restarting the server so that the changes can take effect (check your /etc/rc.d/init.d/ directory).

To finding the hacked website (Gumblar/Martuz)..

Published June 1, 2009 by Siva

To finding the website is hacked by someone or badware scripts running on the server. You can find here…

http://unmaskparasites.com/

This site should be healthy report…. If the report shows badware running..

You need to clean the site on the server & restore the old backup..

Then send review to google web tools &b google will unblock from google blacklist.

Email me for further doubts..

Thanks…