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

Postfix newbie question...

Expand Messages
  • Jan Bakuwel
    Hoi all, I m new to Postfix, studied the book and online documentation and have now started to implement a Postfix based emailsystem (replacing qmail). I ve
    Message 1 of 9 , Mar 31, 2006
    • 0 Attachment
      Hoi all,

      I'm new to Postfix, studied the book and online documentation and have
      now started to implement a Postfix based emailsystem (replacing qmail).
      I've got bits & pieces working... but need some help to finish it off.
      I'll try to explain what I'm trying to do (& apologies for the length of
      the email; I've tried to keep it as short & to the point as possible).

      An office based system receives email for itself and for three ships
      (that connect via expensive satellite dialup connections). This text
      describes the procedure for one ship (ship1). The local users on ship1
      send their emails to the local Postfix MTA that needs to queue those
      until an email exchange with the office system takes place. During that
      (brief) session, all queued email on ship1 must (quickly) be sent to the
      office Postfix MTA (which will forward it to another MTA). All main
      queued on the office for ship1 must (quickly) be sent to the Postfix MTA
      on ship1 (and will be subsequently delivered locally, to Cyrus).

      The domains are as follows (for simplicity sake it will suffice to look
      at internal email only, internet email will be easy once this is in
      place; xxx is the toplevel domain for all of our internal WAN):

      office.xxx, ship1.xxx, ship2.xxx, ship3.xxx

      There are many other other domains on our WAN, for example:

      nl.xxx, int.xxx, us.xxx, etc.

      The internal DNS MX records are setup so the office system is receiving
      email destined for office.xxx, ship1.xxx, ship2.xxx and ship3.xxx, ie.
      the MX records for mail.office.xxx, mail.ship1.xxx, mail.ship2.xxx and
      mail.ship3.xxx all refer to a single IP address (that of mail.office.xxx).

      main.cf (on office server) reads (amongst other things):
      --------------------------------------------------------
      mydestination = office.xxx, localhost
      relayhost = [internal MTA that handles all our outgoing email]
      relay_domains = ship1.xxx
      defer_transports = ondemand

      transport reads:
      ----------------
      ship1.xxx ondemand

      master.cf reads:
      ----------------
      ondemand unix - - n - - smtp


      An email sent from someone@... to someone@... arrives and
      gets delivered locally (to Cyrus) on the office server sucessfully. An
      email sent to someone@... is being received by Postfix on the
      office server:

      office postfix/smtpd[10192]: connect from y.int.xxx [192.168.200.18]
      office postfix/smtpd[10192]: 954705E7: client=y.int.xxx [192.168.200.18]
      office postfix/cleanup[10195]: 954705E7:
      message-id=<442D3969.6030308@...>
      office postfix/smtpd[10192]: disconnect from y.int.xxx[192.168.200.18]
      office postfix/qmgr[10188]: 954705E7: from=<someone@...>, size=1725,
      nrcpt=1 (queue active)
      office postfix/qmgr[10188]: 954705E7: to=<someone@...>,
      relay=none, delay=0, status=deferred (delivery temporarily suspended:
      deferred transport)

      So far so good (I think). However, I've been unable to find out how I
      can tell Postfix on office.xxx that email for @... should be sent
      to Postfix running on the server on ship1.xxx while email for ship2.xxx
      should remain in the queue until ship2 contacts shore.

      postqueue -s ship1.xxx results in a bounce (mail for ship1.xxx loops
      back to myself).

      I have no idea how to tell Postfix where it can find the ship1.xxx
      server... (no idea where I can do that).

      Any help is much appreciated!

      best regards,
      Jan

      --

      'A society of sheep must in time beget a government of wolves.'
      -- Bertrand de Jouvenal

      ----

      Electronic Technology Coordinator
      Ships Unit
      Greenpeace International
      Ottho Heldringstraat 5
      1066 AZ AMSTERDAM
      Netherlands (MET)

      direct +31 (0)20 7182084
      fax +31 (0)20 5148151
      reception +31 (0)20 5148150
      email jan.bakuwel&int.greenpeace.org
      private jan.bakuwel&hccnet.nl
      (replace & by @ in the emailaddress)
    • Victor Duchovni
      ... Sounds like a job for UUCP (over TCP). The SMTP delivery agent in Postfix is not really suitable for intermittent connectivity, and flushing the deferred
      Message 2 of 9 , Mar 31, 2006
      • 0 Attachment
        On Fri, Mar 31, 2006 at 05:31:58PM +0200, Jan Bakuwel wrote:

        > Hoi all,
        >
        > I'm new to Postfix, studied the book and online documentation and have
        > now started to implement a Postfix based emailsystem (replacing qmail).
        > I've got bits & pieces working... but need some help to finish it off.
        > I'll try to explain what I'm trying to do (& apologies for the length of
        > the email; I've tried to keep it as short & to the point as possible).
        >
        > An office based system receives email for itself and for three ships
        > (that connect via expensive satellite dialup connections). This text
        > describes the procedure for one ship (ship1). The local users on ship1
        > send their emails to the local Postfix MTA that needs to queue those
        > until an email exchange with the office system takes place. During that
        > (brief) session, all queued email on ship1 must (quickly) be sent to the
        > office Postfix MTA (which will forward it to another MTA). All main
        > queued on the office for ship1 must (quickly) be sent to the Postfix MTA
        > on ship1 (and will be subsequently delivered locally, to Cyrus).

        Sounds like a job for UUCP (over TCP). The SMTP delivery agent in Postfix
        is not really suitable for intermittent connectivity, and flushing the
        deferred queue does not always succeed in getting all the queued mail
        to be tried immediately.

        The UUCP design is directly tailored (groan) for intermittent connectivity,
        so it is far more suitable for batch delivery of email.

        > The internal DNS MX records are setup so the office system is receiving
        > email destined for office.xxx, ship1.xxx, ship2.xxx and ship3.xxx, ie.
        > the MX records for mail.office.xxx, mail.ship1.xxx, mail.ship2.xxx and
        > mail.ship3.xxx all refer to a single IP address (that of mail.office.xxx).

        The mail to the ships is also best queued to UUCP.

        > relay_domains = ship1.xxx
        > defer_transports = ondemand
        >
        > transport reads:
        > ----------------
        > ship1.xxx ondemand
        >
        > master.cf reads:
        > ----------------
        > ondemand unix - - n - - smtp

        This is where UUCP is better.

        > So far so good (I think). However, I've been unable to find out how I
        > can tell Postfix on office.xxx that email for @... should be sent
        > to Postfix running on the server on ship1.xxx while email for ship2.xxx
        > should remain in the queue until ship2 contacts shore.

        postqueue -s ship1.xxx

        and list ship1.xxx in fast_flush_domains, but UUCP is better.

        > postqueue -s ship1.xxx results in a bounce (mail for ship1.xxx loops
        > back to myself).

        This is a configuration error. Specify a suitable remote nexthop in the
        transport table (the hostname or IP address of ship1), but UUCP is better.

        > I have no idea how to tell Postfix where it can find the ship1.xxx
        > server... (no idea where I can do that).

        smtp:[ship1.xxx]

        but UUCP is better...

        --
        Viktor.

        Disclaimer: off-list followups get on-list replies or get ignored.
        Please do not ignore the "Reply-To" header.

        To unsubscribe from the postfix-users list, visit
        http://www.postfix.org/lists.html or click the link below:
        <mailto:majordomo@...?body=unsubscribe%20postfix-users>

        If my response solves your problem, the best way to thank me is to not
        send an "it worked, thanks" follow-up. If you must respond, please put
        "It worked, thanks" in the "Subject" so I can delete these quickly.
      • Jan Bakuwel
        Hoi Victor, Thanks for the quick answer! ... You have started to answer my next question to the list already :-) I was hoping to learn about the mechanisms
        Message 3 of 9 , Mar 31, 2006
        • 0 Attachment
          Hoi Victor,

          Thanks for the quick answer!

          > Sounds like a job for UUCP (over TCP). The SMTP delivery agent in Postfix
          > is not really suitable for intermittent connectivity, and flushing the
          > deferred queue does not always succeed in getting all the queued mail
          > to be tried immediately.

          You have started to answer my next question to the list already :-)

          I was hoping to learn about the mechanisms before having to dig into
          UUCP (ie. one step at a time). We'll need to use something like UUCP
          (currently we're using serialmail with qmail which is really fast &
          efficient) due to the high latency of the satellite connection (smtp is
          out-of-the-question).

          > The mail to the ships is also best queued to UUCP.

          Ideally the mail to the ships first arrives on the "ships buddy" ashore:
          the office server. In other words, the office server should use UUCP to
          get the mail to the ships but the other MTAs on our WAN should be able
          to use smtp to deliver it to the office server.

          Is that what you're saying here?

          ...snap...

          > This is a configuration error. Specify a suitable remote nexthop in the
          > transport table (the hostname or IP address of ship1), but UUCP is better.
          >
          >> I have no idea how to tell Postfix where it can find the ship1.xxx
          >> server... (no idea where I can do that).
          >
          > smtp:[ship1.xxx]

          Now it says "ondemand". Its either ondemand or smtp:..... both are not
          possible.

          > but UUCP is better...

          Guess I'll have to bite the bullet and start reading up on UUCP...

          Thanks!

          brgds,
          Jan


          --

          'A society of sheep must in time beget a government of wolves.'
          -- Bertrand de Jouvenal

          ----

          Electronic Technology Coordinator
          Ships Unit
          Greenpeace International
          Ottho Heldringstraat 5
          1066 AZ AMSTERDAM
          Netherlands (MET)

          direct +31 (0)20 7182084
          fax +31 (0)20 5148151
          reception +31 (0)20 5148150
          email jan.bakuwel&int.greenpeace.org
          private jan.bakuwel&hccnet.nl
          (replace & by @ in the emailaddress)
        • Victor Duchovni
          ... Sorry, ondemand is just as valid. The syntax is transportname:nexthop. ... Yes, or perhaps batch smtp, but I have never seen a bsmtp server. Postfix can
          Message 4 of 9 , Mar 31, 2006
          • 0 Attachment
            On Fri, Mar 31, 2006 at 06:34:16PM +0200, Jan Bakuwel wrote:

            > >>I have no idea how to tell Postfix where it can find the ship1.xxx
            > >>server... (no idea where I can do that).
            > >
            > > smtp:[ship1.xxx]
            >
            > Now it says "ondemand". Its either ondemand or smtp:..... both are not
            > possible.

            Sorry, ondemand is just as valid. The syntax is transportname:nexthop.

            > >but UUCP is better...
            >
            > Guess I'll have to bite the bullet and start reading up on UUCP...

            Yes, or perhaps batch smtp, but I have never seen a bsmtp server. Postfix
            can drive the spooling client (sample transport definition is in
            master.cf), but does not implement the de-spooler or the server.

            In either case (UUCP or batch SMTP, whichever is easier to implement)
            you have to configure all the non-Postfix pieces. Postfix just adds
            messages to the spool, and forgets about them forever.

            --
            Viktor.

            Disclaimer: off-list followups get on-list replies or get ignored.
            Please do not ignore the "Reply-To" header.

            To unsubscribe from the postfix-users list, visit
            http://www.postfix.org/lists.html or click the link below:
            <mailto:majordomo@...?body=unsubscribe%20postfix-users>

            If my response solves your problem, the best way to thank me is to not
            send an "it worked, thanks" follow-up. If you must respond, please put
            "It worked, thanks" in the "Subject" so I can delete these quickly.
          • mouss
            ... a question here. wouldn t it be better for the OP to have another protocol instead of smtp/uucp? a compressed protocol which transfers as needed seems to
            Message 5 of 9 , Mar 31, 2006
            • 0 Attachment
              Victor Duchovni wrote:
              > On Fri, Mar 31, 2006 at 06:34:16PM +0200, Jan Bakuwel wrote:
              >
              >>>> I have no idea how to tell Postfix where it can find the ship1.xxx
              >>>> server... (no idea where I can do that).
              >>> smtp:[ship1.xxx]
              >> Now it says "ondemand". Its either ondemand or smtp:..... both are not
              >> possible.
              >
              > Sorry, ondemand is just as valid. The syntax is transportname:nexthop.
              >
              >>> but UUCP is better...
              >> Guess I'll have to bite the bullet and start reading up on UUCP...
              >
              > Yes, or perhaps batch smtp, but I have never seen a bsmtp server. Postfix
              > can drive the spooling client (sample transport definition is in
              > master.cf), but does not implement the de-spooler or the server.
              >
              > In either case (UUCP or batch SMTP, whichever is easier to implement)
              > you have to configure all the non-Postfix pieces. Postfix just adds
              > messages to the spool, and forgets about them forever.
              >

              a question here. wouldn't it be better for the OP to have another
              protocol instead of smtp/uucp? a compressed protocol which transfers as
              needed seems to be the right way. or am I wrong?
            • Victor Duchovni
              ... In what way would this differ from UUCP or Batch SMTP? The key problem is multiplexing and demultiplexing multiple messages onto intermitted on-demand
              Message 6 of 9 , Mar 31, 2006
              • 0 Attachment
                On Sat, Apr 01, 2006 at 12:07:28AM +0200, mouss wrote:

                > >Yes, or perhaps batch smtp, but I have never seen a bsmtp server. Postfix
                > >can drive the spooling client (sample transport definition is in
                > >master.cf), but does not implement the de-spooler or the server.
                > >
                > >In either case (UUCP or batch SMTP, whichever is easier to implement)
                > >you have to configure all the non-Postfix pieces. Postfix just adds
                > >messages to the spool, and forgets about them forever.
                > >
                >
                > a question here. wouldn't it be better for the OP to have another
                > protocol instead of smtp/uucp? a compressed protocol which transfers as
                > needed seems to be the right way. or am I wrong?

                In what way would this differ from UUCP or Batch SMTP? The key problem
                is multiplexing and demultiplexing multiple messages onto intermitted
                on-demand sessions. UUCP is very good at that. One can even run UUCP

                Are you aware of some additional software in this space?
                over stunnel for stronger authentication and privacy of the channel.

                --
                Viktor.

                Disclaimer: off-list followups get on-list replies or get ignored.
                Please do not ignore the "Reply-To" header.

                To unsubscribe from the postfix-users list, visit
                http://www.postfix.org/lists.html or click the link below:
                <mailto:majordomo@...?body=unsubscribe%20postfix-users>

                If my response solves your problem, the best way to thank me is to not
                send an "it worked, thanks" follow-up. If you must respond, please put
                "It worked, thanks" in the "Subject" so I can delete these quickly.
              • mouss
                ... I was thinking of an script-abuse of scp/gzip.
                Message 7 of 9 , Mar 31, 2006
                • 0 Attachment
                  Victor Duchovni wrote:
                  >
                  > In what way would this differ from UUCP or Batch SMTP? The key problem
                  > is multiplexing and demultiplexing multiple messages onto intermitted
                  > on-demand sessions. UUCP is very good at that. One can even run UUCP
                  >
                  > Are you aware of some additional software in this space?
                  > over stunnel for stronger authentication and privacy of the channel.
                  >

                  I was thinking of an script-abuse of scp/gzip.
                • Jan Bakuwel
                  Hi Victor, Mouss, ... The most important thing for us is a protocol that deals well with high latency connections. SMTP is not what we need ( hello? , yes ,
                  Message 8 of 9 , Apr 1, 2006
                  • 0 Attachment
                    Hi Victor, Mouss,

                    >> a question here. wouldn't it be better for the OP to have another
                    >> protocol instead of smtp/uucp? a compressed protocol which transfers as
                    >> needed seems to be the right way. or am I wrong?

                    The most important thing for us is a protocol that deals well with high
                    latency connections. SMTP is not what we need ("hello?", "yes", "would
                    you like an email?", "sure why not", "are you feeling fine today?", "of
                    course", "well how about one email?", "yeah I can deal with that", etc etc).

                    Those kind of conversations over high latency links are really expensive...

                    > In what way would this differ from UUCP or Batch SMTP? The key problem
                    > is multiplexing and demultiplexing multiple messages onto intermitted
                    > on-demand sessions. UUCP is very good at that. One can even run UUCP

                    Other things we don't want is DNS lookups, email deliveries to the
                    Internet etc... what we do need is the ability to just to throw a
                    "bucket" of all pending emails both ways, then disconnect and the MTAs
                    on both sides will sort out the email at their convenience.

                    > Are you aware of some additional software in this space?
                    > over stunnel for stronger authentication and privacy of the channel.

                    There's no need to worry about the privacy of the channel since all
                    traffic goes thru an encrypted and compressed tunnel.

                    I guess UUCP would be the way to go (but must admit I need to read up on
                    it)... or would you recommend to also study BSMTP (haven't worked with
                    BSMTP either).

                    cheers,
                    Jan

                    --

                    'A society of sheep must in time beget a government of wolves.'
                    -- Bertrand de Jouvenal

                    ----

                    Electronic Technology Coordinator
                    Ships Unit
                    Greenpeace International
                    Ottho Heldringstraat 5
                    1066 AZ AMSTERDAM
                    Netherlands (MET)

                    direct +31 (0)20 7182084
                    fax +31 (0)20 5148151
                    reception +31 (0)20 5148150
                    email jan.bakuwel&int.greenpeace.org
                    private jan.bakuwel&hccnet.nl
                    (replace & by @ in the emailaddress)
                  • Victor Duchovni
                    ... http://jimsun.linxnet.com/jdp/uucp_over_tcp/index.html I am not seeing too many actively maintained bsmtp projects, what is the state of the art in this
                    Message 9 of 9 , Apr 1, 2006
                    • 0 Attachment
                      On Sat, Apr 01, 2006 at 11:53:47AM +0200, Jan Bakuwel wrote:

                      > I guess UUCP would be the way to go (but must admit I need to read up on
                      > it)... or would you recommend to also study BSMTP (haven't worked with
                      > BSMTP either).

                      http://jimsun.linxnet.com/jdp/uucp_over_tcp/index.html

                      I am not seeing too many actively maintained bsmtp projects, what
                      is the state of the art in this space?

                      --
                      Viktor.

                      Disclaimer: off-list followups get on-list replies or get ignored.
                      Please do not ignore the "Reply-To" header.

                      To unsubscribe from the postfix-users list, visit
                      http://www.postfix.org/lists.html or click the link below:
                      <mailto:majordomo@...?body=unsubscribe%20postfix-users>

                      If my response solves your problem, the best way to thank me is to not
                      send an "it worked, thanks" follow-up. If you must respond, please put
                      "It worked, thanks" in the "Subject" so I can delete these quickly.
                    Your message has been successfully submitted and would be delivered to recipients shortly.