DragonFly 3.2 supports the Areca ARC-1882 RAID controller family
[ikiwiki.git] / docs / handbook / handbook-smtp-dialup.mdwn
1 \r
2 \r
3 ## 20.9 Using Mail with a Dialup Connection \r
4 \r
5 If you have a static IP address, you should not need to adjust anything from the defaults. Set your host name to your assigned Internet name and  **sendmail**  will do the rest.\r
6 \r
7 If you have a dynamically assigned IP number and use a dialup PPP connection to the Internet, you will probably have a mailbox on your ISPs mail server. Let's assume your ISP's domain is `example.net`, and that your user name is `user`, you have called your machine `bsd.home`, and your ISP has told you that you may use `relay.example.net` as a mail relay.\r
8 \r
9 In order to retrieve mail from your mailbox, you must install a retrieval agent. The  **fetchmail**  utility is a good choice as it supports many different protocols. This program is available as a package or from the ports collection ([`mail/fetchmail`](http://pkgsrc.se/mail/fetchmail)). Usually, your ISP will provide POP. If you are using user PPP, you can automatically fetch your mail when an Internet connection is established with the following entry in `/etc/ppp/ppp.linkup`:\r
10 \r
11     \r
12     MYADDR:\r
13     !bg su user -c fetchmail\r
14 \r
15 \r
16 If you are using  **sendmail**  (as shown below) to deliver mail to non-local accounts, you probably want to have  **sendmail**  process your mailqueue as soon as your Internet connection is established. To do this, put this command after the `fetchmail` command in `/etc/ppp/ppp.linkup`:\r
17 \r
18     \r
19       !bg su user -c "sendmail -q"\r
20 \r
21 \r
22 Assume that you have an account for `user` on `bsd.home`. In the home directory of `user` on `bsd.home`, create a `.fetchmailrc` file:\r
23 \r
24     \r
25     poll example.net protocol pop3 fetchall pass MySecret\r
26 \r
27 \r
28 This file should not be readable by anyone except `user` as it contains the password `MySecret`.\r
29 \r
30 In order to send mail with the correct `from:` header, you must tell  **sendmail**  to use `user@example.net` rather than `user@bsd.home`. You may also wish to tell  **sendmail**  to send all mail via `relay.example.net`, allowing quicker mail transmission.\r
31 \r
32 The following `.mc` file should suffice:\r
33 \r
34     \r
35     VERSIONID(`bsd.home.mc version 1.0')\r
36     OSTYPE(bsd4.4)dnl\r
37     FEATURE(nouucp)dnl\r
38     MAILER(local)dnl\r
39     MAILER(smtp)dnl\r
40     Cwlocalhost\r
41     Cwbsd.home\r
42     MASQUERADE_AS(`example.net')dnl\r
43     FEATURE(allmasquerade)dnl\r
44     FEATURE(masquerade_envelope)dnl\r
45     FEATURE(nocanonify)dnl\r
46     FEATURE(nodns)dnl\r
47     define(`SMART_HOST', `relay.example.net')\r
48     Dmbsd.home\r
49     define(`confDOMAIN_NAME',`bsd.home')dnl\r
50     define(`confDELIVERY_MODE',`deferred')dnl\r
51 \r
52 \r
53 Refer to the previous section for details of how to turn this `.mc` file into a `sendmail.cf` file. Also, do not forget to restart  **sendmail**  after updating `sendmail.cf`.\r
54 \r
55 \r
56 \r
57 CategoryHandbook\r
58 CategoryHandbook-email\r