NeoMutt  2020-03-20-65-g141838
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 "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 "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, unsigned long 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_strdup(_("<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_strdup(t);
220 
221  t = strtok(NULL, " \t\n");
222  if (!t)
223  goto problem;
224 
225  p->addr = mutt_str_strdup(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_strdup(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
#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
char * mutt_str_strdup(const char *str)
Copy a string, safely.
Definition: string.c:380
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:602
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:58
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:93
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].r, coords[i].c, 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
#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:292
int mutt_window_addstr(const char *str)
Write a string to a Window.
Definition: mutt_window.c:430
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, i, 0);
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:134
#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:278
+ 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, MIX_VOFFSET - 1, 0,
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:134
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:311
+ 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,
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 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, attach_format_str, data,
501  }
502  else if (flags & MUTT_FORMAT_OPTIONAL)
503  {
504  mutt_expando_format(buf, buflen, col, cols, else_str, attach_format_str,
505  data, MUTT_FORMAT_NO_FLAGS);
506  }
507  return src;
508 }
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:863
#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:473
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_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->data;
520  mutt_expando_format(buf, buflen, 0, menu->win_index->state.cols,
522  (unsigned long) type2_list[num], MUTT_FORMAT_ARROWCURSOR);
523 }
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:863
#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:446
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:58
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:93
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 533 of file remailer.c.

