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.
########################################################################
# 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