2026-10-15 01:15:46 +03:00
|
|
|
/*
|
|
|
|
|
* this is free software: you can redistribute it and/or modify it
|
|
|
|
|
* under the terms of the GNU General Public License as published
|
|
|
|
|
* by the Free Software Foundation, either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* this is distributed in the hope that it will be useful, but
|
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
* See the GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.";
|
|
|
|
|
*
|
|
|
|
|
* (c) Alexander Vdolainen 2007, 2026 <alex@vapaa.xyz>
|
|
|
|
|
* subrelay: a minimalistic maillist server based on external IMAPs/SMTPs
|
|
|
|
|
*
|
|
|
|
|
* mail_processor.h: RFC 822/RFC 5322 header parsing/rewriting and routing
|
|
|
|
|
*
|
|
|
|
|
*/
|
2026-09-29 01:28:53 +03:00
|
|
|
#ifndef __MAIL_PROCESSOR_H__
|
|
|
|
|
#define __MAIL_PROCESSOR_H__
|
|
|
|
|
|
2026-10-13 01:56:01 +03:00
|
|
|
#include <ilib/configuration.h>
|
2026-09-29 01:28:53 +03:00
|
|
|
#include <ilib/subscribers.h>
|
|
|
|
|
#include <ilib/pending.h>
|
|
|
|
|
#include <ilib/mail_engine.h>
|
|
|
|
|
|
|
|
|
|
typedef struct mail_processor {
|
|
|
|
|
subrelay_config_t *cfg;
|
|
|
|
|
subscriber_pool_t *subscribers;
|
2026-10-15 01:15:46 +03:00
|
|
|
pending_pool_t *pending;
|
2026-09-29 01:28:53 +03:00
|
|
|
} mail_processor_t;
|
|
|
|
|
|
2026-10-15 01:15:46 +03:00
|
|
|
int mail_processor_init(mail_processor_t *mp, subrelay_config_t *cfg,
|
|
|
|
|
subscriber_pool_t *subscribers, pending_pool_t *pending);
|
2026-09-29 01:28:53 +03:00
|
|
|
|
2026-10-15 01:15:46 +03:00
|
|
|
/* Processes a single fetched message according to defined use cases */
|
2026-09-29 01:28:53 +03:00
|
|
|
int mail_processor_execute(mail_processor_t *mp, mail_message_t *msg);
|
|
|
|
|
|
|
|
|
|
#endif /* __MAIL_PROCESSOR_H__ */
|