[RESOLVED] I can not receive emails in EC2 server

Hi all,

I have an EC2 Amazon server. I installed Virtualmin and created two virtual servers: {mydomain}.org (for production) and dev.{mydomain}.org (for development).

Properly operate the sites, FTP accounts, accounts for phpMyAdmin, etc. I can send mail, but I can not receive. “Mail delivery failed: returning message to sender”. Someone could help me?

$ hostname {mydomain}.org

$ sudo cat /etc/hosts 127.0.0.1 localhost localhost.localdomain

$ cat /etc/resolv.conf nameserver 127.0.0.1 search ec2.internal

$ postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases allow_percent_hack = no broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME mailbox_size_limit = 0 mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = dev.{mydomain}.org, localhost.{mydomain}.org, localhost, {mydomain}.org, mail.{mydomain}.org mydomain = {mydomain}.org myhostname = dev.{mydomain}.org newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES sample_directory = /usr/share/doc/postfix-2.6.6/samples sender_bcc_maps = hash:/etc/postfix/bcc sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual

Thanks! Regards.

I’ve tried editing /etc/resolv.conf file, but becomes default on reboot

I am receiving emails in the account dev@dev.{mydomain}.org but not in www@{mydomain}.org

Howdy,

Do you receive a bounce message when trying to send yourself an email?

Also, do you see any errors in the email logs, in /var/log/maillog or /var/log/mail.log?

-Eric

First of all thanks for your answer.

Now, when I try to send an email to the same account (www@{mydomain}.org) do not get anything.

In /var/log/maillog I have only one warning, but I never set virtual_alias_domains:

do not list domain dev.{mydomain}.org in BOTH mydestination and virtual_alias_domains

$ sudo cat /var/log/maillog Jan 15 18:36:53 {mydomain} dovecot: imap-login: Login: user=<www>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3614, secured Jan 15 18:36:53 {mydomain} dovecot: imap(www): Connection closed bytes=57/808 Jan 15 18:36:55 {mydomain} dovecot: imap-login: Login: user=<www>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3618, secured Jan 15 18:36:55 {mydomain} dovecot: imap(www): Connection closed bytes=57/808 Jan 15 18:36:59 {mydomain} dovecot: imap-login: Login: user=<www>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3622, secured Jan 15 18:36:59 {mydomain} postfix/smtpd[3623]: connect from localhost[127.0.0.1] Jan 15 18:36:59 {mydomain} postfix/trivial-rewrite[3625]: warning: do not list domain {mydomain}.org in BOTH mydestination and virtual_alias_domains Jan 15 18:36:59 {mydomain} postfix/smtpd[3623]: 4341A24DAE: client=localhost[127.0.0.1] Jan 15 18:36:59 {mydomain} postfix/cleanup[3626]: 4341A24DAE: message-id=<1389811019.3620@{mydomain}.org> Jan 15 18:36:59 {mydomain} postfix/qmgr[3580]: 4341A24DAE: from=<www@{mydomain}.org>, size=673, nrcpt=1 (queue active) Jan 15 18:36:59 {mydomain} postfix/trivial-rewrite[3625]: warning: do not list domain dev.{mydomain}.org in BOTH mydestination and virtual_alias_domains Jan 15 18:36:59 {mydomain} postfix/smtpd[3623]: disconnect from localhost[127.0.0.1] Jan 15 18:36:59 {mydomain} postfix/trivial-rewrite[3625]: warning: do not list domain dev.{mydomain}.org in BOTH mydestination and virtual_alias_domains Jan 15 18:36:59 {mydomain} postfix/trivial-rewrite[3625]: warning: do not list domain dev.{mydomain}.org in BOTH mydestination and virtual_alias_domains Jan 15 18:36:59 {mydomain} dovecot: imap(www): Connection closed bytes=778/2201 Jan 15 18:36:59 {mydomain} postfix/local[3627]: 4341A24DAE: to=<root@dev.{mydomain}.org>, orig_to=<www@{mydomain}.org>, relay=local, delay=0.41, delays=0.07/0.01/0/0.32, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME) Jan 15 18:36:59 {mydomain} postfix/qmgr[3580]: 4341A24DAE: removed

Do I have a bad record?

MX Record:

30 / @ / mx.{mydomain}.org 30 / * / mx.{mydomain}.org

A Record:

[code]www - 1.1.1.1
dev - 1.1.1.1
{mydomain}.org - 1.1.1.1
mx - 2.2.2.2
mx - 3.3.3.3
mx - 4.4.4.4

    • 5.5.5.5
      ftp - 5.5.5.5
      smtp - 5.5.5.5
      mail - 5.5.5.5
      imap - 5.5.5.5
      pop - 5.5.5.5
      email - 6.6.6.6
      webmail - 6.6.6.6[/code]

Help?

I resolve it creating a new virtual server :slight_smile: