NeoMutt  2020-06-26-89-g172cd3
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/lib.h"
#include "address/lib.h"
#include "config/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "mutt.h"
#include "format_flags.h"
#include "keymap.h"
#include "mutt_globals.h"
#include "mutt_menu.h"
#include "muttlib.h"
#include "opcodes.h"
#include "options.h"
#include "protos.h"
#include "recvattach.h"
#include "send/lib.h"
#include "remailer.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, intptr_t data, MuttFormatFlags flags)
 Format a string for the remailer menu - Implements format_t. More...
 
static void mix_make_entry (char *buf, size_t buflen, struct Menu *menu, int num)
 Format a menu item for the mixmaster chain list - Implements Menu::make_entry() More...
 
static int mix_chain_add (struct MixChain *chain, const char *s, struct Remailer **type2_list)
 Add a host to the chain. More...
 
static 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 = filter_create_fd(mutt_b2s(cmd), NULL, &fp, NULL, fd_null, -1, fd_null);
196  if (mm_pid == -1)
197  {
199  close(fd_null);
200  return NULL;
201  }
202 
204 
205  /* first, generate the "random" remailer */
206 
207  p = remailer_new();
208  p->shortname = mutt_str_dup(_("<random>"));
209  mix_add_entry(&type2_list, p, &slots, &used);
210 
211  while (fgets(line, sizeof(line), fp))
212  {
213  p = remailer_new();
214 
215  t = strtok(line, " \t\n");
216  if (!t)
217  goto problem;
218 
219  p->shortname = mutt_str_dup(t);
220 
221  t = strtok(NULL, " \t\n");
222  if (!t)
223  goto problem;
224 
225  p->addr = mutt_str_dup(t);
226 
227  t = strtok(NULL, " \t\n");
228  if (!t)
229  goto problem;
230 
231  t = strtok(NULL, " \t\n");
232  if (!t)
233  goto problem;
234 
235  p->ver = mutt_str_dup(t);
236 
237  t = strtok(NULL, " \t\n");
238  if (!t)
239  goto problem;
240 
241  p->caps = mix_get_caps(t);
242 
243  mix_add_entry(&type2_list, p, &slots, &used);
244  continue;
245 
246  problem:
247  remailer_free(&p);
248  }
249 
250  *l = used;
251 
252  mix_add_entry(&type2_list, NULL, &slots, &used);
253  filter_wait(mm_pid);
254 
255  close(fd_null);
256 
257  return type2_list;
258 }
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
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition: string.c:375
#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
char * shortname
Definition: remailer.h:53
static MixCapFlags mix_get_caps(const char *capstr)
Get Mixmaster Capabilities.
Definition: remailer.c:85
pid_t filter_create_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:61
static struct Remailer * remailer_new(void)
Create a new Remailer.
Definition: remailer.c:148
int const char int line
Definition: acutest.h:617
char * addr
Definition: remailer.h:54
int filter_wait(pid_t pid)
Wait for the exit of a process and return its status.
Definition: filter.c:217
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 264 of file remailer.c.

265 {
266  struct Remailer **type2_list = *ttlp;
267 
268  for (int i = 0; type2_list[i]; i++)
269  remailer_free(&type2_list[i]);
270 
271  FREE(type2_list);
272 }
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 282 of file remailer.c.

284 {
285  if (!chain->cl)
286  return;
287 
288  short c, r;
289 
290  mutt_mem_realloc(coordsp, sizeof(struct Coord) * chain->cl);
291 
292  struct Coord *coords = *coordsp;
293 
294  if (i)
295  {
296  c = coords[i - 1].c + strlen(type2_list[chain->ch[i - 1]]->shortname) + 2;
297  r = coords[i - 1].r;
298  }
299  else
300  {
301  r = MIX_VOFFSET;
302  c = MIX_HOFFSET;
303  }
304 
305  for (; i < chain->cl; i++)
306  {
307  short oc = c;
308  c += strlen(type2_list[chain->ch[i]]->shortname) + 2;
309 
310  if (c >= win->state.cols)
311  {
312  oc = MIX_HOFFSET;
313  c = MIX_HOFFSET;
314  r++;
315  }
316 
317  coords[i].c = oc;
318  coords[i].r = r;
319  }
320 }
#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:57
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:119
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 331 of file remailer.c.

