Friday, April 29, 2011

How to detect usb devices

lsusb is a nice tool to check for the usb divices, we can used this to check which are the usb devices currently connected/detected to your Linux Machine. Suppose id you are trying to connect your mobile broadband devices this will help a lot.

[root@tech29 ajeesh]# lsusb
bash: lsusb: command not found
[root@tech29 bus]# which lsusb
/usr/bin/which: no lsusb in (/usr/lib/ccache:/usr/lib/ccache:/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/src/jre1.6.0_24/bin:/home/users/ajeesh/bin:/usr/src/jre1.6.0_24/bin:/usr/src/jre1.6.0_24/bin)

This means that you have not install the lsusb utility on your machine. usbutils will brings lsusb .

[root@tech29 bus]# yum search usbutils
Loaded plugins: presto
========================================================================== Matched: usbutils ===========================================================================
usbutils.i686 : Linux USB utilities

[root@tech29 bus]# yum install usbutils

[root@tech29 bus]# lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Monday, April 18, 2011

Mail server Ip has been black listed

Suppose all our particular range of IPs have been blocked(black listed) in Yahoo/hotmail/etc... In this case we will insist to change the datacentre.

Exim has a wonderful way to solve this issue without changing the datacentre. That is routing the emails through another server. If you have a server in another data centre we can route all the yahoo (or required domains) to our remote server.

In this case we can use EXIM's Routing mailserver using smarthost function. Which means we can route all the emails related to particular domain(suppose YAHOO) through another server. Which IP is not black listed in Yahoo.

Please note down the Routing mail server configuration for EXIM

under "ROUTERS CONFIGURATION" in exim.conf

smarthost:
driver = manualroute
domains = ^yahoo\.* : btinternet.com
transport = remote_smtp
route_data = "host name of the remote server"

After that on your new routing server we need to relay IP for the server in /etc/relayhosts
Otherwise it will throws out an error message

error:-
2011-04-11 14:45:29 H=your.server.com [IP] F= rejected RCPT : your.server.com [IP] is currently not permitted to relay through this server. Perhaps you have not logged into the pop/imap server in the last 30 minutes or do not have SMTP Authentication turned on in your email client.