1

Need some help,
I am setting up postfix and I need it to accept all emails, from any domain (without a domain list), and forward it to a local address on the machine (It pipes into PHP, toscript@).

I have a catch-all working where it is forwarding the emails to the toscript@ mailbox dispite of the to address. But if I send an email to it that is not in the domain list it gets rejected as it's not in the domain list, Is their a known way to force Postfix to accept all domain emails without having a list of the domains in the server.

I have searched but no luck of a working solution, I have looked at the following with no working solution

Server Fault: 133190
Server Fault: 422468
Server Fault: 179419
Server Fault: 105641
Server Fault: 161321
Server Fault: 318426
Server Fault: 514643
Server Fault: 410053
Stack Overflow: 4772229
Super User: 353488

Looking at the docs I do not see anything for it but making it an open relay but I can't figure what settings to update to make it the open relay to capture all of the mail.

I know I am missing something but I can't figure out what it is!

::Rant::
I'd like to use Postfix as it seems very stable and it's not a hack job as some of the projects that I have seen. It also can communicate with all of the proper channels for SMTP and the Protocol as well as some very easy configs.

Comments
  • 0
    Also I have it setup to be configured via a Setup Script with all of the parts.

    Updating Linux, Set Postfix Config Parameters, Installing Postfix, Installing PHP, Saving PHP File, Appending to Config Files, etc.
  • 1
    Try this:

    https://askubuntu.com/a/206775

    Basically, you tell it to deliver all local mail to the account you specify and then also to treat all mail considered not local as if it was local as well, thus being delivered to the local account.

    With Postfix there are several ways of making it accept all mail and deliver it as local. The way outlined in the linked answer makes sense to me. Alternatively, you could change the following two settings to make it more permissive when accepting mail:

    smtp_recipient_restrictions

    smtp_relay_restrictions

    But yeah, the trick is to make Postfix think that all incoming mail is to be delivered locally.
Add Comment