On 8/19/2010 5:00 PM, Daniel Prieto wrote:
>
>
> On 8/19/2010 2:33 PM, Brian Evans - Postfix List wrote:
>>  On 8/19/2010 2:21 PM, Daniel Prieto wrote:
>>>
>>>
>>> On 8/18/2010 4:16 PM, Brian Evans - Postfix List wrote:
>>>>  On 8/18/2010 3:50 PM, Daniel Prieto wrote:
>>>>> Brian,
>>>>>
>>>>>
>>>>> On 8/18/2010 2:17 PM, Brian Evans - Postfix List wrote:
>>>>>>  On 8/18/2010 2:05 PM, Daniel Prieto wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> I have moved from Sendmail to Postfix and eliminated Student email
>>>>>>> accounts and kept staff accounts.
>>>>>>>  I'm using 'virtual_alias_maps" to forward old student email
>>>>>>> address
>>>>>>> to their other new email address that was given to me. When I
>>>>>>> send an
>>>>>>> email to old stude...
>>>>>>> <http://groups.google.com/groups/unlock?hl=en&_done=/group/list.postfix.users/browse_thread/thread/59e45e627b99c294%3Fhl%3Den&msg=82d2317b674054fd>@mydomain.com
>>>>>>> email address it gets to his new
>>>>>>> email address d...
>>>>>>> <http://groups.google.com/groups/unlock?hl=en&_done=/group/list.postfix.users/browse_thread/thread/59e45e627b99c294%3Fhl%3Den&msg=82d2317b674054fd>@gmail.com.
>>>>>>> However, if I use an alias,
>>>>>>> "aliastest"  (from my NIS) where the stude...
>>>>>>> <http://groups.google.com/groups/unlock?hl=en&_done=/group/list.postfix.users/browse_thread/thread/59e45e627b99c294%3Fhl%3Den&msg=82d2317b674054fd>@mydomain.com
>>>>>>> is part of,
>>>>>>> then his email is rejected as "unknown user". I can see from my
>>>>>>> logs
>>>>>>> below that the using "postfix/smtp" gets forwarded and the other
>>>>>>> one
>>>>>>> using "postfix/local" gets rejected.
>>>>>>>
>>>>>>>  Could someone tell me why it's doing that and what I can do to fix
>>>>>>> that? Thanks in advance.
>>>>>>>
>>>>>>
>>>>>> Welcome to the list!
>>>>>> Unfortunately, you seem to have missed the important welcome
>>>>>> message:
>>>>>> "TO REPORT A PROBLEM, PLEASE SEE
>>>>>> http://www.postfix.org/DEBUG_README.html#mail";
>>>>> Sorry, I missed that.
>>>>>>
>>>>>> Does the *nix account "student1" exist?
>>>>> No, it doesn't exist.
>>>>
>>>> Since "mydomain.com" is listed in mydestination and the user does
>>>> not exist, we see the expected behavior.
>>>>
>>>> You are using virtual_alias_maps which does allows you to send to
>>>> your "aliastest" user since it exists as the key.
>>>
>>> Brian, thanks for helping me out but "aliastest" in not in my
>>> virtual_alias_maps "student1" is. "student1" is in the "aliastest"
>>> list among other users. What I don't understand is why Postfix see
>>> "student1" as unknown user when using "aliastest" even though it's
>>> working when sending directly to stude...@mydomain.com?
>>
>> My comments came from your logs: " to=<stude...@mydomain.com>,
>> orig_to=<aliast...@mydomain>"
>> This mail was sent to "aliast...@mydomain" and was rewritten to
>> "stude...@mydomain.com".
>>
>> Maybe you should explain where messages are being stored since you
>> said that "student1" doesn't exist and all messages are being  sent
>> to the local(8) delivery agent.  local(8) is responsible to deliver
>> to *nix users.
>
> Sorry for the confusion...  "student1" is not a local unix user so I
> have in my virtual file an entry that redirects emails sent to
> "stude...@mydomain.com" to "stude...@whateverdomain.com". (this
> works). I have "stude...@mydomain.com" in an "aliastest" list (NIS
> aliases) and when an email is sent to "aliast...@mydomain.com"  that
> gets the error returned as unknown user: "stundent1".
> After the message is received, virtual_alias_maps are used for
> rewriting messages to it's destination by the cleanup(8) daemon.

Then there is your problem.

virtual_alias_maps is always checked for each type of address class. 
This is done early in the process to determine what address class to
use. local(8) does not review virtual_alias_maps.

Please review http://www.postfix.org/OVERVIEW.html
You will see the queue flow does not have local(8) looking at
cleanup(8).  Instead, cleanup is done before entering the active queue.

The answer is to have all alias as virtual_alias_maps *or* list the
virtual_alias_maps result in alias_maps.  Do not list unknown users for
the domains listed in mydestination in alias_maps or you get the results
you see.

Reply via email to