On Wed, Dec 11, 2013 at 03:59:43PM +0100, Gilles Chehade wrote: >Actually that's not possible the way he did it. > > > > |accept from any for domain "domain.tld" alias <aliases> deliver to > maildir > > > |accept from any for domain "domain.tld" virtual <vmap> deliver to > maildir > >The condition for matching a rule does not look into aliases mapping as this >would create some issues that you can easily figure out if you have a relay >rule at the end of your ruleset. > >The conditions include "from", "sender", "for", "recipient", therefore you >can achieve the desired result by having: > > accept from any for domain "domain.tld" recipient <rcptlist> alias > <aliases> ... > accept from any for domain "domain.tld" virtual <vmap> ... > >recipients for @domain.tld that are not part of rcptlist would not match the >first rule but would match the second one. > >That being said, your use-case of having the same domain both primary AND >virtual, is quite strange, while doable it very likely needs a bit more >thinking or down the road there be dragons ;-)
I think I'll rewrite my smtpd.conf to accept from any for domain "domain.tld" alias <aliases> deliver to maildir accept from any for domain "other_domain.tld" virtual <vmap> deliver to maildir and put the aliases for domain.tld in the <aliases> table. One more thing I stumbled upon while testing: Is it a bug that a .forward will not be used for virtual users? I created a .forward and mail sent to that user (primary domain) is delivered to the user that is mentioned in the .forward. So far so good. However, when I send email to a virtual user that is mapped to the same user (the one with the .forward), the mail is delivered in the users mailbox and the .forward is ignored. -- Maurice -- You received this mail because you are subscribed to [email protected] To unsubscribe, send a mail to: [email protected]