333 {
334  if (!coords || !chain)
335  return;
336 
337  if (coords[i].r < MIX_MAXROW)
338  {
339  if (selected)
341  else
343 
344  mutt_window_mvaddstr(win, coords[i].c, coords[i].r, type2_list[chain->ch[i]]->shortname);
346 
347  if (i + 1 < chain->cl)
348  mutt_window_addstr(", ");
349  }
350 }
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
int mutt_window_mvaddstr(struct MuttWindow *win, int col, int row, const char *str)
Move the cursor and write a fixed string to a Window.
Definition: mutt_window.c:376
#define MIX_MAXROW
Definition: remailer.c:63
Plain text.
Definition: color.h:77
Selected item in list.
Definition: color.h:73
char * shortname
Definition: remailer.h:53
size_t cl
Definition: remailer.h:64
int mutt_window_addstr(const char *str)
Write a string to a Window.
Definition: mutt_window.c:518
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 360 of file remailer.c.

362 {
363  for (int i = MIX_VOFFSET; i < MIX_MAXROW; i++)
364  {
365  mutt_window_move(win, 0, i);
367  }
368 
369  for (int i = 0; i < chain->cl; i++)
370  mix_redraw_ce(win, type2_list, coords, chain, i, i == cur);
371 }
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:331
#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:216
int mutt_window_move(struct MuttWindow *win, int col, int row)
Move the cursor in a Window.
Definition: mutt_window.c:362
#define MIX_MAXROW
Definition: remailer.c:63
size_t cl
Definition: remailer.h:64
+ 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 378 of file remailer.c.

379 {
381  mutt_window_mvprintw(win, 0, MIX_VOFFSET - 1,
382  "-- Remailer chain [Length: %d]", chain ? chain->cl : 0);
385 }
#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:216
Plain text.
Definition: color.h:77
Status bar (takes a pattern)
Definition: color.h:94
size_t cl
Definition: remailer.h:64
int mutt_window_mvprintw(struct MuttWindow *win, int col, int row, const char *fmt,...)
Move the cursor and write a formatted string to a Window.
Definition: mutt_window.c:395
+ 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 394 of file remailer.c.

395 {
396  static char capbuf[10];
397  char *t = capbuf;
398 
399  if (r->caps & MIX_CAP_COMPRESS)
400  *t++ = 'C';
401  else
402  *t++ = ' ';
403 
404  if (r->caps & MIX_CAP_MIDDLEMAN)
405  *t++ = 'M';
406  else
407  *t++ = ' ';
408 
409  if (r->caps & MIX_CAP_NEWSPOST)
410  {
411  *t++ = 'N';
412  *t++ = 'p';
413  }
414  else
415  {
416  *t++ = ' ';
417  *t++ = ' ';
418  }
419 
420  if (r->caps & MIX_CAP_NEWSMAIL)
421  {
422  *t++ = 'N';
423  *t++ = 'm';
424  }
425  else
426  {
427  *t++ = ' ';
428  *t++ = ' ';
429  }
430 
431  *t = '\0';
432 
433  return capbuf;
434 }
#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,
intptr_t  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 446 of file remailer.c.

