Prev: MDN and mupliple recipients
Next: Move queue
From: Alex on 18 Mar 2010 11:41 Hi All My problem is describe here http://www.mail-archive.com/postfix-users(a)postfix.org/msg16775.html Basically I have a mysql table with thousands recipients , on the left hand I have recipient and on the right hand I have the action (REJECT) and some additional text user(a)domain.tld REJECT Additional text In case of am multi-recipient message, if I use check_recipient_access and one of recipients is found in that table, the all message is rejected and affects all recipients of the message. From docs I understand that if I want to treat different every recipient ,I have two solutions : 1 - use a transport table for that recipient, something like : user(a)domain.tld discard - in this case all recipients in the message pass except the rcpt to: <user(a)domain.tld> who is discarded. This solution doesn't help me much because I want notify the sender that one of his recipients was rejected and second : I need to build a new transport table for those recipients. 2 - the second solution is to use a policy service and the ability to use the "instance" attribute. Is there a policy service for my problem or someone have a better solution? Thanks Alex
From: Victor Duchovni on 18 Mar 2010 12:48 On Thu, Mar 18, 2010 at 05:41:32PM +0200, Alex wrote: > Basically I have a mysql table with thousands recipients , on the left hand > I have recipient and on the right hand I have the action (REJECT) and some > additional text > > user(a)domain.tld REJECT Additional text > > In case of am multi-recipient message, if I use check_recipient_access and > one of recipients is found in that table, the all message is rejected and > affects all recipients of the message. From false premises (the above is not true), you get false conclusions. Postfix rejects just the recipient in question. If the sending SMTP client fails to process the rejection of a single recipient out of many correctly, then this client is the problem. Generally, only MUAs and other "submission" SMTP talkers have such issues. If you are an MSA for poorly -- Viktor. P.S. Morgan Stanley is looking for a New York City based, Senior Unix system/email administrator to architect and sustain our perimeter email environment. If you are interested, please drop me a note.
From: Noel Jones on 18 Mar 2010 12:53 On 3/18/2010 10:41 AM, Alex wrote: > Hi All > > My problem is describe here > http://www.mail-archive.com/postfix-users(a)postfix.org/msg16775.html > > Basically I have a mysql table with thousands recipients , on the left > hand I have recipient and on the right hand I have the action (REJECT) > and some additional text > > user(a)domain.tld REJECT Additional text > > In case of am multi-recipient message, if I use check_recipient_access > and one of recipients is found in that table, the all message is > rejected and affects all recipients of the message. No, that's not how postfix works. Only the "current" recipient is rejected. Every other recipient gets their own chance to be accepted or rejected. If postfix does not behave this way for you, then you've misconfigured something. Feel free to follow these directions to ask for help: http://www.postfix.org/DEBUG_README.html#mail > > From docs I understand that if I want to treat different every > recipient ,I have two solutions : You're reading a different part of the docs that does not apply to smtpd_recipient_restrictions, or an action other than REJECT. -- Noel Jones
From: Alex on 19 Mar 2010 06:27 Noel Jones wrote: > On 3/18/2010 10:41 AM, Alex wrote: >> Hi All >> >> My problem is describe here >> http://www.mail-archive.com/postfix-users(a)postfix.org/msg16775.html >> >> Basically I have a mysql table with thousands recipients , on the left >> hand I have recipient and on the right hand I have the action (REJECT) >> and some additional text >> >> user(a)domain.tld REJECT Additional text >> >> In case of am multi-recipient message, if I use check_recipient_access >> and one of recipients is found in that table, the all message is >> rejected and affects all recipients of the message. > > No, that's not how postfix works. Only the "current" recipient is > rejected. Every other recipient gets their own chance to be accepted or > rejected. > > If postfix does not behave this way for you, then you've misconfigured > something. Feel free to follow these directions to ask for help: > http://www.postfix.org/DEBUG_README.html#mail > >> >> From docs I understand that if I want to treat different every >> recipient ,I have two solutions : > > You're reading a different part of the docs that does not apply to > smtpd_recipient_restrictions, or an action other than REJECT. > > > -- Noel Jones Hi Thank you for you answer but I can't figure what is wrong. I review my config and make more tests. The relevant part is that : 1. if I use telnet , connect to the server Mail From:<test(a)mydomain.tld> RCPT TO:<recipient1> 250 2.1.5 Ok RCPT TO:<recipient2> #listed recipient 554 5.7.1 <recipient2>: Recipient address rejected: some text DATA 354 End data with <CR><LF>.<CR><LF> test .. 250 2.0.0 Ok: queued as A532D67CC4B The message is delivered to the first recipient (correct and described behavior) I have put the server in verbose mode and do the same test but with thunderbird and a webmail client. ................ postfix/smtpd[5652]: send attr protocol_state = RCPT postfix/smtpd[5652]: < unknown[myip]: RCPT TO:<recipient1> postfix/smtpd[5652]: dict_proxy_lookup: table=mysql:/etc/postfix/mysql-recipient.cf flags=lock|fold _fix key=recipient1 -> status=1 result= ................... postfix/smtpd[5652]: send attr protocol_state = RCPT postfix/smtpd[5652]: < unknown[myip]: RCPT TO:<recipient2> postfix/smtpd[5652]: dict_proxy_lookup: table=mysql:/etc/postfix/mysql-recipient.cf flags=lock|fold _fix key=recipient2-> status=0 result=REJECT postfix/smtpd[5652]: check_table_result: proxy:mysql:/etc/postfix/mysql-recipient.cf REJECT postfix/smtpd[5652]: 9BA3467CC45: reject: RCPT from unknown[myip]: 554 5.7.1 <recipient2>: text from=<myaddress> to=<recipeint2> proto=ESMTP helo=<localhost.localdomain> postfix/smtpd[5652]: generic_checks: name=check_recipient_access status=2 postfix/smtpd[5652]: > unknown[myip]: 554 5.7.1 <recipient2>: Recipient address rejected: text Both recipients are evaluated , the second gets rejected but no message is delivered (to the first recipient) My relevant configs are: smtpd_recipient_restrictions = check_recipient_access proxy:mysql:/etc/postfix/mysql-recipient.cf, ................. permit_mynetworks, permit_sasl_authenticated, ..................... permit Viktor also wrote : "From false premises (the above is not true), you get false conclusions. Postfix rejects just the recipient in question. If the sending SMTP client fails to process the rejection of a single recipient out of many correctly, then this client is the problem. Generally, only MUAs and other "submission" SMTP talkers have such issues. If you are an MSA for poorly" Alex
From: /dev/rob0 on 19 Mar 2010 09:04
On Fri, Mar 19, 2010 at 12:27:21PM +0200, Alex wrote: > Noel Jones wrote: > >On 3/18/2010 10:41 AM, Alex wrote: > >>In case of am multi-recipient message, if I use > >>check_recipient_access and one of recipients is found in that > >>table, the all message is rejected and affects all recipients > >>of the message. > > > >No, that's not how postfix works. Only the "current" recipient > >is rejected. Every other recipient gets their own chance to be > >accepted or rejected. snip > Thank you for you answer but I can't figure what is wrong. I > review my config and make more tests. The relevant part is that : > > 1. if I use telnet , connect to the server > > Mail From:<test(a)mydomain.tld> > RCPT TO:<recipient1> > 250 2.1.5 Ok > RCPT TO:<recipient2> #listed recipient > 554 5.7.1 <recipient2>: Recipient address rejected: some text > DATA Different SMTP clients act differently. Here you are the client. You're remembering that you had a 250 for recipient1, so you did not abort at the 554 for recipient2. You went on through DATA, successfully completing the SMTP session. > 354 End data with <CR><LF>.<CR><LF> > test > . > 250 2.0.0 Ok: queued as A532D67CC4B > > The message is delivered to the first recipient (correct and > described behavior) And this is typical of MTA SMTP clients. > I have put the server in verbose mode and do the same test but > with thunderbird and a webmail client. snip > Both recipients are evaluated , the second gets rejected but no > message is delivered (to the first recipient) You cut out the relevant part of the logs, which in NON-verbose mode would have probably showed the client disconnecting. It ended the session without DATA. > Viktor also wrote : > "From false premises (the above is not true), you get false > conclusions. Postfix rejects just the recipient in question. If the > sending SMTP client fails to process the rejection of a single > recipient out of many correctly, then this client is the problem. > Generally, only MUAs and other "submission" SMTP talkers have such > issues. If you are an MSA for poorly" Thunderbird is a MUA, a submission client. It's not a MTA. It looks like it considers any rejection to be absolute. "Attachment issues," you might call it in psychobabble; it cannot handle rejection. Maybe it's a bug ... strictly speaking it is, but the role of a MUA is different, so perhaps this is the best thing for a MUA to do. It alerts the user that his/her recipient list has problems, and forces the user to correct those problems before sending the mail. As Victor was saying, this is not uncommon for submission clients. -- Offlist mail to this address is discarded unless "/dev/rob0" or "not-spam" is in Subject: header |