OO 9.4.4 mail sending issue

70 views
Skip to first unread message

seba...@gmail.com

unread,
Jan 21, 2015, 6:26:06 AM1/21/15
to open...@googlegroups.com
Hello,

I have problem with authentication during sending emails to users.
I would like to send it as a system user (fromname or adminemail in local.properties - the same values), but it sends as a different user and I dont have rights to use it.

Best regards,
Sebastian

Florian Gnägi

unread,
Jan 21, 2015, 8:34:04 AM1/21/15
to open...@googlegroups.com
Hi Sebastian

Mails are always send by the user configured in the property fromemail. This is technically mandatory because your mailserver will not be allowed to send emails for other domains than your own. E.g. your smtp can not send a mail with a google from address. This will be dropped as spam because the reverse DNS lookup will not resolve to a google server. 

The solution is to use a form address from the domain of your smtp server. The real sender address is then used in the reply-to field. When a recipient replies to this mail, it uses the real senders email instead of the technical from address. 

Here are the settings you can modify in your olat.local.properties: 

########################################################################
# SMTP (mail) settings
########################################################################

# mail support can be disabled by leaving the following entry blank or
# setting it to the keyword 'disabled' (without quotes!)
smtp.host=localhost
# if required by your local SMTP you may need to provide credentials
smtp.user=
smtp.pwd=
# enable SSL if your smtp server supports it
smtp.sslEnabled=false
smtp.sslCheckCertificate=false
# system mails will be sent from this address (from local domain with valid reverse dns):
fromemail=no-reply@your.domain
# the plain text name of the from mail address usually displayed by the email client
fromname=OpenOLAT eLearning Server (${server.domainname})
# set this email to a mail address in your domain (used as reply-to address)
# set this email to a mail address in your domain (used for 'ask for help here' type of messages that do not have special address)
supportemail=${adminemail}
# set this email to a mail address in your domain (used to tell users how to apply for more quote disk space)
quotaemail=${supportemail}
# set this email to a mail address in your domain (used to notify when users are deleted from the system)
deleteuseremail=${supportemail}
# set this email to a mail address in your domain (used for red-screen error reports)
erroremail=${adminemail}
# maximum size for email attachments (in MB)
mail.attachment.maxsize=5
# if mail intern is enabled you must make sure, that your mysql-db accepts large packets to also save the attachments:
# set "max_allowed_packet = 134217728" in my.cnf/my.ini see FXOLAT-154
mail.intern=false
mail.receiveRealMailUserDefaultSetting=true


--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOLAT".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOLAT - infinite learning - http://www.openolat.org

---
You received this message because you are subscribed to the Google Groups "OpenOLAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

----------------------------------------------------------
professional services for the e-learning system OpenOLAT
 hosting - operating - support - development - consulting
----------------------------------------------------------

frentix  GmbH
Florian Gnägi, Geschäftsführer
Hardturmstrasse 76
CH-8005 Zürich, Switzerland

skype:gnaegi  twitter:gnaegi  xing:Florian_Gnaegi 
----------------------------------------------------------




seba...@gmail.com

unread,
Jan 26, 2015, 3:10:24 AM1/26/15
to open...@googlegroups.com
Hi Florian,

Unfortunately, after changing settings, there is still the same error.

This is warn stack:

Could not send mail ^%^ >>>stack of 1.cause::javax.mail.SendFailedException: Invalid Addresses ->  at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1607) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:887) at javax.mail.Transport.send0(Transport.java:191) at javax.mail.Transport.send(Transport.java:120) at org.olat.core.util.mail.manager.MailManagerImpl.sendMessage(MailManagerImpl.java:1623) at org.olat.core.util.mail.manager.MailManagerImpl.sendRealMessage(MailManagerImpl.java:1390) at org.olat.core.util.mail.manager.MailManagerImpl.saveDBMessage(MailManagerImpl.java:1070) at org.olat.core.util.mail.manager.MailManagerImpl.sendMessage(MailManagerImpl.java:687) at org.olat.modules.co.ContactFormController.event(ContactFormController.java:237) at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:239) at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)>>>stack of 2.cause::com.sun.mail.smtp.SMTPAddressFailedException: 553 5.7.1 <{some random user email}>: Sender address rejected: not owned by user {adminemail}
 ->  at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1458) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:887) at javax.mail.Transport.send0(Transport.java:191) at javax.mail.Transport.send(Transport.java:120) at org.olat.core.util.mail.manager.MailManagerImpl.sendMessage(MailManagerImpl.java:1623) at org.olat.core.util.mail.manager.MailManagerImpl.sendRealMessage(MailManagerImpl.java:1390) at org.olat.core.util.mail.manager.MailManagerImpl.saveDBMessage(MailManagerImpl.java:1070) at org.olat.core.util.mail.manager.MailManagerImpl.sendMessage(MailManagerImpl.java:687) at org.olat.modules.co.ContactFormController.event(ContactFormController.java:237) at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:239) at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)

Best regards,
Sebastian

Florian Gnägi

unread,
Feb 5, 2015, 5:52:19 AM2/5/15
to open...@googlegroups.com
Hi Sebastian

It seems your SMTP does not allow sending mails for other than the user you configured in the SMTP configuration. Make sure you use an SMTP which does not restrict you sending for only your own account. Looks like you use an SMTP of your internet provider. For operating a server system which sends email it is best to use a local SMTP server which then routs the mail to a relay SMTP server which sends the mail to the recipient. Make also sure that your DNS is configured properly to allow the relay SMTP to used as sender, this is normally done with a SPF record. 

Cheers
Florian
Reply all
Reply to author
Forward
0 new messages