tin  2.4.5
About: TIN is a threaded NNTP and spool based UseNet newsreader.
  Fossies Dox: tin-2.4.5.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

post.c File Reference
#include "tin.h"
#include "tcurses.h"
#include "version.h"
Include dependency graph for post.c:

Go to the source code of this file.

Data Structures

struct  msg_header
 

Macros

#define ADD_CAN_KEY(id)
 
#define ADD_MSG_ID_HEADER()
 
#define MAX_MSG_HEADERS   20 /* shouldn't this be dynamic? */
 
#define POST_QUICK   0
 
#define POST_POSTPONED   1
 
#define POST_NORMAL   2
 
#define POST_RESPONSE   3
 
#define POST_REPOST   4
 
#define POST_SUPERSEDED   5
 
#define DISPLAY_SUBJECT_LEN   20
 
#define CA_ERROR_HEADER_LINE_BLANK   0x0000001
 
#define CA_ERROR_MISSING_BODY_SEPARATOR   0x0000002
 
#define CA_ERROR_MISSING_FROM   0x0000004
 
#define CA_ERROR_DUPLICATED_FROM   0x0000008
 
#define CA_ERROR_MISSING_SUBJECT   0x0000010
 
#define CA_ERROR_DUPLICATED_SUBJECT   0x0000020
 
#define CA_ERROR_EMPTY_SUBJECT   0x0000040
 
#define CA_ERROR_MISSING_NEWSGROUPS   0x0000080
 
#define CA_ERROR_DUPLICATED_NEWSGROUPS   0x0000100
 
#define CA_ERROR_EMPTY_NEWSGROUPS   0x0000200
 
#define CA_ERROR_DUPLICATED_FOLLOWUP_TO   0x0000400
 
#define CA_ERROR_BAD_CHARSET   0x0000800
 
#define CA_ERROR_BAD_ENCODING   0x0001000
 
#define CA_ERROR_BAD_MESSAGE_ID   0x0002000
 
#define CA_ERROR_BAD_DATE   0x0004000
 
#define CA_ERROR_BAD_EXPIRES   0x0008000
 
#define CA_ERROR_NEWSGROUPS_NOT_7BIT   0x0010000
 
#define CA_ERROR_FOLLOWUP_TO_NOT_7BIT   0x0020000
 
#define CA_ERROR_DISTRIBUTIOIN_NOT_7BIT   0x0040000
 
#define CA_ERROR_NEWSGROUPS_POSTER   0x0080000
 
#define CA_ERROR_FOLLOWUP_TO_POSTER   0x0100000
 
#define CA_ERROR_SPACE_IN_NEWSGROUPS   0x0200000
 
#define CA_ERROR_NEWLINE_IN_NEWSGROUPS   0x0400000
 
#define CA_ERROR_SPACE_IN_FOLLOWUP_TO   0x0800000
 
#define CA_ERROR_NEWLINE_IN_FOLLOWUP_TO   0x1000000
 
#define CA_WARNING_SPACES_ONLY_SUBJECT   0x000001
 
#define CA_WARNING_RE_WITHOUT_REFERENCES   0x000002
 
#define CA_WARNING_REFERENCES_WITHOUT_RE   0x000004
 
#define CA_WARNING_MULTIPLE_SIGDASHES   0x000008
 
#define CA_WARNING_WRONG_SIGDASHES   0x000010
 
#define CA_WARNING_LONG_SIGNATURE   0x000020
 
#define CA_WARNING_ENCODING_EXTERNAL_INEWS   0x000040
 
#define CA_WARNING_NEWSGROUPS_EXAMPLE   0x000080
 
#define CA_WARNING_FOLLOWUP_TO_EXAMPLE   0x000100
 
#define MAXREFSIZE   512
 
#define FromSameUser   (strcasestr(from_name, arts[respnum].from))
 
#define NotSuperseding   (!supersede || (!FromSameUser) || art_type != GROUP_TYPE_NEWS)
 
#define Superseding   (supersede && FromSameUser && art_type == GROUP_TYPE_NEWS)
 

Functions

static FILE * create_mail_headers (char *filename, size_t filename_len, const char *suffix, const char *to, const char *subject, struct t_header *extra_hdrs)
 
static char ** build_nglist (char *ngs_list, int *ngcnt)
 
static char ** split_address_list (const char *addresses, unsigned int *cnt)
 
static int add_mail_quote (FILE *fp, int respnum)
 
static int append_mail (const char *the_article, const char *addr, const char *the_mailbox)
 
static int check_article_to_be_posted (const char *the_article, int art_type, struct t_group **group, t_bool art_unchanged, t_bool use_cache)
 
