Sending mail from Linux server in Virtual Machine no longer working - 550 sender rejected
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Sending mail from Linux server in Virtual Machine ...
Sending mail from Linux server in Virtual Machine no longer working - 550 sender rejected
11-12-2017 12:05 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I wonder if anyone could help me understand what's going on, what's changed, and what I need to do to fix my issue.
I used to be able to have mail sent using Postfix on a Linux server running in a virtual machine on my desktop to various test email addresses. I used a Turnkey Linux image running in VMWare as the Turnkey Linux server is set up to allow mail out with Postfix pre-configured.
I recently needed to test an application on my Linux server, but am no longer able to get email.
If I look in the /var/log/mail.log I find messages such as
<www-data@localhost> sender rejected - invalid domain (no MX or A record) (in reply to MAIL FROM command))
I have
relayhost = relay.force9.net
in my mail.cf in /etc/postfix
My site on Linux is set up as a virtual host using a 192.168.1.x on a particular port.
My server does not have a domain name as it's just for testing.
All I am doing is running the Php mail($to, $subject, $body, $headers); command
As I say this used to work fine.
I would be grateful for any help.
Thank you.
Re: Sending mail from Linux server in Virtual Machine no longer working - 550 sender rejected
12-12-2017 1:09 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Well it looks like someone somewhere has changed the configuration so that the mail server performs a dns check on the senders domain before accepting mail - aka checking that you're not a spammer. In this case your domain doesn't have a MX or A record setup on any dns server and thus you're done for.
Simple answer would be to jump over to a dns service like no-ip or freedns.afraid.org and get yourself a subdomain from one of their domains and create an A record pointing to your network. Then use that in your outgoing mail instead of localhost.
Re: Sending mail from Linux server in Virtual Machine no longer working - 550 sender rejected
12-12-2017 12:02 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thank you 7up, a sensible suggestion.
I have managed to make it work by changing
myhostname = localhost
to
myhostname = force9.net
in /etc/postfix/main.cf
just in case this is of use to anyone else with a similar problem.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Sending mail from Linux server in Virtual Machine ...