On 10/30/15 4:10 AM, Gilles Chehade wrote: > On Fri, Oct 30, 2015 at 03:56:23AM -0400, Daniel Ouellet wrote: >> Isn't the long form domain <domains> alias <aliases> should be supported >> here for the relay configuration in smtpd.conf >> >> In the man(5) smtpd.conf page I see this form as valid: >> >> accept from any for domain <domains> alias <aliases> deliver to maildir >> accept from any for domain <vdomains> virtual <vusers> deliver to \ >> maildir >> >> So, I would have expected to be able to use these forms: >> accept from any for domain <domains> alias <aliases> relay via \ >> smtp://127.0.0.1:10025 >> accept from any for domain <vdomains> virtual <vusers> relay via \ >> smtp://127.0.0.1:10025 >> >> However it doesn't accept and I need to use this instead: >> >> accept from any for domain <domains> relay via smtp://127.0.0.1:10025 >> accept from any for domain <vdomains> relay via smtp://127.0.0.1:10025 >> >> The users, or aliases part is not accepted. >> >> Any thoughts on this? The reason I asked is that, let say you have a not >> valid users if I can check the users BEFORE doing the local relay, it >> avoid the additional processing and would be rejected right away oppose >> to be after it is locally processed no? >> > > Then you should use the 'recipient' keyword: > > accept [...] for domain <domains> recipient <whitelist> [...] > > Goal of aliases / virtual is to resolve a user-part/address into a > local delivery ... which makes no sense if your mail is not local.
All users and emails address are actually local with local Maildir on the server. The reason I used the virtual part is because there is aliases that are accepted or should be accepted by one local domain, but not an other and if I do not use that, then all aliases will be there for all domains. Example to make it clear. alias in /etc/mail/aliases man1: man man2: man man3: man now let say there is 4 domains. example1.com to example4 .com If I do not do the virtual domains and virtual users, these will all be valid. m...@example1.com m...@example1.com ...etc as well as m...@example4.com But if I want only the aliases in /etc/mail/aliases to apply to only example1.com and example2.com, I actually use the virtual domains and virtual users with the right info in each one to only allow: m...@example3.com to go to the mailbox of man and same for m...@example4.com. I hope it's not to confusing, but in short if I do not use the virtual part, then any local domains with the same users name will be process by the alias and sent to the maildir place. It's the only way I find to not allow all local domains to have all the aliases valid. Hope it make sense. I will try your suggestion and see.