Scheduled procs collect the email. Current methods include: acs_mail_lite::imap_check_incoming for IMAP and acs_mail_lite::maildir_check_incoming for MailDir.
Both schedules procs can be run simultaneously without interfering with each other. In both cases, email is added to the same queue for processing via callbacks.
These procs provide an overview of inbound email processing in general.
Legacy Incoming E-mail up to oacs-5-9 for package developers
A scheduled procedure begins by checking for new incoming email.
The interval is set by package parameter IncomingScanRate
.
ACS Mail Lite detects if an
email is responding to email sent from OpenACS (via ACS Mail Lite).
It verifies
message_id
or originator
hashkey via
acs_mail_lite::unique_id_parse
and identifies
bounced or reply emails.
Then, the message-id is cross-referenced for any parameters passed to the email, such as package_id or party_id.
The email is prioritized and placed in a queue, where it is pulled from the queue in sequence.
When pulled, an email is processed by callbacks. A package can be associated with replies to outbound email generated by the same package. This enables each package to deal with incoming email in its own way. For example, a social networking site could log an event in a special table about subscribers. The package-key is determined from the package_id that sent the email.
For bounced email, the procedure logs a bounced mail event for the user associated with the bounced email address.
A separate process checks if an email account needs to deactivate notifications due to chronic bounce errors:
MaxDaysToBounce
days ago without any further
bounced mail then the bounce-record counter gets reset (deleted).
ACS Mail Lite assumes the user's email account is working again
and no longer refuses emails.
MaxDaysToBounce
is a package parameter.MaxBounceCount
emails are returned
for a particular user then
the account associated with the email stops receiving email
notifications channeled through ACS Mail Lite.
The email_bouncing_p flag is set to 't
'.NotificationInterval
days up to
MaxNotificationCount
times.
It contains a link to re-enable email notifications.