Hi Wietse, Thanks for your response. Assuming this information, it should discard as indicated by transport_maps. However, we are not seeing this behaviour.
This is the course of events: 1) Mail is accepted by postfix. After that, an indication is passed to valvula on smtpd_data_restrictions: smtpd_data_restrictions = check_policy_service inet:127.0.0.1:3579 2) Then, valvula based on its configuration, reports FILTER transp2: Sep 10 16:49:53 host valvulad[16853]: info: FILTER: fran...@aspl.es -> w...@asplhost.com (sasl_user=mailing-sasluser), port 3579, rcpt count=1, queue-id 11C68F762, from X.X.X.X, no-tls: transp2: 3) That causes postfix to use transp2 declared at master.cf, Sep 10 16:49:53 host postfix/smtpd[15410]: 11C68F762: filter: DATA from host[X.X.X.X]: <DATA>: Data command triggers FILTER transp2:; from=<fran...@aspl.es> to=<w...@asplhost.com> proto=ESMTP helo=<[192.168.0.132]> ...which activates smtp(8) transport with the following configuration at master.cf: transp2 unix - - n - - smtp -o smtp_bind_address=X.X.X.X -o smtp_helo_name=outboundname.asplhost.com -o syslog_name=postfix2 4) But instead of discarding it, smtp(8) attempts to actually deliver it without considering what's declared in transport_maps: Sep 10 17:02:15 host postfix2/smtp[26624]: AC04CEA1A: to=<w...@asplhost.com>, relay=mx1.asplhost.com[X.X.X.X]:25, delay=74662, delays=74268/392/0.08/1.1, dsn=5.1.1, status=bounced (host mx1.asplhost.com[X.X.X.X] said: 550 5.1.1 <w...@asplhost.com>: Recipient address rejected: User unknown in virtual mailbox table (in reply to RCPT TO command)) NOTE: certainly it fails because the account does not exists, but that's not the point: it should have been discarded It is like smtp(8) is ignoring what's declared on transport_maps because it already has an order to use the transport indicated by the FILTER +transp2 (point 2). Is it right or it shouldn't happen? If it is the intended behaviour, how can we configure a transport (transp2) that instructs the particular IP to be used and, at the same time, we can discard particular recipients in a multi-recipient message using transport_maps? Thanks for your time and support, Best Regards, PS: Here is the complete configuration file we are using: http://www.aspl.es/postfix-main.cf.txt (ips and host names masked) http://www.aspl.es/postfix-master.cf.txt (ips and host names masked) At the same time, /etc/postfix/local-parts-spam-traps-accounts has the following content: /^web@/ discard: > > At this point, we are trying to discard based on the destination > > domain and/or the local-part@ (without considering the destination > > domain) by reporting a DISCARD code using delegation protocol (with > > valvula [1]). > > As documented, the DISCARD action discards the message, not the > recipient. To drop only the recipient, use transport_maps to send > the recipient to the discard(8) service. > > /etc/postfix/main.cf: > transport_maps = hash:/etc/postfix/transport > > /etc/postfix/transport: > u...@example.com discard: > > After changing the file, do "postmap hash:/etc/postfix/transport". > > To discard a recipient based on localpart, use a pcre table instead; > this requires no postmap command. > > /etc/postfix/main.cf: > transport_maps = pcre:/etc/postfix/transport > > /etc/postfix/transport: > # The ^ at the beginning is required to avoid false matches. > /^user@/ discard: > > Of course this will have collateral damage; it discards mail for > recipients in unrelated domains. > > Wietse -- Francis Brosnan Blázquez <francis.bros...@aspl.es> ASPL 91 134 14 22 - 91 134 14 45 - 91 116 07 57 AVISO LEGAL Este mensaje se dirige exclusivamente a su destinatario. Los datos incluidos en el presente correo son confidenciales y sometidos a secreto profesional, se prohíbe divulgarlos, en virtud de las leyes vigentes. Si usted no lo es y lo ha recibido por error o tiene conocimiento del mismo por cualquier motivo, le rogamos que nos lo comunique por este medio y proceda a destruirlo o borrarlo. En virtud de lo dispuesto en la Ley Orgánica 15/1999, de 13 de diciembre, de Protección de Datos de Carácter Personal, le informamos de que sus datos de carácter personal, recogidos de fuentes accesibles al público o datos que usted nos ha facilitado previamente, proceden de bases de datos propiedad de Advanced Software Production Line, S.L. (ASPL). No obstante, usted puede ejercitar sus derechos de acceso, rectificación, cancelación y oposición dispuestos en la mencionada Ley Orgánica, notificándolo por escrito a: ASPL - Protección Datos, C/Antonio Suárez 10 A-102, 28802, Alcalá de Henares (Madrid).