0

I am setting up aws email accounts (workmail) and and I have problems to receiving mail in this counts. (I must admit that it is my first time with aws and i don't know many about this service)

I'm working with AWS services:

  • WorkMail
  • Simple Email Service
  • Route 53
  • S3

To host the web server we use laravel forge (with nginx file configuration and Wordpress). The Wordpress are using the plugin "WP Mail SMTP".

Following the (tutorial) I have done all the steps from the first to the last.

The problem comes when i configured Route53 for the email services can send and receive (SES and WorkMail). Ok, when i send a email with "example@domain.es" work well. But when i try receive a mail from gmail they show me the next:

550 5.1.1 The email account that you tried to reach does not exist. 

I created the email from the test and i can see it on the workmail panel. But doesn't arrive any email to the Inbox.

I enclose captures to illustrate the problem.

enter image description here

enter image description here

I add the nginx file to:

        # FORGE CONFIG (DO NOT REMOVE!)
    include forge-conf/route.es/before/*;

    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
        server_name route.es;
        #server_name *.route.es;
        #server_name route.es;
        root /home/forge/route.es/;

        # FORGE SSL (DO NOT REMOVE!)
        ssl_certificate /etc/nginx/ssl/route.es/577719/server.crt;
        ssl_certificate_key /etc/nginx/ssl/route.es/577719/server.key;

        ssl_protocols TLSv1.2;
        ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
        ssl_prefer_server_ciphers on;
        ssl_dhparam /etc/nginx/dhparams.pem;

        add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Content-Type-Options "nosniff";

        index index.html index.htm index.php;

        charset utf-8;

        # FORGE CONFIG (DO NOT REMOVE!)
        include forge-conf/route.es/server/*;

        location / {
            try_files $uri $uri/ /index.php?$query_string;
        }

        location = /favicon.ico { access_log off; log_not_found off; }
        location = /robots.txt  { access_log off; log_not_found off; }

        access_log off;
        error_log  /var/log/nginx/route.es-error.log error;

        error_page 404 /index.php;

        location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
        }

        location ~ /\.(?!well-known).* {
            deny all;
        }
    }
# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/route.es/after/*;

And here i show the list of mails created in workmail:

enter image description here

1 Answers1

1

Is "550 5.1.1 The email account that you tried to reach does not exist." from SES or Google ?

You have multiple MX records and with 10 Priority with SES , it won't reach to SES receiving endpoint.

dig pxxxxxxxxxxxx.es mx +short
1 aspmx.l.google.com.
10 alt3.aspmx.l.google.com.
10 alt4.aspmx.l.google.com.
10 inbound-smtp.eu-west-1.amazonaws.com.
5 alt1.aspmx.l.google.com.
5 alt2.aspmx.l.google.com.

SES is configured fine:
220 inbound-smtp.eu-west-1.amazonaws.com ESMTP Amazon SES 
mail from: admin@admin.com
250 Ok
rcpt to:info@pxxxxxxxxxxxxxxxx.es
250 Ok
James Dean
  • 4,033
  • 1
  • 9
  • 18
  • Answering the first question: the message appears when sending from gmail to ses. – Robert Blasco Villarroya Aug 09 '19 at 09:08
  • 1
    @RobertBlascoVillarroya when you're sending from gmail, gmail performs mx to he recipient domain and find out where it needs to deliver and based on your mx records priorities , it'll connect here aspmx.l.google.com – James Dean Aug 09 '19 at 10:29