could be used to handle other low-level protocols.
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 3.76
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.101
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 3.11
# include <sys/mx.h>
#ifndef DAEMON
# include <sys/mx.h>
#ifndef DAEMON
-SCCSID(@(#)daemon.c 3.10 %G% (w/o daemon mode));
+SCCSID(@(#)daemon.c 3.11 %G% (w/o daemon mode));
#else
# include <sys/socket.h>
# include <net/in.h>
#else
# include <sys/socket.h>
# include <net/in.h>
-SCCSID(@(#)daemon.c 3.10 %G% (with daemon mode));
+SCCSID(@(#)daemon.c 3.11 %G% (with daemon mode));
/*
** DAEMON.C -- routines to use when running as a daemon.
/*
** DAEMON.C -- routines to use when running as a daemon.
*/
SendmailAddress.sin_addr.s_addr = 0;
*/
SendmailAddress.sin_addr.s_addr = 0;
+ SendmailAddress.sin_port = IPPORT_SMTP;
/*
** Try to actually open the connection.
/*
** Try to actually open the connection.
**
** Parameters:
** host -- the name of the host.
**
** Parameters:
** host -- the name of the host.
+** port -- the port number to connect to.
** outfile -- a pointer to a place to put the outfile
** descriptor.
** infile -- ditto for infile.
** outfile -- a pointer to a place to put the outfile
** descriptor.
** infile -- ditto for infile.
-makeconnection(host, outfile, infile)
+makeconnection(host, port, outfile, infile)
FILE **outfile;
FILE **infile;
{
FILE **outfile;
FILE **infile;
{
if ((SendmailAddress.sin_addr.s_addr = rhost(&host)) == -1)
return (EX_NOHOST);
if ((SendmailAddress.sin_addr.s_addr = rhost(&host)) == -1)
return (EX_NOHOST);
+ if (port == 0)
+ port = IPPORT_SMTP;
+ SendmailAddress.sin_port = port;
/*
** Try to actually open the connection.
/*
** Try to actually open the connection.
# include <syslog.h>
# endif LOG
# include <syslog.h>
# endif LOG
-SCCSID(@(#)deliver.c 3.75 %G%);
+SCCSID(@(#)deliver.c 3.76 %G%);
/*
** DELIVER -- Deliver a message to a list of addresses.
/*
** DELIVER -- Deliver a message to a list of addresses.
if (!clever)
syserr("non-clever IPC");
if (!clever)
syserr("non-clever IPC");
- i = makeconnection(pvp[1], pmfile, prfile);
+ if (pvp[2] != NULL)
+ i = atoi(pvp[2]);
+ else
+ i = 0;
+ i = makeconnection(pvp[1], i, pmfile, prfile);
if (i != EX_OK)
{
ExitStat = i;
if (i != EX_OK)
{
ExitStat = i;
-static char SccsId[] = "@(#)SendMail version 3.100 of %G%";
+static char SccsId[] = "@(#)SendMail version 3.101 of %G%";
-char Version[] = "3.100 [%G%]";
+char Version[] = "3.101 [%G%]";