NeoMutt  2019-12-07-60-g0cfa53
Teaching an old dog new tricks
DOXYGEN
remailer.c File Reference

Support of Mixmaster anonymous remailer. More...

#include "config.h"
#include <fcntl.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "mutt/mutt.h"
#include "address/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "mutt.h"
#include "filter.h"
#include "format_flags.h"
#include "globals.h"
#include "keymap.h"
#include "mutt_menu.h"
#include "muttlib.h"
#include "opcodes.h"
#include "options.h"
#include "protos.h"
#include "recvattach.h"
#include "sendlib.h"
+ Include dependency graph for remailer.c:

Go to the source code of this file.

Data Structures

struct  Coord
 Screen coordinates. More...
 

Macros

#define MIX_HOFFSET   2
 
#define MIX_VOFFSET   (win->state.rows - 4)
 
#define MIX_MAXROW   (win->state.rows - 1)
 

Functions

static MixCapFlags mix_get_caps (const char *capstr)
 Get Mixmaster Capabilities. More...
 
static void mix_add_entry (struct Remailer ***type2_list, struct Remailer *entry, size_t *slots, size_t *used)
 Add an entry to the Remailer list. More...
 
static struct Remailerremailer_new (void)
 Create a new Remailer. More...
 
static void remailer_free (struct Remailer **ptr)
 Free a Remailer. More...
 
static struct Remailer ** mix_type2_list (size_t *l)
 parse the type2.list as given by mixmaster -T More...
 
static void mix_type2_list_free (struct Remailer ***ttlp)
 Free a Remailer List. More...
 
static void mix_screen_coordinates (struct MuttWindow *win, struct Remailer **type2_list, struct Coord **coordsp, struct MixChain *chain, int i)
 Get the screen coordinates to place a chain. More...
 
static void mix_redraw_ce (struct MuttWindow *win, struct Remailer **type2_list, struct Coord *coords, struct MixChain *chain, int i, bool selected)
 Redraw the Remailer chain. More...
 
static void mix_redraw_chain (struct MuttWindow *win, struct Remailer **type2_list, struct Coord *coords, struct MixChain *chain, int cur)
 Redraw the chain on screen. More...
 
static void mix_redraw_head (struct MuttWindow *win, struct MixChain *chain)
 Redraw the Chain info. More...
 
static const char * mix_format_caps (struct Remailer *r)
 Turn flags into a MixMaster capability string. More...
 
static const char * mix_format_str (char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, unsigned long data, MuttFormatFlags flags)
 Format a string for the remailer menu - Implements format_t. More...
 
static void mix_entry (char *buf, size_t buflen, struct Menu *menu, int num)
 Format a menu item for the mixmaster chain list. More...
 
static int mix_chain_add (struct MixChain *chain, const char *s, struct Remailer **type2_list)
 Add a host to the chain. More...
 
int mutt_dlg_mixmaster_observer (struct NotifyCallback *nc)
 Listen for config changes affecting the Mixmaster menu - Implements observer_t() More...
 
void mix_make_chain (struct MuttWindow *win, struct ListHead *chainhead, int cols)
 Create a Mixmaster chain. More...
 
int mix_check_message (struct Email *e)
 Safety-check the message before passing it to mixmaster. More...
 
int mix_send_message (struct ListHead *chain, const char *tempfile)
 Send an email via Mixmaster. More...
 

Variables

char * C_MixEntryFormat
 Config: (mixmaster) printf-like format string for the mixmaster chain. More...
 
char * C_Mixmaster
 Config: (mixmaster) External command to route a mixmaster message. More...
 
static const struct Mapping RemailerHelp []
 

Detailed Description

Support of Mixmaster anonymous remailer.

Authors
  • Thomas Roessler
  • Pietro Cerutti

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 remailer.c.

Macro Definition Documentation

◆ MIX_HOFFSET

#define MIX_HOFFSET   2

Definition at line 61 of file remailer.c.

◆ MIX_VOFFSET

#define MIX_VOFFSET   (win->state.rows - 4)

Definition at line 62 of file remailer.c.

◆ MIX_MAXROW

#define MIX_MAXROW   (win->state.rows - 1)

Definition at line 63 of file remailer.c.

Function Documentation

◆ mix_get_caps()

static MixCapFlags mix_get_caps ( const char *  capstr)
static

Get Mixmaster Capabilities.

Parameters
capstrCapability string to parse
Return values
numCapabilities, see MixCapFlags

Definition at line 85 of file remailer.c.

86 {
88 
89  while (*capstr)
90  {
91  switch (*capstr)
92  {
93  case 'C':
94  caps |= MIX_CAP_COMPRESS;
95  break;
96 
97  case 'M':
98  caps |= MIX_CAP_MIDDLEMAN;
99  break;
100 
101  case 'N':
102  {
103  switch (*++capstr)
104  {
105  case 'm':
106  caps |= MIX_CAP_NEWSMAIL;
107  break;
108 
109  case 'p':
110  caps |= MIX_CAP_NEWSPOST;
111  break;
112  }
113  }
114  }
115 
116  if (*capstr)
117  capstr++;
118  }
119 
120  return caps;
121 }
#define MIX_CAP_NEWSPOST
Definition: remailer.h:44
uint8_t MixCapFlags
Flags, e.g. MIX_CAP_NO_FLAGS.
Definition: remailer.h:40
#define MIX_CAP_NO_FLAGS
No flags are set.
Definition: remailer.h:41
#define MIX_CAP_NEWSMAIL
Definition: remailer.h:45
#define MIX_CAP_MIDDLEMAN
Definition: remailer.h:43
#define MIX_CAP_COMPRESS
Definition: remailer.h:42
+ Here is the caller graph for this function:

◆ mix_add_entry()

static void mix_add_entry ( struct Remailer ***  type2_list,
struct Remailer entry,
size_t *  slots,
size_t *  used 
)
static

Add an entry to the Remailer list.

