Message Id Expando definitions. More...
#include <stdbool.h>#include <string.h>#include <unistd.h>#include "mutt/lib.h"#include "address/lib.h"#include "email/lib.h"#include "expando_msgid.h"#include "expando/lib.h"#include "globals.h"#include "sendlib.h"
Include dependency graph for expando_msgid.c:Go to the source code of this file.
Functions | |
| static void | msgid_counter (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf) |
| Message Id: Step Counter - Implements get_string_t -. | |
| static long | msgid_day_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags) |
| Message Id: Day - Implements get_number_t -. | |
| static void | msgid_hostname (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf) |
| Message Id: Hostname - Implements get_string_t -. | |
| static long | msgid_hour_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags) |
| Message Id: Hour - Implements get_number_t -. | |
| static long | msgid_minute_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags) |
| Message Id: Minute - Implements get_number_t -. | |
| static long | msgid_month_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags) |
| Message Id: Month - Implements get_number_t -. | |
| static long | msgid_pid_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags) |
| Message Id: Process Id - Implements get_number_t -. | |
| static void | msgid_random_1 (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf) |
| Message Id: 1 Random Hex Byte - Implements get_string_t -. | |
| static void | msgid_random_3 (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf) |
| Message Id: 3 Random Bytes of Base64 - Implements get_string_t -. | |
| static void | msgid_random_12 (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf) |
| Message Id: Timestamp + 8 Random Bytes of Base64 - Implements get_string_t -. | |
| static long | msgid_second_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags) |
| Message Id: Second - Implements get_number_t -. | |
| static long | msgid_year_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags) |
| Message Id: Year (4 digit) - Implements get_number_t -. | |
| static char * | msgid_gen_random (void) |
| Generate a random Message ID. | |
| char * | msgid_generate (void) |
| Generate a Message-Id. | |
Variables | |
| const struct ExpandoRenderCallback | MsgIdRenderCallbacks [] |
| Callbacks for Message Id Expandos. | |
Message Id Expando definitions.
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, see http://www.gnu.org/licenses/.
Definition in file expando_msgid.c.
|
static |
Generate a random Message ID.
| ptr | Message ID |
The length of the message id is chosen such that it is maximal and fits in the recommended 78 character line length for the headers Message-ID:, References:, and In-Reply-To:, this leads to 62 available characters (excluding @ and >). Since we choose from 32 letters, we have 32^62 = 2^310 different message ids.
Examples:
The distribution of the characters to left-of-@ and right-of-@ was arbitrary. The choice was made to put more into the left-id and shorten the right-id to slightly mimic a common length domain name.
Definition at line 227 of file expando_msgid.c.
Here is the call graph for this function:
Here is the caller graph for this function:| char * msgid_generate | ( | void | ) |
Generate a Message-Id.
| ptr | Message ID |
Definition at line 250 of file expando_msgid.c.
Here is the call graph for this function:
Here is the caller graph for this function:| const struct ExpandoRenderCallback MsgIdRenderCallbacks[] |
Callbacks for Message Id Expandos.
Definition at line 186 of file expando_msgid.c.