- Publicity: Public Only All
legacy-inbound-procs.tcl
Provides a simple API for reliably sending email. (Legacy and deprecated procs)
- Location:
- packages/acs-mail-lite/tcl/legacy-inbound-procs.tcl
- Created:
- 21 June 2018
- Author:
- Hector Romojaro <hector.romojaro@gmail.com>
- CVS Identification:
$Id: legacy-inbound-procs.tcl,v 1.2.2.7 2022/08/23 18:44:54 gustafn Exp $
Procedures in this file
- acs_mail_lite::autoreply_p (public, deprecated)
- acs_mail_lite::bouncing_email_p (public, deprecated)
- acs_mail_lite::load_mails (public, deprecated)
- acs_mail_lite::parse_bounce_address (public, deprecated)
- acs_mail_lite::parse_email (private)
- acs_mail_lite::record_bounce (public, deprecated)
- acs_mail_lite::scan_replies (public, deprecated)
Detailed information
acs_mail_lite::autoreply_p (public, deprecated)
acs_mail_lite::autoreply_p [ -subject subject ] [ -from from ]
Deprecated. Invoking this procedure generates a warning.
Parse the subject, from and body to determine if the email is an auto reply Typical autoreplies are "Out of office" messages. This is what the procedure does
- Switches:
- -subject (optional)
- Subject of the Email that will be scanned for "out of office"
- -from (optional)
- From address which will be checked if it is coming from a mailer daemon
- Returns:
- 1 if this is actually an autoreply
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs_mail_lite::bouncing_email_p (public, deprecated)
acs_mail_lite::bouncing_email_p -email email
Deprecated. Invoking this procedure generates a warning.
Checks if email address is bouncing mail
- Switches:
- Options:
- -email (required)
- email address to be checked for bouncing
- Returns:
- boolean 1 if bouncing 0 if ok.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs_mail_lite::load_mails (public, deprecated)
acs_mail_lite::load_mails -queue_dir queue_dir
Deprecated. Invoking this procedure generates a warning.
Scans for incoming email. The function requires incoming emails that comply to the following syntax rule:
[<SitePrefix>][-]<ReplyPrefix>-Whatever@<BounceDomain> [] = optional <> = Package ParametersIf no SitePrefix is set we assume that there is only one OpenACS installation. Otherwise only messages are dealt with which contain a SitePrefix. ReplyPrefixes are provided by packages that implement the callback acs_mail_lite::incoming_email and provide a package parameter called ReplyPrefix. Only implementations are considered where the implementation name is equal to the package key of the package. Also we only deal with messages that contain a valid and registered ReplyPrefix. These prefixes are automatically set in the acs_mail_lite_prefixes table.
- Switches:
- Options:
- -queue_dir (required)
- -queue_dir
- The location of the qmail mail (BounceMailDir) queue in the file-system i.e. /home/service0/mail.
- Author:
- Nima Mazloumi <nima.mazloumi@gmx.de>
- Created:
- 2005-07-15
- See Also:
- acs_mail_lite::incoming_email
- acs_mail_lite::parse_email
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs_mail_lite::parse_bounce_address (public, deprecated)
acs_mail_lite::parse_bounce_address -bounce_address bounce_address
Deprecated. Invoking this procedure generates a warning.
This takes a reply address, checks it for consistency, and returns a list of user_id, package_id and bounce_signature found
- Switches:
- Options:
- -bounce_address (required)
- -bounce_address
- bounce address to be checked
- Returns:
- tcl-list of user_id package_id bounce_signature
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs_mail_lite::parse_email (private)
acs_mail_lite::parse_email -file file -array array
An email is split into several parts: headers, bodies and files lists and all headers directly. The headers consists of a list with header names as keys and their corresponding values. All keys are lowercase. The bodies consists of a list with two elements: content-type and content. The files consists of a list with three elements: content-type, filename and content. The array with all the above data is upvared to the caller environment. Important headers are: -message-id (a unique id for the email, is different for each email except it was bounced from a mailer daemon) -subject -from -to Others possible headers: -date -received -references (this references the original message id if the email is a reply) -in-reply-to (this references the original message id if the email is a reply) -return-path (this is used for mailer daemons to bounce emails back like bounce-user_id-signature-package_id@service0.com) Optional application specific stuff only exist in special cases: X-Mozilla-Status X-Virus-Scanned X-Mozilla-Status2 X-UIDL X-Account-Key X-Sasl-enc You can therefore get a value for a header either through iterating the headers list or simply by calling i.e. "set message_id $email(message-id)". Note: We assume "application/octet-stream" for all attachments and "base64" for as transfer encoding for all files. Note: tcllib required - mime, base64
- Switches:
- -file (required)
- -array (required)
- Author:
- Nima Mazloumi <nima.mazloumi@gmx.de>
- Created:
- 2005-07-15
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs_mail_lite::record_bounce (public, deprecated)
acs_mail_lite::record_bounce [ -user_id user_id ] [ -email email ]
Deprecated. Invoking this procedure generates a warning.
Records that an email bounce for this user
- Switches:
- -user_id (optional)
- -email (optional)
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs_mail_lite::scan_replies (public, deprecated)
acs_mail_lite::scan_replies
Deprecated. Invoking this procedure generates a warning.
Scheduled procedure that will scan for bounced mails
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.