Still beating my head against the wall here.
I changed mydomain from 'home' to 'hoome'. Postconf showed the change, but I
suspect postconf just reads the configuration files rather than reports what
postfix itself has gleaned from those files.
Anyway, I reloaded postfix and tried to send mail to ken@home which still
worked perfectly, while ken@hoome failed:-
Host or domain name not found. Name service error
for name=MacServe.hoome type=AAAA: Host not found
So as far as I can tell from that, postfix is NOT using what is in main.cf - at
least not this changed value.
However, one of the reasons for needing to sort this was the emails every 7
seconds from another server, reporting the bad recipient error
([email protected]) but then sending another message. So constant traffic that
I was unable to stop. Having changed mydomain to 'hoome', the other (media)
server promptly sent over 500 messages to admin@home, as it should since that's
the address it should use for notifications.
So looks like the message being rejected due to bad user was simply resent 7
seconds later, but now the error is "domain not found etc", the media server
accepts that and lets me know and no repetition. So the constant traffic on a 7
second cycle had stopped and even after changing mydomain back to 'home', they
have not started again.
None of that makes much sense to me, but I am again left with the problem of
allowing messages to [email protected] to be accepted and delivered.
I can imagine many reasons why messages might be rejected, but those to @home
working yet any to @macserve.home being rejected is still a puzzle that I need
to fix.
What I'm wondering now is why having changed mydomain to 'hoome', messages to
@home were still handled correctly. As if main.cf was not being used for those
parameters and instead postfix is getting the defaults from the system, which
should mean mydomain is 'home'. But why would it do that and ignore the 'hoome'
in main.cf?
All I need to for mail to validuser@home AND [email protected] both be
accepted. I am still none the wiser how the user causes a rejection in the the
latter but not the former.
To clarify, I will move mailserver duties to a linux or freebsd server as soon
as I can, but I just need to get this Mac server working as it should in the
meantime.
Ken G i l l e t t
_/_/_/_/_/_/_/_/
> On Sun 27 Oct 2024, at 18:06, Ken Gillett via Postfix-users
> <[email protected]> wrote:
>
> Thanks for responding Wietse. This has got me scratching my head.
>
> I did as you suggest and the postconf commands return exactly as for you. I
> then ran telnet (from a different Mac as the server seems not to have telnet).
>
> …
> mail from:<>
> 250 2.1.0 Ok
> rcpt to:<ken@home>
> 250 2.1.5 Ok
> rcpt to:<[email protected] <mailto:[email protected]>>
> 550 5.1.1 <[email protected] <mailto:[email protected]>>: Recipient address
> rejected: User unknown in local recipient table
>
> Which is the exact problem. They should both be looking for the username (me)
> in the same way, but one works, the other does not.
>
> This foxed me some years ago and I gave up, but now I really need to get to
> the bottom of it.
>
> I simply cannot think of any configuration that would affect one and not the
> other. But then I'm no postfix expert.
>
>
> Ken G i l l e t t
>
> _/_/_/_/_/_/_/_/
>
>
>
>> On Sun 27 Oct 2024, at 17:38, Wietse Venema via Postfix-users
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>> 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 <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
>>>
>>> [email protected] <mailto:[email protected]> - 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:<[email protected] <mailto:[email protected]>>
>> 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 -- [email protected]
>> <mailto:[email protected]>
>> To unsubscribe send an email to [email protected]
>> <mailto:[email protected]>
>
> _______________________________________________
> Postfix-users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]