#2567 Fix message-id not having FQDN.
Merged a year ago by pingou. Opened a year ago by skamath.

file modified
+4 -4

@@ -1146,7 +1146,7 @@

          ''' Return a unique reprensetation of the issue as string that

          can be used when sending emails.

          '''

-         return '%s-ticket-%s@pagure' % (self.project.name, self.uid)

+         return '%s-ticket-%s' % (self.project.name, self.uid)

  

      @property

      def tags_text(self):

@@ -1306,7 +1306,7 @@

          ''' Return a unique reprensetation of the issue as string that

          can be used when sending emails.

          '''

-         return '%s-ticket-%s-%s@pagure' % (

+         return '%s-ticket-%s-%s' % (

              self.issue.project.name, self.issue.uid, self.id)

  

      @property

@@ -1703,7 +1703,7 @@

          ''' Return a unique reprensetation of the issue as string that

          can be used when sending emails.

          '''

-         return '%s-pull-request-%s@pagure' % (self.project.name, self.uid)

+         return '%s-pull-request-%s' % (self.project.name, self.uid)

  

      @property

      def discussion(self):

@@ -1873,7 +1873,7 @@

          ''' Return a unique reprensetation of the issue as string that

          can be used when sending emails.

          '''

-         return '%s-pull-request-%s-%s@pagure' % (

+         return '%s-pull-request-%s-%s' % (

              self.pull_request.project.name, self.pull_request.uid, self.id)

  

      @property

file modified
+3 -0

@@ -237,6 +237,9 @@

          subject_tag = project_name

      else:

          subject_tag = 'Pagure'

+     if mail_id:

+         mail_id = mail_id + "@%s" %\

+             pagure.APP.config['DOMAIN_EMAIL_NOTIFICATIONS']

  

      smtp = None

      for mailto in to_mail.split(','):

@@ -341,7 +341,7 @@

              'Email content',

              'Email “Subject“',

              'foo@bar.com,zöé@foo.net',

-             mail_id='test-pull-request-2edbf96ebe644f4bb31b94605e-1@pagure',

+             mail_id='test-pull-request-2edbf96ebe644f4bb31b94605e-1',

              in_reply_to='test-pull-request-2edbf96ebe644f4bb31b94605e@pagure',

              project_name='namespace/project',

              user_from='Zöé',

@@ -351,8 +351,8 @@

  Content-Transfer-Encoding: base64

  Subject: =?utf-8?b?W25hbWVzcGFjZS9wcm9qZWN0XSBFbWFpbCDigJxTdWJqZWN04oCc?=

  From: =?utf-8?b?WsO2w6k=?= <pagure@pagure.org>

- mail-id: test-pull-request-2edbf96ebe644f4bb31b94605e-1@pagure

- Message-Id: <test-pull-request-2edbf96ebe644f4bb31b94605e-1@pagure>

+ mail-id: test-pull-request-2edbf96ebe644f4bb31b94605e-1@pagure.org

+ Message-Id: <test-pull-request-2edbf96ebe644f4bb31b94605e-1@pagure.org>

  In-Reply-To: <test-pull-request-2edbf96ebe644f4bb31b94605e@pagure>

  X-Auto-Response-Suppress: All

  X-pagure: https://pagure.org/

@@ -360,8 +360,8 @@

  List-ID: namespace/project

  List-Archive: https://pagure.org/namespace/project

  To: zöé@foo.net

- Reply-To: reply+42f5809bca16d73f59180bdcc76c981e939b5eab5c02930d7d7dd38f45118b89e9ceb877e94e7f22376fbf35aab1d0e8e83dfb074ee82640cc82da12ea8019ca@pagure.org

- Mail-Followup-To: reply+42f5809bca16d73f59180bdcc76c981e939b5eab5c02930d7d7dd38f45118b89e9ceb877e94e7f22376fbf35aab1d0e8e83dfb074ee82640cc82da12ea8019ca@pagure.org

+ Reply-To: reply+819debcaa294a19ddedd9cfe0cb8faebb50d126adda0f02f203fce83824add55f2e640b75691d4a57cb95b25cc856b0815d1ad2a35ab358cda9de42e2b021957@pagure.org

+ Mail-Followup-To: reply+819debcaa294a19ddedd9cfe0cb8faebb50d126adda0f02f203fce83824add55f2e640b75691d4a57cb95b25cc856b0815d1ad2a35ab358cda9de42e2b021957@pagure.org

  

  RW1haWwgY29udGVudA==

  '''

@@ -371,7 +371,7 @@

              'Email content',

              'Email “Subject“',

              u'foo@bar.com,zöé@foo.net',

-             mail_id='test-pull-request-2edbf96ebe644f4bb31b94605e-1@pagure',

+             mail_id='test-pull-request-2edbf96ebe644f4bb31b94605e-1',

              in_reply_to='test-pull-request-2edbf96ebe644f4bb31b94605e@pagure',

              project_name='namespace/project',

              user_from='Zöé',

This PR fixes issue #2548 - Message-ID header of e-mails generated by Pagure doesn't contain FQDN

This line needs to be indented, it's not following flake8 and thus breaks the test suite :)

rebased

a year ago

rebased

a year ago

@pingou, I have updated the PR :)

Pull-Request has been merged by pingou

a year ago