Yes, I arrived to the same conclusion that after each alias expansion the whole process of finding an accept rules restart from the beginning. Gilles added it was as a local sender. So now I find useless and confusing adding any relay/deliver after alias, I split the line, the first rela/deliver without alias, the second is alias only. Order does matter ! Now I can use relay lmtp: as suggested by Gilles. OpenSMTP now only deals with mailaddresses, and only Dovecot deals with mailaddeses --> mailbox mapping. Sane separation of responsabilty. Of course the MTA has to anticipate the acceptance by the LDA. Minor issue:,relay via lmtp: doesńt socket.
El domingo, 8 de diciembre de 2013, Gilles Chehade escribió: > On Sun, Dec 08, 2013 at 03:20:28PM +0000, John Cox wrote: > > Hi > > > > Hi, > > > > 1st off, very many thanks for your prompt and illuminating reply. I'll > > get the current version of OpenSMTPD and try to make it work shortly. > > > > There's one bit I don't quite understand in your reply though: > > > > >> accept from any for domain example.net\ > > >> alias <aliases>\ > > >> deliver to maildir %(user.directory)/Maildir > > >> > > >> seems clearly wrong as we don't want to deliver there. So we have to > > >> split the forwarding rules from the alias rules? > > >> > > > > > >The "deliver" part is the default action, it will only be matched for > > >aliases entries that map to local users, if a user has an alias that > > >has an email address as a target, mail will match that action first > > >so the deliver part will be discarded. > > > > That is excellent, but could you expand on what happens there. The > > alias expands to an email address - so far so good - it isn't > > delivered locally because it isn't a local address - yes - but what > > happens next? Does smtpd run the entire ruleset over the new > > destination address from the start, does it continue to run the > > ruleset from the current line (i.e. earlier rules aren't checked) or > > is there some other auto-magic that forwards it to the right > > destination? > > > > Quite simple actually, say you have an alias that states: > > gilles [email protected] <javascript:;> > > and a ruleset that goes: > > accept from any for domain foobar.org deliver to maildir > accept from local for any relay > > When you send mail to [email protected] <javascript:;>, during the smtp > transaction we > find a match on the first rule, we generate an envelope for it. > > That envelope goes throuh an expansion process to resolve aliasing, and > at this point we realize that we're not the final destination. > > We therefore generate a new envelope locally and reapply the entire > ruleset on it, but since this process is initiated from a user which > is valid to start with, the envelope is generated with a local source > and requires a rule to accept relaying from local. > > > > Sorry to take up your time, but I'd really like to understand what is > > actually meant to happen so I don't waste your time in the future. > > > > np, these kinds of questions are nice to fill our archives ;-) > > > -- > Gilles Chehade > > https://www.poolp.org @poolpOrg > > -- > You received this mail because you are subscribed to > [email protected]<javascript:;> > To unsubscribe, send a mail to: [email protected]<javascript:;> > >
