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 web@example.com.

What I need is to allow set arbitrary from header, e.g. bar@example.com, or even baz@my-second-domain.com

Currently this is rejecting:

postfix/smtpd[7386]: NOQUEUE: reject: RCPT from ***[127.0.0.1]: 550 5.1.0 <notlviv@pb.org.ua>: Sender address rejected: User unknown in virtual mailbox table; from=<notlviv@pb.org.ua> to=<some@email.com> 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