diff options
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | etrn.c | 2 | ||||
-rw-r--r-- | fetchmail.c | 10 | ||||
-rw-r--r-- | fetchmail.man | 1 |
4 files changed, 16 insertions, 4 deletions
@@ -1,6 +1,13 @@ Release Notes: ------------------------------------------------------------------------------ +fetchmail-3.5 () + +features -- + +* The host that ETRN specifies is now set by the smtphost option. + +------------------------------------------------------------------------------ fetchmail-3.4 (Wed Feb 12 19:23:06 EST 1997) features -- @@ -45,7 +45,7 @@ static int etrn_getrange(FILE *sockfp, struct query *ctl, int*countp, int*newp) *countp = *newp = -1; /* make sure we don't enter the fetch loop */ /* ship the actual poll and get the response */ - gen_send(sockfp, "ETRN %s", fetchmailhost); + gen_send(sockfp, "ETRN %s", ctl->smtphost); if (ok = gen_recv(sockfp, buf, sizeof(buf))) return(ok); diff --git a/fetchmail.c b/fetchmail.c index 20c9cc45..702e2a67 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -116,8 +116,12 @@ int main (int argc, char **argv) } } - /* we'll need this for error messages */ - gethostname(tmpbuf, sizeof(tmpbuf)); + /* we'll need this for the SMTP forwarding target and error messages */ + if (gethostname(tmpbuf, sizeof(tmpbuf))) + { + fprintf(stderr, "fetchmail: can't determine fetchmail's host!"); + exit(PS_IOERR); + } fetchmailhost = xstrdup(tmpbuf); /* @@ -518,7 +522,7 @@ static int load_params(int argc, char **argv, int optind) def_opts.server.protocol = P_AUTO; def_opts.server.timeout = CLIENT_TIMEOUT; def_opts.remotename = user; - def_opts.smtphost = "localhost"; + def_opts.smtphost = fetchmailhost; /* this builds the host list */ if (prc_parse_file(rcfile) != 0) diff --git a/fetchmail.man b/fetchmail.man index 788b3ebb..549fdfba 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -167,6 +167,7 @@ under POP3 or ETRN. .TP .B \-S host, --smtphost host Specify a host to forward mail to (other than localhost). +In ETRN mode, set the host that the mailserver is asked to ship mail to. .TP .B \-m, \--mda You can force mail to be passed to an MDA directly (rather than |