450 {
451  char fmt[128];
452  struct Remailer *remailer = (struct Remailer *) data;
453  bool optional = (flags & MUTT_FORMAT_OPTIONAL);
454 
455  switch (op)
456  {
457  case 'a':
458  if (!optional)
459  {
460  snprintf(fmt, sizeof(fmt), "%%%ss", prec);
461  snprintf(buf, buflen, fmt, NONULL(remailer->addr));
462  }
463  else if (!remailer->addr)
464  optional = false;
465  break;
466 
467  case 'c':
468  if (optional)
469  break;
470 
471  snprintf(fmt, sizeof(fmt), "%%%ss", prec);
472  snprintf(buf, buflen, fmt, mix_format_caps(remailer));
473  break;
474 
475  case 'n':
476  if (optional)
477  break;
478 
479  snprintf(fmt, sizeof(fmt), "%%%sd", prec);
480  snprintf(buf, buflen, fmt, remailer->num);
481  break;
482 
483  case 's':
484  if (!optional)
485  {
486  snprintf(fmt, sizeof(fmt), "%%%ss", prec);
487  snprintf(buf, buflen, fmt, NONULL(remailer->shortname));
488  }
489  else if (!remailer->shortname)
490  optional = false;
491  break;
492 
493  default:
494  *buf = '\0';
495  }
496 
497  if (optional)
498  {
499  mutt_expando_format(buf, buflen, col, cols, if_str, mix_format_str, data,
501  }
502  else if (flags & MUTT_FORMAT_OPTIONAL)
503  {
504  mutt_expando_format(buf, buflen, col, cols, else_str, mix_format_str, data,
506  }
507  return src;
508 }
#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:394
static int const char * fmt
Definition: acutest.h:488
int num
Definition: remailer.h:52
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
Definition: format_flags.h:30
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t *callback, intptr_t data, MuttFormatFlags flags)
Expand expandos (x) in a string.
Definition: muttlib.c:772
char * shortname
Definition: remailer.h:53
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, intptr_t data, MuttFormatFlags flags)
Format a string for the remailer menu - Implements format_t.
Definition: remailer.c:446
#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_make_entry()

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

Format a menu item for the mixmaster chain list - Implements Menu::make_entry()

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

Definition at line 517 of file remailer.c.

518 {
519  struct Remailer **type2_list = menu->mdata;
520  mutt_expando_format(buf, buflen, 0, menu->win_index->state.cols,
522  (intptr_t) type2_list[num], MUTT_FORMAT_ARROWCURSOR);
523 }
#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
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t *callback, intptr_t data, MuttFormatFlags flags)
Expand expandos (x) in a string.
Definition: muttlib.c:772
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:57
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:119
void * mdata
Extra data for the current menu.
Definition: mutt_menu.h:84
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, intptr_t data, MuttFormatFlags flags)
Format a string for the remailer menu - Implements format_t.
Definition: remailer.c:446
struct MuttWindow * win_index
Definition: mutt_menu.h:92
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 533 of file remailer.c.

534 {
535  int i;
536 
537  if (chain->cl >= MAX_MIXES)
538  return -1;
539 
540  if (mutt_str_equal(s, "0") || mutt_istr_equal(s, "<random>"))
541  {
542  chain->ch[chain->cl++] = 0;
543  return 0;
544  }
545 
546  for (i = 0; type2_list[i]; i++)
547  {
548  if (mutt_istr_equal(s, type2_list[i]->shortname))
549  {
550  chain->ch[chain->cl++] = i;
551  return 0;
552  }
553  }
554 
555  /* replace unknown remailers by <random> */
556 
557  if (!type2_list[i])
558  chain->ch[chain->cl++] = 0;
559 
560  return 0;
561 }
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:876
int ch[MAX_MIXES]
Definition: remailer.h:65
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
Definition: string.c:888
char * shortname
Definition: remailer.h:53
size_t cl
Definition: remailer.h:64
#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()

static int mutt_dlg_mixmaster_observer ( struct NotifyCallback nc)
static

Listen for config changes affecting the Mixmaster menu - Implements observer_t.

Definition at line 566 of file remailer.c.

567 {
568  if (!nc->event_data || !nc->global_data)
569  return -1;
570  if (nc->event_type != NT_CONFIG)
571  return 0;
572 
573  struct EventConfig *ec = nc->event_data;
574  struct MuttWindow *dlg = nc->global_data;
575 
576  if (!mutt_str_equal(ec->name, "status_on_top"))
577  return 0;
578 
579  struct MuttWindow *win_first = TAILQ_FIRST(&dlg->children);
580 
581  if ((C_StatusOnTop && (win_first->type == WT_INDEX)) ||
582  (!C_StatusOnTop && (win_first->type != WT_INDEX)))
583  {
584  // Swap the Index and the IndexBar Windows
585  TAILQ_REMOVE(&dlg->children, win_first, entries);
586  TAILQ_INSERT_TAIL(&dlg->children, win_first, entries);
587  }
588 
589  mutt_window_reflow(dlg);
590  return 0;
591 }
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:876
#define TAILQ_FIRST(head)
Definition: queue.h:716
A config-change event.
Definition: subset.h:70
A division of the screen.
Definition: mutt_window.h:114
An Index Window containing a selection list.
Definition: mutt_window.h:93
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
Definition: observer.h:41
void * global_data
Data from notify_observer_add()
Definition: observer.h:44
#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:43
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:36
void mutt_window_reflow(struct MuttWindow *win)
Resize a Window and its children.
Definition: mutt_window.c:429
WHERE bool C_StatusOnTop
Config: Display the status bar at the top.
Definition: mutt_globals.h:166
struct MuttWindowList children
Children Windows.
Definition: mutt_window.h:128
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition: mutt_window.h:132
const char * name
Name of config item that changed.
Definition: subset.h:73
+ 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 of chain links
colsNumber of screen columns

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

