Setting up email addresses for different domains in ISPConfig

Matthew Calabresi asked:

After following this article I have set up a number of email addresses on my server. On another machine on my network, I have seven sites hosted (and configured correctly with Apache). I would like this machine to run the email for these seven domains, yet I can only seem to get email sent to one specific address on one domain.

Let’s say I have the server name set to babs.domain1.com, and all of the MX records for the other six domains point to that server as the mailserver. However, I can only get email sent to matthew@domain2.com. (matthew is a user on babs, if that makes a difference.) I cannot get email sent to matthew@domain3.com, joe@domain2.com, or any other address at any of the domains I have configured — If I send it from Gmail.

I’ve telnetted in to the domain name port 25 (IE telnet domain4.com 25) and I’m able to send mail successfully from there. When I type HELO test.domain4.com it comes back with 220 babs.domain1.com, no matter what domain I’ve telnetted to, and I think that might be the source of my problem.

I’m receiving no bouncebacks in gmail indicating that the mail delivery is failing, and I’m not sure what I should do next.

Is this a gmail thing? Sending email from domain1.com to domain2.com works fine with any address.

Here is my log for a successful mail sent from gmail to domain2:

Jun  1 08:55:14 babs postfix/smtpd[21364]: connect from mail-ie0-f172.google.com[209.85.223.172]
Jun  1 08:55:15 babs postfix/smtpd[21364]: 8227826EF3: client=mail-ie0-f172.google.com[209.85.223.172]
Jun  1 08:55:15 babs postfix/cleanup[21256]: 8227826EF3: message-id=<CAH+8f1siHtmWa-DCBDmyxji0=n698EWqvomi4MuioX=oa4LY7w@mail.gmail.com>
Jun  1 08:55:15 babs postfix/qmgr[19997]: 8227826EF3: from=<matthew.calabresi@gmail.com>, size=1878, nrcpt=1 (queue active)
Jun  1 08:55:15 babs postfix/smtpd[21364]: disconnect from mail-ie0-f172.google.com[209.85.223.172]
Jun  1 08:55:17 babs postfix/smtpd[21264]: connect from localhost.localdomain[127.0.0.1]
Jun  1 08:55:17 babs postfix/smtpd[21264]: 29BF026EF7: client=localhost.localdomain[127.0.0.1]
Jun  1 08:55:17 babs postfix/cleanup[21256]: 29BF026EF7: message-id=<CAH+8f1siHtmWa-DCBDmyxji0=n698EWqvomi4MuioX=oa4LY7w@mail.gmail.com>
Jun  1 08:55:17 babs postfix/qmgr[19997]: 29BF026EF7: from=<matthew.calabresi@gmail.com>, size=2370, nrcpt=1 (queue active)
Jun  1 08:55:17 babs postfix/smtpd[21264]: disconnect from localhost.localdomain[127.0.0.1]
Jun  1 08:55:17 babs amavis[20189]: (20189-05) Passed CLEAN, [209.85.223.172] [209.85.223.172] <matthew.calabresi@gmail.com> -> <matthew@matthewcalabresi.com>, Message-ID: <CAH+8f1siHtmWa-DCBDmyx$
Jun  1 08:55:17 babs postfix/smtp[21286]: 8227826EF3: to=<matthew@matthewcalabresi.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.9, delays=0.35/0.02/0.03/1.5, dsn=2.0.0, status=sent (250 2.0.0 $
Jun  1 08:55:17 babs postfix/qmgr[19997]: 8227826EF3: removed
Jun  1 08:55:17 babs dovecot: lda(matthew@matthewcalabresi.com): sieve: msgid=<CAH+8f1siHtmWa-DCBDmyxji0=n698EWqvomi4MuioX=oa4LY7w@mail.gmail.com>: stored mail into mailbox 'INBOX'
Jun  1 08:55:17 babs postfix/pipe[21296]: 29BF026EF7: to=<matthew@matthewcalabresi.com>, relay=dovecot, delay=0.33, delays=0.06/0.06/0/0.2, dsn=2.0.0, status=sent (delivered via dovecot service)
Jun  1 08:55:17 babs postfix/qmgr[19997]: 29BF026EF7: removed
Jun  1 08:58:36 babs postfix/anvil[21387]: statistics: max connection rate 1/60s for (smtp:209.85.223.172) at Jun  1 08:55:14
Jun  1 08:58:36 babs postfix/anvil[21387]: statistics: max connection count 1 for (smtp:209.85.223.172) at Jun  1 08:55:14
Jun  1 08:58:36 babs postfix/anvil[21387]: statistics: max message rate 1/60s for (smtp:209.85.223.172) at Jun  1 08:55:15
Jun  1 08:58:36 babs postfix/anvil[21387]: statistics: max cache size 1 at Jun  1 08:55:14

And here is the log from what I think is a failed mail attempt:

Jun  1 17:05:02 babs postfix/smtpd[3879]: warning: database /var/lib/mailman/data/virtual-mailman.db is older than source file /var/lib/mailman/data/virtual-mailman
Jun  1 17:05:02 babs dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jun  1 17:05:02 babs postfix/smtpd[3879]: connect from localhost.localdomain[127.0.0.1]
Jun  1 17:05:02 babs dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jun  1 17:05:02 babs postfix/smtpd[3879]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jun  1 17:05:02 babs postfix/smtpd[3879]: disconnect from localhost.localdomain[127.0.0.1]

My answer:


Aha, I see there is a problem in your DNS records.

$ host -t mx matthewcalabresi.com
matthewcalabresi.com mail is handled by 1 babs.braindexter.com.

I presume babs is this machine.

However, babs is completely unreachable, because:

$ host babs.braindexter.com
Host babs.braindexter.com not found: 3(NXDOMAIN)

You can resolve this issue in one (but not both) of two ways:

  1. Give babs.braindexter.com an A record in the DNS, comprised of its IP address.
  2. Change the MX record for matthewcalabresi.com to point to a valid hostname, if its current value isn’t meant to be valid.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.