NotificationTopGeneralitiesMailing

Mailing

In order to send a Qim2000 Email, a traditional Email is created, with the To: address composed like:

recipient_mail_account@recipient_domain.im2000
i.e. the original Email address, with ".im2000" appended.

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

Notes:
 
virtualdomains:
 
.im2000:im2000-mail

im2000:im2000-mail

Procedure

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:

  1. If none is specified by the user, ask im2000 for a new message thread identifier.
  2. for each part of the message post the message to the message thread, properly sequencing them.
  3. signal end of the message block.
In this first Qim2000 implementation things are crudely simplified and adapted to some quirks of Email.
  1. Extract the recipient identifier from the message and add it as the X-im2000-recipient-identifier:
  2. Add the complete sender Email and add it as the X-im2000-sender-identifier: field
  3. Store the Email in a save place - the directory mail.
  4. Ask for a new message thread identifier - we do not support replies yet, because they imply checking the storage for existence.

    here we forge a reply to im2000-post-save_place. So we get track of our stored message.

  5. When we get the thread id post the body of the Email at once to the thread, giving it sequence number "1".
  6. Signal end of block.
~im2000/.qmail-mail-default
 
# 1) do tmda checking or similar things

# 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

~im2000/.qmail-post-default
 
# 1) do tmda checking or similiar things

# 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


Jorge.Lehner@gmx.net

NotificationTopGeneralitiesMailing