Configured my Jenkins to work with corporate Active Directory and corporate SMTP server.
Versions used: Jenkins 2.276, Email Extension Plugin 2.81. Sending mails from the standard e-mail plugin is fine, and the configured "System Admin e-mail address" is perfectly able to send out e-mails on job failure from the SMTP server chosen. Using the Extended Email, however, I end up with
DEBUG SMTP: sendPartial set
RCPT TO:<[email protected]>
453 4.7.1 <[email protected]>: Sender address rejected: You are not authorized to send as [email protected]
DEBUG SMTP: Valid Unsent Addresses
DEBUG SMTP: [email protected]
DEBUG SMTP: Sending failed because of invalid destination addresses
RSET
250 2.0.0 Ok
DEBUG SMTP: MessagingException while sending, THROW:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 453 4.7.1 <[email protected]>: Sender address rejected: You are not authorized to send as [email protected]
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:2064)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1286)
at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:541)
at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:446)
at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:354)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752)
at hudson.model.Build$BuildExecution.cleanUp(Build.java:187)
at hudson.model.Run.execute(Run.java:1954)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 453 4.7.1 <[email protected]>: Sender address rejected: You are not authorized to send as [email protected]
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1964)
... 12 more
Some more settings:
System Admin e-mail address = My Name <[email protected]>
SMTP server = (same as used for email plugin)
SMTP port = 25 (with 465 I do not get a connect)
SMTP user name = (user ID for the email configured "System Admin e-mail address")
SMTP password = (secret)
Use SSL = off (with SSL I do not get a connect)
Default user e-mail suffix = (either the one fron the e-mail address or empty)
How can the SMTP server reject my sender address from the one plugin and accept it from the other?
question from:
https://stackoverflow.com/questions/65890194/jenkins-extendend-email-plugin-not-authorized-to-send-as 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…