use Sympa::Spindle::ProcessIncoming; my $spindle = Sympa::Spindle::ProcessIncoming->new; $spindle->spin;
Sympa::Spindle::ProcessIncoming defines workflow to process incoming messages.
When spin() method is invoked, it reads the messages in incoming spool and rejects, quarantines or modifies them. Processing are done in the following order:
- Checks if message has message ID and sender, and if not, quarantines it. Because such messages will be source of various troubles.
- Checks if robot which message is bound for exists, and if not, rejects it.
- Checks spam status, DKIM signature and S/MIME signature, and decrypts message if possible. Result of these checks are stored in message object and used in succeeding process.
- If message is bound for the list, checks if the list exists, and if not, rejects it.
- Loop prevention. If loop is detected, ignores message.
- Virus checking, if enabled by configuration. And if malware is detected, rejects or discards message.
- Splices message to appropriate class according to the type of message: Sympa::Spindle::DoCommand for command message; Sympa::Spindle::DoForward for message bound for administrator; Sympa::Spindle::DoMessage for ordinal post.
Order to process messages in source spool are controlled by modification time of files and delivery date. Some messages are skipped according to these priorities (See Sympa::Spool::Incoming):
- Messages with lowest priority (
Z) are skipped.
- Messages with possibly higher priority are chosen. This is done by skipping messages with lower priority than those already found.
See also “Public methods” in Sympa::Spindle.
- new ( [ keepcopy => $directory ], [ lang => $lang ], [ log_level => $level ], [ log_smtp => 0|1 ] )
- spin ( )
new() may take following options:
- keepcopy => $directory
spin() keeps copy of successfully processed messages in
- lang => $lang
Overwrites lang parameter in configuration.
- log_level => $level
Overwrites log_level parameter in configuration.
- log_smtp => 0|1
Overwrites log_smtp parameter in configuration.
See also “Properties” in Sympa::Spindle.
Instance of Sympa::Spool::Incoming class.
Sympa::Message, Sympa::Spindle, Sympa::Spindle::DoCommand, Sympa::Spindle::DoForward, Sympa::Spindle::DoMessage, Sympa::Spool::Incoming.
Sympa::Spindle::ProcessIncoming appeared on Sympa 6.2.13.