HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Postfix won't receive external email (http://www.howtoforge.com/forums/showthread.php?t=24595)

fred!head 29th June 2008 04:45

Postfix won't receive external email
 
I'm running Hardy Heron using the Perfect Server instructions, specifically the Postfix install here:

http://www.howtoforge.com/perfect-se...ntu8.04-lts-p5

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:

Code:

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:

Code:

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:

Code:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 www.redwrangler.com ESMTP Postfix (Ubuntu)
ehlo localhost
250-www.redwrangler.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
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!

fred!head 29th June 2008 05:34

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:

http://www.howtoforge.com/forums/showthread.php?t=20419

http://www.howtoforge.com/forums/showthread.php?t=20679

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

Code:

nc -v 127.0.0.1 10025
localhost [127.0.0.1] 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:


Code:

postconf -n | grep mynetworks
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,check_relay_domains

Code:

postconf -d | grep mynetworks
mynetworks = 127.0.0.0/8 75.127.97.0/24
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!

fred!head 29th June 2008 19:30

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:

Code:

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.


All times are GMT +2. The time now is 02:13.

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