Search code examples
emailpostfix-mtairedmail

How to allow on postfix/iredmail to set arbitrary from header?


I've set up mail server with iRedMail. It should act as an SMTP server for web app. Postfix is restricted only for localhost usage.

Let's assume that I create an account [email protected].

What I need is to allow set arbitrary from header, e.g. [email protected], or even [email protected]

Currently this is rejecting:

postfix/smtpd[7386]: NOQUEUE: reject: RCPT from ***[127.0.0.1]: 550 5.1.0 <[email protected]>: Sender address rejected: User unknown in virtual mailbox table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[127.0.0.1]>

How can this be allowed?


Solution

  • Ok, figured out:

    smtpd_reject_unlisted_sender = yes # set to no
    # Sender restrictions
    smtpd_sender_restrictions =
        reject_unknown_sender_domain
        reject_non_fqdn_sender
        reject_unlisted_sender # comment this