Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
2.8k views
by Talented
Hello again Christhian.

I've brought you another little "head-scratcher" I've been working on for about a week, and not getting anywhere.

If I send an email from (say, admin@licencedbreeders.uk) from my website at https://licencedbreeders.uk, to another address on the same domain (say, sales@licencedbreeders.uk), it doesn't arrive.

But if I send an email from (say, admin@licencedbreeders.uk) from my website at https://licencedbreeders.uk, to my personal address on gmail.com, it arrives but TLS fails (red padlock) and its not encrypted.

I have tried connecting to SES to avoid the issue but it followed me there, so I guess its an underlying problem somewhere.

Somewhere I am not looking, I guess, or I am looking but don't recognise it when I see it.

Any ideas?

Terence.
by Expert

Hi Terence,

What happens if you send an email from an external account (Gmail/hotmail) to the "license breeders" domain?

Also, check your server email logs, Webinoly have an option for that, you can see it in real-time if you want: sudo log -mail

Regards.

by Talented

From external domain, no problem -- https://i.imgur.com/DxQM10T.png

I checked the logs as you suggested and this is a sample of what I saw -- https://i.imgur.com/K55aYW6.png

Also, I see all these bounces in a file at /var/mail/www-data

I think this is more than one problem.

My email account/addresses are with G Suite by the way.

by Expert

Can you check the output of this command: sudo log -mail

Just to be sure is no the same server rejecting emails sent to the same domain. I think you omitted this image in your last comment.

by Talented

Sorry about that. I sent you the image of the queue instead of the `sudo log -mail` output -- https://i.imgur.com/LK9SR6W.png

by Expert

Seeing your mail logs, the only thing that caught my attention is that it say that the "Status is bounced" because "Unknown user: sales".

Can you verify it?

Can you confirm that the user "sales" already exist in your email accounts?

Can you try with a valid/different user?

by Talented

"sales" is a Gmail alias for the primary email address, so I checked it out and this what happened. Alias to primary or primary to alias, the result is the same (nothing arrives) -- https://i.imgur.com/UtALwUN.png

DNS seems to set up correctly and the server is attached to SES now but the result is the same. I think this is something that postfix is doing. Don't you?

by Expert

Are you using some WordPress plugin for SMTP or something related with emails?

Did you manually modify any SMTP or Postfix configuration in your server?

Are you still using AWS SES and are you sure is properly configured and ready to send emails in behalf of your domain? (it think this could be the cause, a misconfiguration in AWS SES)

Are you using the SMTP command from Webinoly?

Can you see this file: /etc/postfix/main.cf and send me this values: myorigin, myhostname, mydestination.

by Talented
No SMTP plugin.

No mods to Postfix or SMTP (other than the SMTP command with the SES settings).

Still using SES but this problem was there before I tried and its there if I disconnect it too.

myorigin = /etc/mailname

myhostname = licencedbreeders.uk

mydestination = licencedbreeders.uk, localhost.uk, localhost

I think its Google decided they don't have enough of our money, and we need to buy more primary addresses, so they now block routing between primary addresses and their aliases.  Half said in fun, but you never know!

2 Answers

+1 vote
by Expert

Now I see the problem: Just remove your domain from "mydestination" and then restart Postfix: sudo service postfix restart

myorigin = /etc/mailname
myhostname = licencedbreeders.uk
mydestination = localhost.uk, localhost

Whatever you have in "mydestination" will be seen has local, that's why Postfix is delivering your emails locally in your own server.

Seems like somebody changed the Webinoly default Postfix settings.

by Talented

Nobody has touched Postfix as far as I know. 

OK, I did what you suggested; it's behaving differently but something very odd is now happening... 

Primary and alias addresses have different results 

Primary to alias = arrives; works as it should 

Alias to alias = arrives; but the receiving address is changed and both are same when it arrives 

Alias to primary = arrives; but the receiving address is changed and both are same when it arrives.

 https://i.imgur.com/LGgrxoE.png

by Talented

If I use the test message function on the SES domain page at AWS to sent alias to alias, something different happens again... the mail arrives and both the alias email addresses are different and unchanged -- https://i.imgur.com/vaVn7WN.png

by Expert

Ok, at least now everything arrives. Now you are receiving all the emails. This is good news! No?

