RE: configuring dial-up for extreme novices (i.e. Mom).
From: Dan Langille (dan_at_langille.org)
To: freebsd-questions@FreeBSD.org Date: Tue, 15 Jul 2003 16:21:44 -0400
On 15 Jul 2003 at 11:36, fbsd_user wrote:
> > My mom has been using FreeBSD via DSL for some time. I'm about to
> > move her to dial up. I'm going to use userland ppp and postfix.
> > My initial untested idea is to create a script for her which will:
> > - ppp --dial HerISP,
> > - wait for the connection to come up
> > - then flush the mail queue
> > - run fetchmail to grab anything waiting
> > - kill the connection
> > Anyone already done this? Any suggestions?
> Yes you can do what you have described. User ppp has a mode that
> will not dial out until network services are needed by user. Give
> your Mom a script to run which will start fetchmail, user ppp will
> automatically start and call your ISP and connect, fetchmail will
> complete. Then have commands in script to kill fetchmail and user
> ppp, and start Mutt to read mail from postfix.
Here is what I set up this morning. My mum uses only email, and
doesn't surf the web. So dial on demand wasn't something I wanted to
try. So I took this approach:
pkg_add -r postfix
pkg_add -r sudo
alter /usr/local/etc/postfix/main.cf to have:
relayhost = smtp.myisp.com
alter /etc/ppp/ppp.conf to have this within the myisp section:
set server /var/run/istop "" 0177
create a dial script for mum:
run visudo to add this:
mum ALL = NOPASSWD: /usr/local/sbin/postfix flush
mum ALL = NOPASSWD: /usr/sbin/ppp -quiet -background myisp
mum ALL = NOPASSWD: /bin/kill -TERM `cat /var/run/tun1.pid`
mum ALL = NOPASSWD: /usr/sbin/pppctl /var/run/myisp quit all
Create a "dial" script:
sudo /usr/sbin/ppp -quiet -background myisp
sudo /usr/local/sbin/postfix flush
sudo /usr/sbin/pppctl /var/run/myisp quit all
poll 127.0.0.1 port 12346 with proto apop:
preconnect "ssh -f -L 12346:my.mail.example.org:110
firstname.lastname@example.org sleep 40 </dev/null >/dev/null"
In this case, all of mum's email goes to my mail server, and sits
there waiting for her to pop it off. This is done via fetchmail.
So after Mum types her email and "sends" it, she exits pine, then
issues the "dial" command. I'm going to add some error checking to
the above "dial" script. Especially to check that ppp connects.
FWIW: she's not yet using this as we're waiting for her dial-up
account to be set up but I've tested it using her DSL provider's dial
-- Dan Langille : http://www.langille.org/ _______________________________________________ email@example.com mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "firstname.lastname@example.org"