Changeset 1588


Ignore:
Timestamp:
Jun 28, 2011, 1:49:33 AM (14 years ago)
Author:
John Small
Message:

1) Fix bug causing crash during NNTP send.
2) Changed version format to use x.yy.x format consistently
3) Added support for SMTP ports other than 25
4) Improved internal documentation for ReleaseTool.cfg

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ReleaseTool.cfg

    r1575 r1588  
    2020;     Section lines mark the start of a new set of data.  The section
    2121;     name (within the brackets) defines which type of data follows.
    22 ;     Initially ReleaseTool supports only two section names: FTP and NNTP.
     22;     ReleaseTool currently supports section names: FTP, NNTP and SMTP.
    2323
    2424;     FTP sections are used to define data for uploading one or more files
     
    2727;     NNTP sections are used to define data for uploading messages to one
    2828;     or more newsgroups on a single newsgroup server.
     29
     30;     SMTP sections are used to define data for sending email messages
     31;     through a single email server. SMTP sections can be set up to use
     32;     an external program, like PMMail/2 or REXXMAIL, by defining an
     33;     appropriate command. If no command is defined then email is sent
     34;     using Releasetool's internal REXX code for opeing a socket to an
     35;     SMTP server, loggin in and sending the message.
    2936
    3037;  4) Data lines. These lines provide the actual data to ReleaseTool.
     
    6673;                                         in the same directory as ReleaseTool.
    6774;     NEWSGROUPS           NNTP     1     A comma-separated list of newsgroups for this host.
     75;     PORT                 SMTP     5     Port number. Default: port 25
    6876
    6977;     Codes:
     
    7280;        3: Required, one or more per section
    7381;        4: Optional, one or more per section
     82;        5: Optional, one per section
    7483
    7584;     "Special" key-values:
     
    8796
    8897;     "From" notes:
    89 ;        -  For newsgroups you may want to use a disguied email address to avoid spam.
     98;        -  For newsgroups you may want to use a disguised email address to avoid spam.
    9099;        -  Accepted formats:
    91100;           "Full name" <user@domain.net>
     
    121130
    122131[NNTP]                  ; ReleaseTool user's news server/groups definition
    123 Newsgroups  = comp.os.os2.apps,comp.os.os2.utilities
    124 ;Newsgroups  = alt.test
     132;Newsgroups  = comp.os.os2.apps,comp.os.os2.utilities
     133Newsgroups  = alt.test
    125134Host        =
    126135Userid      =
     
    134143;Command     = call d:\utils\internet\rexxmail\rexxmail /NewMessageSend "%%TO%% ?subject=%%SUBJECT%% &body=%%MESSAGE_BODY_FILE%%" /Address=%%FROM%% /SMTPServer=%%SERVER%% /SMTPUSER=%%USERID%% /SMTPPASSWORD=%%PASSWORD%% /TimeZone=%%UTCOFFSET%%
    135144Host        = smtp.toast.net
     145Port        = 587
    136146Userid      = jsmall@toast.net
    137147From        = "John Small" <jsmall@os2world.net>
  • trunk/ReleaseTool.cmd

    r1586 r1588  
    744744         do
    745745            say
    746             call charout , 'Please enter the version (x.yy.zz) for the pending release: '
     746            call charout , 'Please enter the version (x.yy.z) for the pending release: '
    747747            ver.in = linein()
    748748         end
     
    766766   ver.full       = ver.major || '.' || ver.minor || '.' || ver.CSDlevel
    767767   ver.list       = ver.major || '.' || right(ver.minor, 2, '0') || '.' || right(ver.CSDlevel, 2, '0')
    768    ver.wpi        = translate(ver.list, '-', '.')
    769    ver.tag        = translate(ver.list, '_', '.')
     768   ver.wpi        = translate(ver.full, '-', '.')
     769   ver.tag        = translate(ver.full, '_', '.')
    770770return
    771771
     
    782782   cfg.FTP.keys   = 'HOST USERID PASSWORD DIRECTORY FILE DESCRIPTIVE_HOSTNAME'
    783783   cfg.NNTP.keys  = 'HOST USERID PASSWORD FROM SIGNATURE NEWSGROUPS'
     784/*
    784785   cfg.SMTP.keys  = 'HOST USERID PASSWORD FROM SIGNATURE COMMAND UTCOFFSET'
     786*/
     787   cfg.SMTP.keys  = 'HOST PORT USERID PASSWORD FROM SIGNATURE COMMAND UTCOFFSET'
    785788
    786789   cfg.NNTP.signature_preface     = cfg.crlf || '-- ' || cfg.crlf
     
    835838               key_name = translate(strip(key_name))
    836839               key_value = strip(key_value)
    837                if left(key_value, 1) = '"' then
     840               if left(key_value, 1) = '"' & key_name \= 'FROM' then
    838841                  parse var key_value '"' key_value '"'
    839842               select
     
    14761479   call lineout tempfile, ver.full 'Changes:'
    14771480   history_file = 'history'
    1478    call stream history_file, 'c', 'close'
    14791481   do until left(history_line || 'xxx', 3)  = ' o '
    14801482      history_line = linein(history_file)
     
    19351937         end
    19361938
    1937    socket = ConnectToMailServer(cfg.SMTP.currentSMTP.host)
     1939   socket = ConnectToMailServer(cfg.SMTP.currentSMTP.host, cfg.SMTP.currentSMTP.port)
    19381940   if socket < 0 then
    19391941      do
     
    21312133
    21322134ConnectToMailServer: procedure expose (globals)
     2135   parse arg email_server_name, email_server_port
     2136   if strip(email_server_port) = '' then
     2137      email_server_port = 25
     2138
    21332139   myIPaddr = SockGetHostid()
    21342140   rc = SockGetHostByAddr(myIPaddr, 'hoststem.')
     
    21392145      end
    21402146   cfg.myName = hoststem.name
     2147/*
    21412148   rc = SockGetHostByName(cfg.SMTP.currentSMTP.host, 'hoststem.')
     2149*/
     2150   rc = SockGetHostByName(email_server_name, 'hoststem.')
    21422151   if rc = 0 then
    21432152      do
     
    21542163         inetaddr.family = 'AF_INET'
    21552164         inetaddr.addr   = serverIPaddr
    2156          inetaddr.port   = 25
     2165         inetaddr.port   = email_server_port
    21572166         exit_rc         = SockConnect(socket, 'inetaddr.')
    21582167      end
Note: See TracChangeset for help on using the changeset viewer.