Parameters
[out]type2_listRemailer list to add to
[in]entryRemailer to add
[out]slotsTotal number of slots
[out]usedNumber of slots used

Definition at line 130 of file remailer.c.

132 {
133  if (*used == *slots)
134  {
135  *slots += 5;
136  mutt_mem_realloc(type2_list, sizeof(struct Remailer *) * (*slots));
137  }
138 
139  (*type2_list)[(*used)++] = entry;
140  if (entry)
141  entry->num = *used;
142 }
int num
Definition: remailer.h:52
void mutt_mem_realloc(void *ptr, size_t size)
Resize a block of memory on the heap.
Definition: memory.c:114
A Mixmaster remailer.
Definition: remailer.h:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remailer_new()

static struct Remailer* remailer_new ( void  )
static

Create a new Remailer.

Return values
ptrNewly allocated Remailer

Definition at line 148 of file remailer.c.

149 {
150  return mutt_mem_calloc(1, sizeof(struct Remailer));
151 }
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
A Mixmaster remailer.
Definition: remailer.h:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remailer_free()

static void remailer_free ( struct Remailer **  ptr)
static

Free a Remailer.

Parameters
[out]ptrRemailer to free

Definition at line 157 of file remailer.c.

158 {
159  if (!ptr || !*ptr)
160  return;
161 
162  struct Remailer *r = *ptr;
163 
164  FREE(&r->shortname);
165  FREE(&r->addr);
166  FREE(&r->ver);
167  FREE(ptr);
168 }
char * shortname
Definition: remailer.h:53
#define FREE(x)
Definition: memory.h:40
char * addr
Definition: remailer.h:54
char * ver
Definition: remailer.h:55
A Mixmaster remailer.
Definition: remailer.h:50
+ Here is the caller graph for this function:

◆ mix_type2_list()

static struct Remailer** mix_type2_list ( size_t *  l)
static

parse the type2.list as given by mixmaster -T

Parameters
[out]lLength of list
Return values
ptrtype2.list

Definition at line 175 of file remailer.c.

176 {
177  if (!l)
178  return NULL;
179 
180  FILE *fp = NULL;
181  char line[8192];
182  char *t = NULL;
183 
184  struct Remailer **type2_list = NULL;
185  struct Remailer *p = NULL;
186  size_t slots = 0, used = 0;
187 
188  int fd_null = open("/dev/null", O_RDWR);
189  if (fd_null == -1)
190  return NULL;
191 
192  struct Buffer *cmd = mutt_buffer_pool_get();
193  mutt_buffer_printf(cmd, "%s -T", C_Mixmaster);
194 
195  pid_t mm_pid =
196  mutt_create_filter_fd(mutt_b2s(cmd), NULL, &fp, NULL, fd_null, -1, fd_null);
197  if (mm_pid == -1)
198  {
200  close(fd_null);
201  return NULL;
202  }
203 
205 
206  /* first, generate the "random" remailer */
207 
208  p = remailer_new();
209  p->shortname = mutt_str_strdup(_("<random>"));
210  mix_add_entry(&type2_list, p, &slots, &used);
211 
212  while (fgets(line, sizeof(line), fp))
213  {
214  p = remailer_new();
215 
216  t = strtok(line, " \t\n");
217  if (!t)
218  goto problem;
219 
220  p->shortname = mutt_str_strdup(t);
221 
222  t = strtok(NULL, " \t\n");
223  if (!t)
224  goto problem;
225 
226  p->addr = mutt_str_strdup(t);
227 
228  t = strtok(NULL, " \t\n");
229  if (!t)
230  goto problem;
231 
232  t = strtok(NULL, " \t\n");
233  if (!t)
234  goto problem;
235 
236  p->ver = mutt_str_strdup(t);
237 
238  t = strtok(NULL, " \t\n");
239  if (!t)
240  goto problem;
241 
242  p->caps = mix_get_caps(t);
243 
244  mix_add_entry(&type2_list, p, &slots, &used);
245  continue;
246 
247  problem:
248  remailer_free(&p);
249  }
250 
251  *l = used;
252 
253  mix_add_entry(&type2_list, NULL, &slots, &used);
254  mutt_wait_filter(mm_pid);
255 
256  close(fd_null);
257 
258  return type2_list;
259 }
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
Definition: pool.c:101
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
Definition: pool.c:112
MixCapFlags caps
Definition: remailer.h:56
String manipulation buffer.
Definition: buffer.h:33
#define _(a)
Definition: message.h:28
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:160
char * C_Mixmaster
Config: (mixmaster) External command to route a mixmaster message.
Definition: remailer.c:59
static void remailer_free(struct Remailer **ptr)
Free a Remailer.
Definition: remailer.c:157
static void mix_add_entry(struct Remailer ***type2_list, struct Remailer *entry, size_t *slots, size_t *used)
Add an entry to the Remailer list.
Definition: remailer.c:130
#define mutt_b2s(buf)
Definition: buffer.h:41
const char * line
Definition: common.c:36
pid_t mutt_create_filter_fd(const char *cmd, FILE **fp_in, FILE **fp_out, FILE **fp_err, int fdin, int fdout, int fderr)
Run a command on a pipe (optionally connect stdin/stdout)
Definition: filter.c:64
char * shortname
Definition: remailer.h:53
static MixCapFlags mix_get_caps(const char *capstr)
Get Mixmaster Capabilities.
Definition: remailer.c:85
char * mutt_str_strdup(const char *str)
Copy a string, safely.
Definition: string.c:380
static struct Remailer * remailer_new(void)
Create a new Remailer.
Definition: remailer.c:148
char * addr
Definition: remailer.h:54
int mutt_wait_filter(pid_t pid)
Wait for the exit of a process and return its status.
Definition: filter.c:220
char * ver
Definition: remailer.h:55
A Mixmaster remailer.
Definition: remailer.h:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mix_type2_list_free()

static void mix_type2_list_free ( struct Remailer ***  ttlp)
static

Free a Remailer List.

Parameters
[out]ttlpRemailer List to free