static int mail_loop (const char *filename, t_function func, char *subject, const char *groupname, const char *prompt, FILE *articlefp)
 
static int msg_add_x_body (FILE *fp_out, const char *body)
 
static int msg_write_headers (FILE *fp)
 
static int post_loop (int type, struct t_group *group, t_function func, const char *posting_msg, int art_type, int offset)
 
static unsigned int get_recipients (struct t_header *hdr, char *buf, size_t buflen)
 
static size_t skip_id (const char *id)
 
static struct t_groupcheck_moderated (const char *groups, int *art_type, const char *failmsg)
 
static t_bool address_in_list (const char *addresses, const char *address)
 
static t_bool backup_article (const char *the_article)
 
static t_bool check_for_spamtrap (const char *addr)
 
static t_bool create_normal_article_headers (struct t_group *group, const char *newsgroups, int art_type)
 
static t_bool damaged_id (const char *id)
 
static t_bool fetch_postponed_article (const char tmp_file[], char subject[], char newsgroups[])
 
static t_bool insert_from_header (const char *infile)
 
static t_bool is_crosspost (const char *xref)
 
static t_bool must_include (const char *id)
 
static t_bool repair_article (t_function *result, struct t_group *group)
 
static t_bool stripped_double_ngs (char **newsgroups, int *ngcnt)
 
static t_bool submit_mail_file (const char *file, struct t_group *group, FILE *articlefp, t_bool include_text)
 
static t_function prompt_rejected (void)
 
static t_function prompt_to_send (const char *subject)
 
static void add_headers (const char *infile, const char *a_message_id)
 
static void appendid (char **where, const char **what)
 
static void find_reply_to_addr (char *from_addr, t_bool parse, struct t_header *hdr)
 
static void join_references (char *buffer, const char *oldrefs, const char *newref)
 
static void msg_add_header (const char *name, const char *text)
 
static void msg_add_x_headers (const char *headers)
 
static void msg_free_headers (void)
 
static void msg_init_headers (void)
 
static void post_postponed_article (int ask, const char *subject, const char *newsgroups)
 
static void postpone_article (const char *the_article)
 
static void setup_check_article_screen (int *init)
 
static void show_followup_info (void)
 
static void strip_double_ngs (char *ngs_list)
 
static void update_active_after_posting (char *newsgroups)
 
static void update_posted_info_file (const char *group, int action, const char *subj, const char *a_message_id)
 
static void show_cancel_info (void)
 
void init_postinfo (void)
 
char * backup_article_name (const char *the_article)
 
t_bool user_posted_messages (void)
 
void quick_post_article (t_bool postponed_only, int num_cmd_line_groups)
 
int count_postponed_articles (void)
 
t_bool pickup_postponed_articles (t_bool ask, t_bool all)
 
t_bool post_article (const char *groupname)
 
int post_response (const char *groupname, int respnum, t_bool copy_text, t_bool with_headers, t_bool raw_data)
 
int mail_to_someone (const char *address, t_bool confirm_to_mail, t_openartinfo *artinfo, const struct t_group *group)
 
t_bool mail_bug_report (void)
 
int mail_to_author (const char *group, int respnum, t_bool copy_text, t_bool with_headers, t_bool raw_data)
 
t_bool cancel_article (struct t_group *group, struct t_article *art, int respnum)
 
int repost_article (const char *groupname, int respnum, t_bool supersede, t_openartinfo *artinfo)
 
char * checknadd_headers (const char *infile, struct t_group *group)
 
t_bool reread_active_after_posting (void)
 

Variables

static int start_line_offset = 1
 
char bug_addr [1024]
 
static char my_distribution [1024]
 
static char reply_to [1024]
 
static struct msg_header msg_headers [20/*shouldn 't this be dynamic? */]
 

Macro Definition Documentation

◆ ADD_CAN_KEY

#define ADD_CAN_KEY (   id)

Definition at line 87 of file post.c.

◆ ADD_MSG_ID_HEADER

#define ADD_MSG_ID_HEADER ( )

Definition at line 106 of file post.c.

◆ CA_ERROR_BAD_CHARSET

#define CA_ERROR_BAD_CHARSET   0x0000800

Definition at line 766 of file post.c.

◆ CA_ERROR_BAD_DATE

#define CA_ERROR_BAD_DATE   0x0004000

Definition at line 769 of file post.c.

◆ CA_ERROR_BAD_ENCODING

#define CA_ERROR_BAD_ENCODING   0x0001000

Definition at line 767 of file post.c.

◆ CA_ERROR_BAD_EXPIRES

#define CA_ERROR_BAD_EXPIRES   0x0008000

Definition at line 770 of file post.c.

