postfix main.cf

Discussion in 'Installation/Configuration' started by harhan, Jan 2, 2014.

  1. harhan

    harhan New Member

    Hi,
    Does ISPconfig change postfix main.cf at any time outside the installation or upgrade sequence?
    I want to add some extra features to it, like LDAP verification of external mail accounts, in stead of adding the e-mail addresses to the mysql table.

    br,
    Harald

    Edit: Happy new year to all!
     
    Last edited: Jan 2, 2014
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Yes, but it changes only some entries and does not rewrite the whole file.
    (e. g. when setting rbl in the interface)
     
  3. harhan

    harhan New Member

    I want to modify relay_recipient_maps, I would guess this is a static entry. I don't have time to study the source code right now, but if you can point me to the part that is writing to main.cf I can take a look myself.
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    As far as I know the following settings are altered during update/install:

    This is the content of the install/tpl/debian_postfix.conf.master you can put your altered copy of this file to:
    /usr/local/ispconfig/server/conf-custom/install/
    So any further update should use this file instead of the one that comes with installation package.
    Code:
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
    virtual_mailbox_domains = proxy:mysql:{config_dir}/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:{config_dir}/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = {vmail_mailbox_base}
    virtual_uid_maps = static:{vmail_userid}
    virtual_gid_maps = static:{vmail_groupid}
    inet_protocols=all
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf, reject_unauth_destination{rbl_list}
    smtpd_use_tls = yes
    smtpd_tls_security_level = may
    smtpd_tls_cert_file = {config_dir}/smtpd.cert
    smtpd_tls_key_file = {config_dir}/smtpd.key
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf
    relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf
    smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf
    smtpd_client_message_rate_limit = 100
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit   = 1
    virtual_transport = maildrop
    header_checks = regexp:{config_dir}/header_checks
    mime_header_checks = regexp:{config_dir}/mime_header_checks
    nested_header_checks = regexp:{config_dir}/nested_header_checks
    body_checks = regexp:{config_dir}/body_checks
    owner_request_special = no
    
    Some settings that are altered by changes in interface:
    Code:
    relayhost
    smtp_sasl_auth_enable
    smtp_sasl_password_maps
    smtp_sasl_security_options
    smtpd_recipient_restrictions
    mailbox_size_limit
    message_size_limit
    
    So your change should be safe from being overwritten.
     
  5. muekno

    muekno Active Member HowtoForge Supporter

    the entry in main.cf is
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    the table in the db queried is mail_relay_recipient
    Entries there may be configured in ISPConfig 3

    Rainer

    P.S. as I found sometime main.cf ist altered sometime you have to do it by hand

    mk
     

Share This Page