New Mail template and more fixes for james
[mirror/userdir-ldap.git] / web / forward.wml
1 #use wml::debian::template title="Email Forwarding"
2 <p>
3 Emails to @debian.org now go through a LDAP distributed email system. This
4 system uses the forwarding field in the LDAP directory to route mail without
5 passing it through a users .forward file on a single computer.
6 Multiple machines participate in the forwarding to provide redudency.
7
8 <p>
9 Each of the forwarders inspects the LDAP database
10 to see if foo@debian.org has forwarding set to an address, if so the <i>envelope
11 to address</i> is rewritten and the message redirected to the new address.
12 Otherwise the message is relayed to master.debian.org for processing by the
13 users .forward files. If email forwarding is setup then .forward files are
14 <b>NOT</b> considered. Extension addresses (foo-lists) are always routed
15 directly to master for processing.
16
17 <p>
18 All machines also use the forwarding attribute as a default destination for
19 email. If the user has a home directory and no .forward file the mail is
20 forwarded rather than delivered to /var/spool/mail. This makes sure cron
21 reports, bug responses and other unexpected emails are not misplaced.
22
23 <p>
24 The email forwarding can be easially reconfigured using GnuPG:
25 <pre>
26 echo "emailforward: foo@bar.com" | gpg --clearsign | mail change@db.debian.org
27 </pre>
28 or by visiting <a href="https://db.debian.org/login.html">db.debian.org</a>
29
30 <p>
31 You can test the email routing by using the command <tt>/usr/sbin/exim -bt
32 foo@debian.org</tt>
33
34 <h2>procmail</h2>
35 If you use procmail for your main mailbox, PLEASE, erase your .forward
36 file and put a .procmailrc in its place instead. This feature has been
37 supported on debian.org machines for a good while now, and will continue to be
38 supported.
39
40 <p>
41 The correct way to invoke procmail for extension addresses is "|/usr/bin/procmail [options]"
42 Ignore the IFS=".." stuff in the procmail man page.
43
44 <h2>MailBox formats</h2>
45 Emails can be saved to mailboxes or maildirs by using the correct lines in a
46 .forward file:
47 <p>
48 Mailbox format files "/debian/home/foo/Mbox"
49 <br>Maildir format files "/debian/home/foo/MDir/"
50
51 <p>
52 To deliver to /var/spool/mail/foo use a construct like '|/usr/bin/procmail
53 -m /dev/null'. Putting the mailbox path will not work. You must use
54 absolute paths for mailboxes, qmail-like ./ paths are not supported by
55 Exim.
56
57 <p>
58 Also, 'Exim Filter' files are deliberately turned off.
59
60 <h2>Delivey Environment</h2>
61 Some environment variables are set per-message (not quoted! Carefull!)
62 It is important to note that the environment variables dealing with
63 addressing apply to the ENVELOPE address are are totally completely
64 unrelated to the actual contents of the message:
65 <p>
66 'Standard' Env Variables:
67 <ol>
68 <li>EXTENSION (the 'foo' in .forward-foo)
69 <li>LOGNAME,USER (your user name)
70 <li>SENDER (envelope originator of message)
71 </ol>
72
73 <p>
74 'Qmail' Env Variables:
75 <ol>
76 <li>EXT == EXTENSION
77 <li>LOCAL = (the entire bit before the @)
78 <li>RECIPIENT = (the entire envelope to)
79 </ol>
80
81 <p>
82 Such that, <i>$RECIPIENT = $LOCAL-EXTENSION@&lt;something&gt;</i>.
83