diff -rc pine4.51/pine/init.c pine4.51.fromheader/pine/init.c *** pine4.51/pine/init.c Tue Dec 10 15:43:42 2002 --- pine4.51.fromheader/pine/init.c Fri Dec 13 14:51:08 2002 *************** *** 2441,2446 **** --- 2441,2448 ---- F_AUTO_FCC_ONLY, h_config_auto_fcc_only, PREF_SEND}, {"fcc-without-attachments", F_NO_FCC_ATTACH, h_config_no_fcc_attach, PREF_SEND}, + {"return-path-uses-domain-name", + F_USE_DOMAIN_NAME, h_config_use_domain, PREF_SEND}, {"mark-fcc-seen", F_MARK_FCC_SEEN, h_config_mark_fcc_seen, PREF_SEND}, {"use-sender-not-x-sender", diff -rc pine4.51/pine/pine.h pine4.51.fromheader/pine/pine.h *** pine4.51/pine/pine.h Mon Dec 9 16:01:02 2002 --- pine4.51.fromheader/pine/pine.h Fri Dec 13 14:51:09 2002 *************** *** 1055,1060 **** --- 1055,1061 ---- F_AUTO_REPLY_TO, F_VERBOSE_POST, F_FCC_ON_BOUNCE, + F_USE_DOMAIN_NAME, F_USE_SENDER_NOT_X, F_BLANK_KEYMENU, F_CUSTOM_PRINT, diff -rc pine4.51/pine/pine.hlp pine4.51.fromheader/pine/pine.hlp *** pine4.51/pine/pine.hlp Wed Dec 11 15:14:34 2002 --- pine4.51.fromheader/pine/pine.hlp Fri Dec 13 14:51:11 2002 *************** *** 19897,19902 **** --- 19897,19918 ---- <End of help on this topic> + ====== h_config_use_domain ===== + + + FEATURE: return-path-uses-domain-name + + +

FEATURE: return-path-uses-domain-name

+ + If you enable this configuration option Pine will use your domain name and your + username in that domain name to construct your Return-Path header, if not Pine + will use the address that you have set in the From: field to construct it. + +

+ <End of help on this topic> + + ====== h_config_use_sender_not_x ===== diff -rc pine4.51/pine/send.c pine4.51.fromheader/pine/send.c *** pine4.51/pine/send.c Tue Dec 10 15:45:27 2002 --- pine4.51.fromheader/pine/send.c Fri Dec 13 14:53:12 2002 *************** *** 2073,2079 **** static struct headerentry he_template[]={ {"From : ", "From", h_composer_from, 10, 0, NULL, build_address, NULL, NULL, addr_book_compose, "To AddrBk", NULL, ! 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, KS_TOADDRBOOK}, {"Reply-To: ", "Reply To", h_composer_reply_to, 10, 0, NULL, build_address, NULL, NULL, addr_book_compose, "To AddrBk", NULL, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, KS_TOADDRBOOK}, --- 2073,2079 ---- static struct headerentry he_template[]={ {"From : ", "From", h_composer_from, 10, 0, NULL, build_address, NULL, NULL, addr_book_compose, "To AddrBk", NULL, ! 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, KS_TOADDRBOOK}, {"Reply-To: ", "Reply To", h_composer_reply_to, 10, 0, NULL, build_address, NULL, NULL, addr_book_compose, "To AddrBk", NULL, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, KS_TOADDRBOOK}, *************** *** 2179,2189 **** #define N_OURREPLYTO 20 #define N_OURHDRS 21 #define N_SENDER 22 /* this is used in pine_send and pine_simple_send */ /* name::type::canedit::writehdr::localcopy::rcptto */ static PINEFIELD pf_template[] = { ! {"From", Address, 0, 1, 1, 0}, {"Reply-To", Address, 0, 1, 1, 0}, {"To", Address, 1, 1, 1, 1}, {"cc", Address, 1, 1, 1, 1}, --- 2179,2191 ---- #define N_OURREPLYTO 20 #define N_OURHDRS 21 #define N_SENDER 22 + #define CAN_EDIT(x) (!((x)->never_allow_changing_from) && \ + F_ON(F_ALLOW_CHANGING_FROM, (x))) /* this is used in pine_send and pine_simple_send */ /* name::type::canedit::writehdr::localcopy::rcptto */ static PINEFIELD pf_template[] = { ! {"From", Address, 1, 1, 1, 0}, {"Reply-To", Address, 0, 1, 1, 0}, {"To", Address, 1, 1, 1, 1}, {"cc", Address, 1, 1, 1, 1}, *************** *** 2321,2327 **** *p = *(p+4); pf->type = pf_template[i].type; ! pf->canedit = pf_template[i].canedit; pf->rcptto = pf_template[i].rcptto; pf->writehdr = pf_template[i].writehdr; pf->localcopy = pf_template[i].localcopy; --- 2323,2329 ---- *p = *(p+4); pf->type = pf_template[i].type; ! pf->canedit = (i == N_FROM) ? CAN_EDIT(ps_global) : pf_template[i].canedit; pf->rcptto = pf_template[i].rcptto; pf->writehdr = pf_template[i].writehdr; pf->localcopy = pf_template[i].localcopy; *************** *** 3436,3441 **** --- 3438,3448 ---- he->rich_header = 0; } } + if (F_ON(F_ALLOW_CHANGING_FROM, ps_global) && + !ps_global->never_allow_changing_from){ + he->display_it = 1; /* show it */ + he->rich_header = 0; + } he_from = he; break; *************** *** 4112,4118 **** if(outgoing->return_path) mail_free_address(&outgoing->return_path); ! outgoing->return_path = rfc822_cpy_adr(outgoing->from); /* * Don't ever believe the sender that is there. --- 4119,4127 ---- if(outgoing->return_path) mail_free_address(&outgoing->return_path); ! outgoing->return_path = F_ON(F_USE_DOMAIN_NAME,ps_global) ! ? rfc822_cpy_adr(generate_from()) ! : rfc822_cpy_adr(outgoing->from); /* * Don't ever believe the sender that is there.