merubuntu
By:
merubuntu

[Postfix+Dovecot+Ubuntu] Cannot receive any mails from Google,Yahoo,Outlook... to my @xxx.com account

January 3, 2015 3.6k views

Let me say that for now I send mails (for Yahoo, Google, Outlook). Listening on port 587 for SMTP I send mails from @xxxx.com account to N acounts. :)

But for IMAP case, I do not have a clear reason why I cannot receive any mails from other accounts (Outlook, Gmail, Yahoo, etc.) to my @xxxx.com account.

I checked mail.err (empty) and mail.log report me this:

Jan  2 22:15:43 mail dovecot: imap(miguel@yrma.biz): Disconnected: Logged out in=4128 out=9425
Jan  2 22:15:43 mail dovecot: imap(miguel@yrma.biz): Disconnected: Logged out in=1862 out=5645
Jan  2 22:15:43 mail dovecot: imap(miguel@yrma.biz): Disconnected: Logged out in=1043 out=3632
Jan  2 22:16:00 mail dovecot: imap-login: Login: user=<miguel@yrma.biz>, method=PLAIN, rip=181.67.17.135, lip=104.236.108.28, mpid=1553, TLS, session=<70Vr4$
Jan  2 22:16:33 mail dovecot: imap-login: Login: user=<miguel@yrma.biz>, method=PLAIN, rip=181.67.17.135, lip=104.236.108.28, mpid=1559, TLS, session=<q3Vf4$
Jan  2 22:16:35 mail dovecot: imap-login: Login: user=<miguel@yrma.biz>, method=PLAIN, rip=181.67.17.135, lip=104.236.108.28, mpid=1561, TLS, session=<Br1+4$
Jan  2 22:18:30 mail postfix/anvil[1538]: statistics: max connection rate 1/60s for (submission:181.67.17.135) at Jan  2 22:15:08
Jan  2 22:18:30 mail postfix/anvil[1538]: statistics: max connection count 1 for (submission:181.67.17.135) at Jan  2 22:15:08
Jan  2 22:18:30 mail postfix/anvil[1538]: statistics: max cache size 1 at Jan  2 22:15:08

Hope anyone can help me.
Thanks!
R2

1 comment
  • Thanks guys for your help..
    DigitalOcean was the first right decision in this new 2015.

    Best regards

8 Answers

yrma.biz has no MX records.

Hi.

MX record points to mail.yrma.biz

Hi!
Are your aliases / users correctly configured?

Hi.

Now those are the setting:

NAME TYPE VALUE

mail.example.com. A 12.34.56.78
example.com. MX 10 mail.example.com.

  • That's not the cleanest way to add the record, I guess; anyway it should work.

    Again, are you sure that emails are delivered to the right user?

  • Uhmm, those records are in Amazon Route 53
    Is there a cleanest way to do it?

  • MX records only take A records, i.e. you can't point one to an IP address. So you have to add an A record and then add an MX record that points to the said A record.

  • @kamaln7, what you say is not the same as I configured before?

    mail.example.com. "A" 12.34.56.78?

    and then

    example.com. "MX" 10 mail.example.com.?

    (mail.example.com points to an A record with IP 12.34.56.78)

  • @raulromero: My bad, sorry. What you did is correct. I meant that this is the 'cleanest' way to do it. :)

Well, in fact for the two users I've registered in mysql tables, the folder:

/var/mail/vhosts/example.com/user1/new
/var/mail/vhosts/example.com/user2/new

are still empty. I mean, no Yahoo or Gmail messages are not coming to those folders...

.
.

I see the mail.log address

Jan  4 09:31:33 mail postfix/smtpd[6052]: connect from snt004-omc2s13.mail_outside.com[65.55.90.88]
Jan  4 09:31:34 mail postfix/smtpd[6052]: 2745E1431E1: client=snt004-omc2s13.mail_outside.com[65.55.90.88]
Jan  4 09:31:34 mail postfix/cleanup[6059]: 2745E1431E1: message-id=<SNT151-W491623AE81654E6D3B7F538F5B0@phx.gbl>
Jan  4 09:31:34 mail postfix/qmgr[2056]: 2745E1431E1: from=<mail_outside@mail.com>, size=5137, nrcpt=1 (queue active)
Jan  4 09:31:34 mail postfix/smtpd[6052]: disconnect from snt004-omc2s13.mail_outside.com[65.55.90.88]
Jan  4 09:31:34 mail postfix/pickup[5719]: 87CCC143205: uid=1001 from=<mail_outside@mail.com>
Jan  4 09:31:34 mail postfix/cleanup[6059]: 87CCC143205: message-id=<SNT151-W491623AE81654E6D3B7F538F5B0@phx.gbl>
Jan  4 09:31:34 mail postfix/pipe[6061]: 2745E1431E1: to=<mail_outside@mail.com>, orig_to=<myemail@example.com>, relay=spamassassin, delay=0.46, delays=0.24/0/0/0.22, dsn=2.0.0, status=sent (delivered via spamassassin service)
Jan  4 09:31:34 mail postfix/qmgr[2056]: 2745E1431E1: removed
Jan  4 09:31:34 mail postfix/qmgr[2056]: 87CCC143205: from=<mail_outside@mail.com>, size=5531, nrcpt=1 (queue active)
Jan  4 09:31:35 mail postfix/smtp[6065]: 87CCC143205: to=<mail_outside@mail.com>, relay=mx1.mail_outside.com[65.54.188.126]:25, delay=0.71, delays=0/0/0.3/0.4, dsn=2.0.0, status=sent (250  <SNT151-W491623AE81654E6D3B7F538F5B0@phx.gbl> Queued mail for delivery)
Jan  4 09:31:35 mail postfix/qmgr[2056]: 87CCC143205: removed

Notice that on line 6, instead of appear any dovecot line, just showing the postfix activities. So postfix is not calling to dovecot for manage the incoming mails...

Why? Now I'm checking the dovecot config's but in case you have any suggestions I would appreciate.

Ok guys, now this is my answer.

The problem was that, while I was following this guide -which is very similar to this other one my error was in the virtual_aliases table.

Its use was not meaningful for me until the explanation I read was clear:

"This lets you forward mail from one email address to another. This command will create a table called virtualaliases. It has an id field, a domainid field which will associate each entry with a domain, a source field for the original email address, and a destination field for the target email address"

Ok, so an alias account is not saved in the server, just used to forward all their incoming messages to (i) another @example.com account or (ii) any other mail. Be careful because in case you put an account that is not considered as an alias type, none of their incoming messages will be stored in the server.

Two days of hard thinking... #WhyME!!!

Have another answer? Share your knowledge.