Ajcody-MTA-Postfix-Topics
- This article is NOT official Zimbra documentation. It is a user contribution and may include unsupported customizations, references, suggestions, or information. |
Postfix - MTA
Actual MTA & Postfix Topics Homepage
Please see Ajcody-MTA-Postfix-Topics
Missing main.cf Error
If you get something like:
postfix/postqueue[8739]: fatal: open /opt/zimbra/postfix-2.4.7.5z/conf/main.cf: No such file or directory
All you need to do is create an empty main.cf file and zimbra will rewrite it.
touch main.cf
When you now do something to start the mta, it will generate the values for main.cf
zmmtactl stop zmmtactl start
User Alias Mapping And Mail Transport with Postfix & LDAP
See User_Alias_Mapping_and_Mail_Transport_with_Postfix_&_LDAP
Automatic BCC
Please see the following:
- Postfix workaround
- "User defined auto bcc"
- "Next rev of (mail) identities preferences management (server side)"
Limiting Or Increasing Number Of Recipents / Messages
Mailing Lists - Distribution Lists
Policy Daemon
If you want to restrict messages per hour, you can look into Policy Daemon:
Postfix
Also, there are some default postfix parameters set to control sending a message to x amount recipients. The parameters you will need to look at are smtpd_recipient_limit & smtpd_recipient_overshoot_limit, these have a default value of 1000.
Postfix defines these parameters as:
- smtpd_recipient_limit: The maximum number of recipients that the Postfix SMTP server accepts per message delivery request.
- smtpd_recipient_overshoot_limit: The number of recipients that a remote SMTP client can send in excess of the limit specified with $smtpd_recipient_limit, before the Postfix SMTP server increments the per-session error count for each excess recipient.
From the command line you can change the default values.
su - zimbra postconf -e smtpd_recipient_limit=<new value> postconf -e smtpd_recipient_overshoot_limit=<new value> postfix reload
Controlling SMTPD Client Connections
Postfix Resources At Their Site (All Clients/Connections):
- Measures against clients that make too many connections
- anvil - Postfix session count and request rate control
- anvil_rate_time_unit - The time unit over which client connection rates and other rates are calculated.
- smtpd_client_connection_count_limit - How many simultaneous connections any client is allowed to make to this service.
- smtpd_client_message_rate_limit - The maximal number of message delivery requests that any client is allowed to make to this service per time unit, regardless of whether or not Postfix actually accepts those messages.
- smtpd_client_recipient_rate_limit - The maximal number of recipient addresses that any client is allowed to send to this service per time unit, regardless of whether or not Postfix actually accepts those recipients.
- smtpd_client_connection_rate_limit - The maximal number of connection attempts any client is allowed to make to this service per time unit.
Postfix Resources At Their Site (Exceptions To Clients/Connections Or Single Source):
Spam Control And Related Issues
Resources
A list of resources you'll find useful:
http://wiki.zimbra.com/index.php?title=Zimbra_MTA#Anti-Spam_Training_Filters
http://wiki.zimbra.com/index.php?title=CLI_zmtrainsa
http://wiki.zimbra.com/index.php?title=Improving_Anti-spam_system
http://wiki.zimbra.com/index.php?title=Postfix_Policyd
http://wiki.zimbra.com/index.php?title=IP_Address_whitelisting
http://wiki.zimbra.com/index.php?title=Spam_training
Wiki articles that have been assigned to the anit-spam category:
http://wiki.zimbra.com/index.php?title=Category:Anti-spam
Down to the end-user:
http://wiki.zimbra.com/index.php?title=Cool_User_Spam_Filters
http://www.zimbra.com/community/end_user_guide_and_how_to.html
Using Different SMTP Server For Webclient (ZWC), Mobiles, And ZCO
There a variable called zimbraSmtpHostname that is in the global (zmprov gacf) and server (zmprov gs `hostname`) configs. It's defaulted to 'localhost' - at least on a single ZCS configuration.
In cases where you need/want all mail to be processed by, for example, an external non-Zimbra spam filter box you could set this variable to the spam filter boxes hostname.
Global:
zmprov mcf zimbraSmtpHostname hostname-of-ext-server
Per Server:
zmprov ms servername zimbraSmtpHostname hostname-of-ext-server
Global Disclaimer Options
Here's the url to review for a "current" possibility:
And in the notes section there's a comment about multi-servers:
Please note though, "This article is a community contribution and may include unsupported customizations." Meaning, it's an unsupported customization, so please take the necessary precautions.
In regards to an official and supported way to do this, please review this RFE:
Quota Issues
Where To Adjust Message User Gets When They Are Over Quota
- From the web admin console:
- Configuration > Class of Service
- Select the COS in question
- Then goto the Advanced tab on the right
- There's a quota section. The sub-section you want is called:
- "Quota warning message template:"
Controlling Behavior For Messages Sent To Over Quota Mailbox
The variable to set for a 452 Temp/Try Again response verses a 552 Permanent Error.
zmprov gacf zimbraLmtpPermanentFailureWhenOverQuota
Setting to TRUE will flag it for the 552 response.
Message Senders Receive About Mailbox Over Quota
File that holds text of message:
/opt/zimbra/postfix/conf/bounce.cf.default
Note, please read the bounce MAN page before you attempt to edit this file directly.
su - zimbra man bounce
Also, I haven't been able to confirm the relationship of this above file with the postconf default output:
[root@mail3 ~]# postconf | grep -i bounce 2bounce_notice_recipient = postmaster backwards_bounce_logfile_compatibility = yes bounce_notice_recipient = postmaster bounce_queue_lifetime = 5d bounce_service_name = bounce bounce_size_limit = 50000 bounce_template_file = disable_verp_bounces = no double_bounce_sender = double-bounce multi_recipient_bounce_reject_code = 550 soft_bounce = no
To use a bounce.cf file, you'll want to add the file to variable and reload postfix via the zmmtactl script. It looks like zmlocalconfig doesn't currently handle this variable.
cp /opt/zimbra/postfix/conf/bounce.cf.default /opt/zimbra/postfix/conf/bounce.cf postconf -e bounce_template_file="/opt/zimbra/postfix/conf/bounce.cf" zmmtactl reload
Note, this might get lost during upgrades so make a note to yourself about this change.