~ubuntu-branches/ubuntu/saucy/postfix/saucy

« back to all changes in this revision

Viewing changes to src/local/recipient.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2011-02-22 11:20:43 UTC
  • mfrom: (1.1.27 upstream)
  • Revision ID: james.westby@ubuntu.com-20110222112043-c34ht219w3ybrilr
Tags: 2.8.0-2
* a little more lintian cleanup
* Fix missing format strings in smtp-sink.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
 
251
251
    /*
252
252
     * Address extension management.
 
253
     * 
 
254
     * XXX Fix 20100422, finalized 20100529: it is too error-prone to
 
255
     * distinguish between "no extension" and "no valid extension", so we
 
256
     * drop an invalid extension from the recipient address local-part.
253
257
     */
254
258
    state.msg_attr.user = mystrdup(state.msg_attr.local);
255
259
    if (*var_rcpt_delim) {
259
263
            msg_warn("%s: address with illegal extension: %s",
260
264
                     state.msg_attr.queue_id, state.msg_attr.local);
261
265
            state.msg_attr.extension = 0;
 
266
            /* XXX Can't myfree + mystrdup, must truncate instead. */
 
267
            state.msg_attr.local[strlen(state.msg_attr.user)] = 0;
 
268
            /* Truncating is safe. The code below rejects null usernames. */
262
269
        }
263
270
    } else
264
271
        state.msg_attr.extension = 0;