534 {
535  int i;
536 
537  if (chain->cl >= MAX_MIXES)
538  return -1;
539 
540  if ((mutt_str_strcmp(s, "0") == 0) || (mutt_str_strcasecmp(s, "<random>") == 0))
541  {
542  chain->ch[chain->cl++] = 0;
543  return 0;
544  }
545 
546  for (i = 0; type2_list[i]; i++)
547  {
548  if (mutt_str_strcasecmp(s, type2_list[i]->shortname) == 0)
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 }
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:651
int mutt_str_strcmp(const char *a, const char *b)
Compare two strings, safely.
Definition: string.c:638
#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_strcmp(ec->name, "status_on_top") != 0)
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 }
WHERE bool C_StatusOnTop
Config: Display the status bar at the top.
Definition: globals.h:252
#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:88
An Index Window containing a selection list.
Definition: mutt_window.h:74
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.
Definition: notify_type.h:34
void mutt_window_reflow(struct MuttWindow *win)
Resize a Window and its children.
Definition: mutt_window.c:345
struct MuttWindowList children
Children Windows.
Definition: mutt_window.h:101
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition: mutt_window.h:103
const char * name
Name of config item that changed.
Definition: subset.h:73
int mutt_str_strcmp(const char *a, const char *b)
Compare two strings, safely.
Definition: string.c:638
+ 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 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 #ifdef USE_DEBUG_WINDOW
644  dlg->name = "remailer";
645 #endif
646  dlg->type = WT_DIALOG;
647  struct MuttWindow *index =
650  index->type = WT_INDEX;
651  struct MuttWindow *ibar = mutt_window_new(
653  ibar->type = WT_INDEX_BAR;
654 
655  if (C_StatusOnTop)
656  {
657  mutt_window_add_child(dlg, ibar);
658  mutt_window_add_child(dlg, index);
659  }
660  else
661  {
662  mutt_window_add_child(dlg, index);
663  mutt_window_add_child(dlg, ibar);
664  }
665 
667  dialog_push(dlg);
668 
669  menu = mutt_menu_new(MENU_MIX);
670  menu->pagelen = index->state.rows;
671  menu->win_index = index;
672  menu->win_ibar = ibar;
673 
674  menu->max = ttll;
675  menu->make_entry = mix_make_entry;
676  menu->tag = NULL;
677  menu->title = _("Select a remailer chain");
678  menu->data = type2_list;
679  menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_MIX, RemailerHelp);
680  menu->pagelen = MIX_VOFFSET - 1;
682 
683  while (loop)
684  {
685  if (menu->pagelen != MIX_VOFFSET - 1)
686  {
687  menu->pagelen = MIX_VOFFSET - 1;
688  menu->redraw = REDRAW_FULL;
689  }
690 
691  if (c_redraw)
692  {
693  mix_redraw_head(menu->win_index, chain);
694  mix_redraw_chain(menu->win_index, type2_list, coords, chain, c_cur);
695  c_redraw = false;
696  }
697  else if (c_cur != c_old)
698  {
699  mix_redraw_ce(menu->win_index, type2_list, coords, chain, c_old, false);
700  mix_redraw_ce(menu->win_index, type2_list, coords, chain, c_cur, true);
701  }
702 
703  c_old = c_cur;
704 
705  const int op = mutt_menu_loop(menu);
706  switch (op)
707  {
708  case OP_REDRAW:
709  {
710  menu_redraw_status(menu);
711  mix_redraw_head(menu->win_index, chain);
712  mix_screen_coordinates(menu->win_index, type2_list, &coords, chain, 0);
713  mix_redraw_chain(menu->win_index, type2_list, coords, chain, c_cur);
714  menu->pagelen = MIX_VOFFSET - 1;
715  break;
716  }
717 
718  case OP_EXIT:
719  {
720  chain->cl = 0;
721  loop = false;
722  break;
723  }
724 
725  case OP_MIX_USE:
726  {
727  if (!chain->cl)
728  {
729  chain->cl++;
730  chain->ch[0] = menu->current;
731  mix_screen_coordinates(menu->win_index, type2_list, &coords, chain, c_cur);
732  c_redraw = true;
733  }
734 
735  if (chain->cl && chain->ch[chain->cl - 1] &&
736  (type2_list[chain->ch[chain->cl - 1]]->caps & MIX_CAP_MIDDLEMAN))
737  {
738  mutt_error(
739  _("Error: %s can't be used as the final remailer of a chain"),
740  type2_list[chain->ch[chain->cl - 1]]->shortname);
741  }
742  else
743  {
744  loop = false;
745  }
746  break;
747  }
748 
749  case OP_GENERIC_SELECT_ENTRY:
750  case OP_MIX_APPEND:
751  {
752  if ((chain->cl < MAX_MIXES) && (c_cur < chain->cl))
753  c_cur++;
754  }
755  /* fallthrough */
756  case OP_MIX_INSERT:
757  {
758  if (chain->cl < MAX_MIXES)
759  {
760  chain->cl++;
761  for (int i = chain->cl - 1; i > c_cur; i--)
762  chain->ch[i] = chain->ch[i - 1];
763 
764  chain->ch[c_cur] = menu->current;
765  mix_screen_coordinates(menu->win_index, type2_list, &coords, chain, c_cur);
766  c_redraw = true;
767  }
768  else
769  {
770  /* L10N The '%d' here hard-coded to 19 */
771  mutt_error(_("Mixmaster chains are limited to %d elements"), MAX_MIXES);
772  }
773 
774  break;
775  }
776 
777  case OP_MIX_DELETE:
778  {
779  if (chain->cl)
780  {
781  chain->cl--;
782 
783  for (int i = c_cur; i < chain->cl; i++)
784  chain->ch[i] = chain->ch[i + 1];
785 
786  if ((c_cur == chain->cl) && c_cur)
787  c_cur--;
788 
789  mix_screen_coordinates(menu->win_index, type2_list, &coords, chain, c_cur);
790  c_redraw = true;
791  }
792  else
793  {
794  mutt_error(_("The remailer chain is already empty"));
795  }
796  break;
797  }
798 
799  case OP_MIX_CHAIN_PREV:
800  {
801  if (c_cur)
802  c_cur--;
803  else
804  mutt_error(_("You already have the first chain element selected"));
805 
806  break;
807  }
808 
809  case OP_MIX_CHAIN_NEXT:
810  {
811  if (chain->cl && (c_cur < chain->cl - 1))
812  c_cur++;
813  else
814  mutt_error(_("You already have the last chain element selected"));
815 
816  break;
817  }
818  }
819  }
820 
821  mutt_menu_pop_current(menu);
822  mutt_menu_free(&menu);
823  dialog_pop();
825  mutt_window_free(&dlg);
826 
827  /* construct the remailer list */
828 
829  if (chain->cl)
830  {
831  for (int i = 0; i < chain->cl; i++)
832  {
833  const int j = chain->ch[i];
834  if (j != 0)
835  t = type2_list[j]->shortname;
836  else
837  t = "*";
838 
839  mutt_list_insert_tail(chainhead, mutt_str_strdup(t));
840  }
841  }
842 
843  mix_type2_list_free(&type2_list);
844  FREE(&coords);
845  FREE(&chain);
846 }
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
WHERE bool C_StatusOnTop
Config: Display the status bar at the top.
Definition: globals.h:252
#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
if(!test_colorize_)
Definition: acutest.h:484
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:70
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:628
void dialog_push(struct MuttWindow *dlg)
Display a Window to the user.
Definition: mutt_window.c:605
MixCapFlags caps
Definition: remailer.h:56
#define _(a)
Definition: message.h:28
A division of the screen.
Definition: mutt_window.h:88
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:35
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
Definition: list.c:123
An Index Window containing a selection list.
Definition: mutt_window.h:74
void mutt_window_free(struct MuttWindow **ptr)
Free a Window and its children.
Definition: mutt_window.c:74
struct MuttWindow * win_ibar
Definition: mutt_menu.h:96
const char * title
Title of this menu.
Definition: mutt_menu.h:84
Window has a fixed size.
Definition: mutt_window.h:44
const char * help
Quickref for the current menu.
Definition: mutt_menu.h:85
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:65
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:93
struct MuttWindow * mutt_window_new(enum MuttWindowOrientation orient, enum MuttWindowSize size, int rows, int cols)
Create a new Window.
Definition: mutt_window.c:56
#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:57
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:139
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
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:88
void mutt_window_add_child(struct MuttWindow *parent, struct MuttWindow *child)
Add a child to Window.
Definition: mutt_window.c:473
MuttRedrawFlags redraw
When to redraw the screen.
Definition: mutt_menu.h:89
static void mix_type2_list_free(struct Remailer ***ttlp)
Free a Remailer List.
Definition: remailer.c:264
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
Create/edit a Mixmaster chain.
Definition: keymap.h:88
#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: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
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:116
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:33
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:75
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition: mutt_window.h:103
void(* make_entry)(char *buf, size_t buflen, struct Menu *menu, int line)
Format a item for a menu.
Definition: mutt_menu.h:120
#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 854 of file remailer.c.

