Deleted Added
full compact
recipient.c (42575) recipient.c (43730)
1/*
2 * Copyright (c) 1998 Sendmail, Inc. All rights reserved.
3 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
4 * Copyright (c) 1988, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * By using this file, you agree to the terms and conditions set
8 * forth in the LICENSE file which can be found at the top level of
9 * the sendmail distribution.
10 *
11 */
12
13#ifndef lint
1/*
2 * Copyright (c) 1998 Sendmail, Inc. All rights reserved.
3 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
4 * Copyright (c) 1988, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * By using this file, you agree to the terms and conditions set
8 * forth in the LICENSE file which can be found at the top level of
9 * the sendmail distribution.
10 *
11 */
12
13#ifndef lint
14static char sccsid[] = "@(#)recipient.c 8.161 (Berkeley) 12/18/1998";
14static char sccsid[] = "@(#)recipient.c 8.163 (Berkeley) 1/23/1999";
15#endif /* not lint */
16
17# include "sendmail.h"
18# include <grp.h>
19
20/*
21** SENDTOLIST -- Designate a send list.
22**

--- 1167 unchanged lines hidden (view full) ---

1190 }
1191 }
1192 }
1193
1194 if (bitset(EF_VRFYONLY, e->e_flags))
1195 {
1196 /* don't do any more now */
1197 ctladdr->q_flags |= QVERIFIED;
15#endif /* not lint */
16
17# include "sendmail.h"
18# include <grp.h>
19
20/*
21** SENDTOLIST -- Designate a send list.
22**

--- 1167 unchanged lines hidden (view full) ---

1190 }
1191 }
1192 }
1193
1194 if (bitset(EF_VRFYONLY, e->e_flags))
1195 {
1196 /* don't do any more now */
1197 ctladdr->q_flags |= QVERIFIED;
1198 ctladdr->q_flags &= ~QDONTSEND;
1198 e->e_nrcpts++;
1199 xfclose(fp, "include", fname);
1200 return rval;
1201 }
1202
1203 /*
1204 ** Check to see if some bad guy can write this file
1205 **

--- 198 unchanged lines hidden (view full) ---

1404 ** expanded form will be used instead of the current address.
1405 ** This behaviour is turned off if the address is marked
1406 ** QSELFREF We set QSELFREF when we return to recipient().
1407 */
1408
1409 c = a;
1410 while (c != NULL)
1411 {
1199 e->e_nrcpts++;
1200 xfclose(fp, "include", fname);
1201 return rval;
1202 }
1203
1204 /*
1205 ** Check to see if some bad guy can write this file
1206 **

--- 198 unchanged lines hidden (view full) ---

1405 ** expanded form will be used instead of the current address.
1406 ** This behaviour is turned off if the address is marked
1407 ** QSELFREF We set QSELFREF when we return to recipient().
1408 */
1409
1410 c = a;
1411 while (c != NULL)
1412 {
1413 if (tTd(27, 10))
1414 printf(" %s", c->q_user);
1412 if (bitnset(M_HASPWENT, c->q_mailer->m_flags))
1413 {
1414 if (tTd(27, 2))
1415 printf("\t... getpwnam(%s)... ", c->q_user);
1416 if (sm_getpwnam(c->q_user) != NULL)
1417 {
1418 if (tTd(27, 2))
1419 printf("found\n");
1420
1421 /* ought to cache results here */
1422 if (sameaddr(b, c))
1423 return b;
1424 else
1425 return c;
1426 }
1427 if (tTd(27, 2))
1428 printf("failed\n");
1429 }
1415 if (bitnset(M_HASPWENT, c->q_mailer->m_flags))
1416 {
1417 if (tTd(27, 2))
1418 printf("\t... getpwnam(%s)... ", c->q_user);
1419 if (sm_getpwnam(c->q_user) != NULL)
1420 {
1421 if (tTd(27, 2))
1422 printf("found\n");
1423
1424 /* ought to cache results here */
1425 if (sameaddr(b, c))
1426 return b;
1427 else
1428 return c;
1429 }
1430 if (tTd(27, 2))
1431 printf("failed\n");
1432 }
1433 else
1434 {
1435 /* if local delivery, compare usernames */
1436 if (bitnset(M_LOCALMAILER, c->q_mailer->m_flags) &&
1437 b->q_mailer == c->q_mailer)
1438 {
1439 if (tTd(27, 2))
1440 printf("\t... local match (%s)\n", c->q_user);
1441 if (sameaddr(b, c))
1442 return b;
1443 else
1444 return c;
1445 }
1446 }
1447 if (tTd(27, 10))
1448 printf("\n");
1430 c = c->q_alias;
1431 }
1432
1433 if (tTd(27, 1))
1434 printf("\t... cannot break loop for \"%s\"\n", a->q_paddr);
1435
1436 return NULL;
1437}
1449 c = c->q_alias;
1450 }
1451
1452 if (tTd(27, 1))
1453 printf("\t... cannot break loop for \"%s\"\n", a->q_paddr);
1454
1455 return NULL;
1456}