Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-4766

CiviMailProcessor script does not respect configured VERP separator

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.2.6
    • Fix Version/s: 3.0
    • Component/s: CiviMail
    • Labels:
      None

      Description

      Regular expressions used in CiviMailProcessor script had hard-coded VERP separator character. This has now been fixed to use the site-configured VERP separator (defined at CiviMail -> MailerSettings -> VERP_Separator).

      NOTE: The original poster also noted a problem with using -f parameter for sendmail. However our team is not experienced enough with sendmail to change the underlying package code. If you use sendmail and are having problems with bounce processing - check his comment below (item 1).

      — Original Post ----
      While trying to get bounce processing to work I stumbled to 2 bugs.
      I was surprised not to find any reports or doc,
      although they might be there.

      1) I never found a documentation that states that by using sendmail you cannot do bounce processing.
      Because code calls sendmail with -f argument which destroys return-path.

      packages/Mail/sendmail.php:130
      $mail = @popen($this->sendmail_path . (!empty($this->sendmail_args) ? ' ' . $this->sendmail_args : '') . " -f$from – $recipients", 'w');

      2) I never found a documentation, that states that it doesn't matter how you configure VERP separator (at CiviMail -> MailerSettings -> VERP_Separator),
      because its hardcoded and you anyway have to use dot for separator or otherwise it simply doesn't work.

      bin/CiviMailProcessor.php: 52,53,56
      $commonRegex = '/^' . preg_quote($dao->localpart) . '(b|bounce|c|confirm|o|optOut|r|reply|re|e|resubscribe|u|unsubscribe)\.(\d+)\.(\d+)\.(\d+)\.([0-9a-f]

      {16})(.*)?@' . preg_quote($dao>domain) . '$/';
      $subscrRegex = '/^' . preg_quote($dao->localpart) . '(s|subscribe)\.(\d+)\.(\d+)@' . preg_quote($dao->domain) . '$/';
      $regex = '/^' . preg_quote($dao->localpart) . '(b|c|e|o|r|u)\.(\d+)\.(\d+)\.([0-9a-f]{16}

      )@' . preg_quote($dao->domain) . '$/';

      Maybe this bug-report has value for someone who attempts to set up CiviMail Bounce Processing.

        Attachments

          Activity

            People

            • Assignee:
              sunny.sharma Sunny Sharma
              Reporter:
              ragnarkurm ragnar kurm
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: