Question

Email Server Issues (postfix, rainloop, dovecot)

Posted March 25, 2014 13.6k views
Hi, I am trying to setup my own mail server to serve my personal email address, "me@mydomain.com"... I don't plan on having any other email accounts on this server aside from this one. What I did... Install Postfix for smtp.. https://help.ubuntu.com/community/Postfix Install Dovecot for IMAP.. https://help.ubuntu.com/10.04/serverguide/dovecot-server.html Install Rainloop for webmail..http://rainloop.net/docs/installation/ The Zone file for my domain... mydomain.com -----------Begin Zone File-------------- $TTL 1800 @ IN SOA NS1.DIGITALOCEAN.COM. hostmaster.mydomain.com. ( 1395759915 ; last update: 2014-03-25 15:05:15 UTC 3600 ; refresh 900 ; retry 1209600 ; expire 1800 ; ttl ) IN NS NS1.DIGITALOCEAN.COM. MX 5 mydomain.com. NS NS2.DIGITALOCEAN.COM. NS NS3.DIGITALOCEAN.COM. mydomain.com. TXT google-site-verification=SUaAi0AD-OTTO1y4mzyqMcKu72WFpGTiLgNiNxYYS1o @ TXT "v=spf1 a include:_spf.leoadhemartan.com ~all" www CNAME @ @ IN A 162.243.141.208 ------------End Zone File---------------- The Zone File for my webmail domain... -----------Begin Zone File-------------- $TTL 1800 @ IN SOA NS1.DIGITALOCEAN.COM. hostmaster.webmail.mydomain.com. ( 1395679621 ; last update: 2014-03-24 16:47:01 UTC 3600 ; refresh 900 ; retry 1209600 ; expire 1800 ; ttl ) IN NS NS1.DIGITALOCEAN.COM. NS NS2.DIGITALOCEAN.COM. NS NS3.DIGITALOCEAN.COM. @ IN A 162.243.141.208 ------------End Zone File---------------- What I can do... I can send email with no issues through the terminal via the command, echo "This is a test message." | mail -s Hello mygmailadd@gmail.com I can also send email through Heirloom mailx I can recieve email from my root user account (I send email to me@mydomain.com, using the terminal command) I can login and view my inbox through my webmail. What I can't do... Recieve email sent from my gmail address. (no mailer:daemon error message from my gmail at the time of sending this ticket.) Send email from my webmail app (authentication failed). Is there something wrong with my configurations? Thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
4 answers
Update:

I am now able to send email through my rainloop webmail account...

To do this, I removed postfix from chroot and set the saslauthd to Default. Now my only problem is receiving email.

still can't receimails...
I can't connect to mydomain at port 25 through telnet (connect failed)

this is the output of my netstat -plntu command

http://pastebin.com/XiXDJ6bX

my postfix main conf

GNU nano 2.2.6 File: /etc/postfix/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/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/smtpd.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

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

myhostname = leoadhemartan.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = leoadhemartan.com, localhost, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_interfaces = $myhostname
inet_interfaces = $myhostname, localhost
inet_protocols = all
home_mailbox = Maildir/
smtpd_sasl_local_domain = leoadhemartan.com
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_sender_login_mismatch
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
# DKIM
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
UPDATE:

Finally figured out the problem....

It was an IPtables Rules conflict.

I flushed the iptables and redid all the rules to allow smtp, imap, pop3 and icmp traffic.

I had no idea why I had these iptable rules in the firstplace. I never configured it. I had another droplet and it did not have the same rules.

Submit an Answer