BBMRI-ERIC / negotiator

An Open-source access negotation system for Research Infrastructures
https://negotiator.bbmri-eric.eu
GNU Affero General Public License v3.0
4 stars 8 forks source link

[BUG] Unauthenticated mail servers are not supported #386

Closed iblanque closed 3 weeks ago

iblanque commented 1 month ago

Describe the bug The configuration of the mail client forces the use of authentication (See https://github.com/BBMRI-ERIC/negotiator/blob/0e404fad789d0ffae2f7c9f11149a4a3a2b5ce76/src/main/java/eu/bbmri_eric/negotiator/configuration/MailConfig.java#L12), line 29. Some mail servers allow unauthenticated users running on the same network segment to send mail. This would be feasible if the attributes "mail.smtp.auth", and "mail.smtp.starttls.enable" could be configurable via environment variables, as for the host.

I please ask you to support this functionality, as it is blocking our deployment.

Thanks!

RadovanTomik commented 1 month ago

can you please test it now with this branch and let us know?

iblanque commented 3 weeks ago

Hi Radovan,

Many thanks for implementing this feature. We finally managed to have some of the e-mails sent.

When a new negotiation request is created, a mail is sent to the user that has the “admin” flag set to true in the “person” table.

When the status changes (e.g. to approval), the dataset representative receives a message.

We do not see e-mails when we send a message through the “Comments” area in the negotiator. Is this the normal behaviour?

Thanks

Ignacio

Please find attached the contents of the relevant tables in the database

id | creation_date | email_status | message | negotiation_id | r

ecipient_id | modified_date | created_by | modified_by

-------+----------------------------+----------------+---------------------------------------------------------------------------------------------------------------------+--------------------------------------+--

------------+----------------------------+------------+-------------

10048 | 2024-08-22 12:04:56.313877 | EMAIL_SENT | New Negotiation 96be48fe-6b41-45f5-b989-d2c819d29b67 was added for review. | 96be48fe-6b41-45f5-b989-d2c819d29b67 |

    102 | 2024-08-22 12:04:56.313877 |      10002 |       10002

10049 | 2024-08-23 07:01:21.488197 | EMAIL_SENT | New Negotiation a273e8fc-20fd-4a58-a2df-2221cb2adf64 was added for review. | a273e8fc-20fd-4a58-a2df-2221cb2adf64 |

    102 | 2024-08-23 07:01:21.488197 |      10002 |       10002

10050 | 2024-08-23 07:35:21.962353 | EMAIL_SENT | New Negotiation d15c5bbe-8421-4aba-a015-10b3c1e490e4 was added for review. | d15c5bbe-8421-4aba-a015-10b3c1e490e4 |

    105 | 2024-08-23 07:35:21.962353 |      10002 |       10002

10051 | 2024-08-23 07:55:35.738713 | EMAIL_SENT | New Negotiation d15c5bbe-8421-4aba-a015-10b3c1e490e4 | d15c5bbe-8421-4aba-a015-10b3c1e490e4 |

  10002 | 2024-08-23 08:00:00.834436 |      10002 |       10002

10052 | 2024-08-23 07:55:35.825428 | EMAIL_SENT | Negotiation d15c5bbe-8421-4aba-a015-10b3c1e490e4 had a change of status of ECI-Breast-3 to REPRESENTATIVE_CONTACTED | d15c5bbe-8421-4aba-a015-10b3c1e490e4 |

  10002 | 2024-08-23 08:00:00.835032 |      10002 |       10002

10053 | 2024-08-23 08:02:33.903991 | EMAIL_NOT_SENT | New Negotiation a273e8fc-20fd-4a58-a2df-2221cb2adf64 | a273e8fc-20fd-4a58-a2df-2221cb2adf64 |

  10002 | 2024-08-23 08:02:33.903991 |      10002 |       10002

10054 | 2024-08-23 08:02:33.956129 | EMAIL_NOT_SENT | Negotiation a273e8fc-20fd-4a58-a2df-2221cb2adf64 had a change of status of ECI-Breast-3 to REPRESENTATIVE_CONTACTED | a273e8fc-20fd-4a58-a2df-2221cb2adf64 |

  10002 | 2024-08-23 08:02:33.956129 |      10002 |       10002

negotiator=> select * from post;

              id                  |       creation_date        |       modified_date        | status  |                 text                  |  type   | created_by | modified_by

| negotiation_id | organization_id

--------------------------------------+----------------------------+----------------------------+---------+---------------------------------------+---------+------------+------------

-+--------------------------------------+-----------------

4fff273a-3272-48c4-88d5-e514f927d9fe | 2024-08-23 07:52:45.297812 | 2024-08-23 07:52:45.297812 | CREATED | Another message, who will receive it? | PUBLIC | 10002 | 10002

| d15c5bbe-8421-4aba-a015-10b3c1e490e4 |

ab46e988-f11f-43b6-aec0-45b7e000ce5d | 2024-08-23 07:54:45.860918 | 2024-08-23 07:54:45.860918 | CREATED | New message, who will receive it? | PUBLIC | 10002 | 10002

| d15c5bbe-8421-4aba-a015-10b3c1e490e4 |

1357a24a-4629-4c0a-a4d3-db7f865da3f8 | 2024-08-23 07:56:46.105834 | 2024-08-23 07:56:46.105834 | CREATED | Yet another message... | PRIVATE | 10002 | 10002

| d15c5bbe-8421-4aba-a015-10b3c1e490e4 | 7

9c58321e-f61d-47d6-aa3f-3373be1ffa4f | 2024-08-23 07:57:01.208471 | 2024-08-23 07:57:01.208471 | CREATED | And the final one | PUBLIC | 10002 | 10002

| d15c5bbe-8421-4aba-a015-10b3c1e490e4 |

09589628-5a3f-46c8-a5b4-b93f1198be0e | 2024-08-23 08:02:14.342923 | 2024-08-23 08:02:14.342923 | CREATED | Check? | PRIVATE | 10002 | 10002

| d15c5bbe-8421-4aba-a015-10b3c1e490e4 |

Many thanks!

Ignacio

El 14 ago 2024, a las 11:28, Radovan Tomášik @.***> escribió:

can you please test it now with this branch and let us know?

— Reply to this email directly, view it on GitHubhttps://github.com/BBMRI-ERIC/negotiator/issues/386#issuecomment-2288281931, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABTM4AGEFQD7BFL6SQ3EDZTZRMPMXAVCNFSM6AAAAABLOKUS2WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBYGI4DCOJTGE. You are receiving this because you authored the thread.Message ID: @.***>