summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2017-11-02Version 3.4release-3.4Sergey Poznyakoff2
2017-11-01Minor fixSergey Poznyakoff1
2017-11-01Improve socket and SMTP client APISergey Poznyakoff12
Split formatting functions into two distinct families. Functions prefixed with mu_sys_sockadrr deal with struct sockaddr, wherease those starting with mu_sockaddr deal with struct mu_sockaddr. Introduce special format for SMTP EHLO. When sending EHLO to the remote party, use IP address in square brackets if hostname is empty. * libmailutils/sockaddr/Makefile.am (libsockaddr_la_SOURCES): Add fromsock.c * libmailutils/sockaddr/fromsock.c: New function. * libmailutils/sockaddr/str.c (mu_sockaddr_format): Rewrite. (mu_sys_sockaddr_format,mu_sys_sockaddr_to_astr): New functions. * include/mailutils/debug.h (mu_sockaddr_to_astr): Remove prototype. * include/mailutils/sockaddr.h (mu_sockaddr_format): New enum. (mu_sockaddr_format): change signature. (mu_sys_sockaddr_format,mu_sys_sockaddr_to_astr): New prototypes. (mu_sockaddr_from_socket): New prototype. * include/mailutils/stream.h (MU_IOCTL_TCPSTREAM): New ioctl family; (MU_IOCTL_TCP_GETSOCKNAME): New ioctl opcode. * comsat/comsat.c: Use mu_sys_sockaddr_ interface to handle struct sockaddr. * lib/tcpwrap.c: Likewise. * libmailutils/server/ipsrv.c: Likewise. * libmailutils/server/msrv.c: Likewise. * libmailutils/stream/tcp.c (_tcp_ioctl): Handle MU_IOCTL_TCPSTREAM. * libproto/mailer/smtp_ehlo.c (mu_smtp_ehlo): If hostname is empty, use IP address in square brackets.
2017-11-01BugfixSergey Poznyakoff1
* libmailutils/sockaddr/fromnode.c [!MAILUTILS_IPV6] (mu_sockaddr_from_node): Convert port to network order.
2017-10-25Bugfix in AM_MAILUTILS macroSergey Poznyakoff1
* mu-aux/mailutils.m4 (am_mu_vercmp): Ignore missing version parts.
2017-10-18Version 3.3release-3.3Sergey Poznyakoff3
* NEWS: Update. * configure.ac: Update. * Makefile.am (dist-hook): Fix conditional.
2017-10-18Minor changeSergey Poznyakoff1
* libmailutils/mailbox/msgsave.c (mu_message_save_to_mailbox): Open destination in append mode.
2017-10-16Reimplement control escapes in mh_format.Sergey Poznyakoff7
This patch makes sure that (1) the value of the "num" register is not altered by evaluating the condition expressions and remains visible in the conditional branches, and (2) the value of the control escape is 1 or 0 depending on whether the last control condition succeeded or not. * mh/mh_format.h: Implement numeric stack in the vm. (mhop_pushn,mhop_popn,mhop_xchgn): New opcodes. (mh_fvm) <numstack,maxstack,tos>: New members. * mh/mh_fmtgram.y (ctx_stack): Reallocate as necessary. (yylex_cond): Handle backslash continuations. (format_parse): Initialize and free ctx_stack (codegen_node): Reimplement control escapes. See the comment for explanation * mh/mh_format.c (mh_fvm_run): Use mh_string_init to initialize registers. Initialize stack. Implement push, popn, and xchgn (extract_labels,mh_format_dump_disass): Handle new opcodes. * mh/tests/fmtcnd00.at: New testcase. * mh/tests/Makefile.am: Add new testcase * mh/tests/testsuite.at: Likewise. * mh/tests/fmtcomp.at: Fix expected code dumps
2017-10-15Fix memory leaks in amd and assoc.Sergey Poznyakoff3
2017-10-10Version 3.2.94Sergey Poznyakoff2
2017-10-10Use mu_prtstr to safely print string valuesSergey Poznyakoff22
2017-10-10Check for NULL return from mu_address_aget_ and mu_address_sget_ family ↵Sergey Poznyakoff18
functions It is possible that these functions return success and place NULL in the result variable. Make sure this possibility is checked throughout the code. * libmailutils/base/usremail.c (mu_set_user_email): Check for NULL return value from mu_address_[as]get. * libmailutils/mailbox/msgenv.c (message_envelope_sender) * libmailutils/tests/addr.c (parse) * libmu_scm/mu_message.c (mu_scm_message_print): * libproto/mailer/prog.c (_expand_rcpt) * libproto/mailer/smtp.c (_rcpt_to_addr) (mu_address_sget_email) * maidag/lmtp.c (check_address): * mail/from.c (hdr_from): * mail/util.c (util_get_sender): * mh/mh_format.c (addr_cmp, builtin_proper) (builtin_addr, builtin_pers, builtin_note) (builtin_mbox, builtin_path, builtin_formataddr) * mh/mh_whom.c (scan_addrs): * libmu_sieve/util.c (mu_sieve_vlist_compare): Skip NULL returns from retr. * libmu_sieve/actions.c (check_redirect_loop): Error checking. * include/mailutils/types.hin (mu_prstr): New function. * libmu_cpp/address.cc: Use mu_prstr to ensure the printable representation of string. * python/libmu_py/address.c: Likewise. * libmu_scm/mu_address.c (_get_address_part): Likewise. * libmailutils/string/wordsplit.c (expvar): Treat NULL value as "".
2017-10-10Bugfix in mhSergey Poznyakoff1
* mh/mh_fmtgram.y (yylex_func): Accept negative numbers.
2017-10-04Minor fixSergey Poznyakoff1
* libmailutils/mime/mimehdr.c (_mime_header_parse): Preserve charset no matter what lang setting is.
2017-10-04bugfix in imap4d: INBOX name is case-insensitiveSergey Poznyakoff3
2017-09-27Assume UTC for IMAP internaldateSergey Poznyakoff6
* include/mailutils/datetime.h (mu_datetime_tz_utc): New proto. * libmailutils/datetime/tzutc.c: New file. * libmailutils/datetime/Makefile.am: Add tzutc.c * imap4d/fetch.c (_frt_internaldate): Assume UTC for internaldate. * libproto/imap/fetch.c (_date_mapper): Likewise. * mh/send.c: Improve diagnostics.
2017-09-27Fix build without libtoolSergey Poznyakoff3
* libmu_sieve/load.c [!HAVE_LIBLTDL] (mu_sieve_unload_ext): Dummy function. [!HAVE_LIBLTDL] (mu_sieve_load_ext, mu_i_sv_load_add_dir): Set errno. Fix return value. * mu-aux/gylwrap (yysym): Add more symbols (dumpme): Skip old contents of the BOOTSTRAP section up to the next POD keyword. * mu/libexec/Makefile.am (MUTOOL_LIBRARIES_TAIL): Fix ordering of libraries.
2017-09-27Minor fixSergey Poznyakoff1
2017-07-29Merge branch 'master' of ssh://git.savannah.gnu.org/srv/git/mailutilsSergey Poznyakoff1
2017-07-29Implement new MH format primitives (for compatibility with nmh).Sergey Poznyakoff6
* mh/etc/replcomps: Use localmbox instead of me. * mh/etc/replgroupcomps: Likewise. * mh/mh.h (mh_get_my_real_name) (mh_get_my_user_name,mh_my_host): New protos. (mh_my_email): Change prototype. * mh/mh_format.c (builtin_me): Use mh_get_my_user_name. (builtin_myhost,builtin_myname,builtin_localmbox): New functions. (builtin_formataddr): Preserve collected data if the address is not parseable. (builtin_tab): New functions: myhost, myname, localmbox. * mh/mh_init.c (mh_local_mailbox): New function. (mh_get_my_real_name) (mh_get_my_user_name,mh_my_host): New functions. * mh/repl.c (set_group): Don't overwrite any prior -form or -format options.
2017-07-14BugfixSergey Poznyakoff1
* mail/send.c (add_body): Increase reference counter of the copied stream.
2017-07-07Bugfixes in MH format code generatorSergey Poznyakoff4
* mh/mh_fmtgram.y (mh_read_formfile): Remove only the last trailing newline. (codegen_node): Don't emit spurious clear register statements at the end of the "else" branch. Optimize if no "else" branch is present. * mh/mh_format.c (mh_fvm_run) <mhop_brzn, mhop_brzs>: Leave the result of condition evaluation in num. (builtin_tab): rcpt takes literal argument. * mh/scan.c (action): Remove unused argument. * mh/tests/fmtcomp.at: Update the "if-else" test.
2017-07-07Simplify mh_fvm_run calling sequence.Sergey Poznyakoff9
The commit 6b16ba19 (in its changes to mh/mh_format.c) inadvertently broke the operaton of inc on folders with gaps in sequence (UID) numbering. It turns out that the msgno argument to mh_fvm_run (and msgno member in struct mh_fvm) can be disposed of. If the caller wants to supply an explicit UID number of the messagem, it should use mu_message_set_uid. * mh/mh.h (mh_fvm_run): Take only two arguments: fvm and message. * mh/mh_format.h (mh_fvm) <msgno>: Remove. * mh/fmtcheck.c (run): Set the uid accessor on the created message. * mh/mh_format.c (mh_format_str): Likewise. (builtin_msg, builtin_cur): Always call mh_message_number. * mh/inc.c: Update calls to mh_fvm_run * mh/repl.c: Likewise. * mh/scan.c: Likewise. * mh/sortm.c: Likewise. * mh/tests/inc.at: Check whether inc on folders with gaps in message UIDs produces the correct output.
2017-07-06BugfixSergey Poznyakoff1
* mu-aux/gylwrap (filter): $yyrx is always defined after ce4b84ab. Use $yyrepl instead.
2017-07-06Implement new opool functionSergey Poznyakoff2
* include/mailutils/opool.h (mu_opool_less): New function. * libmailutils/base/opool.c: Likewise.
2017-07-06Rewrite rfc822 date parserSergey Poznyakoff2
* include/mailutils/parse822.h (mu_parse822_day) (mu_parse822_date,mu_parse822_time): Remove protos. * libmailutils/address/parse822.c (mu_parse822_date_time): Rewrite via mu_scan_datetime.
2017-07-06Start rewriting parse822Sergey Poznyakoff4
* include/mailutils/cctype.h (MU_CTYPE_IMSPC) (MU_CTYPE_NWCTL,MU_CTYPE_IMATM): New classes. (mu_isimspc,mu_isnwctl,mu_isimatm): New macros * libmailutils/string/muctype.c: Mark characters from the above classes. * include/mailutils/parse822.h (mu_parse822_is_char) (mu_parse822_is_digit,mu_parse822_is_ctl) (mu_parse822_is_space,mu_parse822_is_htab) (mu_parse822_is_lwsp_char,mu_parse822_is_special) (mu_parse822_is_atom_char,mu_parse822_is_q_text) (mu_parse822_is_d_text,mu_parse822_is_smtp_q): Rewrite as inline static functions, using macros from cctype.h * libmailutils/address/parse822.c: See above. (parse822_is_atom_char_ex): Remove.
2017-07-06Bootstrap gylwrapSergey Poznyakoff1
This removes the need for List::Regexp during development
2017-07-06Improve gylwrapSergey Poznyakoff1
This change allows the user to pre-compile the yyrx expression in gylwrap so that it no longer requires the List::Regexp module. Only supplying the --yysym module will require the module. * mu-aux/gylwrap: New options --reset and --dump
2017-07-06BugfixSergey Poznyakoff1
* am/flex.m4: Add missing 'fi'
2017-07-05Fix VI_REVISION and VI_AGE in configure.acSergey Poznyakoff1
2017-07-05Merge branch 'mhfmt'Sergey Poznyakoff36
2017-07-05Fix the nohost MH format functionmhfmtSergey Poznyakoff2
2017-07-05MH: Rewrite the mymbox function.Sergey Poznyakoff2
* mh/mh_init.c (emailcmp): Rewrite. (email_match): New function. (mh_is_my_name): Cache Alternate-Mailboxes and mh_my_email in a static mu_address_t; use email_match to compare. * mh/tests/fmtfunc.at: Test mymbox function.
2017-07-04Add more fmtfunc testsSergey Poznyakoff2
2017-07-04Minor fixesSergey Poznyakoff3
* mh/mh_fmtgram.y (yyerror): Cast * arguments to int * mh/mh_format.h (mh_instr_t)<size>: New member. * mh/tests/fmtfunc.at (FMTFUNC): Enforce Charset:auto.
2017-07-04mu_parse_date_dtl: Minor fixSergey Poznyakoff1
* libmailutils/datetime/parsedate.y (mu_parse_date_dtl): Set tm.tm_gmtoff and tm.tm_zone upon return (if present).
2017-07-04Improve parsedate & related MH formatsSergey Poznyakoff3
* libmailutils/datetime/parsedate.y (spec production): If a non-signed number is given, treat it as a (positive) timezone, unless tz is already set, or as a year number, unless a year is already set, or throw an error otherwise. (mu_parse_date_dtl): Revert sign of the returned utc_offset * mh/mh_format.c (builtin_tzone): Compatibility fix * mh/tests/fmtfunc.at: Test more functions.
2017-07-04Revamp MH datetime format functionsSergey Poznyakoff2
* mh/mh_format.c (_parse_date): Use mu_parse_date_dtl instead of much stricter mu_parse822_date_time. Return more info. All callers changed (builtin_sday,builtin_szone): Implemented * mh/tests/fmtfunc.at: Comment out (temporarly) the tzone test
2017-07-04Move parsedate.y from base to datetime librarySergey Poznyakoff4
2017-07-04Improve parsedate parserSergey Poznyakoff2
* include/mailutils/datetime.h (MU_PD_MASK_*): New defines, taken from parsedate.y (mu_parse_date_dtl): New proto. * libmailutils/base/parsedate.y: Remove obsolete defines. Move PD_MASK_ defines to datetime.h; use functions from cctype.h and cstr.h (pd_date) <tzname>: New member (%union): New member tz (T_ZONE,T_DAYZONE): Change type to <tz> (zone productions): Set tzname. (mu_parse_date_dtl): New function. Returns detailed time information. (mu_parse_date): Rewrite as an entry point to mu_parse_date_dtl
2017-07-03Test mh format date functionsSergey Poznyakoff2
* mh/mh_format.c (builtin_sday, builtin_szone): Mark as not implemented (builtin_zone): Fix output (builtin_tzone): Fix output * mh/tests/fmtfunc.at: Test most date functions.
2017-07-03BugfixSergey Poznyakoff1
* libmailutils/address/parse822.c (mu_parse822_date_time): Set tm_yday
2017-07-03fmtcheck: use symbolic label names by defaultSergey Poznyakoff4
Actual program counters may differ between different architecture, so avoid using them in the testsuite. * mh/fmtcheck.c: New option -pc requires printing program counters. Unless this option is used, -disass prints only labels where needed. * mh/mh.h (mh_format_dump_disass): Change signature. * mh/mh_format.c (mh_format_dump_disass): Take additional flag indicating whether to print program counters. Compute and print program labels, unless this flag is non-zero. * mh/tests/fmtcomp.at: Don't expect program counters in disassembled code.
2017-07-02MH: fix formataddr.Sergey Poznyakoff5
* mh/mh_fmtgram.y (emit_funcall): Emit mhop_movs acc, reg if MHA_ACC flag is set. * mh/mh_format.c (mh_fvm_run): Clear all registers. (builtin_formataddr): Get previously accumulated addresses from R_ACC (builtin_tab): Mark formataddr with MHA_ACC, remove MHA_OPTARG (mh_format_dump_disass): Account for the new register. (mh_fvm_destroy): Free all registers. * mh/mh_format.h: New register R_ACC. It is needed to implement proper formataddr and concataddr functionality. * mh/tests/fmtcomp.at: Update. * mh/tests/fmtfunc.at: Update.
2017-07-02MH: fix the nodate format functionSergey Poznyakoff2
* mh/mh_format.c (builtin_nodate): Call mu_parse822_date_time directly. (mh_format_dump_disass): Escape literal strings on output. * mh/tests/fmtfunc.at: Test nodate.
2017-07-01Minor fixesSergey Poznyakoff3
2017-07-01MH format: fix processing of special functions: putstrf, putnumf, lit, and numSergey Poznyakoff5
* mh/mh_fmtgram.y (node): Replace noprint with printflag. (escape production): Consult printflag to decide whether to amd how to print (funcall production): Rewrite logic (yylex_func): Make a clear distinction between literals and inlined ctls, which require leading whitespace, and funcalls and components, that don't tolerate it. (emit_funcall): Process special functions separately * mh/mh_format.c (builtin_tab): Mark lit, num, putstrf, and putnumf as specials. * mh/mh_format.h: Revamp MHA_ flags * mh/tests/fmtcomp.at: Update. * mh/tests/fmtfunc.at: Add tests for putstrf and putnumf
2017-07-01MH: Fix mh_builtin field misnomerSergey Poznyakoff2
2017-07-01More fixes in MH format parserSergey Poznyakoff5
* mh/mh_fmtgram.y (codegen_node): Generate mhop_printlit instruction for fmtnode_print node with a literal or number argument. * mh/mh_format.c (mh_fvm_run): Handle mhop_printlit * mh/mh_format.h (mhop_printlit): New opcode. * mh/tests/fmtcomp.at: Update. * mh/tests/fmtfunc.at: Add more tests.

Return to:

Send suggestions and report system problems to the System administrator.