Troubleshooting Course Content Rough Drafts-Identify And Resolve Mail Flow Issues: Difference between revisions
Line 215: | Line 215: | ||
<code><pre>3. *TRUE* | <code><pre>3. *TRUE* | ||
Trick question: You do not need to configure the zimbraMtaRelayHost | Trick question: You do not need to configure the zimbraMtaRelayHost | ||
setting unless your network provider is blocking outbound smtp traffic; then you will need a relayhost. | setting unless your network provider is blocking outbound smtp traffic; then you will need a relayhost. | ||
</pre></code> | </pre></code> |
Revision as of 01:39, 27 February 2015
ROUGH DRAFT ROUGH DRAFT ROUGH DRAFT ROUGH DRAFT
Section I - General Info
Email traffic depends on DNS MX records
Section II - Trouble with Incoming Messages
Why are my messages not getting delivered? Check your DNS MX records from this linux command
host –t mx yourdomain.com
You should see something like…
yourdomain.com is handled by 10 mail.yourdomain.com.
Check to see if the MTA IP address is correct
host -t a mail.yourdomain.com
Is the IP correct?
Section III - Trouble with Outgoing Messages
Why are my messages not getting sent out?
Is your Network provider denying outbound smtp connections?
telnet smtp.hp.com 25
Section IV - Troubleshooting Tools
- /opt/zimbra/postfix/sbin/mailq
- /opt/zimbra/postfix/sbin/postqueue
- sudo /opt/zimbra/libexec/zmqstat
- /opt/zimbra/libexec/zmmsgtrace
Section V - Differences between zimbraMtaRelayHost & zimbraSmtpHostname
zimbraMtaRelayHost: Used by the zimbra MTA, postfix's value for postconf relayhost.
zimbraSmtpHostname: Used by the zimbra user store node not running MTA service.
Section VI - Real World case examples
OS MTA vs. Zimbra MTA
When a Linux OS is installed, the OS will include either Postfix or Sendmail. You must be aware that if the OS installs Postfix, the binary paths will be different.
[root@mail ~] which postfix
/usr/sbin/postfix
[zimbra@mail ~] which postfix
~/bin/postfix
See the difference? Make sure when you are running postfix commands like postconf, that you are running the commands as the zimbra user, not root.
Also, make sure to disable the OS MTA from the start up sequence.
chkconfig postfix off
or
update-rc.d -f /etc/init.d/postfix remove
Mail Loops back to myself
Typically a bounce message would look something like this:
This is the mail system at host mail.yourdomain.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<jsmith@mail.yourdomain.com>: mail for mail.yourdomain.com loops
back to myself
What this means is that someone tried to send a message to jsmith@mail.yourdomain.com, however the Zimbra system is smart enough to have looked up the MX (mail exchange) records for the domain. It notes that it in fact is the destination server for the mail, but the domain of mail.yourdomain.com was not created.
LMTP delivery resolving to a public IP not the Private IP
Scenario would involve the zimbra MTA with the private IP, i.e. 192.168.1.17; however, mail is not getting delivered internally.
In the /var/log/zimbra.log file would show this:
relay=mail.yourdomain.com[17.218.128.55]:7025 **INCORRECT**
relay=mail.yourdomain.com[192.168.1.17]:7025 **CORRECT**
If this happens to you, try the following.
ZCS8.5 & ZCS8.6
zmprov mcf zimbraMtaLmtpHostLookup native
zmmtactl restart
Older zimbra versions
zmlocalconfig -e postfix_lmtp_host_lookup=native
zmmtactl restart
Relay Access Denied
You may have seen a bounce message like this.
From: System Administrator
Sent: Friday, August 28, 2014 12:00 PM
To: John Smith
Subject: Undeliverable: test
Your message did not reach some or all of the intended recipients.
Subject: RE: Sales
Sent: 8/28/2014 12:00 PM
The following recipient(s) cannot be reached:
'Susan Smith' on 8/28/2014 12:00 PM
554 5.7.1 <ssmith@domain.com>: Relay access denied
Usually this is caused by zimbra MTA's mynetworks setting was not correct. Running the following commands from the MTA as the zimbra user, are the results the same?
zmprov gs zimbra-mta.yourdomain.com zimbraMtaMyNetworks
zmprov gacf zimbraMtaMyNetworks
postconf | grep mynetworks
Remember, zimbraMtaMyNetworks should contain the network addresses of the localhost IP, and the IP from the network interface i.e. eth0 192.168.1.17 lo 127.0.0.1 would look like this...
postconf mynetworks
mynetworks = 127.0.0.0/8 192.168.1.0/24
zmprov gs zimbra-mta.yourdomain.com zimbraMtaMyNetworks
zimbraMtaMyNetworks: 127.0.0.0/8 192.168.1.0/24
Things to consider regarding zimbraMtaMyNetworks and "relay access denied" issues
- End users that are using email clients like Thunderbird, or Outlook must use smtp authentication if they want to relay email through the zimbra-MTA.
If they don't enter a username/password in their email client, there will be a "relay access denied" error in the /var/log/zimbra.log file.
- Never configure zimbraMtaMyNetworks to relay public IP networks, i.e. adding 140.108.26.0/24 zimbraMtaMyNetworks. This means ANYONE on the 140.108.26.0 subnet can relay email without authentication, which is bad and would make the zimbra-MTA an open relay for the 140.108.26.0 subnet.
Unknown sender
Symptom: Checking outgoing mail and I am seeing email that is coming from zimbra that are coming from users that do not exist in the LDAP server.
ZCS-8.0.x
1. zmlocalconfig -e postfix_enable_smtpd_policyd=yes
2. zmlocalconfig -e postfix_smtpd_reject_unlisted_recipient=yes
3. zmlocalconfig -e postfix_smtpd_reject_unlisted_sender=yes
4. zmprov mcf +zimbraMtaRestriction "check_policy_service unix:private/policy"
5. zmmtactl restart
6. zmconfigdctl restart
ZCS-8.6.x
1. zmprov mcf zimbraMtaEnableSmtpdPolicyd TRUE
2. zmprov mcf zimbraMtaSmtpdRejectUnlistedRecipient yes
3. zmprov mcf zimbraMtaSmtpdRejectUnlistedSender yes
4. zmprov mcf +zimbraMtaRestriction "check_policy_service unix:private/policy"
5. zmmtactl restart
6. zmconfigdctl restart
Short Quiz
1. Adding a pubic network subnet to zimbraMtaMyNetworks is recommended.
2. You can configure Zimbra MTA settings as the root user.
3. To send messages outbound from Zimbra MTA, you do not need to configure zimbraMtaRelayHost setting.
4. You need to uninstall the OS MTA in order for Zimbra's MTA to work properly.
5. Zimbra MTA traffic is logged to the /opt/zimbra/log/mailbox.log file
Short Quiz - No peeking
1. *FALSE*
Adding a public network subnet will allow anyone on the same subnet to relay email without authentication.
2. *FALSE*
Must be the "zimbra" user when making changes to the MTA service.
3. *TRUE*
Trick question: You do not need to configure the zimbraMtaRelayHost
setting unless your network provider is blocking outbound smtp traffic; then you will need a relayhost.
4. *FALSE*
You can simply disable the OS MTA from the OS startup sequence.
5. *FALSE*
Zimbra MTA traffic is logged to the /var/log/zimbra.log file.