aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-09-06 17:13:37 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-09-06 17:13:37 +0000
commit9e9c28d491e7836dcea9feea75646bd9cfc32ec9 (patch)
tree5f96c6cbb18dd3d74fb62a1d2b325d3e717a65c6 /driver.c
parentcbb7dda83d7346b32d9973af6eccf99c8c6b99b3 (diff)
downloadfetchmail-9e9c28d491e7836dcea9feea75646bd9cfc32ec9.tar.gz
fetchmail-9e9c28d491e7836dcea9feea75646bd9cfc32ec9.tar.bz2
fetchmail-9e9c28d491e7836dcea9feea75646bd9cfc32ec9.zip
Better RCPT TO address generation.
svn path=/trunk/; revision=1317
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/driver.c b/driver.c
index b290efcd..33d245e9 100644
--- a/driver.c
+++ b/driver.c
@@ -995,10 +995,13 @@ int num; /* index of message */
for (idp = xmit_names; idp; idp = idp->next)
if (idp->val.num == XMIT_ACCEPT)
{
+ if (strchr(idp->id, '@'))
+ strcpy(addr, idp->id);
+ else
#ifdef HAVE_SNPRINTF
- snprintf(addr, sizeof(addr)-1, "%s@%s", idp->id, desthost);
+ snprintf(addr, sizeof(addr)-1, "%s@%s", idp->id, desthost);
#else
- sprintf(addr, "%s@%s", idp->id, desthost);
+ sprintf(addr, "%s@%s", idp->id, desthost);
#endif /* HAVE_SNPRINTF */
if (SMTP_rcpt(ctl->smtp_socket, addr) == SM_OK)
@@ -1014,12 +1017,12 @@ int num; /* index of message */
if (!good_addresses)
{
#ifdef HAVE_SNPRINTF
- snprintf(addr, sizeof(addr)-1, "%s@%s", idp->id, desthost);
+ snprintf(addr, sizeof(addr)-1, "%s@%s", user, desthost);
#else
- sprintf(addr, "%s@%s", idp->id, desthost);
+ sprintf(addr, "%s@%s", user, desthost);
#endif /* HAVE_SNPRINTF */
- if (SMTP_rcpt(ctl->smtp_socket, user) != SM_OK)
+ if (SMTP_rcpt(ctl->smtp_socket, addr) != SM_OK)
{
error(0, 0, "can't even send to calling user!");
free(headers);