Hi to all and thanks for your time helping me out here. I have a problem that is just f***ing my brain, I'll try to explain as much as possible. I have 1 server with hostname, let's say: server1.myserver.com, here the conf: DOMAIN: server1.myserver.com IP: 1.1.1.1 PTR: server1.myserver.com I can send emails and they are delivery correctly. The problem happens with additional domains. I add a secondary domain just to e-mail with a secondary IP address: DOMAIN: mail.mydomain.com IP: 1.1.1.2 PTR: mail.mydomain.com I create 1 website to mail.mydomain.com with LE cert, everything is alright. I created one email domain, lets say mydomain.com and also created a new mailbox: [email protected] (without MX records cause I dont want to keep emails there, I want them sent to elsewhere. In my DNS records I added: mail.mydomain.com -> 1.1.1.2 THE PROBLEMS: 1 - When my website (hosted elsewhere) send emails through SMTP (mail.mydomain.com) with login [email protected], the email is sent through the IP 1.1.1.1 instead of 1.1.1.2, why? 2 - Also, a strange thing. If the form have in FROM field something like: [email protected], the emails stays in server, and are not sent to correct mailbox. This happens even if I force the
1: Postfix uses a system IP address and doesn't look at the set DNS records set for the domain that is sending out. afaik it's not possible to set a different IP for outgoing mail for a domain. 2: take a look at your mail log to see what is going wrong.
Hi, Thanks for your reply. Well, the point here is have a way to force the IP OR make postfix detect the mail.mydomain.com. I think in the same way Apache handle the request to correct website it must be something we can do to postfix too, no, if the connections comes from IP 1.1.1.3 why it keeps sending through 1.1.1.1? If 1 customer with IP 1.1.1.3 send SPAM or something all webserver will get the reputation in trash and all websites will be affected... I'm not sure how cpanel or other panels do this, have you an idea? Regarding the problem is strange but the error I get is the same as here: https://www.howtoforge.com/community/threads/email-not-sending-to-myself-on-local-server.64437/ Thanks for your time.
you configure postfix to use different ips when sending mails: https://docs.iredmail.org/send.out.email.from.specified.ip.addresses.html you can do the similar for receive mails - just add more smtp-services for postfix.
Hello, Thanks. Yes, I already do that and it's enough. I just want to send out through specific IP and it's working... it would be amazing if ISP config can manage that when you assign a dedicated IP address to a client, all e-mails and sh*t goes from there... Thanks
Postfix settings are always manually done in PS tutorials. I don't see any is being done via ISPConfig CP so far.