◆ CA_ERROR_BAD_MESSAGE_ID

#define CA_ERROR_BAD_MESSAGE_ID   0x0002000

Definition at line 768 of file post.c.

◆ CA_ERROR_DISTRIBUTIOIN_NOT_7BIT

#define CA_ERROR_DISTRIBUTIOIN_NOT_7BIT   0x0040000

Definition at line 773 of file post.c.

◆ CA_ERROR_DUPLICATED_FOLLOWUP_TO

#define CA_ERROR_DUPLICATED_FOLLOWUP_TO   0x0000400

Definition at line 765 of file post.c.

◆ CA_ERROR_DUPLICATED_FROM

#define CA_ERROR_DUPLICATED_FROM   0x0000008

Definition at line 758 of file post.c.

◆ CA_ERROR_DUPLICATED_NEWSGROUPS

#define CA_ERROR_DUPLICATED_NEWSGROUPS   0x0000100

Definition at line 763 of file post.c.

◆ CA_ERROR_DUPLICATED_SUBJECT

#define CA_ERROR_DUPLICATED_SUBJECT   0x0000020

Definition at line 760 of file post.c.

◆ CA_ERROR_EMPTY_NEWSGROUPS

#define CA_ERROR_EMPTY_NEWSGROUPS   0x0000200

Definition at line 764 of file post.c.

◆ CA_ERROR_EMPTY_SUBJECT

#define CA_ERROR_EMPTY_SUBJECT   0x0000040

Definition at line 761 of file post.c.

◆ CA_ERROR_FOLLOWUP_TO_NOT_7BIT

#define CA_ERROR_FOLLOWUP_TO_NOT_7BIT   0x0020000

Definition at line 772 of file post.c.

◆ CA_ERROR_FOLLOWUP_TO_POSTER

#define CA_ERROR_FOLLOWUP_TO_POSTER   0x0100000

Definition at line 775 of file post.c.

◆ CA_ERROR_HEADER_LINE_BLANK

#define CA_ERROR_HEADER_LINE_BLANK   0x0000001

Definition at line 755 of file post.c.

◆ CA_ERROR_MISSING_BODY_SEPARATOR

#define CA_ERROR_MISSING_BODY_SEPARATOR   0x0000002

Definition at line 756 of file post.c.

◆ CA_ERROR_MISSING_FROM

#define CA_ERROR_MISSING_FROM   0x0000004

Definition at line 757 of file post.c.

◆ CA_ERROR_MISSING_NEWSGROUPS

#define CA_ERROR_MISSING_NEWSGROUPS   0x0000080

Definition at line 762 of file post.c.

◆ CA_ERROR_MISSING_SUBJECT

#define CA_ERROR_MISSING_SUBJECT   0x0000010

Definition at line 759 of file post.c.

◆ CA_ERROR_NEWLINE_IN_FOLLOWUP_TO

#define CA_ERROR_NEWLINE_IN_FOLLOWUP_TO   0x1000000

Definition at line 780 of file post.c.

◆ CA_ERROR_NEWLINE_IN_NEWSGROUPS

#define CA_ERROR_NEWLINE_IN_NEWSGROUPS   0x0400000

Definition at line 778 of file post.c.

◆ CA_ERROR_NEWSGROUPS_NOT_7BIT

#define CA_ERROR_NEWSGROUPS_NOT_7BIT   0x0010000

Definition at line 771 of file post.c.

◆ CA_ERROR_NEWSGROUPS_POSTER

#define CA_ERROR_NEWSGROUPS_POSTER   0x0080000

Definition at line 774 of file post.c.

◆ CA_ERROR_SPACE_IN_FOLLOWUP_TO

#define CA_ERROR_SPACE_IN_FOLLOWUP_TO   0x0800000

Definition at line 779 of file post.c.

◆ CA_ERROR_SPACE_IN_NEWSGROUPS

#define CA_ERROR_SPACE_IN_NEWSGROUPS   0x0200000

Definition at line 777 of file post.c.

◆ CA_WARNING_ENCODING_EXTERNAL_INEWS

#define CA_WARNING_ENCODING_EXTERNAL_INEWS   0x000040

Definition at line 788 of file post.c.

◆ CA_WARNING_FOLLOWUP_TO_EXAMPLE

#define CA_WARNING_FOLLOWUP_TO_EXAMPLE   0x000100

Definition at line 790 of file post.c.

◆ CA_WARNING_LONG_SIGNATURE

#define CA_WARNING_LONG_SIGNATURE   0x000020

Definition at line 787 of file post.c.

◆ CA_WARNING_MULTIPLE_SIGDASHES

#define CA_WARNING_MULTIPLE_SIGDASHES   0x000008

