Loading ...
Sorry, an error occurred while loading the content.

relayhost = smtp.myisp.nl

Expand Messages
  • Adri van Loopik
    Hallo, As an amateur I am playing with configuring email on a Linux box (Ubuntu 12.04 LTS Server). I was able to send mail DIRECTLY to the internet, but of
    Message 1 of 8 , Jan 18, 2013
    • 0 Attachment
      Hallo,

      As an amateur I am playing with configuring email on a Linux  box (Ubuntu 12.04 LTS Server).

      I was able to send mail DIRECTLY to the internet, but of course I ran into the problem of spamhouse etc. So it seems clear that I absolutely need to use a relayhost. This works perfectly, the Linux box can send mail indirectly  -  via the smtp server provided by my ISP  - to internet addresses.

      But when relayhost is defined, mail to other hosts on my LAN does not go through.

      If 'relayhost = smtp.myisp.nl' is conmmented out, email again goes through to the other hosts.

      MY QUESTION: is it simply the case that when in '/etc/postfix/main.cf' a relayhost is defined, ALL MAIL goes to that relay host?

      Where it then dies without even a whisper.

      If the answer is YES, my problem is solved: I will simply have to live without the capability on that server to send mail to the LAN.

      thanks for any attention to this - not very serious - problem,

      Adri van Loopik.
    • Reindl Harald
      ... what about the manual? http://www.postfix.org/postconf.5.html#relayhost what else should postfix do if you only say relay to host xyz ? The next-hop
      Message 2 of 8 , Jan 18, 2013
      • 0 Attachment
        Am 18.01.2013 11:17, schrieb Adri van Loopik:
        > Hallo,
        >
        > As an amateur I am playing with configuring email on a Linux box (Ubuntu 12.04 LTS Server).
        >
        > I was able to send mail DIRECTLY to the internet, but of course I ran into the problem of spamhouse etc. So it
        > seems clear that I absolutely need to use a relayhost. This works perfectly, the Linux box can send mail
        > indirectly - via the smtp server provided by my ISP - to internet addresses.
        >
        > But when relayhost is defined, mail to other hosts on my LAN does not go through.
        >
        > If 'relayhost = smtp.myisp.nl <http://smtp.myisp.nl>' is conmmented out, email again goes through to the other hosts.
        >
        > MY QUESTION: is it simply the case that when in '/etc/postfix/main.cf <http://main.cf>' a relayhost is defined, ALL
        > MAIL goes to that relay host?

        what about the manual?
        http://www.postfix.org/postconf.5.html#relayhost

        what else should postfix do if you only say "relay to host xyz"?

        The next-hop destination of non-local mail; overrides non-local domains in
        recipient addresses. This information is overruled with relay_transport,
        sender_dependent_default_transport_maps, default_transport,
        sender_dependent_relayhost_maps and with the transport(5) table.
      • Reindl Harald
        FIRST: DO NOT REPLY OFF-LIST AND DO NOT REPLY IN HTML ON MAILING-LISTS! ... and why do you not post configurations and state what you have already tried? ...
        Message 3 of 8 , Jan 18, 2013
        • 0 Attachment
          FIRST:

          DO NOT REPLY OFF-LIST AND DO NOT REPLY IN HTML
          ON MAILING-LISTS!

          Am 18.01.2013 11:39, schrieb Adri van Loopik:
          > what about the manual?
          > http://www.postfix.org/postconf.5.html#relayhost
          >
          > what else should postfix do if you only say "relay to host xyz"?
          >
          > The next-hop destination of non-local mail; overrides non-local domains in
          > recipient addresses. This information is overruled with relay_transport,
          > sender_dependent_default_transport_maps, default_transport,
          > sender_dependent_relayhost_maps and with the transport(5) table.
          >
          > Than you for referring me to the manual. I had already taken that path on many occasions, but without luck. More in
          > particular, I have been trying - among other things - to find a solution by making a transport map.

          and why do you not post configurations and state
          what you have already tried?

          > As I had no luck with that yet, my question arose whether I was trying to
          > do something that was somehow impossible.

          if the documentation says "is overruled" you can be pretty sure
          that this is correct

          > From your answer I now conclude that it must be possible to send mail to the internet via relayhost and at the same
          > time send mail to my LAN. So I am motivated to continue the struggle.

          as said: if you need help provide configuration (postconf -n) and also logs
        • Wietse Venema
          ... relayhost, as documented, sends mail that isn t for the machine itself to the relayhost. However you can override relayhost, as documented, with
          Message 4 of 8 , Jan 18, 2013
          • 0 Attachment
            Adri van Loopik:
            > use a relayhost. This works perfectly, the Linux box can send mail
            > indirectly - via the smtp server provided by my ISP - to internet
            > addresses.
            >
            > But when relayhost is defined, mail to other hosts on my LAN does not go
            > through.

            relayhost, as documented, sends mail that isn't for the machine
            itself to the relayhost.

            However you can override relayhost, as documented, with transport_maps.

            So one example is:

            /etc/postfix/main.cf:
            transport_maps hash:/etc/postfix/transport
            relayhost = [smtp.isp.nl]

            /etc/postfix/transport
            .localdomain smtp:

            (instead of localdomain specify your local domain name).

            http://www.postfix.org/postconf.5.html#relayhost
            http://www.postfix.org/postconf.5.html#transport_maps
            http://www.postfix.org/transport.5.html

            Wietse
          • Adri van Loopik
            Thanks a lot Wietse, for Postfix and also for this very helpful reaction and good advice. It has worked, though not immediately. I had first also to put
            Message 5 of 8 , Jan 18, 2013
            • 0 Attachment
              Thanks a lot Wietse,

              for Postfix

              and also for this very helpful reaction and good advice. It has
              worked, though not immediately.

              I had first also to put smtp_host_lookup on 'native, dns' (I did the
              same for lmtp_host_lookup, not sure that was needed).

              Everything started to go really well after I had also edited
              /etc/nsswitc.conf, by putting everything on 'files'.

              kind regards (en vriendelijke groet),

              Adri van Loopik.



              2013/1/18 Wietse Venema <wietse@...>
              >
              > Adri van Loopik:
              > > use a relayhost. This works perfectly, the Linux box can send mail
              > > indirectly - via the smtp server provided by my ISP - to internet
              > > addresses.
              > >
              > > But when relayhost is defined, mail to other hosts on my LAN does not go
              > > through.
              >
              > relayhost, as documented, sends mail that isn't for the machine
              > itself to the relayhost.
              >
              > However you can override relayhost, as documented, with transport_maps.
              >
              > So one example is:
              >
              > /etc/postfix/main.cf:
              > transport_maps hash:/etc/postfix/transport
              > relayhost = [smtp.isp.nl]
              >
              > /etc/postfix/transport
              > .localdomain smtp:
              >
              > (instead of localdomain specify your local domain name).
              >
              > http://www.postfix.org/postconf.5.html#relayhost
              > http://www.postfix.org/postconf.5.html#transport_maps
              > http://www.postfix.org/transport.5.html
              >
              > Wietse
            • Viktor Dukhovni
              ... The real issue was that you failed to use the correct relayhost syntax: relayhost = [relay.example.com] not relayhost = example.com typically the first
              Message 6 of 8 , Jan 18, 2013
              • 0 Attachment
                On Fri, Jan 18, 2013 at 09:12:31PM +0100, Adri van Loopik wrote:

                > I had first also to put smtp_host_lookup on 'native, dns' (I did the
                > same for lmtp_host_lookup, not sure that was needed).

                The real issue was that you failed to use the correct relayhost
                syntax:

                relayhost = [relay.example.com]

                not

                relayhost = example.com

                typically the first form is for relay servers ISPs give their
                customers as submission servers, ... while the second is for relays
                that are domains with MX RRsets. Your ISP probably had MX records
                for the relayhost that pointed elsewhere.

                --
                Viktor.
              • Adri van Loopik
                For what it is worth: I DID use the relayhost = [smtp.myisp.nl] syntax. I hope this is helpful to someone.
                Message 7 of 8 , Jan 19, 2013
                • 0 Attachment
                  For what it is worth: I DID use the relayhost = [smtp.myisp.nl] syntax.

                  I hope this is helpful to someone.

                  2013/1/18 Viktor Dukhovni <postfix-users@...>:
                  > On Fri, Jan 18, 2013 at 09:12:31PM +0100, Adri van Loopik wrote:
                  >
                  >> I had first also to put smtp_host_lookup on 'native, dns' (I did the
                  >> same for lmtp_host_lookup, not sure that was needed).
                  >
                  > The real issue was that you failed to use the correct relayhost
                  > syntax:
                  >
                  > relayhost = [relay.example.com]
                  >
                  > not
                  >
                  > relayhost = example.com
                  >
                  > typically the first form is for relay servers ISPs give their
                  > customers as submission servers, ... while the second is for relays
                  > that are domains with MX RRsets. Your ISP probably had MX records
                  > for the relayhost that pointed elsewhere.
                  >
                  > --
                  > Viktor.
                • Wietse Venema
                  ... It s not helpful without a descripton of the problem symptoms. A working Postfix does not need /etc/hosts lookups just because you add a transport map.
                  Message 8 of 8 , Jan 19, 2013
                  • 0 Attachment
                    Adri van Loopik:
                    > For what it is worth: I DID use the relayhost = [smtp.myisp.nl] syntax.
                    >
                    > I hope this is helpful to someone.

                    It's not helpful without a descripton of the problem symptoms.

                    A working Postfix does not need /etc/hosts lookups just because you
                    add a transport map. That makes absolutely no sense.

                    You need /etc/hosts lookups because you changed something else that
                    wasn't mentioned in this thread.

                    Wietse

                    > 2013/1/18 Viktor Dukhovni <postfix-users@...>:
                    > > On Fri, Jan 18, 2013 at 09:12:31PM +0100, Adri van Loopik wrote:
                    > >
                    > >> I had first also to put smtp_host_lookup on 'native, dns' (I did the
                    > >> same for lmtp_host_lookup, not sure that was needed).
                    > >
                    > > The real issue was that you failed to use the correct relayhost
                    > > syntax:
                    > >
                    > > relayhost = [relay.example.com]
                    > >
                    > > not
                    > >
                    > > relayhost = example.com
                    > >
                    > > typically the first form is for relay servers ISPs give their
                    > > customers as submission servers, ... while the second is for relays
                    > > that are domains with MX RRsets. Your ISP probably had MX records
                    > > for the relayhost that pointed elsewhere.
                    > >
                    > > --
                    > > Viktor.
                    >
                  Your message has been successfully submitted and would be delivered to recipients shortly.