Trying to forward contactform mails for customer-self-hosted maildomain

Discussion in 'General' started by Qroac, Apr 18, 2018.

  1. Qroac

    Qroac New Member

    The situation is as follows:
    I have a webserver running nginx and php with fpm. Because it is a webserver I decided to install exim4 as MTA running as satellite forwarding all incoming mails to my main mailserver.
    The main mailserver is a perfect server set up postfix and dovecot server.

    The Website of my customer generates contact form mails to the customers own mail address as well as a copy to the visitor that used the form.
    In the mail queue I can see a lot of mails, exim4 wasn't able to forward to the mailserver up to now, because the mailserver doesn't know the domain of my customer and thus neither knows the sender nor the recipient of the mail.

    I added a relay recipient *@domain.com as well as a mail transport for domain.com to the smtp ip of my customers mailserver.
    Now, Mails sent by the contactform from [email protected] to [email protected] are accepted.
    Mails the other way [email protected] -> [email protected] are still rejected (send me copy function of the contact form)

    Is there a way to convience postfix to relay not only mails going TO domain.com but also to relay mails coming FROM domain.com?
     
  2. Jesse Norell

    Jesse Norell Well-Known Member

    That's a bad idea if you're mail server allows smtp from the internet; better is to just add the IP address of the web server to mynetworks on your mail server.
     

Share This Page