Mailing |
In order to send a Qim2000 Email, a traditional Email is created, with the To: address composed like:
".im2000" is configured as a virtual domain, which redirects the email to the local user im2000-mail. The .im2000 part is stripped off the Email address and a X-im2000-recipient-identifier: header line containing the "real" Email address of the recipient is created. The message is then posted to the mail storage server.
im2000:im2000-mail
We suppose, that the user has composed a message with all its components, and the MUA wants to hand it over to the im2000 system. The following steps are taken:
here we forge a reply to im2000-post-save_place. So we get track of our stored message.
# 2) Compose the im2000-recipient
# | QIMMESS=$( \
# /usr/bin/reformail -a"X-im2000-recipient-identifier: $EXT2@$HOST2" \
# 3) Add the im2000-sender
# -a"X-im2000-sender-identifier: $SENDER" \
# | /usr/local/bin/safecat tmp mail) \
# 4) ask for a new message thread identifier, remember the message
# ; echo | QMAILUSER="im2000-post-$QIMMESS" \
# mail im2000-post-$QIMMESS" im2000-nt \
| QIMMESS=$( \
/usr/bin/reformail -a"X-im2000-recipient-identifier: $EXT2@$HOST2" \
-a"X-im2000-sender-identifier: $SENDER" \
| /usr/local/bin/safecat tmp mail) \
; echo | QMAILUSER="im2000-post-$QIMMESS" mail im2000-nt
# 2) Extract the thread ID
# | THREAD=$(/usr/local/bin/822field) \
# 3) Post the message. The Subject: field of the original message is renamed
# to Old-Subject
# ; /usr/bin/reformail -i `"Subject: $THREAD`" <cat mail/`"$EXT2`" \
# | /var/qmail/bin/forward im2000-am-1 \
# 4) Delete the message
# ; rm mail/"$EXT" \
# 5) Notify end of block
# ; echo | mail -s $THREAD im2000-eb
| THREAD=$(/usr/local/bin/822field) \
; /usr/bin/reformail -i `"Subject: $THREAD`" <cat mail/`"$EXT2`" \
| /var/qmail/bin/forward im2000-am-1 \
; rm mail/`"$EXT2`" \
; echo | mail -s $THREAD im2000-eb
Mailing |