Chris G wrote:
I have a small SoHo network of machines and I have postfix installed on
most of them for sending mail.   The machines sit behind a NAT router
which connects them to the internet, the domain name (as seen from the
outside world) is zbmc.eu.  All the machines are running xubuntu 10.04
and have postfix 2.7.0.

Within the LAN behind the router the machines have names like
chris.zbmc.eu, mws.zbmc.eu, dps.zbmc.eu and so on.

Most things are working OK, I can send and receive mail on my desktop
machine OK via my ISP's smarthost and I get local messages OK.

My problem has arisen on one of the machines which is a headless server,
it's dps.zbmc.eu.  I want E-Mail from that machine to be sent out via
the mailhub machine on the network which is mws.zbmc.eu.  The problem is
that, whatever I try, the mailhub machine sees mail sent from dps.zbmc.eu
as coming from zbmc.eu (well, its IP) and rejects it with a 'relaying
denied' message.

The bottom of /etc/postfix/main.cf on dps.zbmc.eu is:-

    myhostname = dps.zbmc.eu
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = dps.zbmc.eu, localhost.zbmc.eu, localhost
    relayhost = mws.zbmc.eu
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = loopback-only
    inet_protocols = ipv4

What I see in /var/log/mail.log is:-
    Nov 16 16:04:20 mws postfix/smtpd[31242]: connect from unknown[84.45.228.40]
    Nov 16 16:04:20 mws postfix/smtpd[31242]: NOQUEUE: reject: RCPT from unknown[84.45.228.40]: 554 
5.7.  1 <ch...@halon.org.uk>: Relay access denied; from=<ch...@dps.zbmc.eu> 
to=<ch...@halon.org.uk> proto=ESMTP helo=<dps.zbmc.eu>
    Nov 16 16:04:20 mws postfix/smtpd[31242]: disconnect from 
unknown[84.45.228.40]

So why does postfix see the connection as if it comes from 84.45.228.40?
It's as if it thinks the connection is from zbmc.eu as opposed to
dps.zbmc.eu but everything is set to say I'm sending from dps.zbmc.eu.
The command 'host dps.zbmc.eu' returns 'dps.zbmc.eu has address
192.168.1.2' on both dps.zbmc.eu and on mws.zbmc.eu.  (Oh, /etc/mailname
contains dps.zbmc.eu too)


It connects from 84.45.228.40. Either fix the that or add that to mynetworks on mws.zbmc.eu.

Reply via email to