Definition at line 601 of file remailer.c.

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

852 {
853  bool need_hostname = false;
854 
855  if (!TAILQ_EMPTY(&e->env->cc) || !TAILQ_EMPTY(&e->env->bcc))
856  {
857  mutt_error(_("Mixmaster doesn't accept Cc or Bcc headers"));
858  return -1;
859  }
860 
861  /* When using mixmaster, we MUST qualify any addresses since
862  * the message will be delivered through remote systems.
863  *
864  * use_domain won't be respected at this point, hidden_host will.
865  */
866 
867  struct Address *a = NULL;
868  TAILQ_FOREACH(a, &e->env->to, entries)
869  {
870  if (!a->group && !strchr(a->mailbox, '@'))
871  {
872  need_hostname = true;
873  break;
874  }
875  }
876 
877  if (need_hostname)
878  {
879  const char *fqdn = mutt_fqdn(true, NeoMutt->sub);
880  if (!fqdn)
881  {
882  mutt_error(_("Please set the hostname variable to a proper value when "
883  "using mixmaster"));
884  return -1;
885  }
886 
887  /* Cc and Bcc are empty at this point. */
888  mutt_addrlist_qualify(&e->env->to, fqdn);
889  mutt_addrlist_qualify(&e->env->reply_to, fqdn);
891  }
892 
893  return 0;
894 }
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
Container for Accounts, Notifications.
Definition: neomutt.h:36
struct Envelope * env
Envelope information.
Definition: email.h:89
struct AddressList cc
Email&#39;s &#39;Cc&#39; list.
Definition: envelope.h:59
void mutt_addrlist_qualify(struct AddressList *al, const char *host)
Expand local names in an Address list using a hostname.
Definition: address.c:650
const char * mutt_fqdn(bool may_hide_host, const struct ConfigSubset *sub)
Get the Fully-Qualified Domain Name.
Definition: sendlib.c:1179
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
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
#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 903 of file remailer.c.

904 {
905  int i = 0;
906  struct Buffer *cmd = mutt_buffer_pool_get();
907  struct Buffer *cd_quoted = mutt_buffer_pool_get();
908 
909  mutt_buffer_printf(cmd, "cat %s | %s -m ", tempfile, C_Mixmaster);
910 
911  struct ListNode *np = NULL;
912  STAILQ_FOREACH(np, chain, entries)
913  {
914  mutt_buffer_addstr(cmd, (i != 0) ? "," : " -l ");
915  mutt_buffer_quote_filename(cd_quoted, (char *) np->data, true);
916  mutt_buffer_addstr(cmd, mutt_b2s(cd_quoted));
917  i = 1;
918  }
919 
920  mutt_endwin();
921 
922  i = mutt_system(cmd->data);
923  if (i != 0)
924  {
925  fprintf(stderr, _("Error sending message, child exited %d.\n"), i);
926  if (!OptNoCurses)
927  {
929  mutt_error(_("Error sending message"));
930  }
931  }
932 
934  mutt_buffer_pool_release(&cd_quoted);
935  unlink(tempfile);
936  return i;
937 }
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:836
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:48
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:569
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:602
char * data
String.
Definition: list.h:36
#define mutt_error(...)
Definition: logging.h:84
A List node for strings.
Definition: list.h:34
int mutt_system(const char *cmd)
Run an external command.
Definition: system.c:51
+ 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.