RE: configuring dial-up for extreme novices (i.e. Mom).

From: Dan Langille (dan_at_langille.org)
Date: 07/15/03

  • Next message: Neu, Benjamin S.: "RE: learning PHP - book idea?"
    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:
    #!/bin/sh
    sudo /usr/sbin/ppp -quiet -background myisp
    sudo /usr/local/sbin/postfix flush
    fetchmail
    sudo /usr/sbin/pppctl /var/run/myisp quit all

    Create ~/.fetchmailrc:

    poll 127.0.0.1 port 12346 with proto apop:
        preconnect "ssh -f -L 12346:my.mail.example.org:110
        mum@mail.example.org sleep 40 </dev/null >/dev/null"
        password secret;

    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.

    Any suggestions?

    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
    up line.

    -- 
    Dan Langille : http://www.langille.org/
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Neu, Benjamin S.: "RE: learning PHP - book idea?"

    Relevant Pages

    • RE: [SLE] Seeking help with mail-server setup
      ... I thought I'd set fetchmail to get my mail from the ISP ... So, if I'm understanding this, fetchmail grabs from ISP POP ... postfix grabs what fetchmail brought and feeds it to IMAP ... postfix feeds those sent messages to the ISP's SMTP server? ...
      (SuSE)
    • RE: [SLE] POP Mail HOWTO?
      ... delivered locally to an IMAP server (cyrus) ... Packages needed: postfix, cyrus-imapd, fetchmail, ... Postfix and Procmail and... ... But those config options were so ...
      (SuSE)
    • Re: Home IMAP server
      ... You would be using fetchmail too, ... postfix will receive mail for domains, ... it's just a regular mail server so postfix is listening ... that bogofilter can learn from it. ...
      (Ubuntu)
    • FW: [SLE] fetchd and postfix
      ... If fetchmail is going through the header checks in postfix, ... Rejecting email with attachs ...
      (SuSE)
    • RE: [SLE] fetchd and postfix
      ... If fetchmail is going through the header checks in postfix, ... Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com -- ...
      (SuSE)