Definition at line 265 of file remailer.c.

266 {
267  struct Remailer **type2_list = *ttlp;
268 
269  for (int i = 0; type2_list[i]; i++)
270  remailer_free(&type2_list[i]);
271 
272  FREE(type2_list);
273 }
static void remailer_free(struct Remailer **ptr)
Free a Remailer.
Definition: remailer.c:157
#define FREE(x)
Definition: memory.h:40
A Mixmaster remailer.
Definition: remailer.h:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mix_screen_coordinates()

static void mix_screen_coordinates ( struct MuttWindow win,
struct Remailer **  type2_list,
struct Coord **  coordsp,
struct MixChain chain,
int  i 
)
static

Get the screen coordinates to place a chain.

Parameters
[in]winWindow
[out]type2_listRemailer List
[out]coordspOn screen coordinates
[in]chainChain
[in]iIndex in chain

Definition at line 283 of file remailer.c.

285 {
286  if (!chain->cl)
287  return;
288 
289  short c, r;
290 
291  mutt_mem_realloc(coordsp, sizeof(struct Coord) * chain->cl);
292 
293  struct Coord *coords = *coordsp;
294 
295  if (i)
296  {
297  c = coords[i - 1].c + strlen(type2_list[chain->ch[i - 1]]->shortname) + 2;
298  r = coords[i - 1].r;
299  }
300  else
301  {
302  r = MIX_VOFFSET;
303  c = MIX_HOFFSET;
304  }
305 
306  for (; i < chain->cl; i++)
307  {
308  short oc = c;
309  c += strlen(type2_list[chain->ch[i]]->shortname) + 2;
310 
311  if (c >= win->state.cols)
312  {
313  oc = MIX_HOFFSET;
314  c = MIX_HOFFSET;
315  r++;
316  }
317 
318  coords[i].c = oc;
319  coords[i].r = r;
320  }
321 }
#define MIX_VOFFSET
Definition: remailer.c:62
int ch[MAX_MIXES]
Definition: remailer.h:65
short r
row
Definition: remailer.c:70
void mutt_mem_realloc(void *ptr, size_t size)
Resize a block of memory on the heap.
Definition: memory.c:114
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:56
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:91
char * shortname
Definition: remailer.h:53
size_t cl
Definition: remailer.h:64
#define MIX_HOFFSET
Definition: remailer.c:61
Screen coordinates.
Definition: remailer.c:68
short c
column
Definition: remailer.c:71
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mix_redraw_ce()

static void mix_redraw_ce ( struct MuttWindow win,
struct Remailer **  type2_list,
struct Coord coords,
struct MixChain chain,
int  i,
bool  selected 
)
static

Redraw the Remailer chain.

Parameters
[in]winWindow
[out]type2_listRemailer List
[in]coordsScreen Coordinates
[in]chainChain
[in]iIndex in chain
[in]selectedtrue, if this item is selected

Definition at line 332 of file remailer.c.

334 {
335  if (!coords || !chain)
336  return;
337 
338  if (coords[i].r < MIX_MAXROW)
339  {
340  if (selected)
342  else
344 
345  mutt_window_mvaddstr(win, coords[i].r, coords[i].c, type2_list[chain->ch[i]]->shortname);
347 
348  if (i + 1 < chain->cl)
349  mutt_window_addstr(", ");
350  }
351 }
int ch[MAX_MIXES]
Definition: remailer.h:65
void mutt_curses_set_color(enum ColorId color)
Set the current colour for text.
Definition: mutt_curses.c:55
short r
row
Definition: remailer.c:70
#define MIX_MAXROW
Definition: remailer.c:63
Plain text.
Definition: color.h:78
Selected item in list.
Definition: color.h:74
char * shortname
Definition: remailer.h:53
size_t cl
Definition: remailer.h:64
int mutt_window_mvaddstr(struct MuttWindow *win, int row, int col, const char *str)
Move the cursor and write a fixed string to a Window.
Definition: mutt_window.c:293
int mutt_window_addstr(const char *str)
Write a string to a Window.
Definition: mutt_window.c:428
short c
column
Definition: remailer.c:71
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mix_redraw_chain()

static void mix_redraw_chain ( struct MuttWindow win,
struct Remailer **  type2_list,
struct Coord coords,
struct MixChain chain,
int  cur 
)
static

Redraw the chain on screen.

Parameters
[in]winWindow
[out]type2_listRemailer List
[in]coordsWhere to draw the list on screen
[in]chainChain to display
[in]curChain index of current selection

Definition at line 361 of file remailer.c.

363 {
364  for (int i = MIX_VOFFSET; i < MIX_MAXROW; i++)
365  {
366  mutt_window_move(win, i, 0);
368  }
369 
370  for (int i = 0; i < chain->cl; i++)
371  mix_redraw_ce(win, type2_list, coords, chain, i, i == cur);
372 }
static void mix_redraw_ce(struct MuttWindow *win, struct Remailer **type2_list, struct Coord *coords, struct MixChain *chain, int i, bool selected)
Redraw the Remailer chain.
Definition: remailer.c:332
#define MIX_VOFFSET
Definition: remailer.c:62
void mutt_window_clrtoeol(struct MuttWindow *win)
Clear to the end of the line.
Definition: mutt_window.c:135
#define MIX_MAXROW
Definition: remailer.c:63
size_t cl
Definition: remailer.h:64
int mutt_window_move(struct MuttWindow *win, int row, int col)
Move the cursor in a Window.
Definition: mutt_window.c:279
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mix_redraw_head()

static void mix_redraw_head ( struct MuttWindow win,
struct MixChain chain 
)
static

Redraw the Chain info.

Parameters
winWindow
chainChain

Definition at line 379 of file remailer.c.

380 {
382  mutt_window_mvprintw(win, MIX_VOFFSET - 1, 0,
383  "-- Remailer chain [Length: %d]", chain ? chain->cl : 0);
386 }
#define MIX_VOFFSET
Definition: remailer.c:62
void mutt_curses_set_color(enum ColorId color)
Set the current colour for text.
Definition: mutt_curses.c:55
void mutt_window_clrtoeol(struct MuttWindow *win)
Clear to the end of the line.
Definition: mutt_window.c:135
Plain text.
Definition: color.h:78
Status bar (takes a pattern)
Definition: color.h:95
size_t cl
Definition: remailer.h:64
int mutt_window_mvprintw(struct MuttWindow *win, int row, int col, const char *fmt,...)
Move the cursor and write a formatted string to a Window.
Definition: mutt_window.c:312
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mix_format_caps()

static const char* mix_format_caps ( struct Remailer r)
static

Turn flags into a MixMaster capability string.

Parameters
rRemailer to use
Return values
ptrCapability string
Note
The string is a static buffer

Definition at line 395 of file remailer.c.

396 {
397  static char capbuf[10];
398  char *t = capbuf;
399 
400  if (r->caps & MIX_CAP_COMPRESS)
401  *t++ = 'C';
402  else
403  *t++ = ' ';
404 
405  if (r->caps & MIX_CAP_MIDDLEMAN)
406  *t++ = 'M';
407  else
408  *t++ = ' ';
409 
410  if (r->caps & MIX_CAP_NEWSPOST)
411  {
412  *t++ = 'N';
413  *t++ = 'p';
414  }
415  else
416  {
417  *t++ = ' ';
418  *t++ = ' ';
419  }
420 
421  if (r->caps & MIX_CAP_NEWSMAIL)
422  {
423  *t++ = 'N';
424  *t++ = 'm';
425  }
426  else
427  {
428  *t++ = ' ';
429  *t++ = ' ';
430  }
431 
432  *t = '\0';
433 
434  return capbuf;
435 }
#define MIX_CAP_NEWSPOST
Definition: remailer.h:44
MixCapFlags caps
Definition: remailer.h:56
#define MIX_CAP_NEWSMAIL
Definition: remailer.h:45
#define MIX_CAP_MIDDLEMAN
Definition: remailer.h:43
#define MIX_CAP_COMPRESS
Definition: remailer.h:42
+ Here is the caller graph for this function:

◆ mix_format_str()

static const char* mix_format_str ( char *  buf,
size_t  buflen,
size_t  col,
int  cols,
char  op,
const char *  src,
const char *  prec,
const char *  if_str,
const char *  else_str,
unsigned long  data,
MuttFormatFlags  flags 
)
static

Format a string for the remailer menu - Implements format_t.

Expando Description
%a The remailer's e-mail address
%c Remailer capabilities
%n The running number on the menu
%s The remailer's short name

Definition at line 447 of file remailer.c.

451 {
452  char fmt[128];
453  struct Remailer *remailer = (struct Remailer *) data;
454  bool optional = (flags & MUTT_FORMAT_OPTIONAL);
455 
456  switch (op)
457  {
458  case 'a':
459  if (!optional)
460  {
461  snprintf(fmt, sizeof(fmt), "%%%ss", prec);
462  snprintf(buf, buflen, fmt, NONULL(remailer->addr));
463  }
464  else if (!remailer->addr)
465  optional = false;
466  break;
467 
468  case 'c':
469  if (!optional)
470  {
471  snprintf(fmt, sizeof(fmt), "%%%ss", prec);
472  snprintf(buf, buflen, fmt, mix_format_caps(remailer));
473  }
474  break;
475 
476  case 'n':
477  if (!optional)
478  {
479  snprintf(fmt, sizeof(fmt), "%%%sd", prec);
480  snprintf(buf, buflen, fmt, remailer->num);
481  }
482  break;
483 
484  case 's':
485  if (!optional)
486  {
487  snprintf(fmt, sizeof(fmt), "%%%ss", prec);
488  snprintf(buf, buflen, fmt, NONULL(remailer->shortname));
489  }
490  else if (!remailer->shortname)
491  optional = false;
492  break;
493 
494  default:
495  *buf = '\0';
496  }
497 
498  if (optional)
499  mutt_expando_format(buf, buflen, col, cols, if_str, attach_format_str, data,
501  else if (flags & MUTT_FORMAT_OPTIONAL)
502  mutt_expando_format(buf, buflen, col, cols, else_str, attach_format_str,
503  data, MUTT_FORMAT_NO_FLAGS);
504  return src;
505 }
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t *callback, unsigned long data, MuttFormatFlags flags)
Expand expandos (x) in a string.
Definition: muttlib.c:877
#define NONULL(x)
Definition: string2.h:37
static const char * mix_format_caps(struct Remailer *r)
Turn flags into a MixMaster capability string.
Definition: remailer.c:395
int num
Definition: remailer.h:52
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
Definition: format_flags.h:30
char * shortname
Definition: remailer.h:53
const char * attach_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, unsigned long data, MuttFormatFlags flags)
Format a string for the attachment menu - Implements format_t.
Definition: recvattach.c:208
#define MUTT_FORMAT_OPTIONAL
Allow optional field processing.
Definition: format_flags.h:33
char * addr
Definition: remailer.h:54
A Mixmaster remailer.
Definition: remailer.h:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mix_entry()

static void mix_entry ( char *  buf,
size_t  buflen,
struct Menu menu,
int  num 
)
static

Format a menu item for the mixmaster chain list.

Parameters
[out]bufBuffer in which to save string
[in]buflenBuffer length
[in]menuMenu containing aliases
[in]numIndex into the menu

Definition at line 514 of file remailer.c.

515 {
516  struct Remailer **type2_list = menu->data;
517  mutt_expando_format(buf, buflen, 0, menu->win_index->state.cols,
519  (unsigned long) type2_list[num], MUTT_FORMAT_ARROWCURSOR);
520 }
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t *callback, unsigned long data, MuttFormatFlags flags)
Expand expandos (x) in a string.
Definition: muttlib.c:877
#define NONULL(x)
Definition: string2.h:37
#define MUTT_FORMAT_ARROWCURSOR
Reserve space for arrow_cursor.
Definition: format_flags.h:35
int num
Definition: remailer.h:52
char * C_MixEntryFormat
Config: (mixmaster) printf-like format string for the mixmaster chain.
Definition: remailer.c:58
static const char * mix_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, unsigned long data, MuttFormatFlags flags)
Format a string for the remailer menu - Implements format_t.
Definition: remailer.c:447
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:56
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:91
void * data
Extra data for the current menu.
Definition: mutt_menu.h:86
struct MuttWindow * win_index
Definition: mutt_menu.h:95
A Mixmaster remailer.
Definition: remailer.h:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mix_chain_add()

static int mix_chain_add ( struct MixChain chain,
const char *  s,
struct Remailer **  type2_list 
)
static

Add a host to the chain.

Parameters
[in]chainChain to add to
[in]sHostname
[out]type2_listRemailer List
Return values
0Success
-1Error

Definition at line 530 of file remailer.c.

531 {
532  int i;
533 
534  if (chain->cl >= MAX_MIXES)
535  return -1;
536 
537  if ((mutt_str_strcmp(s, "0") == 0) || (mutt_str_strcasecmp(s, "<random>") == 0))
538  {
539  chain->ch[chain->cl++] = 0;
540  return 0;
541  }
542 
543  for (i = 0; type2_list[i]; i++)
544  {
545  if (mutt_str_strcasecmp(s, type2_list[i]->shortname) == 0)
546  {
547  chain->ch[chain->cl++] = i;
548  return 0;
549  }
550  }
551 
552  /* replace unknown remailers by <random> */
553 
554  if (!type2_list[i])
555  chain->ch[chain->cl++] = 0;
556 
557  return 0;
558 }
int ch[MAX_MIXES]
Definition: remailer.h:65
char * shortname
Definition: remailer.h:53
size_t cl
Definition: remailer.h:64
int mutt_str_strcasecmp(const char *a, const char *b)
Compare two strings ignoring case, safely.
Definition: string.c:628
int mutt_str_strcmp(const char *a, const char *b)
Compare two strings, safely.
Definition: string.c:615
#define MAX_MIXES
Definition: remailer.h:38
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_dlg_mixmaster_observer()

int mutt_dlg_mixmaster_observer ( struct NotifyCallback nc)

Listen for config changes affecting the Mixmaster menu - Implements observer_t()

Definition at line 563 of file remailer.c.

564 {
565  if (!nc->event_data || !nc->global_data)
566  return -1;
567  if (nc->event_type != NT_CONFIG)
568  return 0;
569 
570  struct EventConfig *ec = nc->event_data;
571  struct MuttWindow *dlg = nc->global_data;
572 
573  if (mutt_str_strcmp(ec->name, "status_on_top") != 0)
574  return 0;
575 
576  struct MuttWindow *win_first = TAILQ_FIRST(&dlg->children);
577 
578  if ((C_StatusOnTop && (win_first->type == WT_INDEX)) ||
579  (!C_StatusOnTop && (win_first->type != WT_INDEX)))
580  {
581  // Swap the Index and the IndexBar Windows
582  TAILQ_REMOVE(&dlg->children, win_first, entries);
583  TAILQ_INSERT_TAIL(&dlg->children, win_first, entries);
584  }
585 
586  mutt_window_reflow(dlg);
587  return 0;
588 }
WHERE bool C_StatusOnTop
Config: Display the status bar at the top.
Definition: globals.h:255
#define TAILQ_FIRST(head)
Definition: queue.h:716
A config-change event.
Definition: subset.h:68
A division of the screen.
Definition: mutt_window.h:86
An Index Window containing a selection list.
Definition: mutt_window.h:72
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
Definition: observer.h:42
void * global_data
Data from notify_observer_add()
Definition: observer.h:45
#define TAILQ_REMOVE(head, elm, field)
Definition: queue.h:834
#define TAILQ_INSERT_TAIL(head, elm, field)
Definition: queue.h:802
void * event_data
Data from notify_send()
Definition: observer.h:44
Config has changed.
Definition: notify_type.h:34
void mutt_window_reflow(struct MuttWindow *win)
Resize a Window and its children.
Definition: mutt_window.c:346
struct MuttWindowList children
Children Windows.
Definition: mutt_window.h:99
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition: mutt_window.h:101
const char * name
Name of config item that changed.
Definition: subset.h:71
int mutt_str_strcmp(const char *a, const char *b)
Compare two strings, safely.
Definition: string.c:615
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mix_make_chain()

void mix_make_chain ( struct MuttWindow win,
struct ListHead *  chainhead,
int  cols 
)

Create a Mixmaster chain.

Parameters
winWindow
chainheadList if chain links
colsNumber of screen columns

Ask the user to select Mixmaster hosts to create a chain.

Definition at line 598 of file remailer.c.