855 {
856  bool need_hostname = false;
857 
858  if (!TAILQ_EMPTY(&e->env->cc) || !TAILQ_EMPTY(&e->env->bcc))
859  {
860  mutt_error(_("Mixmaster doesn't accept Cc or Bcc headers"));
861  return -1;
862  }
863 
864  /* When using mixmaster, we MUST qualify any addresses since
865  * the message will be delivered through remote systems.
866  *
867  * use_domain won't be respected at this point, hidden_host will.
868  */
869 
870  struct Address *a = NULL;
871  TAILQ_FOREACH(a, &e->env->to, entries)
872  {
873  if (!a->group && !strchr(a->mailbox, '@'))
874  {
875  need_hostname = true;
876  break;
877  }
878  }
879 
880  if (need_hostname)
881  {
882  const char *fqdn = mutt_fqdn(true);
883  if (!fqdn)
884  {
885  mutt_error(_("Please set the hostname variable to a proper value when "
886  "using mixmaster"));
887  return -1;
888  }
889 
890  /* Cc and Bcc are empty at this point. */
891  mutt_addrlist_qualify(&e->env->to, fqdn);
892  mutt_addrlist_qualify(&e->env->reply_to, fqdn);
894  }
895 
896  return 0;
897 }
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:2526
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 906 of file remailer.c.

907 {
908  int i = 0;
909  struct Buffer *cmd = mutt_buffer_pool_get();
910  struct Buffer *cd_quoted = mutt_buffer_pool_get();
911 
912  mutt_buffer_printf(cmd, "cat %s | %s -m ", tempfile, C_Mixmaster);
913 
914  struct ListNode *np = NULL;
915  STAILQ_FOREACH(np, chain, entries)
916  {
917  mutt_buffer_addstr(cmd, (i != 0) ? "," : " -l ");
918  mutt_buffer_quote_filename(cd_quoted, (char *) np->data, true);
919  mutt_buffer_addstr(cmd, mutt_b2s(cd_quoted));
920  i = 1;
921  }
922 
923  mutt_endwin();
924 
925  i = mutt_system(cmd->data);
926  if (i != 0)
927  {
928  fprintf(stderr, _("Error sending message, child exited %d.\n"), i);
929  if (!OptNoCurses)
930  {
932  mutt_error(_("Error sending message"));
933  }
934  }
935 
937  mutt_buffer_pool_release(&cd_quoted);
938  unlink(tempfile);
939  return i;
940 }
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:837
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:49
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:547
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:580
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: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.