Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 29th June 2008, 05:45
fred!head fred!head is offline
Junior Member
Join Date: Mar 2008
Posts: 14
Thanks: 1
Thanked 1 Time in 1 Post
Default Postfix won't receive external email

I'm running Hardy Heron using the Perfect Server instructions, specifically the Postfix install here:


I've got my Postfix/Dovecot server relaying messages from my Outlook to an account on my mail server out to another email address managed by a different email server. Also I can use telnet to send email to an account on the mail server and Postfix will receive and store the email for that account.

The problem is that when people send email from say GMail to an email address handled by my Postfix server, the server will not capture the email. The emails bounce. I'm trying hard, in vain so far, to figure out what might be wrong.

I did have all this working, including receipt/storage of inbound email for virtual domains I set up with Virtualmin. Something changed Wednesday evening and suddenly I can't receive email into my domains through Postfix.

If it helps, here is my postconf -n output:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
mail_spool_directory = /home/mail
mailbox_command = procmail -a $EXTENSION
mailbox_size_limit = 0
mydestination = www.redwrangler.com, localhost.redwrangler.com, localhost
myhostname = www.redwrangler.com
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtp_sasl_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,check_relay_domains
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
virtual_alias_domains = $virtual_alias_maps
virtual_alias_maps = hash:/etc/postfix/virtual
And here's my master.cf file:

10025      inet  n       -       -       -       -       smtpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
	-o smtp_fallback_relay=
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix	-	n	n	-	2	pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}
When I telnet to mail.redhorsecommunications.com (one of the virtual domains hosted on the server with Virtualmin) to the custom port and from the command line I get this output:

Connected to localhost.
Escape character is '^]'.
220 www.redwrangler.com ESMTP Postfix (Ubuntu)
ehlo localhost
250-SIZE 10240000
250 DSN
221 2.0.0 Bye
Connection closed by foreign host.
In Virtualmin, all my users appear to be configured properly as Unix users and so on. My /etc/postfix/virtual file looks fine.

Finally, if it matters, I'm in the process of moving domains hosted on several hosting services into one or two VPS servers. So the redwrangler.com domain is hosted elsewhere for the moment. I do not believe DNS is an issue because I had Postfix working fine with a DNS record and Virtualmin account for redwrangler.com on the new server even though DNS currently points traffic for that domain to the old/current server.

Any ideas what might be wrong? How I can figure out what prevents Postfix from receiving and storing emails for virtual domains?

Thank you!
Reply With Quote
Sponsored Links
Old 29th June 2008, 06:34
fred!head fred!head is offline
Junior Member
Join Date: Mar 2008
Posts: 14
Thanks: 1
Thanked 1 Time in 1 Post
Default More data...if it helps

Of course after I posted I saw at the very bottom of this topic page a link to this forum topic which, while it doesn't solve my problem, does show a lot of useful ways to generate output, to isolate potential issues. Here are the topics:



If it's useful, here's some more output:

nc -v 10025
localhost [] 10025 (?) open
220 www.redwrangler.com ESMTP Postfix (Ubuntu)
Running Netcat did appear to hang. However, I'm not familiar with this tool so it may have been waiting for me to generate input.

And more output, if it helps:

postconf -n | grep mynetworks
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,check_relay_domains
postconf -d | grep mynetworks
mynetworks =
mynetworks_style = subnet
parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
smtpd_client_event_limit_exceptions = ${smtpd_client_connection_limit_exceptions:$mynetworks}
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
Let me know if anything else would help. Thanks!
Reply With Quote
Old 29th June 2008, 20:30
fred!head fred!head is offline
Junior Member
Join Date: Mar 2008
Posts: 14
Thanks: 1
Thanked 1 Time in 1 Post
Default Port 25 was missing...

In case anyone finds this topic through search, the problem was that I left off the first smtp line in the master.cf file:

smtp      inet  n       -       -       -       -       smtpd
This prevented the Postfix MTA and anything else from binding to port 25. I had disabled port 25 thinking I did not need it because my internet service provider, and a few others in the US, block access to this port. When I put this line back in to the master.cf file, Postfix was/is able to receive email to all the virtual domains I set up with Virtualmin.
Reply With Quote
The Following User Says Thank You to fred!head For This Useful Post:
falko (30th June 2008)


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hotmail rejects outgoing email nzimas Server Operation 3 1st May 2009 04:39
Postfix email server config veremchook Server Operation 10 18th April 2009 17:14
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 10:40
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 16:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 16:36

All times are GMT +2. The time now is 21:51.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.