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

claro_message_send throws an Swift_TransportException code 451 Temporary local problem #18

Closed
ChMat opened this issue Sep 28, 2015 · 4 comments

Comments

@ChMat
Copy link
Contributor

ChMat commented Sep 28, 2015

Hi,

I was confronted with the following error message in our logs:

Uncaught PHP Exception Swift_TransportException: "Expected response code 250 but got code "451", with message "451 Temporary local problem - please try later "" at vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php line 383

Apparently, this was triggered in Claroline\MessageBundle\Controller\MessageController::sendAction.

The user who reported the error said she was trying to send a message to a specific group.

The same error message was thrown in another bundle. See corresponding ticket: claroline/AnnouncementBundle#27

@ngodfraind
Copy link
Member

Thanks for the report. A quick search on google gave me this response. It looks like we have to 'restart' swiftmailer from time to time.

http://stackoverflow.com/questions/6549819/symfony-mailer-swift-transportexception-between-message-sending

@ChMat
Copy link
Contributor Author

ChMat commented Sep 30, 2015

Here is additional information on the issue. Some smtp server log (the first two lines are repeated until smtp server returns the third line):

sender verify defer for <noreply@changeme.com>: host lookup did not complete
F=<noreply@changeme.com> temporarily rejected RCPT <any_email@ourdomain.tld>: Could not complete sender verify
dropped: too many nonmail commands (last was "RSET")

I don't know where this noreply@changeme.com comes from as the sender address should be that of the connected user. Line 145 of Claroline\MessageBundle\Controller\MessageController:sendAction() reads like this:

* @EXT\ParamConverter("sender", options={"authenticatedUser" = true})

Is there perhaps a misconfiguration with the paramConverter?

@ngodfraind
Copy link
Member

That was one is easy to solve.
First I think you should upgrade your platform because it's some bad behaviour I implented a few days ago.
We had a lot of problem with your mailing system so I changed it a little bit. Now the 'from' field of the mail is always fixed.
In your version, a platform parameter has been added (wich is domain_name, you can see it in the admin => parameters => general configuration page). It's changeme.com by default. The sender name will always be noreply@[domain_name]. In your case it'll be noreply@changeme.com.
In the last version, you can see the from field in the mail configuration page (administration => parameters => mail => option).
The domain name parameter is null by default and the from name will be constructed like this:
If the from field is configured, it'll be the from field.
If it's not and the domain name exists, it'll be noreply@domainname
If none of them exists, it'll be the support email.

@ChMat
Copy link
Contributor Author

ChMat commented Sep 30, 2015

I gave it a try and it looks like it works.

I'll upgrade the platform later.

Thanks!

@ChMat ChMat closed this as completed Oct 7, 2015
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

2 participants