added postfix-3.x configs for gentoo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -979,8 +979,8 @@ root: root@<SERVERNAME>
|
||||
</commands>
|
||||
</general>
|
||||
<!-- postfix with dovecot -->
|
||||
<daemon name="postfix_dovecot" title="Postfix with dovecot"
|
||||
default="true">
|
||||
<daemon name="postfix_dovecot" version="2.x"
|
||||
title="Postfix 2 with dovecot" default="true">
|
||||
<include>//service[@type='smtp']/general/commands[@index=1]
|
||||
</include>
|
||||
<command><![CDATA[echo "mail-mta/postfix dovecot-sasl -sasl" >> /etc/portage/package.use]]></command>
|
||||
@@ -1106,6 +1106,159 @@ virtual_mailbox_limit = 0
|
||||
#virtual_maildir_limit_message = Sorry, this user has overdrawn their diskspace quota. Please try again later.
|
||||
#virtual_overquota_bounce = yes
|
||||
|
||||
debugger_command =
|
||||
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
||||
ddd $daemon_directory/$process_name $process_id & sleep 5
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<include>//service[@type='smtp']/general/files[@index=0]</include>
|
||||
<file name="/etc/postfix/master.cf" chown="root:root" chmod="0644"
|
||||
backup="true" mode="append">
|
||||
<content><![CDATA[
|
||||
# Add this lines to be able to use dovecot as delivery agent
|
||||
# Dovecot LDA
|
||||
dovecot unix - n n - - pipe
|
||||
flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -d ${recipient}
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<include>//service[@type='smtp']/general/commands[@index=3]
|
||||
</include>
|
||||
</daemon>
|
||||
<!-- postfix with dovecot -->
|
||||
<daemon name="postfix_dovecot" version="3.x"
|
||||
title="Postfix 3 with dovecot">
|
||||
<include>//service[@type='smtp']/general/commands[@index=1]
|
||||
</include>
|
||||
<command><![CDATA[echo "mail-mta/postfix dovecot-sasl -sasl" >> /etc/portage/package.use]]></command>
|
||||
<include>//service[@type='smtp']/general/installs[@index=1]
|
||||
</include>
|
||||
<include>//service[@type='smtp']/general/commands[@index=2]
|
||||
</include>
|
||||
<file name="/etc/postfix/main.cf" chown="root:root" chmod="0644"
|
||||
backup="true">
|
||||
<content><![CDATA[
|
||||
# Postfix programs paths settings
|
||||
command_directory = /usr/sbin
|
||||
daemon_directory = /usr/libexec/postfix
|
||||
program_directory = /usr/libexec/postfix
|
||||
sendmail_path = /usr/sbin/sendmail
|
||||
|
||||
meta_directory = /etc/postfix
|
||||
shlib_directory = /usr/lib64/postfix/${mail_version}
|
||||
|
||||
compatibility_level = 2
|
||||
|
||||
## General Postfix configuration
|
||||
# should be the default domain from your provider eg. "server100.provider.tld"
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# should be different from $mydomain eg. "mail.$mydomain"
|
||||
myhostname = mail.$mydomain
|
||||
|
||||
mydestination = $myhostname,
|
||||
$mydomain,
|
||||
localhost.$myhostname,
|
||||
localhost.$mydomain,
|
||||
localhost
|
||||
mynetworks = 127.0.0.0/8
|
||||
inet_interfaces = all
|
||||
append_dot_mydomain = no
|
||||
biff = no
|
||||
|
||||
# Postfix performance settings
|
||||
default_destination_concurrency_limit = 20
|
||||
local_destination_concurrency_limit = 2
|
||||
|
||||
# SMTPD Settings
|
||||
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
|
||||
smtpd_helo_required = yes
|
||||
smtpd_recipient_restrictions = permit_mynetworks,
|
||||
permit_sasl_authenticated,
|
||||
reject_unauth_destination,
|
||||
reject_unauth_pipelining,
|
||||
reject_non_fqdn_recipient
|
||||
smtpd_sender_restrictions = permit_mynetworks,
|
||||
reject_sender_login_mismatch,
|
||||
permit_sasl_authenticated,
|
||||
reject_unknown_hostname,
|
||||
reject_unknown_recipient_domain,
|
||||
reject_unknown_sender_domain
|
||||
smtpd_client_restrictions = permit_mynetworks,
|
||||
permit_sasl_authenticated,
|
||||
reject_unknown_client
|
||||
|
||||
smtpd_relay_restrictions = permit_mynetworks,
|
||||
permit_sasl_authenticated,
|
||||
defer_unauth_destination
|
||||
|
||||
# Maximum size of Message in bytes (512MB)
|
||||
message_size_limit = 536870912
|
||||
|
||||
## SASL Auth Settings
|
||||
smtpd_sasl_auth_enable = yes
|
||||
smtpd_sasl_local_domain = $myhostname
|
||||
smtpd_sasl_security_options = noanonymous
|
||||
broken_sasl_auth_clients = yes
|
||||
## Dovecot Settings for deliver, SASL Auth and virtual transport
|
||||
mailbox_command = /usr/libexec/dovecot/deliver
|
||||
smtpd_sasl_type = dovecot
|
||||
smtpd_sasl_path = private/auth
|
||||
virtual_transport = dovecot
|
||||
dovecot_destination_recipient_limit = 1
|
||||
|
||||
# Virtual delivery settings
|
||||
virtual_mailbox_base = /
|
||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
||||
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual_sender_permissions.cf
|
||||
virtual_uid_maps = mysql:/etc/postfix/mysql-virtual_uid_maps.cf
|
||||
virtual_gid_maps = mysql:/etc/postfix/mysql-virtual_gid_maps.cf
|
||||
|
||||
# Local delivery settings
|
||||
local_transport = local
|
||||
alias_database = hash:/etc/mail/aliases
|
||||
alias_maps = $alias_database
|
||||
|
||||
# Default Mailbox size, is set to 0 which means unlimited!
|
||||
mailbox_size_limit = 0
|
||||
virtual_mailbox_limit = 0
|
||||
|
||||
### TLS settings
|
||||
###
|
||||
## TLS for outgoing mails from the server to another server
|
||||
#smtp_use_tls = yes
|
||||
#smtp_tls_note_starttls_offer = yes
|
||||
## TLS for email client
|
||||
#smtpd_tls_cert_file = /etc/ssl/server/server.pem
|
||||
#smtpd_tls_key_file = /etc/ssl/server/server.key
|
||||
#smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
||||
#smtpd_tls_CAfile = /etc/ssl/cacert.class3.crt # Just an example for CACert.org
|
||||
#smtpd_tls_auth_only = no
|
||||
#smtpd_tls_loglevel = 1
|
||||
#smtpd_tls_received_header = yes
|
||||
#smtpd_tls_session_cache_timeout = 3600s
|
||||
#tls_random_source = dev:/dev/urandom
|
||||
|
||||
### Quota Settings with vda useflag
|
||||
## I use only virtual as localdelivery... This permits me to have full
|
||||
## virtual domain hosting without using a lot of maps
|
||||
#virtual_transport = virtual
|
||||
## Generate maildirsize files or not
|
||||
#virtual_create_maildirsize = yes
|
||||
## I use Courier IMAP compatibles files.
|
||||
#virtual_mailbox_extended = yes
|
||||
## Limits only INBOX part (useful when
|
||||
## using when you have IMAP users)
|
||||
#virtual_mailbox_limit_inbox = yes
|
||||
## maps of soft disk quotas
|
||||
#virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
|
||||
#virtual_mailbox_limit_override = yes
|
||||
#virtual_maildir_limit_message = Sorry, this user has overdrawn their diskspace quota. Please try again later.
|
||||
#virtual_overquota_bounce = yes
|
||||
|
||||
debugger_command =
|
||||
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
||||
ddd $daemon_directory/$process_name $process_id & sleep 5
|
||||
@@ -1127,7 +1280,8 @@ dovecot unix - n n - - pipe
|
||||
</include>
|
||||
</daemon>
|
||||
<!-- postfix with courier -->
|
||||
<daemon name="postfix_courier" title="Postfix with courier">
|
||||
<daemon name="postfix_courier" version="2.x"
|
||||
title="Postfix 2 with courier">
|
||||
<include>//service[@type='smtp']/general/commands[@index=1]
|
||||
</include>
|
||||
<command><![CDATA[echo "mail-mta/postfix -dovecot-sasl sasl" >> /etc/portage/package.use]]></command>
|
||||
|
||||
Reference in New Issue
Block a user