599 {
600  int c_cur = 0, c_old = 0;
601  bool c_redraw = true;
602  size_t ttll = 0;
603 
604  struct Coord *coords = NULL;
605 
606  struct Menu *menu = NULL;
607  char helpstr[1024];
608  bool loop = true;
609 
610  char *t = NULL;
611 
612  struct Remailer **type2_list = mix_type2_list(&ttll);
613  if (!type2_list)
614  {
615  mutt_error(_("Can't get mixmaster's type2.list"));
616  return;
617  }
618 
619  struct MixChain *chain = mutt_mem_calloc(1, sizeof(struct MixChain));
620 
621  struct ListNode *p = NULL;
622  STAILQ_FOREACH(p, chainhead, entries)
623  {
624  mix_chain_add(chain, p->data, type2_list);
625  }
626  mutt_list_free(chainhead);
627 
628  /* safety check */
629  for (int i = 0; i < chain->cl; i++)
630  {
631  if (chain->ch[i] >= ttll)
632  chain->ch[i] = 0;
633  }
634 
635  mix_screen_coordinates(win, type2_list, &coords, chain, 0);
636 
637  struct MuttWindow *dlg =
640  dlg->type = WT_DIALOG;
641  struct MuttWindow *index =
644  index->type = WT_INDEX;
645  struct MuttWindow *ibar = mutt_window_new(
647  ibar->type = WT_INDEX_BAR;
648 
649  if (C_StatusOnTop)
650  {
651  mutt_window_add_child(dlg, ibar);
652  mutt_window_add_child(dlg, index);
653  }
654  else
655  {
656  mutt_window_add_child(dlg, index);
657  mutt_window_add_child(dlg, ibar);
658  }
659 
661  dialog_push(dlg);
662 
663  menu = mutt_menu_new(MENU_MIX);
664  menu->pagelen = index->state.rows;
665  menu->win_index = index;
666  menu->win_ibar = ibar;
667 
668  menu->max = ttll;
669  menu->menu_make_entry = mix_entry;
670  menu->menu_tag = NULL;
671  menu->title = _("Select a remailer chain");
672  menu->data = type2_list;
673  menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_MIX, RemailerHelp);
674  menu->pagelen = MIX_VOFFSET - 1;
676 
677  while (loop)
678  {
679  if (menu->pagelen != MIX_VOFFSET - 1)
680  {
681  menu->pagelen = MIX_VOFFSET - 1;
682  menu->redraw = REDRAW_FULL;
683  }
684 
685  if (c_redraw)
686  {
687  mix_redraw_head(menu->win_index, chain);
688  mix_redraw_chain(menu->win_index, type2_list, coords, chain, c_cur);
689  c_redraw = false;
690  }
691  else if (c_cur != c_old)
692  {
693  mix_redraw_ce(menu->win_index, type2_list, coords, chain, c_old, false);
694  mix_redraw_ce(menu->win_index, type2_list, coords, chain, c_cur, true);
695  }
696 
697  c_old = c_cur;
698 
699  const int op = mutt_menu_loop(menu);
700  switch (op)
701  {
702  case OP_REDRAW:
703  {
704  menu_redraw_status(menu);
705  mix_redraw_head(menu->win_index, chain);
706  mix_screen_coordinates(menu->win_index, type2_list, &coords, chain, 0);
707  mix_redraw_chain(menu->win_index, type2_list, coords, chain, c_cur);
708  menu->pagelen = MIX_VOFFSET - 1;
709  break;
710  }
711 
712  case OP_EXIT:
713  {
714  chain->cl = 0;
715  loop = false;
716  break;
717  }
718 
719  case OP_MIX_USE:
720  {
721  if (!chain->cl)
722  {
723  chain->cl++;
724  chain->ch[0] = menu->current;
725  mix_screen_coordinates(menu->win_index, type2_list, &coords, chain, c_cur);
726  c_redraw = true;
727  }
728 
729  if (chain->cl && chain->ch[chain->cl - 1] &&
730  (type2_list[chain->ch[chain->cl - 1]]->caps & MIX_CAP_MIDDLEMAN))
731  {
732  mutt_error(
733  _("Error: %s can't be used as the final remailer of a chain"),
734  type2_list[chain->ch[chain->cl - 1]]->shortname);
735  }
736  else
737  {
738  loop = false;
739  }
740  break;
741  }
742 
743  case OP_GENERIC_SELECT_ENTRY:
744  case OP_MIX_APPEND:
745  {
746  if ((chain->cl < MAX_MIXES) && (c_cur < chain->cl))
747  c_cur++;
748  }
749  /* fallthrough */
750  case OP_MIX_INSERT:
751  {
752  if (chain->cl < MAX_MIXES)
753  {
754  chain->cl++;
755  for (int i = chain->cl - 1; i > c_cur; i--)
756  chain->ch[i] = chain->ch[i - 1];
757 
758  chain->ch[c_cur] = menu->current;
759  mix_screen_coordinates(menu->win_index, type2_list, &coords, chain, c_cur);
760  c_redraw = true;
761  }
762  else
763  {
764  /* L10N The '%d' here hard-coded to 19 */
765  mutt_error(_("Mixmaster chains are limited to %d elements"), MAX_MIXES);
766  }
767 
768  break;
769  }
770 
771  case OP_MIX_DELETE:
772  {
773  if (chain->cl)
774  {
775  chain->cl--;
776 
777  for (int i = c_cur; i < chain->cl; i++)
778  chain->ch[i] = chain->ch[i + 1];
779 
780  if ((c_cur == chain->cl) && c_cur)
781  c_cur--;
782 
783  mix_screen_coordinates(menu->win_index, type2_list, &coords, chain, c_cur);
784  c_redraw = true;
785  }
786  else
787  {
788  mutt_error(_("The remailer chain is already empty"));
789  }
790  break;
791  }
792 
793  case OP_MIX_CHAIN_PREV:
794  {
795  if (c_cur)
796  c_cur--;
797  else
798  mutt_error(_("You already have the first chain element selected"));
799 
800  break;
801  }
802 
803  case OP_MIX_CHAIN_NEXT:
804  {
805  if (chain->cl && (c_cur < chain->cl - 1))
806  c_cur++;
807  else
808  mutt_error(_("You already have the last chain element selected"));
809 
810  break;
811  }
812  }
813  }
814 
815  mutt_menu_pop_current(menu);
816  mutt_menu_free(&menu);
817  dialog_pop();
819  mutt_window_free(&dlg);
820 
821  /* construct the remailer list */
822 
823  if (chain->cl)
824  {
825  for (int i = 0; i < chain->cl; i++)
826  {
827  const int j = chain->ch[i];
828  if (j != 0)
829  t = type2_list[j]->shortname;
830  else
831  t = "*";
832 
833  mutt_list_insert_tail(chainhead, mutt_str_strdup(t));
834  }
835  }
836 
837  mix_type2_list_free(&type2_list);
838  FREE(&coords);
839  FREE(&chain);
840 }
static void mix_redraw_ce(struct MuttWindow *win, struct Remailer **type2_list, struct Coord *coords, struct MixChain *chain, int i, bool selected)
Redraw the Remailer chain.
Definition: remailer.c:332
#define MIX_VOFFSET
Definition: remailer.c:62
WHERE bool C_StatusOnTop
Config: Display the status bar at the top.
Definition: globals.h:255
#define REDRAW_FULL
Redraw everything.
Definition: mutt_menu.h:47
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
GUI selectable list of items.
Definition: mutt_menu.h:82
A Mixmaster chain.
Definition: remailer.h:62
int ch[MAX_MIXES]
Definition: remailer.h:65
Dialog (nested Windows) displayed to the user.
Definition: mutt_window.h:68
Window uses all available vertical space.
Definition: mutt_window.h:33
void dialog_pop(void)
Hide a Window from the user.
Definition: mutt_window.c:623
void dialog_push(struct MuttWindow *dlg)
Display a Window to the user.
Definition: mutt_window.c:603
MixCapFlags caps
Definition: remailer.h:56
#define _(a)
Definition: message.h:28
A division of the screen.
Definition: mutt_window.h:86
static void mix_redraw_chain(struct MuttWindow *win, struct Remailer **type2_list, struct Coord *coords, struct MixChain *chain, int cur)
Redraw the chain on screen.
Definition: remailer.c:361
Container for Accounts, Notifications.
Definition: neomutt.h:35
void(* menu_make_entry)(char *buf, size_t buflen, struct Menu *menu, int line)
Format a item for a menu.
Definition: mutt_menu.h:120
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
Definition: list.c:123
bool notify_observer_add(struct Notify *notify, observer_t callback, void *global_data)
Add an observer to an object.
Definition: notify.c:154
An Index Window containing a selection list.
Definition: mutt_window.h:72
void mutt_window_free(struct MuttWindow **ptr)
Free a Window and its children.
Definition: mutt_window.c:75
struct MuttWindow * win_ibar
Definition: mutt_menu.h:96
static void mix_entry(char *buf, size_t buflen, struct Menu *menu, int num)
Format a menu item for the mixmaster chain list.
Definition: remailer.c:514
Window has a fixed size.
Definition: mutt_window.h:42
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
Definition: list.c:65
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:91
struct MuttWindow * mutt_window_new(enum MuttWindowOrientation orient, enum MuttWindowSize size, int rows, int cols)
Create a new Window.
Definition: mutt_window.c:57
bool notify_observer_remove(struct Notify *notify, observer_t callback, void *global_data)
Remove an observer from an object.
Definition: notify.c:186
#define MUTT_WIN_SIZE_UNLIMITED
Use as much space as possible.
Definition: mutt_window.h:47
short rows
Number of rows, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:55
char * shortname
Definition: remailer.h:53
#define STAILQ_FOREACH(var, head, field)
Definition: queue.h:349
int pagelen
Number of entries per screen.
Definition: mutt_menu.h:92
struct Notify * notify
Notifications handler.
Definition: neomutt.h:37
size_t cl
Definition: remailer.h:64
#define MIX_CAP_MIDDLEMAN
Definition: remailer.h:43
int max
Number of entries in the menu.
Definition: mutt_menu.h:88
void mutt_window_add_child(struct MuttWindow *parent, struct MuttWindow *child)
Add a child to Window.
Definition: mutt_window.c:471
int(* menu_tag)(struct Menu *menu, int sel, int act)
Tag some menu items.
Definition: mutt_menu.h:137
MuttRedrawFlags redraw
When to redraw the screen.
Definition: mutt_menu.h:89
char * title
Title of this menu.
Definition: mutt_menu.h:84
static void mix_type2_list_free(struct Remailer ***ttlp)
Free a Remailer List.
Definition: remailer.c:265
int mutt_dlg_mixmaster_observer(struct NotifyCallback *nc)
Listen for config changes affecting the Mixmaster menu - Implements observer_t()
Definition: remailer.c:563
char * data
String.
Definition: list.h:35
char * mutt_str_strdup(const char *str)
Copy a string, safely.
Definition: string.c:380
#define mutt_error(...)
Definition: logging.h:84
#define FREE(x)
Definition: memory.h:40
void * data
Extra data for the current menu.
Definition: mutt_menu.h:86
static void mix_redraw_head(struct MuttWindow *win, struct MixChain *chain)
Redraw the Chain info.
Definition: remailer.c:379
static int mix_chain_add(struct MixChain *chain, const char *s, struct Remailer **type2_list)
Add a host to the chain.
Definition: remailer.c:530
int current
Current entry.
Definition: mutt_menu.h:87
struct MuttWindow * win_index
Definition: mutt_menu.h:95
char * mutt_compile_help(char *buf, size_t buflen, enum MenuType menu, const struct Mapping *items)
Create the text for the help menu.
Definition: help.c:115
A List node for strings.
Definition: list.h:33
Window wants as much space as possible.
Definition: mutt_window.h:43
static void mix_screen_coordinates(struct MuttWindow *win, struct Remailer **type2_list, struct Coord **coordsp, struct MixChain *chain, int i)
Get the screen coordinates to place a chain.
Definition: remailer.c:283
static struct Remailer ** mix_type2_list(size_t *l)
parse the type2.list as given by mixmaster -T
Definition: remailer.c:175
Index Bar containing status info about the Index.
Definition: mutt_window.h:73
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition: mutt_window.h:101
char * help
Quickref for the current menu.
Definition: mutt_menu.h:85
#define MAX_MIXES
Definition: remailer.h:38
Screen coordinates.
Definition: remailer.c:68
static const struct Mapping RemailerHelp[]
Definition: remailer.c:74
A Mixmaster remailer.
Definition: remailer.h:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mix_check_message()

