Ken Gillett via Postfix-users:
> Postfix has been running for some years on my Mac server, with some 
> limitations that I have been working around. However, another server on my 
> LAN is trying to send emails to me (on the Mac server) and being rejected 
> with the above error and repeats every 7 seconds so I need to figure out what 
> is wrong.
> 
> Here's the relevant config:-
> 
> alias_maps = hash:/etc/aliases
> local_recipient_maps = proxy:unix:passwd.byname $alias_maps
> mydomain = home

The name 'home' is relatively safe from collisions with future real
domain name because it is often used on internal networks (source:
https://icannwiki.org/Name_Collision)

> myhostname = macserve.home
> myorigin = $myhostname
> mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
> 
> The problem is that mail to :-
> 
>       ken@home - works
> 
>       k...@macserve.home - fails with the above error

When I try the above settings on my non-mac system, the addresses
work as expected:

    $ postconf alias_maps local_recipient_maps mydomain
    alias_maps = hash:/etc/aliases
    local_recipient_maps = proxy:unix:passwd.byname $alias_maps
    mydomain = home

    $ postconf myhostname myorigin mydestination
    myhostname = macserve.home
    myorigin = $mydomain
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

Both email addresses are accepted in SMTP:

    $ telnet localhost smtp
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 macserve.home ESMTP Postfix
    ehlo macserve.home
    250-macserve.home
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-XCLIENT NAME ADDR PROTO HELO REVERSE_NAME PORT LOGIN DESTADDR DESTPORT
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250-DSN
    250-SMTPUTF8
    250 CHUNKING
    mail from:<>
    250 2.1.0 Ok
    rcpt to:<ken@home>
    250 2.1.5 Ok
    rcpt to:<k...@macserve.home>
    250 2.1.5 Ok

I expect that it should work in the exact same way on MacOS. 

With both RCPT TO commands, the Postfix SMTP server finds the user
'ken' in the system password database, after stripping the mydestination
domains (home or macserve.home) and calling the system library
function getpwnam() with the 'bare' username ('ken'). Thus, the
getpwnam() result should be the same with both RCPT TO commands.

Suggestion: use the above postconf commands to verify your configuration.
I suspect that will expose the source of the discrepancy.

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to