Jun 10 02:45:04 ericlin postfix/cleanup: 2601D43AC3: message-id=<email@example.com> Jun 10 02:45:04 ericlin postfix/qmgr: 2601D43AC3: from=<firstname.lastname@example.org>, size=701, nrcpt=1 (queue active) Jun 10 02:45:04 ericlin postfix/local: 2601D43AC3: to=the logs for working email was following:
, relay=local, delay=0.01, delays=0.01/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox) Jun 10 02:45:04 ericlin postfix/qmgr: 2601D43AC3: removed
Jun 10 03:09:07 ericlin postfix/cleanup: DED8843AC4: message-id=You can see the differences between the two logs were the final message after status=sent, successful one was (250 2.0.0 OK 1465528180 18sm2559005qkd.30 – gsmtp), however, failed one was (delivered to mailbox) I had been searching for a solution for a long time, but never be able to find a fix. Today I spent another few hours trying to dig out if I can find anything, finally it is fixed. The problem is the following line in the postfix’s configuration file /etc/postfix/main.cf, there is a line like below
Jun 10 03:09:07 ericlin postfix/qmgr: DED8843AC4: from=<email@example.com>, size=5170, nrcpt=1 (queue active) Jun 10 03:09:08 ericlin postfix/smtp: DED8843AC4: to=<firstname.lastname@example.org>, relay=smtp.gmail.com[126.96.36.199]:587, delay=0.74, delays=0.02/0.01/0.2/0.51, dsn=2.0.0, status=sent (250 2.0.0 OK 1465528180 18sm2559005qkd.30 - gsmtp) Jun 10 03:09:08 ericlin postfix/qmgr: DED8843AC4: removed
mydestination = ericlin.me, ip-172-31-50-123.ec2.internal, localhost.ec2.internal, localhostThe problem is that I added my own domain (ericlin.me) to the list, which was wrong. After removing it, issue resolved!! ^_^. I hope this can help someone with similar problems.