int mix_check_message ( struct Email e)

Safety-check the message before passing it to mixmaster.

Parameters
eEmail
Return values
0Success
-1Error

Definition at line 848 of file remailer.c.

849 {
850  bool need_hostname = false;
851 
852  if (!TAILQ_EMPTY(&e->env->cc) || !TAILQ_EMPTY(&e->env->bcc))
853  {
854  mutt_error(_("Mixmaster doesn't accept Cc or Bcc headers"));
855  return -1;
856  }
857 
858  /* When using mixmaster, we MUST qualify any addresses since
859  * the message will be delivered through remote systems.
860  *
861  * use_domain won't be respected at this point, hidden_host will.
862  */
863 
864  struct Address *a = NULL;
865  TAILQ_FOREACH(a, &e->env->to, entries)
866  {
867  if (!a->group && !strchr(a->mailbox, '@'))
868  {
869  need_hostname = true;
870  break;
871  }
872  }
873 
874  if (need_hostname)
875  {
876  const char *fqdn = mutt_fqdn(true);
877  if (!fqdn)
878  {
879  mutt_error(_("Please set the hostname variable to a proper value when "
880  "using mixmaster"));
881  return -1;
882  }
883 
884  /* Cc and Bcc are empty at this point. */
885  mutt_addrlist_qualify(&e->env->to, fqdn);
886  mutt_addrlist_qualify(&e->env->reply_to, fqdn);
888  }
889 
890  return 0;
891 }
struct AddressList mail_followup_to
Email&#39;s &#39;mail-followup-to&#39;.
Definition: envelope.h:63
#define TAILQ_FOREACH(var, head, field)
Definition: queue.h:718
struct AddressList reply_to
Email&#39;s &#39;reply-to&#39;.
Definition: envelope.h:62
struct AddressList bcc
Email&#39;s &#39;Bcc&#39; list.
Definition: envelope.h:60
#define _(a)
Definition: message.h:28
An email address.
Definition: address.h:34
char * mailbox
Mailbox and host address.
Definition: address.h:37
struct Envelope * env
Envelope information.
Definition: email.h:89
struct AddressList cc
Email&#39;s &#39;Cc&#39; list.
Definition: envelope.h:59
const char * mutt_fqdn(bool may_hide_host)
Get the Fully-Qualified Domain Name.
Definition: sendlib.c:2531
void mutt_addrlist_qualify(struct AddressList *al, const char *host)
Expand local names in an Address list using a hostname.
Definition: address.c:641
bool group
Group mailbox?
Definition: address.h:38
#define mutt_error(...)
Definition: logging.h:84
struct AddressList to
Email&#39;s &#39;To&#39; list.
Definition: envelope.h:58
#define TAILQ_EMPTY(head)
Definition: queue.h:714
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mix_send_message()

