From: fink <fi...@ra...> - 2006-01-22 01:10:29
|
Hi, I would like Fetchmail to check my mailserver periodically for new mail. I created a small script which just needs one argument (the exit code from fetchmail): if [ $1 = 1] then echo 1 > /proc/acpi/asus/mled else echo 0 > /proc/acpi/asus/mled fi exit The trouble is now how to get the exit code passed to the script: When fetchmail is running deamonised it never returns and thus the exit code does not exist. Is it possible in some odd way to pass the result of the fechmail mail check to the program called by the "postconnect" command ? The idea I had was something like this: [poll SERVERNAME with proto IMAP user 'USER' password 'PASSWD' postconnect '/usr/bin/servicemled $?'] Cheers RaceMouse |