This repository was archived by the owner on Jul 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Debugging Postfix
Timotheus Pokorra edited this page Nov 15, 2016
·
5 revisions
Useful links:
- https://rtcamp.com/tutorials/mail/postfix-debugging/
- https://rtcamp.com/tutorials/mail/postfix-queue/
Useful commands:
mailq
postfix flush
postqueue -i <MAILID>
/var/log/maillog shows:
timed out while receiving the initial server greeting
This happens when sending emails should connect to amavis.
After a reboot of the whole machine, the emails were sent.
with telnet:
telnet localhost 25
mail from:test@example.org
rcpt to:invalid@example.org # OK because it is an external domain
rcpt to:invalid@localdomain.org # Recipient address rejected: User unknown in local recipient table
rcpt to:valid@localdomain.org # OK if that email address exists locally
You can also test if forwarding emails to another server works, see http://www.pokorra.de/2016/05/configuring-postfix-to-distribute-emails-to-other-servers/
with telnet:
telnet localhost 25
# important: paste line by line, not all in one go!
HELO client.example.com
MAIL FROM:mail@example.org
RCPT TO:timotheus.pokorra@mydomain.de
DATA
X-Spam-Status: Yes
Spam-Status: Yes
Subject: Test message
This is a test message.
.
QUIT