Bug#688109: debbugs does not process mails sent to control@ in Cc:

Mike Gabriel <[email protected]>
Newsgroups gmane.linux.debian.devel.debbugs
Message-ID <20120919214355.138852p2w7kbxnjv__17540.5747177594$1348084105$gmane$org@mail.das-netzwerkteam.de>
retitle #688109 Setup debbugs with postfix MTA
thanks

Hi Don,

thanks for the prompt reply.

On Mi 19 Sep 2012 18:56:32 CEST Don Armstrong wrote:

> On Wed, 19 Sep 2012, Mike Gabriel wrote:
>> Considering the ATM latest Git code of debbugs:
>> http://git.donarmstrong.com/?p=debbugs.git;a=tree;h=445ef2a66a2f6e97760ca319ac3d919834178f0b;hb=445ef2a66a2f6e97760ca319ac3d919834178f0b
>>
>> With that code base, debbugs fails to process mails that have a
>> control header and the control@ address is used in Cc: field of the
>> mail.
>
> Debbugs processes both correctly, actually. (As you can see in this
> example.) This sounds like your MTA has a configuration problem.
> [Debbugs doesn't actually parse the mail to figure out where it was
> sent, anyway; you can Bcc: it messages if you want.]

So, this might indeed be related to postfix as MTA and the way the  
receive scripts handles incoming mails.

So what I did is:

1. add the below block to master.cf (as described in the MTA Readme of  
debbugs)

"""
debbugs   unix  -       n       n       -       -       pipe
                 flags=F user=debbugs argv=/usr/lib/debbugs/receive $recipient
"""

2. add a transport map for postfix (as described in the MTA Readme of  
debbugs):

""" /etc/postfix/transport
bugs.x2go.org        debbugs:
"""

""" /etc/postfix/master.cf
# debbugs transport
transport_maps = hash:/etc/postfix/transport
"""

Diverting all mails for the subdomain bugs.x2go.org to the debbugs:  
service/queue in postfix.

Till here, postfix refused to deliver mails into the receive script of  
debbugs.

If found then that for postfix in etch and above you have to add  
another file to the postfix configuration:

""" /etc/postfix/non-unix-users
@bugs.x2go.org          ACCEPT
"""

""" /etc/postfix/master.cf
local_recipient_maps = hash:/etc/postfix/non-unix-users
"""

(For both maps, of course, one has to run the postmap command on the maps.)

NOTE: The above information about the non-unix-users map has to be  
added to the Readme.MTA file.

WHAT REMAINS
------------
So, but my observation with postfix + receive script in debbugs is,  
that debbugs's receive expects to be called once for every mail  
address found in the mail headers. So if you have <no>@debbugs.site in  
To: and [email protected] in Cc: receive expects to be called twice  
for this one mail. Is this correct?

However, postfix sees the mail, with transport map just hands this one  
mail over to debbugs's receive script and then the receive script only  
sees one mail...

------------
After some reading of the postfix documentations...
------------

Don, it is found in postfix's man page of the postfix component pipe:

"""
SINGLE-RECIPIENT DELIVERY
        Some  destinations  cannot  handle more than one recipient
        per delivery request. Examples are pagers or fax machines.
        In  addition, multi-recipient delivery is undesirable when
        prepending  a  Delivered-to:  or  X-Original-To:   message
        header.

        To  prevent  Postfix  from sending multiple recipients per
        delivery request, specify

            transport_destination_recipient_limit = 1

        in the Postfix main.cf file, where transport is  the  name
        in the first column of the Postfix master.cf entry for the
        pipe-based delivery transport.
"""

If debbugs is the transport name in the most left column in master.cf:

"""
debbugs   unix  -       n       n       -       -       pipe
                 flags=F user=debbugs argv=/usr/lib/debbugs/receive $recipient
"""

Then altogether these 3 following lines for this transport have to be  
added to main.cf:

"""
# debbugs transport
local_recipient_maps = hash:/etc/postfix/non-unix-users
transport_maps = hash:/etc/postfix/transport
debbugs_destination_recipient_limit = 1
"""

I will send a patch for the MTA Readme in a minute.

Mike



-- 

DAS-NETZWERKTEAM
mike gabriel, rothenstein 5, 24214 neudorf-bornstein
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email protected], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAABAgAGBQJQWiB7AAoJEJr0azAldxsxqMUP/3Q/9J/LTgJUKyUv5JPUfxgY
MDdvhi9vQppY5OzVtXLEaiFtvClwNNGviNCa1E9yGlcWDKJnUSIWwLUQGKHIY5nu
RDa0oOy9A4i5ON0CCgUzI0t3IXe7ginkGtuzr2g1cXembXsKSsLPpujXfdB6RkAd
6Zb58tkLqdpPa5blZdiYS3BQQG9bu5eid5fP50WAMPkQAO0ZaLM+CWszoqa8rRFM
OX4aITIUhpmuEfzlLuIZKYrcjUZJNGa/Tqx/Za6SOzwHf2nk8ALwfzJVlZrnoSge
9SBcZsS3cdr8R/jPMEgMwc9NfO0htuBbmLe06gSmOazXSL4JuXhGIFuLxLM94zoa
8+ExKtY0xsLo+IfzTMcTJjeelVk8Ek/zEr5IK7cS75+poNRU9CGN0/Vm741AtN9J
pD2fIbL0t2YWWn23qFXGhTr5wkvkgk3FMKoSQYUD148cSH4glcssvFBpdfe1h+fN
JzNsXfsyEvJ3kmEg2/CD2Go6fhlTqPc6B1XTxzCCW+qwr/mFlzYjFem6KGPd1DRj
H7i2d4oM7UobeLfcLpBvFHHNf1dlirwF6jNfRy6nGmuuep2sdrftKKeOfONQLnSn
7yTlQ3qbRH3Q6t47IoRCDNClr3UZ/mwAQBm5Oe4UDkafGGDMMcE80eZUQiJweCYJ
ZXAtT1o8J7s9le6zOc+4
=KdIH
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.