Page MenuHomePhabricator

Create documentation for configuring BounceHandler with Postfix
Closed, ResolvedPublic

Description

Currently, https://www.mediawiki.org/wiki/Extension:BounceHandler shows how to route a bounce back to Meidaiwki API via exim4 MTA, which is used in our production servers. No proper documentation of how to get that done in Postfix is given. I just received this email :

I just wanted to ask you if do know where this extension is installed in combination with postfix (and not exim) and/or if there is any documentation how to configure that correctly in postfix.

Event Timeline

01tonythomas raised the priority of this task from to Needs Triage.
01tonythomas updated the task description. (Show Details)
01tonythomas added subscribers: 01tonythomas, Jgreen.

yeah, we (The Document Foundation) do want to use it on our wikis (at least help.libreoffice.org and wiki.documentfoundation.org), too.

Step 3 in this page has one approach for postfix http://brianbrunner.com/automation/postfix/email/2013/09/09/postfix.html -- it doesn't do some of the filtering we do with our exim config, but that is fairly site-specific anyway.

I've unpublished the task from the GCI site for the time being as @Jgreen said we should probably break this down into subtasks.

@Jgreen : The steps to complete this would be:

  1. Install mediawiki and bouncehandler extension
  2. Install exim mail server, and configure it using https://www.mediawiki.org/wiki/Extension:BounceHandler#Configuration to make the bounce emails route correctly to the Bouncehandler API
  3. Make a test bounce email and see that the bounced user details gets saved in the db
  4. Install POSTFIX mail server, disable EXIM to listen on email connections
  5. Configure POSTFIX to make sure that the bounce email gets routed correctly to the Bouncehandler API
  6. Make a test bounce, and see the bounce gets saved in the db
  7. Document what the user did :)

I wonder how we will be able to break it into subtasks :(

Looking at some of the other projects it seemed like the tasks were pretty
small, so I think what you've got here is the right direction.

Looking at some of the other projects it seemed like the tasks were pretty
small, so I think what you've got here is the right direction.

Well, it might get bit difficult around step 4 and 5, but it should be doable with some relevant clicks. Should we make the task available then, @Aklapper ?

Well, it might get bit difficult around step 4 and 5, but it should be doable with some relevant clicks. Should we make the task available then, @Aklapper ?

That is up to your judgment and if you feel like being able to mentor all aspects of this task. Please decide and tell me. :)

That is up to your judgment and if you feel like being able to mentor all aspects of this task. Please decide and tell me. :)

I am ready. Please make it visible again :)

I got this message in my IRC chatbox, but couldnt reply before the person quit.

20:52 <anmol_wassan> Hi! I installed Exim using cygwin and I don't know where I have to declare the variables in the exim.conf file. I got the router and transport configuration but the variable section, I have no idea.

On the top of the file, you can see

######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################

section. You can paste

VERP_BOUNCE_LOCALPART_REGEXP = \N^wiki-[\w.]+-\w+-\w+-[+/\w]+$\N

just below that heading on the following line.

This is not just hard, but the king of all tasks. I'm stuck for the past 5 days on this task, And with everyone clueless on IRC about BounceHandler & Postfix , I badly need help here. :(

Mails are now bouncing, but what I don't know is what to do, to make them go to a web address. I followed the tutorial accordingly, and it didn't work. It's just not working.

I'm trying to go through the source code of BounceHandler to get around problems. If I myself can't get this to work, I wonder how will I write the documentation for it :P . I just hope we get this to work before the deadline. :)

Also, I'm running this on my AWS Instance:: http://ananayarora.com/gci/

Mails are now bouncing, but what I don't know is what to do, to make them go to a web address. I followed the tutorial accordingly, and it didn't work. It's just not working.

Could you get that done with exim, or did you start off with POSTFIX ?
For exim, https://www.mediawiki.org/wiki/Extension:BounceHandler#Configuration configuration makes exim run the curl command and post the bounce email to your mediawiki API url. You will need to find out how you can forward the email using curl from postfix, and http://brianbrunner.com/automation/postfix/email/2013/09/09/postfix.html has exactly the same case broken down.
To verify if the bounce was correctly posted, you should set the following in LocalSettings.php

$wgJobRunRate = 0;

and after the bounce was routed,

$ php maintenance/runJobs.php 

I'm trying to go through the source code of BounceHandler to get around problems. If I myself can't get this to work, I wonder how will I write the documentation for it :P . I just hope we get this to work before the deadline. :)

Also, I'm running this on my AWS Instance:: http://ananayarora.com/gci/

I'm stuck for the past 5 days on this task

@ananayarora: I'm sorry to hear that. :(
Please don't get stuck for so long but ask for help earlier, with good data and an explanation what goes wrong at which step. We don't want to frustrate contributors. :)

I followed the tutorial accordingly, and it didn't work. It's just not working.

What is "the tutorial"? https://www.mediawiki.org/wiki/Extension:BounceHandler#Configuration ?
Did you complete all steps or where does it "not work"? What have you tried to debug what is "not working"? What exactly does "not working" mean? Exact descriptions welcome...

After a lot of struggling with Postfix, @tonythomas & I have finally got it to work, and I've written the documentation for the same here:

https://www.mediawiki.org/wiki/Extension:BounceHandler

01tonythomas claimed this task.

After a lot of struggling with Postfix, @tonythomas & I have finally got it to work, and I've written the documentation for the same here:

https://www.mediawiki.org/wiki/Extension:BounceHandler

Confirmed working after testing with @ananayarora on his instance. Thank you, and it was a pleasure working with you on getting this one done.

Wohoo! :D

It was great working with you @tonythomas. I'm so happy after learning so much about this stuff :D

Thank you! :D