int mix_send_message ( struct ListHead *  chain,
const char *  tempfile 
)

Send an email via Mixmaster.

Parameters
chainString list of hosts
tempfileTemporary file containing email
Return values
-1Error
>=0Success (Mixmaster's return code)

Definition at line 900 of file remailer.c.

901 {
902  int i = 0;
903  struct Buffer *cmd = mutt_buffer_pool_get();
904  struct Buffer *cd_quoted = mutt_buffer_pool_get();
905 
906  mutt_buffer_printf(cmd, "cat %s | %s -m ", tempfile, C_Mixmaster);
907 
908  struct ListNode *np = NULL;
909  STAILQ_FOREACH(np, chain, entries)
910  {
911  mutt_buffer_addstr(cmd, (i != 0) ? "," : " -l ");
912  mutt_buffer_quote_filename(cd_quoted, (char *) np->data, true);
913  mutt_buffer_addstr(cmd, mutt_b2s(cd_quoted));
914  i = 1;
915  }
916 
917  mutt_endwin();
918 
919  i = mutt_system(cmd->data);
920  if (i != 0)
921  {
922  fprintf(stderr, _("Error sending message, child exited %d.\n"), i);
923  if (!OptNoCurses)
924  {
926  mutt_error(_("Error sending message"));
927  }
928  }
929 
931  mutt_buffer_pool_release(&cd_quoted);
932  unlink(tempfile);
933  return i;
934 }
void mutt_buffer_quote_filename(struct Buffer *buf, const char *filename, bool add_outer)
Quote a filename to survive the shell&#39;s quoting rules.
Definition: file.c:834
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
Definition: pool.c:101
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
Definition: pool.c:112
String manipulation buffer.
Definition: buffer.h:33
#define _(a)
Definition: message.h:28
WHERE bool OptNoCurses
(pseudo) when sending in batch mode
Definition: options.h:46
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:160
char * C_Mixmaster
Config: (mixmaster) External command to route a mixmaster message.
Definition: remailer.c:59
size_t mutt_buffer_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
Definition: buffer.c:225
#define mutt_b2s(buf)
Definition: buffer.h:41
void mutt_endwin(void)
Shutdown curses/slang.
Definition: curs_lib.c:545
char * data
Pointer to data.
Definition: buffer.h:35
#define STAILQ_FOREACH(var, head, field)
Definition: queue.h:349
int mutt_any_key_to_continue(const char *s)
Prompt the user to &#39;press any key&#39; and wait.
Definition: curs_lib.c:578
char * data
String.
Definition: list.h:35
#define mutt_error(...)
Definition: logging.h:84
A List node for strings.
Definition: list.h:33
int mutt_system(const char *cmd)
Run an external command.
Definition: system.c:52
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ C_MixEntryFormat

char* C_MixEntryFormat

Config: (mixmaster) printf-like format string for the mixmaster chain.

Definition at line 58 of file remailer.c.

◆ C_Mixmaster

char* C_Mixmaster

Config: (mixmaster) External command to route a mixmaster message.

Definition at line 59 of file remailer.c.

◆ RemailerHelp

const struct Mapping RemailerHelp[]
static
Initial value:
= {
{ N_("Append"), OP_MIX_APPEND }, { N_("Insert"), OP_MIX_INSERT },
{ N_("Delete"), OP_MIX_DELETE }, { N_("Abort"), OP_EXIT },
{ N_("OK"), OP_MIX_USE }, { NULL, 0 },
}
#define N_(a)
Definition: message.h:32

Definition at line 74 of file remailer.c.