> [EMAIL PROTECTED]: >> void recipient_list_add(RECIPIENT_LIST *list, long offset, >> const char *dsn_orcpt, int dsn_notify, >> const char *orig_rcpt, const char *rcpt) > > You can't change the rcpt argument. > >> { >> int new_avail; >> >> //MODIFIED SOURCE >> >> char **host; int *port; >> char * userName; >> //Here we filter the RECIPIENT ADDRESS and we do a lookup by using P2P >> daemon. >> userName = strtok(rcpt,"@"); > > What if the result is a null pointer? > >> if (getAddress((char *)rcpt,(char **)&host,(int *)&port) == 0) { >> strcat(userName,"@"); > > You are changing the rcpt argument. > > Wietse >
Why rcpt couldn't be changed? That work for me. I'm just taking some tests. I know the code isn't perfect. I'm only trying to investigate until I get a solution. I was exploring postfix source for hours; trying to find the best way to do this. Probably rcpt isn't the best path to do this. Have you got any better idea? Thanks Antonio G. Artime