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

Accept and store locally any mail received

Expand Messages
  • Nicolas KOWALSKI
    Hello, For a lab test, with several computers sending mail to any domain, I would like to setup a postfix server accepting and storing locally to only one
    Message 1 of 6 , Mar 4 11:02 AM
    • 0 Attachment
      Hello,

      For a lab test, with several computers sending mail to any domain, I
      would like to setup a postfix server accepting and storing locally to
      only one account any mail received. It would be a sort of blackhole
      relay server, but with mail kept locally, no mail going out from it.

      Any idea on how to configure postfix this way?

      Thanks,
      --
      Nicolas
    • /dev/rob0
      ... I ve answered this before. One link that I found (interestingly, through a search for postfix blackhole ) is here:
      Message 2 of 6 , Mar 4 11:25 AM
      • 0 Attachment
        On Mon, Mar 04, 2013 at 08:02:30PM +0100, Nicolas KOWALSKI wrote:
        > For a lab test, with several computers sending mail to any domain,
        > I would like to setup a postfix server accepting and storing
        > locally to only one account any mail received. It would be a sort
        > of blackhole relay server, but with mail kept locally, no mail
        > going out from it.
        >
        > Any idea on how to configure postfix this way?

        I've answered this before. One link that I found (interestingly,
        through a search for "postfix blackhole") is here:

        http://archives.neohapsis.com/archives/postfix/2010-04/0168.html
        --
        http://rob0.nodns4.us/ -- system administration and consulting
        Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
      • Noel Jones
        ... There s several ways to do this. I think the easiest is: # main.cf header_checks = regexp:/etc/postfix/header_checks in your header_checks file: /./
        Message 3 of 6 , Mar 4 11:35 AM
        • 0 Attachment
          On 3/4/2013 1:02 PM, Nicolas KOWALSKI wrote:
          > Hello,
          >
          > For a lab test, with several computers sending mail to any domain, I
          > would like to setup a postfix server accepting and storing locally to
          > only one account any mail received. It would be a sort of blackhole
          > relay server, but with mail kept locally, no mail going out from it.
          >
          > Any idea on how to configure postfix this way?
          >
          > Thanks,
          >


          There's several ways to do this. I think the easiest is:

          # main.cf
          header_checks = regexp:/etc/postfix/header_checks

          in your header_checks file:
          /./ REDIRECT someone@...


          where "someone" is a valid local user, and "example.com" is listed
          in mydestination.




          -- Noel Jones
        • Erwan David
          ... I think always_bcc would be a better solution, it does not involve trying to match anything, it justs sends a copy to the specified address.
          Message 4 of 6 , Mar 4 11:42 AM
          • 0 Attachment
            Le 04/03/2013 20:35, Noel Jones a écrit :
            > On 3/4/2013 1:02 PM, Nicolas KOWALSKI wrote:
            >> Hello,
            >>
            >> For a lab test, with several computers sending mail to any domain, I
            >> would like to setup a postfix server accepting and storing locally to
            >> only one account any mail received. It would be a sort of blackhole
            >> relay server, but with mail kept locally, no mail going out from it.
            >>
            >> Any idea on how to configure postfix this way?
            >>
            >> Thanks,
            >>
            >
            > There's several ways to do this. I think the easiest is:
            >
            > # main.cf
            > header_checks = regexp:/etc/postfix/header_checks
            >
            > in your header_checks file:
            > /./ REDIRECT someone@...
            >
            >
            > where "someone" is a valid local user, and "example.com" is listed
            > in mydestination.
            >
            >
            >
            >
            > -- Noel Jones
            >

            I think always_bcc would be a better solution, it does not involve
            trying to match anything, it justs sends a copy to the specified address.
          • Noel Jones
            ... The goal stated is to not allow mail to escape the lab, eg. a blackhole. always_bcc does not meet that requirement. -- Noel Jones
            Message 5 of 6 , Mar 4 12:04 PM
            • 0 Attachment
              On 3/4/2013 1:42 PM, Erwan David wrote:
              > Le 04/03/2013 20:35, Noel Jones a écrit :
              >> On 3/4/2013 1:02 PM, Nicolas KOWALSKI wrote:
              >>> Hello,
              >>>
              >>> For a lab test, with several computers sending mail to any domain, I
              >>> would like to setup a postfix server accepting and storing
              >>> locally to
              >>> only one account any mail received. It would be a sort of blackhole
              >>> relay server, but with mail kept locally, no mail going out from it.
              >>>
              >>> Any idea on how to configure postfix this way?
              >>>
              >>> Thanks,
              >>>
              >>
              >> There's several ways to do this. I think the easiest is:
              >>
              >> # main.cf
              >> header_checks = regexp:/etc/postfix/header_checks
              >>
              >> in your header_checks file:
              >> /./ REDIRECT someone@...
              >>
              >>
              >> where "someone" is a valid local user, and "example.com" is listed
              >> in mydestination.
              >>
              >>
              >>
              >>
              >> -- Noel Jones
              >>
              >
              > I think always_bcc would be a better solution, it does not involve
              > trying to match anything, it justs sends a copy to the specified
              > address.


              The goal stated is to not allow mail to escape the lab, eg. a
              blackhole. always_bcc does not meet that requirement.



              -- Noel Jones
            • Nicolas KOWALSKI
              ... This works perfectly. Thanks a lot Noel. -- Nicolas
              Message 6 of 6 , Mar 5 8:20 AM
              • 0 Attachment
                On Mon, Mar 04, 2013 at 01:35:42PM -0600, Noel Jones wrote:
                > There's several ways to do this. I think the easiest is:
                >
                > # main.cf
                > header_checks = regexp:/etc/postfix/header_checks
                >
                > in your header_checks file:
                > /./ REDIRECT someone@...
                >
                >
                > where "someone" is a valid local user, and "example.com" is listed
                > in mydestination.

                This works perfectly.

                Thanks a lot Noel.

                --
                Nicolas
              Your message has been successfully submitted and would be delivered to recipients shortly.