2

I have set up a mail server on ubuntu.

Ive checked ports are open and I've double checked all config files, checking with every google search result I could find. Most of the similar posts have more complex logs and outline steps I have already taken.

I can send emails from my server no problem, but I can not receive them.

Here is the mail log after trying to an email from my university email, and my gmail email:

Jan 3 19:02:03 li740-32 postfix/smtpd[19816]: connect from mail-by2on0070.outbound.protection.outlook.com[207.46.100.70]
Jan 3 19:02:04 li740-32 postfix/smtpd[19816]: NOQUEUE: reject: RCPT from mail-by2on0070.outbound.protection.outlook.com[207.46.100.70]: 454 4.7.1 <info@vapsterthekoala.com>: Relay access denied; from=<benjamin.hoey@uqconnect.edu.au> to=<info@vapsterthekoala.com> proto=ESMTP helo=<na01-by2-obe.outbound.protection.outlook.com>
Jan 3 19:02:04 li740-32 postfix/smtpd[19816]: disconnect from mail-by2on0070.outbound.protection.outlook.com[207.46.100.70]
Jan 3 19:02:32 li740-32 postfix/smtpd[19816]: connect from mail-vc0-f178.google.com[209.85.220.178]
Jan 3 19:02:33 li740-32 postfix/smtpd[19816]: NOQUEUE: reject: RCPT from mail-vc0-f178.google.com[209.85.220.178]: 454 4.7.1 <info@vapsterthekoala.com>: Relay access denied; from=<vapsterthevapist@gmail.com> to=<info@vapsterthekoala.com> proto=ESMTP helo=<mail-vc0-f178.google.com>
Jan 3 19:02:33 li740-32 postfix/smtpd[19823]: connect from mail-vc0-f172.google.com[209.85.220.172]
Jan 3 19:02:34 li740-32 postfix/smtpd[19816]: disconnect from mail-vc0-f178.google.com[209.85.220.178]
Jan 3 19:02:34 li740-32 postfix/smtpd[19823]: NOQUEUE: reject: RCPT from mail-vc0-f172.google.com[209.85.220.172]: 454 4.7.1 <info@vapsterthekoala.com>: Relay access denied; from=<vapsterthevapist@gmail.com> to=<info@vapsterthekoala.com> proto=ESMTP helo=<mail-vc0-f172.google.com>
Jan 3 19:02:35 li740-32 postfix/smtpd[19823]: disconnect from mail-vc0-f172.google.com[209.85.220.172]

Log when I sent an email to myself:

Jan  3 20:31:41 li740-32 postfix/smtpd[20703]: connect from CPE-121-208-28-184.bxny1.woo.bigpond.net.au[121.208.28.184]
Jan  3 20:31:43 li740-32 postfix/smtpd[20703]: 0AB1FE675: client=CPE-121-208-28-184.bxny1.woo.bigpond.net.au[121.208.28.184], sasl_method=LOGIN, sasl_username=info@vapsterthekoala.com
Jan  3 20:31:43 li740-32 postfix/cleanup[20715]: 0AB1FE675: message-id=<005b01d02794$24178a70$6c469f50$@vapsterthekoala.com>
Jan  3 20:31:43 li740-32 postfix/qmgr[20683]: 0AB1FE675: from=<info@vapsterthekoala.com>, size=2731, nrcpt=1 (queue active)
Jan  3 20:31:45 li740-32 dovecot: imap-login: Login: user=<info@vapsterthekoala.com>, method=PLAIN, rip=121.208.28.184, lip=106.185.34.32, mpid=20718, TLS, session=<9uuNWMULlQB50By4>
Jan  3 20:31:46 li740-32 postfix/smtpd[20703]: disconnect from CPE-121-208-28-184.bxny1.woo.bigpond.net.au[121.208.28.184]
Jan  3 20:31:50 li740-32 postfix/smtp[20716]: 0AB1FE675: to=<info@vapsterthekoala.com>, relay=none, delay=7.5, delays=0.67/0.01/6.8/0, dsn=5.4.6, status=bounced (mail for vapsterthekoala.com loops back to myself)
Jan  3 20:31:50 li740-32 postfix/cleanup[20715]: 5D12FE677: message-id=<20150103203150.5D12FE677@makaveli>
Jan  3 20:31:50 li740-32 postfix/qmgr[20683]: 5D12FE677: from=<>, size=4510, nrcpt=1 (queue active)
Jan  3 20:31:50 li740-32 postfix/bounce[20719]: 0AB1FE675: sender non-delivery notification: 5D12FE677
Jan  3 20:31:50 li740-32 postfix/qmgr[20683]: 0AB1FE675: removed
Jan  3 20:31:50 li740-32 postfix/smtp[20716]: 5D12FE677: to=<info@vapsterthekoala.com>, relay=none, delay=0, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for vapsterthekoala.com loops back to myself)
Jan  3 20:31:50 li740-32 postfix/qmgr[20683]: 5D12FE677: removed
Jan  3 20:32:21 li740-32 dovecot: imap(info@vapsterthekoala.com): Disconnected: Logged out in=2989 out=1780
Jan  3 20:32:23 li740-32 dovecot: imap-login: Login: user=<info@vapsterthekoala.com>, method=PLAIN, rip=121.208.28.184, lip=106.185.34.32, mpid=20722, TLS, session=<fCbHWsULnwB50By4>
Jan  3 20:32:43 li740-32 dovecot: imap(info@vapsterthekoala.com): Connection closed in=498 out=4241

main.cf:

#See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
#smtpd_use_tls=yes
#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_tls_cert_file=/etc/dovecot/dovecot.pem
smtpd_tls_key_file=/etc/dovecot/private/dovecot.pem
smtpd_use_tls=yes
smtpd_tls_auth_only = yes

#Enabling SMTP for authenticated users, and handing off authentication to Dovecot
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes

#smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks           reject_unauth_destination



# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = makaveli
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = vapsterthekoala.com, makaveli, localhost.localdomain, localhost
mydestination = localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

#Handing off local delivery to Dovecot's LMTP, and telling it where to store mail
virtual_transport = lmtp:unix:private/dovecot-lmtp
  • 2
    What is your Postfix configuration? What steps have you already taken? – Michael Hampton Jan 03 '15 at 20:25
  • Ive actually dont quite alot, too much to list, I was hoping my log would help. Ive added the main.cf file to my post. The master.cf was only touched in 3 places from default. I removed the comment, thus enabling, smpt, smpts, submission, -inet. Thanks. – בנימין הויי Jan 03 '15 at 20:51
  • In the future, you should post the output `postconf -n` and/or `postconf -Mf` to show contents of file `main.cf` and/or `master.cf` respectively :) – masegaloeh Jan 03 '15 at 21:48
  • @בנימין הויי: re your flag: Nothing dramatic, don't worry. People would have told you. – Sven Jan 05 '15 at 17:15

2 Answers2

4

Your mydestination does not include your own domain, thus Postfix doesn't know it is meant to deliver the mail locally. This is why you see errors like "Relay access denied" and "Mail loops back to myself".

It appears you had already set this up, but had commented it out.

#mydestination = vapsterthekoala.com, makaveli, localhost.localdomain, localhost
mydestination = localhost

Simply add your domain name to mydestination and reload Postfix.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
0

I dont know what I did wrong, but redoing the setup all over again fixed the problem. A guide for those who are interested. https://www.linode.com/docs/email/postfix/email-with-postfix-dovecot-and-mysql#postfix