I have written a udev rule that call a script to send email when a usb drive is attached/removed. so far its working fine. but i want to know if there is any way i can include detail of usb drive in my email? how can i get it using udev? like usb size, label, mounted on, time. following is my udev rule and send email script:
SUBSYSTEM=="usb", ACTION=="add", RUN+="/u/usb_added add %b"
usb_added script is:
sendEmail -f root@IP -t firstname.lastname@example.org -s smtp.live.com:587 -m "USB Attached" -o email@example.com