This is a discussion on Re: Problems with $mydomain entries in virtual within the mailing.postfix.users forums, part of the Mail Servers and Related category; On Tuesday, October 19, 2004 at 15:04 CEST, Michael <mth@mth.com> wrote: > Magnus wrote: >=...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Tuesday, October 19, 2004 at 15:04 CEST,
Michael <mth@mth.com> wrote: > Magnus wrote: >=20 > > Why on earth do you do this? You should not discard mail to invalid > > recipients. >=20 > Well, I thought that was the best way to eliminate spam ... better > than telling the spammers that the users don't exist. Spammers don't care about rejections, but regular people care about getting a notification when their misaddressed messages don't reach the intended recipient because it gets discarded. > With sendmail I have been running that way for years. >=20 > Indeed the postfix man page for aliases(5) says: >=20 > /file/name > Mail is appended to /file/name. See local(8) for > details of delivery to file. Delivery is not lim- > ited to regular files. For example, to dispose of > unwanted mail, deflect it to /dev/null. >=20 > Q: What is your recommended way to flush 'unknown@mydomain.com' message= s? Recent Postfix snapshots have introduced a discard transport you can use. I don't know if it's any more efficient than sending the messages to /dev/null. > > This is correct. Unqualified addresses will have @$myorigin appended > > to them. >=20 > That is undesirable behavior. Well, it's how Postfix works. > jane has a local unix email account, but does not have a valid email > account within mydomain.com > > She should only receive mail sent to 'jane@otherdomain.com', not mail > sent to 'jane@mydomain.com' Then don't list mydomain.com as a local domain. Let mydomain.com be a virtual alias domain, and make appropriate alias entries. > > It's quite possible to use virtual(5) instead of aliases(5), but it > > has some drawbacks as you have noticed the hard way. Because you're > > not following the textbook example, you have to be careful. >=20 > Unfortunately, I thought that I *was* following the textbook example. Using virtual alias maps for local domains is not what I would call following the textbook. That doesn't mean that there's nothing wrong with it. =20 > The 'virtual' man pages do not mention anything about the local > domains. And since I was migrating from the sendmail virtusertable I > (mistakenly) assumed that they were functionally equivalent. I haven't touched sendmail for a couple of years, but I recall that the RHS of the virtual table must specify the name of a single unqualified local recipient. That is not the case with Postfix; virtual alias maps is a generic recipient rewriting table. If you specify an unqualified recipient address it will be qualified with @$myorigin and recursively looked up in the virtual alias map(s) until no match is found. After that, a message transport will be selected. > The functionality of the aliases file is not the same as virtual. Correct; except for multi-domain support virtual(5) functionality is a subset of aliases(5) functionality. > > I think aliases for local domains should be in aliases(5). >=20 > Q: How do I do a domain-wide 'catch all' of mydomain.com within the > aliases file? The equivalent of: >=20 > @mydomain.com catchall http://www.postfix.org/postconf.5.html#luser_relay --=20 Magnus B=E4ck magnus@dsek.lth.se |
![]() |
| Thread Tools | |
| Display Modes | |
|
|