Postfix-Amavisd Mail Flow - Birds-eye Overview - MTA

Postfix-Amavisd Mail Flow - Birds-eye Overview - MTA

   KB 21879        Last updated on 2016-06-20  




0.00
(0 votes)


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.

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


Verified Against: Zimbra Collaboration 8.6, 8.5, 8.0 Date Created: 04/16/2015
Article ID: https://wiki.zimbra.com/index.php?title=Postfix-Amavisd_Mail_Flow_-_Birds-eye_Overview_-_MTA Date Modified: 2016-06-20



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Wiki/KB reviewed by SME1 SME2 Copyeditor Last edit by Jorge de la Cruz
Jump to: navigation, search