Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMTP configuration not working - sender and receiver are both 'technicalcontact_email' #1679

Open
pkxb opened this issue Aug 13, 2022 · 4 comments

Comments

@pkxb
Copy link

pkxb commented Aug 13, 2022

Describe the bug
I've set up SMTP in config/config.php using the following settings:

'technicalcontact_email' => 'admin@example.com',
'mail.transport.method' => 'smtp',
mail.transport.options' => [
'host' => 'mx.example.com',
'port' => 587,
'username' => 'test@example.com',
'password' => 'passw0rd',
'security' => 'tls',
],

The problem is that SimpleSAML authenticates as test@example.com but tries to send the email as admin@example.com which leads to the following error message on the email server:

NOQUEUE: reject: RCPT from test.example.com[1.2.3.4]: 553 5.7.1 <admin@example.com>: Sender address rejected: not owned by user test@example.com; from=<admin@example.com> to=<admin@example.com> proto=E SMTP helo=<test.example.com>

Expected behavior
I'm expecting the client to login as test@example.com and send the email as test@example.com and not as admin@example.com which should be the recipient address only. To put in other words: I'm expecting the SMTP login and sender to be $config['mail.transport.options']['username'] and the receiver to be $config['technicalcontact_email'] , but now $config['technicalcontact_email'] is used as the sender.

Additional information
My SimpleSAML version is 1.19.

@tvdijen
Copy link
Member

tvdijen commented Aug 13, 2022

Is this about sending error reports? Or cron?

Your proposed solution is problematic, because a username is not necessarily an email address.
We can of course add another config-setting to configure the 'From' address.

@pkxb
Copy link
Author

pkxb commented Aug 14, 2022

Hi, I'm referring to the error reports.

Having the possibility to set the from address would be helpful in my opinion. Otherwise (please correct me if I'm wrong) I can send only messages to myself ($config['technicalcontact_email'] -> $config['technicalcontact_email'] if $config['mail.transport.options']['username'] is not being used as the from when being an email address).

@tvdijen
Copy link
Member

tvdijen commented Aug 14, 2022

The technical contact email is being abused there anyway, because it's meant to set the technical contact inside metadata, so it makes perfect sense to create new config settings for this. I'll get to it ASAP.

@thijskh
Copy link
Member

thijskh commented Sep 7, 2022

Technicalcontact_email is just a default for the metadata contacts, but is also primarily the address SSP sends emails to about issues (error reports, cron mails ...). So that probably needs to remain. Indeed what could be improved is to configure the From of any of these system emails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants