LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] another useful laptop bit...

[ILUG] another useful laptop bit...

kevin lyda kevin at suberic.net
Thu Jan 20 21:28:32 GMT 2000


add this line:

O DeliveryMode=d

to your sendmail.cf.  (or use an mc file, or the install-sendmail
script)  that way there'll be no problem when you're not connected. 
then write a shell script to go through your queue when you're
connected.

normally i'm only online when my ip address is 192.168.5.xxx, and the
ppp0 interface is up on my home machine named inle.  the following
confirms all this and if so it runs /usr/lib/sendmail -q to send all my
email.  then have crontab (see man 5 crontab) fire it off.

---snip---
#!/bin/sh
#####
# Is there mail to send?
mailtosend=`mailq|wc -l`
if [ $mailtosend -eq 1 ]; then
    exit 0;
fi
#####
# Am I connected at home?
/sbin/ifconfig eth0 > /dev/null 2>%1
if [ $? -eq 0 ]; then
    /sbin/ifconfig eth0|grep -q 192.168.5
    if [ $? -eq 0 ]; then
	rsh inle /sbin/ifconfig | grep -q ppp0
	if [ $? -eq 0 ]; then
	    /usr/lib/sendmail -q
	fi
    fi
fi
---snip---

kevin
-- 
kevin at suberic.net                              Nutrition Facts
fork()'ed on 37058400		       Puns: 100% RDA  (% good puns: 0)




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell