Files
bongo/include/bongomaildrop.h
T
Mario Fetka c8b250e9b0
Debian Trixie package bundle / packages (push) Successful in 22m11s
Implement durable C local mail submission
2026-07-24 11:05:19 +02:00

48 lines
1.6 KiB
C

/****************************************************************************
* <Novell-copyright>
* Copyright (c) 2001 Novell, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
*
* This program 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, contact Novell, Inc.
* </Novell-copyright>
****************************************************************************/
#ifndef BONGO_MAILDROP_H
#define BONGO_MAILDROP_H
#include <stdint.h>
#include <stdio.h>
#include <sys/types.h>
#include <glib.h>
#define BONGO_MAILDROP_ADDRESS_LIMIT 998U
#define BONGO_MAILDROP_RECIPIENT_LIMIT 1000U
#define BONGO_MAILDROP_MESSAGE_LIMIT (256U * 1024U * 1024U)
typedef struct {
uid_t uid;
char *sender;
GPtrArray *recipients;
unsigned char *message;
size_t message_length;
} BongoMaildropSubmission;
int BongoMaildropAddressValid(const char *address);
int BongoMaildropWrite(FILE *stream, const BongoMaildropSubmission *submission);
int BongoMaildropRead(FILE *stream, size_t message_limit,
unsigned int recipient_limit,
BongoMaildropSubmission *submission);
void BongoMaildropSubmissionClear(BongoMaildropSubmission *submission);
#endif