Index: pine/pine/headers.h diff -u pine/pine/headers.h:1.1.1.2 pine/pine/headers.h:1.3 --- pine/pine/headers.h:1.1.1.2 Wed May 30 01:29:25 2001 +++ pine/pine/headers.h Wed May 30 02:02:36 2001 @@ -121,6 +121,7 @@ extern struct pine *ps_global; extern char *pine_version; /* pointer to version string */ +extern char *pine_xmailer; /* pointer to xmailer string */ #define SIZEOF_20KBUF (20480) extern char tmp_20k_buf[]; Index: pine/pine/init.c diff -u pine/pine/init.c:1.1.1.2 pine/pine/init.c:1.3 --- pine/pine/init.c:1.1.1.2 Wed May 30 01:29:26 2001 +++ pine/pine/init.c Wed May 30 02:02:36 2001 @@ -397,12 +397,7 @@ static struct variable variables[] = { {"personal-name", 0, 1, 0, 1, 1, 0, 0, 0, 0, cf_text_personal_name}, -#if defined(DOS) || defined(OS2) - /* Have to have this on DOS, PC's, Macs, etc... */ {"user-id", 0, 1, 0, 1, 0, 0, 0, 0, 0, -#else /* Don't allow on UNIX machines for some security */ -{"user-id", 0, 0, 0, 1, 0, 0, 0, 0, 0, -#endif cf_text_user_id}, {"user-domain", 0, 1, 0, 1, 1, 0, 0, 0, 0, cf_text_user_domain}, @@ -2169,6 +2164,8 @@ F_ENABLE_STRIP_SIGDASHES, h_config_strip_sigdashes, PREF_RPLY}, /* Sending Prefs */ + {"disable-x-sender", + F_NO_X_SENDER, h_config_no_x_sender, PREF_SEND}, {"enable-8bit-esmtp-negotiation", F_ENABLE_8BIT, h_config_8bit_smtp, PREF_SEND}, #ifdef BACKGROUND_POST @@ -2179,6 +2176,8 @@ F_DSN, h_config_compose_dsn, PREF_SEND}, {"enable-verbose-smtp-posting", F_VERBOSE_POST, h_config_verbose_post, PREF_SEND}, + {"enable-x-mailer-header", + F_X_MAILER, h_config_x_mailer_header, PREF_SEND}, {"fcc-on-bounce", F_FCC_ON_BOUNCE, h_config_fcc_on_bounce, PREF_SEND}, {"fcc-only-without-confirm", @@ -2187,6 +2186,8 @@ F_NO_FCC_ATTACH, h_config_no_fcc_attach, PREF_SEND}, {"use-sender-not-x-sender", F_USE_SENDER_NOT_X, h_config_use_sender_not_x, PREF_SEND}, + {"use-user-domain-in-message-id", + F_USE_DOMAIN_IN_MSGID, h_config_use_domain_in_msgid, PREF_SEND}, /* Folder */ {"combined-subdirectory-display", @@ -3554,7 +3555,7 @@ elems = 0; elems++; /* for default F_ALLOW_CHANGING_FROM */ - + /* count the lists so we can allocate */ for(m = 0; m < 6; m++){ list = m==0 ? var->global_val.l : @@ -3790,7 +3791,10 @@ rv = 0; expanded = NULL; -#if defined(DOS) || defined(OS2) + + /* Use user-id if in the config file, even in UNIX. + It happens that the local user-id be different of the email address + user-id... think of dial-up users :) */ if(ps->COM_USER_ID) expanded = expand_variables(tmp_20k_buf, ps->COM_USER_ID, 0); @@ -3802,16 +3806,20 @@ expanded = expand_variables(tmp_20k_buf, ps->vars[V_USER_ID].main_user_val.p, 0); +#if defined(DOS) || defined(OS2) if(!expanded) ps->blank_user_id = 1; ps->VAR_USER_ID = cpystr(expanded ? expanded : ""); #else - ps->VAR_USER_ID = cpystr(ps->ui.login); - if(!ps->VAR_USER_ID[0]){ + if (!expanded) { + ps->VAR_USER_ID = cpystr(ps->ui.login); + if(!ps->VAR_USER_ID[0]){ fprintf(stderr, "Who are you? (Unable to look up login name)\n"); rv = -1; - } + } + } else + ps->VAR_USER_ID = cpystr(expanded); #endif expanded = NULL; Index: pine/pine/mailview.c diff -u pine/pine/mailview.c:1.1.1.2 pine/pine/mailview.c:1.3 --- pine/pine/mailview.c:1.1.1.2 Wed May 30 01:29:26 2001 +++ pine/pine/mailview.c Wed May 30 02:02:36 2001 @@ -1082,6 +1082,7 @@ {"UTF-7", "7-bit encoded Unicode"}, {"UTF-8", "Internet-standard Unicode"}, {"ISO-2022-JP-2", "Multilingual"}, + {"ISO-8859-15", "Latin 9"}, {NULL, NULL} }; Index: pine/pine/pine.c diff -u pine/pine/pine.c:1.1.1.2 pine/pine/pine.c:1.3 --- pine/pine/pine.c:1.1.1.2 Wed May 30 01:29:26 2001 +++ pine/pine/pine.c Wed May 30 02:02:37 2001 @@ -57,7 +57,7 @@ */ struct pine *ps_global; /* THE global variable! */ char *pine_version = PINE_VERSION; /* version string */ - +char *pine_xmailer = "Pine " PINE_VERSION " (" SYSTYPE ")"; /*---------------------------------------------------------------------- General use big buffer. It is used in the following places: Index: pine/pine/pine.h diff -u pine/pine/pine.h:1.1.1.2 pine/pine/pine.h:1.3 --- pine/pine/pine.h:1.1.1.2 Wed May 30 01:29:25 2001 +++ pine/pine/pine.h Wed May 30 02:02:37 2001 @@ -63,7 +63,7 @@ #ifndef _PINE_INCLUDED #define _PINE_INCLUDED -#define PINE_VERSION "4.33" +#define PINE_VERSION "4.33L" #define PHONE_HOME_VERSION "-count" #define PHONE_HOME_HOST "docserver.cac.washington.edu" @@ -913,6 +913,9 @@ F_VERBOSE_POST, F_FCC_ON_BOUNCE, F_USE_SENDER_NOT_X, + F_NO_X_SENDER, + F_USE_DOMAIN_IN_MSGID, + F_X_MAILER, F_BLANK_KEYMENU, F_CUSTOM_PRINT, F_DEL_FROM_DOT, Index: pine/pine/pine.hlp diff -u pine/pine/pine.hlp:1.1.1.2 pine/pine/pine.hlp:1.3 --- pine/pine/pine.hlp:1.1.1.2 Wed May 30 01:29:27 2001 +++ pine/pine/pine.hlp Wed May 30 02:02:37 2001 @@ -21005,6 +21005,60 @@ ========== h_custom_print ========== Enter a Unix command that accepts its data on standard input. Pine will display any information the command sends to standard output. +====== h_config_no_x_sender ===== + + +FEATURE: disable-x-sender + + +

