Moderator: ScalixSupport
davidz wrote:One last quesiton I have is should the mail value be the full email address with domain for just the username? Ex. foo@domain.com or just foo?
Code: Select all
"User Name" <foo@domain.com>
Valerion wrote:davidz wrote:One last quesiton I have is should the mail value be the full email address with domain for just the username? Ex. foo@domain.com or just foo?
Ideally it should beto have a friendly outgoing address. Of course, you can use a rewrite and/or script to synthesize the address.Code: Select all
"User Name" <foo@domain.com>
"man omldaputil" will point you in the right direction here.
Code: Select all
foo@domain.com
Code: Select all
"User Name" <foo@domain.com>
davidz wrote:In my situation I had no email addresses in my OpenLDAP directory so when I created them I just used:
"User Name" <foo@domain.com>
That way when I setup my omldapsync stuff I didn't have to worry about any sort of extra stuff needing to happen. So, I did not use any sort of script to "sythesize" the complete address. It sounded too complicated, when I could just type it in at the time I create a new user.
Code: Select all
mail|INTERNET-ADDR|*,1,512|!SCRIPT=email.map --ldifrec sourcefile
Code: Select all
#!/bin/sh
##########################################################################
# Template/Example script - protocols definition copied from OM Tech Guide
##########################################################################
#
# for latest protocols, see OM Tech Guide
#
##########################################################################
# Scalix Server Router Subject Mapping Protocols #
##########################################################################
#
# PROTOCOLS SYNTAX:
# The following table outlines the possible commands sent by Scalix Server
# and the expected replies sent by the Mapper. Note:
# 1) each command/reply must end with a new line (\n) character
# 2) the Mapper must NOT buffer its output, each reply must be flushed
# 3) the Mapper must reply to each command
#
# COMMAND REPLY REPLY COMMENTS
# ================= =============== ======================================
# <start> 220<SP><text> Mapper must output this when starts up
# HELO<SP><text> 250<SP><text> Mapper accepts Scalix Server session
# SUBJECT:<text> 251<SP><text> Subject does not match requirement
# SUBJECT:<text> 252<SP><text> Subject matches requirement
# QUIT<SP><text> 221<SP><text> Mapper terminates session
# <others> 500<SP><text> Unexpected command/syntax
##########################################################################
# handle "<start>"
# return ready status
rep="220 Email Address Mapper Ready"
echo "$rep"
displayname=`grep displayName sourcefile | cut -f 2 -d ":" | sed -e "s/^ //"`
# loop to process commands
Quit="FALSE"
while read cmd
do
case "$cmd" in
"HELO"*)
# handle "HELO<SP><text>"
# return ok status
rep="250 Ok"
;;
"SUBJECT:"*)
# handle "SUBJECT:<text>"
# subject matches requirement, strip off "SUBJECT:"
input=`echo $cmd | sed -e "s/SUBJECT://"`
email="\"$displayname\" <$input>"
rep="252 $email"
;;
"QUIT"*)
# handle "QUIT<SP><text>"
# return status, set flag to exit loop
rep="221 Subject Mapper Close"; Quit="TRUE"
;;
*)
# handle "<others>"
# return error status
rep="500 Unrecognised Command or Syntax Error"
;;
esac
# must reply to each command
echo "$rep"
if [ "X$Quit" != "XTRUE" ]
then
continue
else
break
fi
done
exit 0
###########################################################################
# End of script
###########################################################################
Code: Select all
displayname=`grep displayName sourcefile | cut -f 2 -d ":" | sed -e "s/^ //"`
email="\"$displayname\" <$input>"
Code: Select all
Display Name <email>
Return to “Third Party Integration”
Users browsing this forum: No registered users and 1 guest