Postfix-Amavisd Mail Flow - Birds-eye Overview - MTA
Postfix-Amavisd Mail Flow - Birds-eye Overview - MTA
- This article is a Work in Progress, and may be unfinished or missing sections.
Purpose
Postfix-Amavisd Mail Flow - Birds-eye Overview - MTA
Resolution
The following references are very good reads to familiarize yourself with in regards to postfix.
- http://www.onlamp.com/pub/a/onlamp/2004/01/22/postfix.html
- http://www.linuxjournal.com/article/9454 [5 pages]
- https://help.ubuntu.com/community/PostfixBasicSetupHowto [nice flowcharts]
- http://www.postfix.org/OVERVIEW.html
- http://www.postfix.org/smtpd.8.html
- http://www.postfix.org/QSHAPE_README.html - "Postfix Bottleneck Analysis"
- This explains how the postfix queues work, a must read.
Below is my initial attempt to show the flow within ZCS.
Incoming mail > smtp port 25 > netstat -plnt | grep ":25 " tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN - ## smtp port 25 is because 'mta is enabled' > zmprov gs `zmhostname` zimbraServiceEnabled | grep mta zimbraServiceEnabled: mta Postfix's "Incoming Queue" /opt/zimbra/data/postfix/spool/incoming/ Postfix's "Active Queue" /opt/zimbra/data/postfix/spool/active/ su - zimbra $ sudo /opt/zimbra/libexec/zmqstat hold=0 corrupt=0 deferred=0 active=0 incoming=0 Is amavisd enabled? zcs721:/opt/zimbra/postfix/conf # diff main.cf /tmp/before/postfix/conf/main.cf < content_filter = > content_filter = smtp-amavis:[127.0.0.1]:10024 Then messages goto port 10024 zimbra@zcs721:~> netstat -plnt | grep 10024 tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 2583/amavisd (ch8-a Three things amavisd is enabled for: 1. spamassassin zmprov ms `zmhostname` +zimbraServiceEnabled antispam /opt/zimbra/conf> diff amavisd.conf /tmp/before/amavisd.conf < @bypass_spam_checks_maps = (1); # uncomment to DISABLE anti-spam code > # @bypass_spam_checks_maps = (1); # uncomment to DISABLE anti-spam code 2. clamav zmprov ms `zmhostname` +zimbraServiceEnabled antivirus /opt/zimbra/conf> diff amavisd.conf /tmp/before/amavisd.conf < @bypass_virus_checks_maps = (1); # uncomment to DISABLE anti-virus code > # @bypass_virus_checks_maps = (1); # uncomment to DISABLE anti-virus code 3. archiving zmprov ms `zmhostname` +zimbraServiceEnabled archiving /opt/zimbra/conf> diff amavisd.conf /tmp/before/amavisd.conf < $archive_quarantine_method = 'smtp:[127.0.0.1]:10025'; > #$archive_quarantine_method = 'smtp:[127.0.0.1]:10025'; zimbra@zcs721:~/postfix/conf> netstat -plnt | grep 1002 tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 13779/amavisd (mast tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN Once the amavis related items are checked, the message goes back to postfix's active queue via port 10025 and will get delivered to the mailstore via lmtp/port 7025 > netstat -plnt | grep 7025 tcp 0 0 0.0.0.0:7025 0.0.0.0:* LISTEN - You can see how the ports are configured in /opt/zimbra/postfix/conf in the master.cf & master.cf.in files. Port 10025 [always configured] and 10024 [only configured if amavis is enabled] are setup there also.
Additional Content
- http://www.onlamp.com/pub/a/onlamp/2004/01/22/postfix.html
- http://www.linuxjournal.com/article/9454 [5 pages]
- https://help.ubuntu.com/community/PostfixBasicSetupHowto [nice flowcharts]
- http://www.postfix.org/OVERVIEW.html
- http://www.postfix.org/smtpd.8.html
- http://www.postfix.org/QSHAPE_README.html - "Postfix Bottleneck Analysis"
- This explains how the postfix queues work, a must read.