Definition at line 785 of file post.c.

◆ CA_WARNING_NEWSGROUPS_EXAMPLE

#define CA_WARNING_NEWSGROUPS_EXAMPLE   0x000080

Definition at line 789 of file post.c.

◆ CA_WARNING_RE_WITHOUT_REFERENCES

#define CA_WARNING_RE_WITHOUT_REFERENCES   0x000002

Definition at line 783 of file post.c.

◆ CA_WARNING_REFERENCES_WITHOUT_RE

#define CA_WARNING_REFERENCES_WITHOUT_RE   0x000004

Definition at line 784 of file post.c.

◆ CA_WARNING_SPACES_ONLY_SUBJECT

#define CA_WARNING_SPACES_ONLY_SUBJECT   0x000001

Definition at line 782 of file post.c.

◆ CA_WARNING_WRONG_SIGDASHES

#define CA_WARNING_WRONG_SIGDASHES   0x000010

Definition at line 786 of file post.c.

◆ DISPLAY_SUBJECT_LEN

#define DISPLAY_SUBJECT_LEN   20

Definition at line 120 of file post.c.

◆ FromSameUser

#define FromSameUser   (strcasestr(from_name, arts[respnum].from))

Definition at line 4065 of file post.c.

◆ MAX_MSG_HEADERS

#define MAX_MSG_HEADERS   20 /* shouldn't this be dynamic? */

Definition at line 109 of file post.c.

◆ MAXREFSIZE

#define MAXREFSIZE   512

Definition at line 2722 of file post.c.

◆ NotSuperseding

#define NotSuperseding   (!supersede || (!FromSameUser) || art_type != GROUP_TYPE_NEWS)

Definition at line 4067 of file post.c.

◆ POST_NORMAL

#define POST_NORMAL   2

Definition at line 114 of file post.c.

◆ POST_POSTPONED

#define POST_POSTPONED   1

Definition at line 113 of file post.c.

◆ POST_QUICK

#define POST_QUICK   0

Definition at line 112 of file post.c.

◆ POST_REPOST

#define POST_REPOST   4

Definition at line 116 of file post.c.

◆ POST_RESPONSE

#define POST_RESPONSE   3

Definition at line 115 of file post.c.

◆ POST_SUPERSEDED

#define POST_SUPERSEDED   5

Definition at line 117 of file post.c.

◆ Superseding

#define Superseding   (supersede && FromSameUser && art_type == GROUP_TYPE_NEWS)

Definition at line 4068 of file post.c.

Function Documentation

◆ add_headers()

static void add_headers ( const char *  infile,
const char *  a_message_id 
)
static

◆ add_mail_quote()

static int add_mail_quote ( FILE *  fp,
int  respnum 
)
static

Definition at line 3373 of file post.c.

References buf, CURR_GROUP, HEADER_LEN, t_config::mail_quote_format, strfquote(), and tinrc.

Referenced by mail_to_author().

◆ address_in_list()

static t_bool address_in_list ( const char *  addresses,
const char *  address 
)
static

Definition at line 5013 of file post.c.

References FALSE, FreeIfNeeded, my_malloc, my_realloc, split_address_list(), strcasecmp(), strip_name(), and TRUE.

Referenced by create_mail_headers().

◆ append_mail()

◆ appendid()

static void appendid ( char **  where,
const char **  what 
)
static

Definition at line 2607 of file post.c.

Referenced by join_references().

◆ backup_article()

static t_bool backup_article ( const char *  the_article)
static

Definition at line 341 of file post.c.

References backup_article_name(), and backup_file().

Referenced by post_loop().

◆ backup_article_name()

char* backup_article_name ( const char *  the_article)

Definition at line 330 of file post.c.

References name, PATH_LEN, and snprintf.

Referenced by backup_article(), and post_loop().

◆ build_nglist()

static char ** build_nglist ( char *  ngs_list,
int *  ngcnt 
)
static

Definition at line 5459 of file post.c.

References my_malloc, and ulBuildArgv().

Referenced by check_article_to_be_posted(), and strip_double_ngs().

◆ cancel_article()

t_bool cancel_article ( struct t_group group,
struct t_article art,
int  respnum 
)

Definition at line 3808 of file post.c.

