Be sure to set the $gMailer variable correctly in /etc/debbugs/config.
The options are (all lower case) exim, qmail and sendmail.
-Exim
+
+Exim 4
+------
+The exim 4 setup supports virtual domains. This doesn't hurt on a
+dedicated system. File names are for systems that use exim4's split
+config scheme. If you use something else, you'll need to put the
+configuration options in yourself at the appropriate place (most
+likely /etc/exim4/exim4.conf or /etc/exim4/exim4.conf.template).
+
+Create a non-root user with a non-root group as its primary group.
+We'll use Debian-debbugs as the user and group:
+ # adduser --system --group --home /var/lib/debbugs \
+ --no-create-home --disabled-login --force-badname Debian-debbugs
+
+This user needs to be able to write to /var/lib/debbugs.
+
+/etc/exim4/conf.d/main/03_debbugs:
+DEBBUGS_DOMAIN = <domain name>
+DEBBUGS_USER = Debian-debbugs
+DEBBUGS_GROUP = Debian-debbugs
+
+/etc/exim4/conf.d/transport/30_debbugs:
+debbugs_pipe:
+ debug_print = "T: debbugs_pipe for $local_part@$domain"
+ driver = pipe
+ user = DEBBUGS_USER
+ group = DEBBUGS_GROUP
+ command = /usr/lib/debbugs/receive
+ return_output
+
+/etc/exim4/conf.d/router/250_debbugs:
+debbugs:
+ debug_print = "R: debbugs for $local_part@$domain"
+ driver = accept
+ transport = debbugs_pipe
+ local_parts = submit : bugs : maintonly : quiet : forwarded : \
+ done : close : request : submitter : control : ^\\d+
+ domains = DEBBUGS_DOMAIN
+
+bounce_debbugs:
+ debug_print = "R: bounce_debbugs for $local_part@$domain"
+ driver = redirect
+ allow_fail
+ data = :fail: Unknown user
+ domains = DEBBUGS_DOMAIN
+
+The bounce_debbugs router bounces all mail for the DEBBUGS_DOMAIN that
+hasn't been picked up by the debbugs router. If you want addresses
+from that domain that do not belong to debbugs to be handled normally,
+simply omit that router. However, since the pattern on deb debbugs
+router match a significant subset of the domain's local parts, it is
+strongly recommended to use a dedicated domain for debbugs.
+
+
+Exim 3
----
-I've seen two types of setting up Exim used.
+I've seen two types of Exim 3 set ups being used:
1) If the machine is dedicated and all e-mail goes to the debbugs script,
add this in the transport section:
mail for those zones ("debbugs_router") and "send" the mail using a pipe
("debbugs_transport").
+
Qmail
-----
From Tommi Virtanen (tv@debian.org), amended by Daniel Ruoso
restart sendmail with the new configuration. Your system should now
be up and running. Congratulations!
+
Postfix
-------
-It seems Bdale isn't around currently, so I'll just mail this
-here directly. This is a short description of how to get debbugs
-working with postfix. If someone can verify this and give me some
-feedback if would be appreciated.
-
-Lets assume that you are going to install bugs.domain.net, and you
+Let's assume that you are going to install bugs.domain.net, and you
are going to run it on the machine master.domain.net.
DNS setup: point the MX to the machine running debbugs:
bugs.domain.net MX 50 master.domain.net.
-In /etc/postfix/main.cf enable the transport maps by inserting the
-following line:
+For postfix we have to do three things now:
- transport_maps = hash:/etc/postfix/transport
+ 1. Open postfix for any recipient address on the domain
+ bugs.domain.net
+ 2. Create a transport map to the debbugs script called
+ ,,receive''.
+ 3. Make sure that mails are handed individually into the
+ debbugs pipe. The receive script can only process mails
+ with _one_ recipient.
-Now create /etc/postfix/transport and insert:
+So, create /etc/postfix/transport and insert:
bugs.domain.net debbugs:
This tells postfix to use the debbugs transport agent to deliver any
mail send to bugs.domain.net. Now we need to make a database from that
+map, so that postfix can use:
+
+ $ postmap hash:/etc/postfix/transport
+
+So, create /etc/postfix/debbugs-recipients and put:
+
+ @bugs.domain.net ACCEPT
+
+into it.
+
+Here, we also need to make a database from that map, so
that postfix can use:
- # makemap hash transport
+ # postmap hash:/etc/postfix/debbugs-recipients
+
+In /etc/postfix/main.cf we enable the transport and local recipient
+map by inserting the following lines:
-Now we need to teach postfix what the debbugs transport agent is. Edit
+ transport_maps = hash:/etc/postfix/transport
+ # debbugs transport
+ local_recipient_maps = hash:/etc/postfix/non-unix-users
+ transport_maps = hash:/etc/postfix/transport
+ debbugs_destination_recipient_limit = 1
+
+The last line in the block above assures that mails pour into
+the debbugs receive scripts on a one by one recipient basis.
+
+At last we need to teach postfix what the debbugs transport agent is. Edit
/etc/postfix/master.cf and add:
debbugs unix - n n - - pipe
Finally add bugs.domain.net to mydestination in main.cf:
- mydestination = $myhostname localhost.$mydomain bugs.domain.org
+ mydestination = $myhostname localhost.$mydomain bugs.domain.net
Now that all this is done, restart postfix and it should be working..
-Wichert.
+Wichert
+Updated+modified by Mike (20120919)
+
Procmail and SpamAssassin
-------------------------
autoreply approach may be useful.
:0h
- * ? test "$LOCAL_PART" = control
+ * LOCAL_PART ?? control
* !^FROM_DAEMON
* !^X-Loop: owner@bugs\.example\.org
* ^(From|Reply-To):.*(abuser1@example\.org|abuser2@example\.org)