Dne 19.9.2012 v 19:37 Viktor Dukhovni napsal(a): > On Wed, Sep 19, 2012 at 07:46:06PM +0200, Michal Kurka wrote: > > > Hello. > > > > I use virtual_transport and my own script for local delivery: > > > > main.cf: > > virtual_mailbox_maps = hash:/etc/postfix/vmailbox > > virtual_transport = locdel > > > > master.cf: > > locdel unix - n n - - pipe > > flags=DRXhu user=vmail:vmail > > argv=/usr/local/bin/MailDelivery.sh ${sender} ${recipient} > > If this script is delivering mail to per-user mailboxes, it generally > cannot do so atomically when the same message arrives for multiple > users. Therefore it is generally necessary to set the recipient limit > for this transport to 1. > > locdel_destination_recipient_limit = 1
Yes, I know about it, I've had it set. > > If a mail is arriving from smtpd(8) for local delivery via "locdel" and > > "MailDelivery.sh" return error, then mail remains in local queue (if > > temporary error) or generate bounce mail. > > I need to return SMTP-error to sender server without put in local > > queue as well as local(8). Is it possible? > > No. Postfix delivery is asynchronous. > http://www.postfix.org/OVERVIEW.html I'm viewing "http://www.postfix.org/OVERVIEW.html#delivering". The local(8) and virtual(8) are at the same level. Why local(8) return SMTP-error and virtual(8) generate bounce mail? I tried turn on debug (with debug_peer_level and debug_peer_list). I added "reject_unverified_recipient" to "smtpd_recipient_restrictions". I see in maillog that verify(8) tests deliverability using only lookup in "/etc/postfix/vmailbox", no test execute locdel-transport. This is logical, because executing a final delivery program causes a delivery process. So how to solve it? There is "address_verify_virtual_transport". May be use external program for "address_verify_virtual_transport" returning error if mail is not deliverable. Anyone have experience with this? -- Michal Kurka - Mysak sluzby spojene s operacnim systemem Linux