• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Postfix originating IP issue

iain

New Pleskian
Server operating system version
Linux 4.15.0-109-generic
Plesk version and microupdate number
Obsidian 18.0.49
Hello,
Sending emails via an email client works fine. The originating IP shows as the mail server IP on all emails so passes all SPF and DMARC settings.
BUT connecting to postfix via SMTP on our accounting software, to send invoices etc, the originating IP shows as the local IP NOT the mail server IP so often fails due to our SPF rules etc.
Originally postfix refused all SMTP connections saying it was relaying (not allowed) but I fixed this by adding our local IP's as a trusted source in Plesk. HOWEVER the originating IP still shows as mu local IP NOT the mail server IP so many emails bounce back.

Using any email client and IMAP causes no problems, the orig. IP shows as the mail server IP.
How can I fix this?
I can add the office IP to the SPF and DMARC records but that wont work when connecting remotely using a dynamic IP
 
For example:
Received-SPF: fail (vps.XXX.co.uk: domain of XXX.co.uk does not designate 82.132.224.215 as permitted sender) client-ip=82.132.224.215; envelope-from=[email protected]; helo=Aorus;

That IP is my home IP NOT the mail server IP.
I have tried setting 'Fix incorrectly set sender for outgoing mail' but this doesn't fix it.
 
When you say email client, you talking about an email client like Outlook or Thunderbird, or you talking about the webmail?

And what is this "accounting software" that you're speaking of?

Technically speaking, the proper way of doing this would be to have an email account configured to authentication to the SMTP server to allow the sending, otherwise what you are doing is a relay which will show your local home IP address instead of the server.
 
When you say email client, you talking about an email client like Outlook or Thunderbird, or you talking about the webmail?

And what is this "accounting software" that you're speaking of?

Technically speaking, the proper way of doing this would be to have an email account configured to authentication to the SMTP server to allow the sending, otherwise what you are doing is a relay which will show your local home IP address instead of the server.
Hello,
Email client = thunderbird, works fine. Not relaying.
The accounting software is Sage. I have specified username and password correctly.

Relaying is set as below.

1676192692256.png

When I had relaying set to closed, no emails were sent at all, it would never connect.

Any ideas ?
 
When you say email client, you talking about an email client like Outlook or Thunderbird, or you talking about the webmail?

And what is this "accounting software" that you're speaking of?

Technically speaking, the proper way of doing this would be to have an email account configured to authentication to the SMTP server to allow the sending, otherwise what you are doing is a relay which will show your local home IP address instead of the server.
 
Hello,
I have now set Relaying to CLOSED.
It passes username and password OK and sends the test email.
Setting on the software below.
The sender IP on the message source is STILL showing my local IP. I have added an extra SPF record so it now passes but I am concerned as to why it still thinks its relaying and doesn't send the mail servers IP
 

Attachments

  • Screenshot3.png
    Screenshot3.png
    20.9 KB · Views: 10
OK, I found the mail server logs.
I set up a new email account with KNOWN good mail username and password.
I switched off SMTP relay.
It will not send to an external address , it still tries to relay it..

NOQUEUE: reject: RCPT from 82-132-224-215.dab.02.net[82.132.224.215]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<Aorus>
 
Sorted..
After getting access to the postfix logs, now sorted.
Was a mail spam lookup service (barracuda) that had listed my home IP.
Also SMTP relay has to be ON.
It appears the mail server IP shows as originating ONLY if sent to an external mail server. If its a local email address on the same domain it shows the local IP.
 
Back
Top