Friday, September 3, 2010

Exim Mail removal using script

Exim Mail removal using script

If an Exim based mail server suffers from a spammer attack through an exploited web site or a script, it is required to delete all the offending mails of the spammer.

You can use the below mentioned script which does exactly the required. The mentioned script will scan through your server’s mail queue and deletes all the mail that match the sender or the recipient address that you specify.

In order to use the script, please login to your server via the SSH and execute the below mentioned command:

vi /bin/queuesweep

Press the key i and notice the message “—- INSERT -—” at the bottom of your window or terminal. Now you can copy and paste the below mentioned lines:


Click here to READ MORE

Thursday, September 2, 2010

Track spammer in Qmail

Track spammer in Qmail

Track down the spammer in Qmail mail server:

1. Make sure that all domains have the Mail to nonexistent user option set to Reject.This option is available since Parallels Plesk Panel 7.5.3 and can be changed for all the domains using group operations: select the domains, click Modify Selected, in the Preferences section select Switch on for the Mail to nonexistent user option and select the Reject value for it.

2. Make sure that there are no untrusted IP addresses or networks in the white list.To do this, go to Home > Mail Server Settings > White List tab. To remove untrusted IP addresses or networks, select them in the list and click Remove Selected.

Look at the qmail queue for the number of mails. If the mail count too high, then it means, some spammer is roaming over there.

# /var/qmail/bin/qmail-qstat
messages in queue: 111976
messages in queue but not yet preprocessed: 0

From the qmail-qstat results we can see a huge mails are there in the queue. Next step is to identify the domain from which the mail is generating.


Click here for more

Monday, April 13, 2009

St. Josephs Church Peringuha, 5th chuch of our journey
Posted by Picasa

Wednesday, November 12, 2008

Granting Access to database from remote IP


View more similar posts...visit my personal site http://santhoshg.co.cc Also visit my forum http://santhoshg.co.cc/forum

* Login as root to mysql server .

Your shell prompt should now look like this:
mysql>

* Run the command:

GRANT ALL PRIVILEGES ON DATABASENAME.* TO USERNAME@IP IDENTIFIED BY 'PASSWORD';


USERNAME is the username that you would like to create. IP is the public IP address of your remote connection. PASSWORD is the password you would like to use for this username.


For example:

To grant access to database 'testdb' for the user 'alpha' identified by password 'changeme' from remoteip 62.54.10.20

GRANT ALL ON testdb.* TO alpha@'62.54.10.20' IDENTIFIED BY 'changeme';

* You now must flush MySQL's privileges

FLUSH PRIVILEGES;

* Run this command to exit MySQL

exit;

To allow remote Access to particular table in the database

GRANT ALL PRIVILEGES ON DATABASENAME.TABLENAME TO USERNAME@IP IDENTIFIED BY 'PASSWORD';

For example: To grant access to a table t1 in database alpha for the user testdb identified by password changeme from remoteip 62.54.10.20

GRANT ALL ON testdb.t1 TO alpha@'62.54.10.20' IDENTIFIED BY 'changeme';


GRANT ALL PRIVILEGES ON valija_registro.* TO valija_gi2@63.246.5.127 IDENTIFIED BY 'gitanava';

http://santhoshg.co.cc/forum/viewtopic.php?f=7&t=496&sid=6adebb0fcd24f7292047cb091f31cf94

Creating or Importing a Database

Ref : http://santhoshg.co.cc/forum/viewtopic.php?f=7&t=496&sid=6adebb0fcd24f7292047cb091f31cf94

Creating or Importing a Database

View more similar posts...visit my personal site http://santhoshg.co.cc Also visit my forum http://santhoshg.co.cc/forum

To create a new database on a hosting account:

1. Click the Domains shortcut in the navigation pane.
2. Click the required domain name in the list.
3. Click Databases.
4. Click Add New Database.
5. Enter a name for the database.

We recommend that you choose a name that starts with a Latin alphabet symbol
and comprises only alphanumeric and underscore symbols (up to 64 symbols).
6. Select the database type that you are going to use: MySQL or PostgreSQL.
Click OK.
7. To set up database administrator's credentials, click Add New Database
User.
8. Type a user name and a password that will be used for accessing the
contents of the database.
9. Click OK.

To import an existing database:

1. Click the Domains shortcut in the navigation pane.
2. Click the required domain name in the list.
3. Click Databases.
4. Click Add New Database.
5. Enter a name for the database. We recommend that you choose a name that
starts with a Latin alphabet symbol and comprises only alphanumeric and
underscore symbols (up to 64 symbols).
6. Select the database type that you are going to use: MySQL or PostgreSQL.
Click OK.
7. To set up database administrator's credentials, click Add New Database
User.
8. Type a user name and a password that will be used for accessing the
contents of the database. Click OK.
9. Click the btn configure odbc DB WebAdmin icon in the Tools group. An
interface to phpMyAdmin (or phpPgAdmin) database management tool will open in
a separate browser window.
10. Click on the Query window icon in the left frame.
11. Click the Import files tab.
12. Select the text file that contains the data and click Go.
13. Click the Insert data from a text file link.

To manage your databases and their contents, use your favorite MySQL or
PostgreSQL client or the web based database management tool accessible from
Plesk control panel (Domains > domain name > Databases > Database name > DB
WebAdmin).
View more similar posts...visit my personal site http://santhoshg.co.cc Also visit my forum http://santhoshg.co.cc/forum

Ref : http://santhoshg.co.cc/forum/viewtopic.php?f=7&t=496&sid=6adebb0fcd24f7292047cb091f31cf94

Useful Exim commands

Useful Exim commands

These are some useful Exim commands

--------> REMOVE MAILS BY ID -------->
# /usr/sbin/exim -v -Mrm (MAIL ID HERE)

--------> LIST QUEDED MAILS -------->
# /usr/sbin/exim -bp

--------> OUTPUT NUMBER OF QUEDED MAILS -------->
# /usr/sbin/exim -bpc

--------> DELETE FROZEN MAILS -------->
# /usr/sbin/exim -bp | awk '$6~"frozen" { print $3 }' | xargs exim -Mrm

--------> DELIVER FORCEFULLY EMAILS -------->
# /usr/sbin/exim -qff -v -C /etc/exim.conf &

--------> FREEZE MAILS FROM SENDER -------->
# /usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mf

--------> REMOVE MAILS FROM SENDER -------->
# /usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mrm


Ref : http://sysadmingear.blogspot.com/search/label/exim