References _, ADD_CAN_KEY, ADD_MSG_ID_HEADER, art, t_group::attribute, buf, clear_message(), copy_fp(), cPostCancel, debug, DEBUG_MISC, t_header::distrib, error_message(), FALSE, forever, free_and_init_header(), t_header::from, func, func_to_key(), get_from_name(), GLOBAL_ABORT, GLOBAL_QUIT, GROUP_TYPE_MAIL, GROUP_TYPE_SAVE, grp_del_mail_art(), openartinfo::hdr, HEADER_LEN, homedir, info_message(), invoke_editor(), joinpath(), LEN, MAXKEYLEN, t_header::messageid, t_group::moderated, msg_add_header(), msg_add_x_headers(), msg_free_headers(), msg_init_headers(), msg_write_headers(), my_distribution, t_group::name, t_header::newsgroups, note_h, t_attribute::organization, parse_rfc822_headers(), PATH_LEN, perror_message(), pgart, POST_CANCEL, post_cancel_keys, post_delete_keys, POST_EDIT, POST_SUPERSEDE, printascii(), process_id, t_attribute::prompt_followupto, prompt_slk_response(), random_organization(), Raw(), openartinfo::raw, RawState(), redraw_screen, repost_article(), S_IRUSR, S_IWUSR, setup_check_article_screen(), show_cancel_info(), signal_context, sized_message(), snprintf, start_line_offset, strcasestr(), strip_double_ngs(), t_header::subj, submit_news_file(), TIN_CANCEL_NAME, TRUE, txt_art_cancel, txt_art_cannot_cancel, txt_article_cancelled, txt_cancel_article, txt_cancelling_art, txt_cannot_open, txt_error_header_line_missing, txt_quit_cancel, t_group::type, unlink, update_posted_info_file(), wait_message(), and t_attribute::x_headers.

Referenced by group_page(), show_page(), and thread_page().

◆ check_article_to_be_posted()

static int check_article_to_be_posted ( const char *  the_article,
int  art_type,
struct t_group **  group,
t_bool  art_unchanged,
t_bool  use_cache 
)
static

Definition at line 810 of file post.c.

References _, t_group::aliasedto, t_group::attribute, t_config::beginner_level, BlankIfNull, build_nglist(), CA_ERROR_BAD_CHARSET, CA_ERROR_BAD_DATE, CA_ERROR_BAD_ENCODING, CA_ERROR_BAD_EXPIRES, CA_ERROR_BAD_MESSAGE_ID, CA_ERROR_DISTRIBUTIOIN_NOT_7BIT, CA_ERROR_DUPLICATED_FOLLOWUP_TO, CA_ERROR_DUPLICATED_FROM, CA_ERROR_DUPLICATED_NEWSGROUPS, CA_ERROR_DUPLICATED_SUBJECT, CA_ERROR_EMPTY_NEWSGROUPS, CA_ERROR_EMPTY_SUBJECT, CA_ERROR_FOLLOWUP_TO_NOT_7BIT, CA_ERROR_FOLLOWUP_TO_POSTER, CA_ERROR_HEADER_LINE_BLANK, CA_ERROR_MISSING_BODY_SEPARATOR, CA_ERROR_MISSING_FROM, CA_ERROR_MISSING_NEWSGROUPS, CA_ERROR_MISSING_SUBJECT, CA_ERROR_NEWLINE_IN_FOLLOWUP_TO, CA_ERROR_NEWLINE_IN_NEWSGROUPS, CA_ERROR_NEWSGROUPS_NOT_7BIT, CA_ERROR_NEWSGROUPS_POSTER, CA_ERROR_SPACE_IN_FOLLOWUP_TO, CA_ERROR_SPACE_IN_NEWSGROUPS, CA_WARNING_ENCODING_EXTERNAL_INEWS, CA_WARNING_FOLLOWUP_TO_EXAMPLE, CA_WARNING_LONG_SIGNATURE, CA_WARNING_MULTIPLE_SIGDASHES, CA_WARNING_NEWSGROUPS_EXAMPLE, CA_WARNING_RE_WITHOUT_REFERENCES, CA_WARNING_REFERENCES_WITHOUT_RE, CA_WARNING_SPACES_ONLY_SUBJECT, CA_WARNING_WRONG_SIGDASHES, cCOLS, damaged_id(), t_group::description, EndInverse(), FALSE, FreeIfNeeded, gnksa_check_from(), GNKSA_LOCALPART_MISSING, GNKSA_MISSING_REALNAME, GNKSA_OK, gnksa_split_from(), gnksa_strerror(), group_find(), GROUP_TYPE_MAIL, GROUP_TYPE_NEWS, HEADER_LEN, IMF_LINE_LEN, t_config::inews_prog, INTERNAL_CMD, isascii, list_active, MAX_COL, MAX_SIG_LINES, MIME_ENCODING_7BIT, MIME_ENCODING_BASE64, MIME_ENCODING_QP, t_config::mm_charset, t_config::mm_local_charset, my_fflush, my_fprintf, my_malloc, my_strdup(), N_, name, parse_header(), parsedate(), perror_message(), PLURAL, t_attribute::post_mime_encoding, t_config::post_mime_encoding, Raw(), RawState(), rfc1522_encode(), setup_check_article_screen(), SIGDASHES, StartInverse(), strcasecmp(), STRCMPEQ, STRCPY, stripped_double_ngs(), strncasecmp(), tin_fgets(), tinrc, TRUE, txt_art_mailgroups, txt_art_newsgroups, txt_base64, txt_cannot_open, txt_error_approved, txt_error_bad_approved, txt_error_bad_from, txt_error_bad_msgidfqdn, txt_error_bad_replyto, txt_error_bad_to, txt_error_followup_poster, txt_error_header_and_body_not_separate, txt_error_header_duplicate, txt_error_header_format, txt_error_header_line_bad_charset, txt_error_header_line_bad_encoding, txt_error_header_line_blank, txt_error_header_line_colon, txt_error_header_line_comma, txt_error_header_line_empty, txt_error_header_line_groups_contd, txt_error_header_line_missing, txt_error_header_line_not_7bit, txt_error_header_line_space, txt_error_newsgroups_poster, txt_error_sender_in_header_not_allowed, txt_followup_newsgroups, txt_followup_poster, txt_mime_7bit_charsets, txt_newsgroup, txt_quoted_printable, txt_warn_art_line_too_long, txt_warn_article_unchanged, txt_warn_blank_subject, txt_warn_encoding_and_external_inews, txt_warn_example_hierarchy, txt_warn_followup_to_several_groups, txt_warn_grp_renamed, txt_warn_missing_followup_to, txt_warn_multiple_sigs, txt_warn_not_in_newsrc, txt_warn_not_valid_newsgroup, txt_warn_posting_etiquette, txt_warn_re_but_no_references, txt_warn_references_but_no_re, txt_warn_sig_too_long, txt_warn_wrong_sig_format, t_group::type, and unfold_header().