FEATURE: disable-x-sender

+ +Normally Pine adds a header line labeled X-Sender (or Sender) if the sender +is different from the From: line. However in some cases this information +is not relevant (for example if your local host is not known outside of your +local network). Setting this feature causes the [X-]Sender header to be +ignored. + +

+<End of help on this topic> + + +===== h_config_use_domain_in_msgid ===== + + +FEATURE: use-user-domain-in-message-id + + +

FEATURE: use-user-domain-in-message-id

+ +Normally Pine uses your local hostname as the host part of the +Message-ID header. However, if your local hostname is rather different +from your email address domain, you might want to use it +instead. Setting this feature enables its use instead of the local +hostname. + +

+<End of help on this topic> + + +===== h_config_x_mailer_header ===== + + +FEATURE: enable-x-mailer-header + + +

FEATURE: enable-x-mailer-header

+ +Normally Pine "signs" message by telling its name and version in the +Message-ID header. A lot of mail clients use the X-Mailer header for +this purpose however. Setting this feature adds an X-Mailer header +mentionning Pine version to all your outgoing messages, and removes +this information from their Message-ID headers. + +

+<End of help on this topic> + + ========== h_convert_abooks_and_sigs ========== You will be given the opportunity to convert address books and signature files to remote configurations. Index: pine/pine/reply.c diff -u pine/pine/reply.c:1.1.1.2 pine/pine/reply.c:1.3 --- pine/pine/reply.c:1.1.1.2 Wed May 30 01:29:25 2001 +++ pine/pine/reply.c Wed May 30 02:02:37 2001 @@ -4971,6 +4971,7 @@ char *id; time_t now; struct tm *now_x; + char *dom; now = time((time_t *)0); now_x = localtime(&now); @@ -4982,10 +4983,22 @@ cnt = 0; osec = now_x->tm_sec; } - sprintf(id,"", - SYSTYPE, pine_version, (now_x->tm_year) % 100, now_x->tm_mon + 1, - now_x->tm_mday, now_x->tm_hour, now_x->tm_min, now_x->tm_sec, - cnt, getpid(), ps_global->hostname); + + if (F_ON(F_USE_DOMAIN_IN_MSGID, ps_global) && ps_global->userdomain) + dom = ps_global->userdomain; + else + dom = ps_global->hostname; + + if (F_ON(F_X_MAILER, ps_global)) + sprintf(id,"<%02d%02d%02d%02d%02d%02d%X.%d@%.50s>", + (now_x->tm_year) % 100, now_x->tm_mon + 1, + now_x->tm_mday, now_x->tm_hour, now_x->tm_min, now_x->tm_sec, + cnt, getpid(), dom); + else + sprintf(id,"", + SYSTYPE, pine_version, (now_x->tm_year) % 100, now_x->tm_mon + 1, + now_x->tm_mday, now_x->tm_hour, now_x->tm_min, now_x->tm_sec, + cnt, getpid(), dom); return(id); } Index: pine/pine/send.c diff -u pine/pine/send.c:1.1.1.2 pine/pine/send.c:1.3 --- pine/pine/send.c:1.1.1.2 Wed May 30 01:29:25 2001 +++ pine/pine/send.c Wed May 30 02:02:37 2001 @@ -2043,8 +2043,11 @@ #if !(defined(DOS) || defined(OS2)) || defined(NOAUTH) {"", "Sender", NO_HELP, 10, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KS_NONE} + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KS_NONE}, #endif + {"", "X-Mailer", NO_HELP, 10, 0, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KS_NONE} }; static struct headerentry he_custom_addr_templ={ @@ -2080,6 +2083,7 @@ #define N_OURREPLYTO 18 #define N_OURHDRS 19 #define N_SENDER 20 +#define N_XMAILER 21 /* this is used in pine_send and pine_simple_send */ /* name::type::canedit::writehdr::localcopy::rcptto */ @@ -2107,6 +2111,7 @@ #if !(defined(DOS) || defined(OS2)) || defined(NOAUTH) {"X-X-Sender", Address, 0, 1, 1, 0}, #endif + {"X-Mailer", FreeText, 0, 1, 1, 0}, {NULL, FreeText} }; @@ -2265,6 +2270,12 @@ sending_order[NN+16] = pf; break; + case N_XMAILER: + if (F_ON(F_X_MAILER, ps_global)) + pf->text = &pine_xmailer; + sending_order[NN+17] = pf; + break; + default: q_status_message1(SM_ORDER,3,3, "Internal error: 1)FreeText header %d", (void *)i); @@ -3093,7 +3104,7 @@ N_FROM, N_REPLYTO, N_NEWS, N_TO, N_CC, N_BCC, N_FCC, N_LCC, N_ATTCH, N_SUBJ, N_REF, N_DATE, N_INREPLY, N_MSGID, N_NOBODY, N_POSTERR, N_RPLUID, N_CURPOS, N_OURREPLYTO, - N_OURHDRS + N_OURHDRS, N_XMAILER #if !(defined(DOS) || defined(OS2)) || defined(NOAUTH) , N_SENDER #endif @@ -3236,6 +3247,12 @@ pf->text = &pf->textbuf; pf->he = NULL; } + else if(index == N_XMAILER){ + sending_order[NN+17] = pf; + if (F_ON(F_X_MAILER, ps_global)) + pf->text = &pine_xmailer; + pf->he = NULL; + } else{ q_status_message(SM_ORDER | SM_DING, 3, 7, "Botched: Unmatched FreeText header in pine_send"); @@ -3943,12 +3960,12 @@ * * Don't add a personal_name since the user can change that. */ - if(!outgoing->from + if(!F_ON(F_NO_X_SENDER, ps_global) && (!outgoing->from || !outgoing->from->mailbox || strucmp(outgoing->from->mailbox, ps_global->VAR_USER_ID) != 0 || !outgoing->from->host || !(strucmp(outgoing->from->host, ps_global->localdomain) == 0 - || strucmp(outgoing->from->host, ps_global->hostname) == 0)){ + || strucmp(outgoing->from->host, ps_global->hostname) == 0))){ outgoing->sender = mail_newaddr(); outgoing->sender->mailbox = cpystr(ps_global->VAR_USER_ID);