I'm still just trying to understand what you did. You say you're still using SES but nobody changed the Postfix configuration and also, you're not using any SMTP plugins. So, how did you configured SES in your server?

by Talented
edited by

I wanted to post some wide text but I don't have the code snippet button enabled on my toolbar.  But hey ho!  laugh

Definitely going in the right direction and beginning to understand the nature of the problem a little better.

What I meant was, nobody edited the Postfix configuration manually.  I tried both MailPoet and MailerLite so maybe they might of done it programmatically, but I don't think so.

There's no SMTP plugin on the site. All I did to use SES was `sudo webinoly -smtp` and enter the SES SMTP credentials.

Deliverability Report
---------------------
https://mxtoolbox.com/deliverability/f637f5b9-9efb-4bd8-b3ce-a3c2da39bc88

sudo log -mail
--------------
https://i.imgur.com/41ZQHg1.png

Personal Gmail address 
----------------------
terence.milbourn@ primary

SES verified G Suite sending addresses
--------------------------------------
terence@ primary
admin@ alias
hello@ alias
sales@ alias
support@ alias
wordpress@ alias

Route == Result
---------------
sales@ to terence@ == sales@ terence@ [OK?]
admin@ to terence@ == sales@ terence@ [Error]
terence@ to terence.milbourn@ == sales@ terence.milbourn@ [Error]
terence@ to sales@ == sales@ sales@ [Error]
terence@ to hello@ == sales@ hello@ [Error]
terence@ to support@ == sales@ support@ [Error]
sales@ to admin@ == sales@ sales@ [Error]
sales@ to support@ == sales@ sales@ [Error]
wordpress@ to support@ == sales@ support@ [Error]

I think you can see the picture -- when I send from any alias address, something (Postfix?) changes the sender to sales@, and when I send from any alias to any other alias, it changes both addresses to sales@.

This holds true when sending from alias to alias, and primary to alias, but not alias to primary. In that case it changes the alias and leaves the primary as intended.

I don't know what happened to any that didn't arrive.

If you want me to disconnect the Webinoly SMTP routing to the SES relay I can do that, but I don't think it will make any difference.  Let me know if you want me to and I will.

Terence.

by Talented

I have just discovered that sales@ to admin@ is no longer arriving, while admin@ to sales@ arrives, but the admin@ address is still being changed to sales@ 

https://i.imgur.com/PPS75cR.png

by Expert
I don't know, but I think this issue is not in your server, nothing wrong is in your logs. Postfix is sending emails with all the correct data.

What now caught my attention is that you had a postfix configuration very different from what Webinoly does, I don't understand why you had your "domain" included in "mydestination". I don't know if you have some thing more additional misconfigured and we are not seeing it.

I always use SES and Webinoly together and never have any issues, I'm pretty sure it must work natively.

What I would do, is trying the SMTP configuration in a new and fresh server and see the postfix configuration file before and after the SMTP is configured. Just to be sure that everything is OK as expected.

Also, you should take a look in the plugin you are using to send emails from WordPress, like contact forms or whatever you have in your site, just to be sure everything is configured as you want.
by Talented
I am beginning to think its not a Postfix issue because I cannot see any way the config was changed by me, and as far as I know I have not used any plugin which would have that capability.

Yesterday I changed the DNS servers back from Route 53 to DigitalOcean (Cloudflare) to see of that made any difference.

As a test this morning I tried to email from sales@ to admin@ using Chrome and the Gmail web interface directly, and it did arrive but the header was totally munged. However I suspect that message would have stayed within Gmail and probably on the same server.

After that I also tried to send a test message (on the website) and via SES from sales@ to admin@ but it bounced. However, with that email I also included a CC to terence@ which did not bounce, and this time the `to address` was not changed to sales@!

I got Google cloud support involved yesterday and later today, or maybe tomorrow I will ask AWS SES support to help me resolve this issue. Why? Because if I use the SES test email function to send a message from sales@ to admin@ it bounces (as expected), however, if I use it to send a message from sales@ to terence@ it arrives, no problem.

So I don't think its a server related issue. Far more likely email routing or Google screwed up the addresses somehow.

Onward and upward Geraldo!
0 votes
by Expert
This issue has been fixed in v1.11.0, released today.
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...