Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10027

phpBB doesn't use -f to set Return-Path for sendmail under FreeBSD system

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.8
    • Fix Version/s: 3.0.15-RC1
    • Component/s: None
    • Labels:
      None

      Description

      1. Go to Client communication -> E-mail settings
      2. Set options Contact e-mail address: and Return e-mail address:
      3. Set Use SMTP server for e-mail to No
      4. Send any email via FreeBSD and its sendmail.
      5. You will have such headers in your email (example):

      Return-Path: <www@www.phpbb.com>
      Received: from www.phpbb.com (localhost.phpbb.com [127.0.0.1])
              by www.phpbb.com (8.14.4/8.14.4) with ESMTP id p1393qkQ058973
              for <some@email.com>; Thu, 3 Feb 2011 12:03:52 +0300 (MSK)
              (envelope-from www@www.phpbb.com)
      Received: (from www@localhost)
              by www.phpbb.com (8.14.4/8.14.4/Submit) id p1393qV5058972;
              Thu, 3 Feb 2011 12:03:52 +0300 (MSK)
              (envelope-from www)
      To: =?UTF-8?-------==?= <some@email.com>
      Subject: =?UTF-8?-------=?=
      From: <reply-to@www.phpbb.com>
      Reply-To: <reply-to@www.phpbb.com>
      Sender: <return-path@www.phpbb.com>
      MIME-Version: 1.0
      Message-ID: <dda8@www.phpbb.com>
      Date: Thu, 03 Feb 2011 12:03:52 +0300
      Content-Type: text/plain; charset=UTF-8
      Content-Transfer-Encoding: 8bit
      X-Priority: 3
      X-MSMail-Priority: Normal
      X-Mailer: phpBB3
      X-MimeOLE: phpBB3
      X-phpBB-Origin: phpbb://www.phpbb.com/community/
      X-AntiAbuse: Board servername - www.phpbb.com
      X-AntiAbuse: User_id - 1
      X-AntiAbuse: Username - Anonymous
      X-AntiAbuse: User IP - 123.123.123.123
       
      Welcome to forums
       
      Please keep this e-mail for your records. Your account information is as
      follows:
       
      ............
      

      As you can see there is no original phpBB's Return-Path line.

      I speak about line from file /includes/functions_messenger.php

      $headers[] = 'Reply-To: ' . $this->replyto;
      $headers[] = 'Return-Path: <' . $config['board_email'] . '>';
      $headers[] = 'Sender: <' . $config['board_email'] . '>';
      

      This happens as I see because you don't use -f <> option for sendmail as many others coders and scripts uses.

      For example from vBulletin software:

      if (!SAFEMODE AND $this->registry->options['needfromemail'])
      {
      $result =  @mail($this->toemail, $this->subject, $this->message, trim($this->headers), '-f ' . $this->fromemail);
      }
      else
      {
      $result = @mail($this->toemail, $this->subject, $this->message, trim($this->headers));
      }
      

      In FreeBSD mail config files /etc/mail there is such string:

      H?P?Return-Path: <$g>

      The explanation for this line:

      This line defines a field called Return-Path: that displays the contents of the $g macro (sender address relative to the receiver). The ?P? portion indicates that this line is only used if the mailer uses the P flag (the mailer requires a Return-Path line).
      

      So if no -f <> option is used for sendmail and there will be any Return-Path: string in mail headers
      then it will be replaces with sendmails own Return-Path: string via code:

      H?P?Return-Path: <$g>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                CHItA CHItA
                Reporter:
                Makc666 Makc666 [X] (Inactive)
              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: