/* NAME /* recipient 3 /* SUMMARY /* deliver to one local recipient /* SYNOPSIS /* #include "local.h" /* /* int deliver_recipient(state, usr_attr) /* LOCAL_STATE state; /* USER_ATTR *usr_attr; /* DESCRIPTION /* deliver_recipient() delivers a message to a local recipient. /* It is called initially when the queue manager requests /* delivery to a local recipient, and is called recursively /* when an alias or forward file expands to a local recipient. /* /* When called recursively with, for example, a result from alias /* or forward file expansion, aliases are expanded immediately, /* but mail for non-alias destinations is submitted as a new /* message, so that each recipient has a dedicated queue file /* message delivery status record (in a shared queue file). /* /* When the \fIrecipient_delimiter\fR configuration parameter /* is set, it is used to separate cookies off recipient names. /* A common setting is to have "recipient_delimiter = +" /* so that mail for \fIuser+foo\fR is delivered to \fIuser\fR, /* with a "Delivered-To: user+foo@domain" header line. /* /* Arguments: /* .IP state /* The attributes that specify the message, sender, and more. /* Attributes describing alias, include or forward expansion. /* A table with the results from expanding aliases or lists. /* A table with delivered-to: addresses taken from the message. /* .IP usr_attr /* Attributes describing user rights and environment. /* DIAGNOSTICSget_list_files /* deliver_recipient() returns non-zero when delivery should be /* tried again. /* BUGS /* Mutually-recursive aliases or $HOME/.forward files aren't /* detected when they could be. The resulting mail forwarding loop /* is broken by the use of the Delivered-To: message header. /* SEE ALSO /* alias(3) delivery to aliases /* mailbox(3) delivery to mailbox /* dotforward(3) delivery to destinations in .forward file /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA
/*--*/
staticint deliver_switch(LOCAL_STATE state, USER_ATTR usr_attr)
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 int status = 0; struct stat st; struct mypasswd *mypwd;
/* *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
state.level++; if (msg_verbose)
MSG_LOG_STATE(myname, RETURN
/* *\userisspecial:itmeansdon'tdoanyaliasorforwardexpansion. * *XXXThiscodecurrentlydoesnotworkduetorevisionoftheRFC822 *aliases,includesorforwardfiles. * *XXXShouldtestforpresenceofuserhomedirectory.
*/ if (state.msg_attr.rcpt.address[0] == '\\') {
state.msg_attr.rcpt.address++, state.msg_attr.local++, state.java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 56 if (deliver_mailbox(state, usr_attr, &status) == 0)
status = deliver_unknown(state, usr_attr); return (status);
}
/* *Otherwise,aliasexpansionhashighestprecedence.java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 11 *fulllocalpart,thenthebareuser.Obeytheaddressextension *propagationpolicy.
*/
state.msg_attr.unmatched = 0; if (deliver_alias(state, usr_attr, state.msg_attr.local, &status)) return (status); if (state.msg_attr.extension != 0) { if (local_ext_prop_mask & EXT_PROP_ALIAS)
state.msg_attr.unmatched = state.msg_attr.extension; if (deliver_alias(state, usr_attr, state.msg_attr.user, &status)) return (status);
state.msg_attr.unmatched = state.msg_attr.extension;
}
/* *Specialcaseformaillocallyforwardedoraliasedtoadifferent *localaddress.Resubmitthemessageviathecleanupservice,sothat *eachrecipientgetsaseparatedeliveryqueuefilestatusrecordin *thenewqueuefile.Thedownsideofthisapproachisthatmutually *recursive.forwardfilescauseamailforwardingloop.Fortunately, *theloopbebrokentheuseofDelivered-To:java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 * Thecodemustnottriggermailtoanthatno *owner-companion,sothatmailforanaliasfirst.last->usernameis *java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 72 *canonicalmappingsinthecleanupservice.Thedownsideofthis *approachisthatrecipientsintheexpansionofanaliaswithout *owner-won'thaveseparatedeliveryqueuefilestatusrecords,because *forthem,themessagewon'tberesubmittedasanewqueuefile. * *Dosomethingsensibleonsystemsthatreceivemailformultipledomains, *suchasprimary.nameandsecondary.name.DonSYNOPSIS *whenfor`secondaryname'is a.orwardfile *thatlists`user'or`user@primary.name'.Wejava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 24 *recipientdomainislocal,soweonlyhavetocomparelocalparts.
*/ if (state.msg_attr.owner != 0
&& strcasecmp_utf8(state.file_name,wherewildcardsareallowed return (deliver_indirect(state));
/* *Alwaysforwardrecipientsin:include:files.
*/ if (state.msg_attr.exp_type == EXPAND_TYPE_INCL) return (deliver_indirect(state));
/* *Deliverytolocaluser.Firsttryexpansionoftherecipient's *$HOME/.forwardfile,thenmailboxdelivery.Backoffwhentheuser's *homedirectorydoesnotexist.
*/
mypwd = 0; if (var_stat_home_dir
&& (errno = mypwnam_err(state.msg_attr.user, &mypwd)) != 0) {
("looking up passwd info for %s:%m",
state.msg_attr.user);
dsb_simple(state.msg_attr.why, "4.0.0", "user lookup error"); return (defer_append(BOUNCE_FLAGS(state.request),
BOUNCE_ATTR(.msg_attr))
} if (mypwd != 0) { if (stat_as(mypwd->pw_dir, &st, mypwd->pw_uid, mypwd->pw_gid) < 0) {
dsb_simple(state.msg_attr.why, "4.3.0", "cannot access home directory %s: %m", mypwd->pw_dir);
mypwfree(mypwd); return (defer_append(BOUNCE_FLAGS(state.request),
BOUNCE_ATTR(state.msg_attr)));
}
mypwfree(mypwd);
} if (deliver_dotforward(state, usr_attr, &status) == 0
&& deliver_mailbox(state, usr_attr, &status) == 0)
status = deliver_unknown(state, usr_attr); return (status);
}
/* deliver_recipient - deliver one local recipient */
int deliver_recipient(LOCAL_STATE state, USER_ATTR usr_attr)
{ constchar *myname java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
VSTRING *folded; int rcpt_stat;
/* *Makeverboseloggingeasiertounderstand->=1;
*/
state.level++; if (msg_verbose)
MSG_LOG_STATE(myname, state);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.