Referenced by post_loop().

◆ check_for_spamtrap()

static t_bool check_for_spamtrap ( const char *  addr)
static

Definition at line 3744 of file post.c.

References FALSE, my_strdup(), t_config::spamtrap_warning_addresses, strcasestr(), tinrc, and TRUE.

Referenced by mail_to_author().

◆ check_moderated()

◆ checknadd_headers()

◆ count_postponed_articles()

int count_postponed_articles ( void  )

Definition at line 2364 of file post.c.

References t_group::count, HEADER_LEN, and postponed_articles_file.

Referenced by main(), and pickup_postponed_articles().

◆ create_mail_headers()

◆ create_normal_article_headers()

◆ damaged_id()

static t_bool damaged_id ( const char *  id)
static

Definition at line 2676 of file post.c.

References FALSE, isascii, and TRUE.

Referenced by check_article_to_be_posted(), and join_references().

◆ fetch_postponed_article()

static t_bool fetch_postponed_article ( const char  tmp_file[],
char  subject[],
char  newsgroups[] 
)
static

◆ find_reply_to_addr()

static void find_reply_to_addr ( char *  from_addr,
t_bool  parse,
struct t_header hdr 
)
static

Definition at line 4660 of file post.c.

References t_header::from, HEADER_LEN, parse_from(), t_header::replyto, and rfc1522_decode().

Referenced by mail_to_author(), and repost_article().

◆ get_recipients()

static unsigned int get_recipients ( struct t_header hdr,
char *  buf,
size_t  buflen 
)
static

◆ init_postinfo()

void init_postinfo ( void  )

Definition at line 274 of file post.c.

References my_distribution, my_strncpy(), and reply_to.

Referenced by init_selfinfo().

◆ insert_from_header()

◆ is_crosspost()

static t_bool is_crosspost ( const char *  xref)
static

Definition at line 2700 of file post.c.

References t_group::count, FALSE, and TRUE.

Referenced by post_response().

◆ join_references()

static void join_references ( char *  buffer,
const char *  oldrefs,
const char *  newref 
)
static

Definition at line 2731 of file post.c.

References appendid(), buffer, damaged_id(), MAXREFSIZE, memmove, must_include(), my_malloc, and skip_id().

Referenced by post_response(), and repost_article().

◆ mail_bug_report()

◆ mail_loop()

◆ mail_to_author()

◆ mail_to_someone()

◆ msg_add_header()

static void msg_add_header ( const char *  name,
const char *  text 
)
static

◆ msg_add_x_body()

static int msg_add_x_body ( FILE *  fp_out,
const char *  body 
)
static

Definition at line 4419 of file post.c.

References CURR_GROUP, FALSE, HEADER_LEN, PATH_LEN, STRCPY, and strfpath().

Referenced by create_normal_article_headers(), and post_response().

◆ msg_add_x_headers()

static void msg_add_x_headers ( const char *  headers)
static

◆ msg_free_headers()

static void msg_free_headers ( void  )
static

◆ msg_init_headers()

static void msg_init_headers ( void  )
static

◆ msg_write_headers()

static int msg_write_headers ( FILE *  fp)
static

◆ must_include()

static t_bool must_include ( const char *  id)
static

Definition at line 2634 of file post.c.

References FALSE, and TRUE.

Referenced by join_references().

◆ pickup_postponed_articles()

◆ post_article()

◆ post_loop()

static int post_loop ( int  type,
struct t_group group,
t_function  func,
const char *  posting_msg,
int  art_type,
int  offset 
)
static

Definition at line 1754 of file post.c.

References _, add_headers(), t_attribute::add_posted_to_filter, append_file(), append_mail(), t_cmdlineopts::args, article_name, t_group::attribute, backup_article(), backup_article_name(), buf, check_article_to_be_posted(), clear_message(), cmdline, CMDLINE_MAILDIR, config_page(), cPost, curr_group, dead_article, dead_articles, t_config::default_post_newsgroups, t_config::default_post_subject, errno, FALSE, file_mtime(), file_size(), filter_file, forever, free_and_init_header(), func, func_to_key(), GLOBAL_ABORT, GLOBAL_OPTION_MENU, GLOBAL_POST, GLOBAL_QUIT, group_find(), GROUP_TYPE_MAIL, GROUP_TYPE_NEWS, HEADER_LEN, invoke_editor(), joinpath(), t_config::keep_dead_articles, LEN, t_cmdlineopts::maildir, t_attribute::maildir, t_config::maildir, MAXKEYLEN, my_strncpy(), t_group::name, t_header::newsgroups, offset, parse_rfc822_headers(), PATH_LEN, perror_message(), POST_EDIT, POST_NORMAL, post_post_keys, POST_POSTPONE, POST_POSTPONED, post_postponed_and_exit, POST_QUICK, POST_REPOST, POST_RESPONSE, POST_SUPERSEDED, t_config::posted_articles_file, POSTED_NONE, POSTED_OK, POSTED_REDRAW, postpone_article(), printascii(), prompt_rejected(), prompt_slk_response(), quick_filter_select_posted_art(), t_header::references, rename_file(), repair_article(), ret_code, signal_context, sized_message(), snprintf, STRCPY, strfpath(), t_header::subj, submit_mail_file(), submit_news_file(), tinrc, t_header::to, TRUE, txt_art_posted, txt_art_rejected, txt_cannot_open, txt_cannot_open_for_saving, txt_quit_edit_post, txt_quit_edit_xpost, t_group::type, unlink, t_config::unlink_article, update_active_after_posting(), update_posted_info_file(), userid, wait_message(), and write_filter_file().

Referenced by post_article(), post_postponed_article(), post_response(), quick_post_article(), and repost_article().

◆ post_postponed_article()

static void post_postponed_article ( int  ask,
const char *  subject,
const char *  newsgroups 
)
static

◆ post_response()

int post_response ( const char *  groupname,
int  respnum,
t_bool  copy_text,
t_bool  with_headers,
t_bool  raw_data 
)

Definition at line 2900 of file post.c.

References _, ADD_MSG_ID_HEADER, article_name, arts, t_group::attribute, buf, buffer, C_HEADER, openartinfo::cooked, openartinfo::cookl, copy_body(), cPostFup, t_header::distrib, eat_re(), eat_tab(), FALSE, lineinfo::flags, t_header::followup, t_attribute::followup_to, t_header::from, func, func_to_key(), get_from_name(), get_initials(), GLOBAL_ABORT, GLOBAL_POST, GLOBAL_QUIT, group_find(), GROUP_TYPE_MAIL, GROUP_TYPE_NEWS, openartinfo::hdr, HEADER_LEN, is_crosspost(), join_references(), mail_to_author(), t_attribute::mailing_list, MAXKEYLEN, t_header::messageid, msg_add_header(), msg_add_x_body(), msg_add_x_headers(), msg_free_headers(), msg_init_headers(), msg_write_headers(), msg_write_signature(), my_distribution, my_strdup(), t_group::name, t_attribute::news_quote_format, t_config::news_quote_format, t_header::newsgroups, note_h, lineinfo::offset, offset, t_attribute::organization, PAGE_MAIL, perror_message(), pgart, POST_EDIT, POST_IGNORE_FUPTO, post_ignore_fupto_keys, post_loop(), POST_MAIL, post_mail_fup_keys, POST_RESPONSE, POSTED_NONE, printascii(), t_attribute::prompt_followupto, prompt_slk_response(), t_attribute::quote_chars, t_config::quote_chars, random_organization(), openartinfo::raw, t_header::references, reply_to, resize_article(), ret_code, S_IRUSR, S_IWUSR, SEEK_SET, show_followup_info(), signal_context, snprintf, start_line_offset, STRCMPEQ, strfquote(), strip_double_ngs(), t_header::subj, tinrc, toggle_raw(), TRUE, txt_cannot_open, txt_post_a_followup, txt_posting, txt_prompt_fup_ignore, txt_resp_to_poster, wait_message(), t_attribute::x_body, t_attribute::x_comment_to, t_attribute::x_headers, and t_config::xpost_quote_format.

Referenced by show_page().

◆ postpone_article()

static void postpone_article ( const char *  the_article)
static

◆ prompt_rejected()

◆ prompt_to_send()

static t_function prompt_to_send ( const char *  subject)
static

◆ quick_post_article()

◆ repair_article()

◆ repost_article()

int repost_article ( const char *  groupname,
int  respnum,
t_bool  supersede,
t_openartinfo artinfo 
)

Definition at line 4078 of file post.c.

References _, ADD_CAN_KEY, ADD_MSG_ID_HEADER, article_name, t_group::attribute, buf, C_HEADER, check_moderated(), openartinfo::cooked, openartinfo::cookl, copy_fp(), default_organization, t_header::distrib, error_message(), FALSE, find_reply_to_addr(), lineinfo::flags, t_header::followup, t_header::from, FromSameUser, func, func_to_key(), get_from_name(), get_user_info(), GLOBAL_OPTION_MENU, GLOBAL_POST, GLOBAL_QUIT, GROUP_TYPE_MAIL, GROUP_TYPE_NEWS, openartinfo::hdr, HEADER_LEN, join_references(), t_header::keywords, LEN, t_attribute::mailing_list, MAXKEYLEN, t_header::messageid, msg_add_header(), msg_add_x_headers(), msg_free_headers(), msg_init_headers(), msg_write_headers(), msg_write_signature(), my_distribution, t_header::newsgroups, note_h, NotSuperseding, lineinfo::offset, t_header::org, t_attribute::organization, perror_message(), POST_EDIT, post_loop(), post_post_keys, POST_POSTPONE, POST_REPOST, POST_SUPERSEDED, POSTED_NONE, printascii(), prompt_slk_response(), random_organization(), t_header::references, reply_to, resize_article(), ret_code, S_IRUSR, S_IWUSR, SEEK_SET, t_attribute::signature_repost, sized_message(), snprintf, start_line_offset, strip_double_ngs(), strwidth(), t_header::subj, t_header::summary, supersede, Superseding, TRUE, txt_art_not_posted, txt_article_reposted, txt_cannot_open, txt_quit_edit_xpost, txt_repost_an_article, txt_superseding_art, and t_attribute::x_headers.

Referenced by cancel_article(), and feed_article().

◆ reread_active_after_posting()

◆ setup_check_article_screen()

static void setup_check_article_screen ( int *  init)
static

◆ show_cancel_info()

static void show_cancel_info ( void  )
static

◆ show_followup_info()

static void show_followup_info ( void  )
static

◆ skip_id()

static size_t skip_id ( const char *  id)
static

Definition at line 2654 of file post.c.

Referenced by join_references().

◆ split_address_list()

static char ** split_address_list ( const char *  addresses,
unsigned int *  cnt 
)
static

Definition at line 4867 of file post.c.

References end, my_malloc, and my_realloc.

Referenced by address_in_list(), and get_recipients().

◆ strip_double_ngs()

static void strip_double_ngs ( char *  ngs_list)
static

◆ stripped_double_ngs()

static t_bool stripped_double_ngs ( char **  newsgroups,
int *  ngcnt 
)
static

Definition at line 5489 of file post.c.

References FALSE, strcasecmp(), and TRUE.

Referenced by check_article_to_be_posted(), and strip_double_ngs().

◆ submit_mail_file()

◆ update_active_after_posting()

static void update_active_after_posting ( char *  newsgroups)
static

◆ update_posted_info_file()

static void update_posted_info_file ( const char *  group,
int  action,
const char *  subj,
const char *  a_message_id 
)
static

◆ user_posted_messages()

Variable Documentation

◆ bug_addr

char bug_addr[1024]

◆ msg_headers

struct msg_header msg_headers[ 20 /* shouldn't this be dynamic? */ ]
static

◆ my_distribution

char my_distribution[1024]
static

◆ reply_to

char reply_to[1024]
static

◆ start_line_offset