#
# Configuration defaults for PowerMTA
#

# This file is read by PowerMTA before reading the main configuration
# file.  Items in the main configuration file thus override those in this one.
#
# WARNING: do not change this file, as it is overwritten during installation.
# Make any changes to the main configuration file instead.

# --- recommended settings from Port25 forum ---

<domain aol.com>
    max-msg-per-connection 450
    max-rcpt-per-message 100
</domain>

<domain yahoo.com>
    max-msg-per-connection 20
    mx-connection-attempts 10
</domain>

<domain hotmail.com>
    max-msg-per-connection 100
    smtp-421-means-mx-unavailable yes
</domain>

<domain msn.com>
    max-msg-per-connection 100
</domain>

<domain cox.net>
    max-smtp-out 5
</domain>

<domain att.net>
    max-smtp-out 2
</domain>

<domain comcast.net>
    max-smtp-out 2
    max-msg-per-connection 100
</domain>

<domain adelphia.net>
    max-smtp-out 4
</domain>

<domain bellsouth.net>
    max-smtp-out 10
    max-msg-per-connection 1
    retry-after 5m
</domain>

<domain mac.com>
    ignore-chunking yes
</domain>

<domain orange.fr>
    max-smtp-out 1
    max-msg-rate 1000/m
    max-connect-rate 10/m
    max-msg-per-connection 100
</domain>

<domain wanadoo.fr>
    max-smtp-out 1
    max-msg-rate 1000/m
    max-connect-rate 10/m
    max-msg-per-connection 100
</domain>

<domain gmail.com>
    reuse-ssl-session yes
</domain>

# --- recommended settings from Port25 forum ---

<domain [*.]port25.com>
    dkim-sign yes               # to facilitate support
</domain>

<domain {sparkpost}>
    auth-username SMTP_Injection
    smtp-hosts smtp.sparkpostmail.com:587
    add-x-msys-api-header yes
    use-starttls yes
    require-starttls yes
</domain>

<source {pickup}>
    process-x-virtual-mta yes
    process-x-envid yes
    process-x-job yes
</source>

<source 127.0.0.1>              # to allow API submissions from the local host
    always-allow-api-submission yes
</source>

<source ::1>                    # to allow API submissions from the local host
    always-allow-api-submission yes
</source>

<source {auth}>                 # used by default by authenticated SMTP users
    always-allow-api-submission yes
</source>

# "international" domains for the biggest mailbox providers (e.g., yahoo.$intl)
domain-macro intl com.ar,as,at,com.au,be,com.bo,com.br,bs,ca,ch,de,dk,com.do,
    es,com.fj,fr,ge,gr,co.id,ie,it,com.jo,co.jp,co.kr,la,mw,com.mx,com.my,nl,
    no,com.ph,pl,pn,com.pr,pt,se,co.th,com.tr,com.tt,ug,co.uk,com.uz,com.ve,
    com.vn

<domain *>
    ignore-chunking yes

    # opportunistic TLS
    use-starttls yes
    require-starttls no
</domain>

# default bounce categorization patterns
<bounce-category-patterns>
    /^2.\d+.\d+;/ success
    /spam/ spam-related
    /junk mail/ spam-related
    /blacklist/ spam-related
    /blocked/ spam-related
    /\bU\.?C\.?E\.?\b/ spam-related
    /\bAdv(ertisements?)?\b/ spam-related
    /unsolicited/ spam-related
    /\b(open)?RBL\b/ spam-related
    /realtime blackhole/ spam-related
    /http:\/\/basic.wirehub.nl\/blackholes.html/ spam-related
    /\bvirus\b/ virus-related
    /message +content/ content-related
    /content +rejected/ content-related
    /quota/ quota-issues
    /limit exceeded/ quota-issues
    /mailbox +(is +)?full/ quota-issues
    /sender ((verify|verification) failed|could not be verified|address rejected|domain must exist)/ invalid-sender
    /unable to verify sender/ invalid-sender
    /requires valid sender domain/ invalid-sender
    /bad sender's system address/ invalid-sender
    /No MX for envelope sender domain/ invalid-sender
    /^[45]\.4\.4/ routing-errors
    /no mail hosts for domain/ invalid-sender
    /Your domain has no(t)? DNS\/MX entries/ invalid-sender
    /REQUESTED ACTION NOT TAKEN: DNS FAILURE/ invalid-sender
    /Domain of sender address/ invalid-sender
    /return MX does not exist/ invalid-sender
    /Invalid sender domain/ invalid-sender
    /Verification failed/ invalid-sender
    /\bstorage\b/ quota-issues
    /(user|mailbox|recipient|rcpt|local part|address|account|mail drop|ad(d?)ressee) (has|has been|is)? *(currently|temporarily +)?(disabled|expired|inactive|not activated)/ inactive-mailbox
    /(conta|usu.rio) inativ(a|o)/ inactive-mailbox
    /Too many (bad|invalid|unknown|illegal|unavailable) (user|mailbox|recipient|rcpt|local part|address|account|mail drop|ad(d?)ressee)/ other
    /(No such|bad|invalid|unknown|illegal|unavailable) (local +)?(user|mailbox|recipient|rcpt|local part|address|account|mail drop|ad(d?)ressee)/ bad-mailbox
    /(user|mailbox|recipient|rcpt|local part|address|account|mail drop|ad(d?)ressee) +(\S+@\S+ +)?(not (a +)?valid|not known|not here|not found|does not exist|bad|invalid|unknown|illegal|(is +)?unavailable)/ bad-mailbox
    /\S+@\S+ +(is +)?(not (a +)?valid|not known|not here|not found|does not exist|bad|invalid|unknown|illegal|unavailable)/ bad-mailbox
    /no mailbox here by that name/ bad-mailbox
    /my badrcptto list/ bad-mailbox
    /not our customer/ bad-mailbox
    /no longer (valid|available)/ bad-mailbox
    /Recipient address rejected/ bad-mailbox
    /have a \S+ account/ bad-mailbox
    /The email account that you tried to reach does not exist/ bad-mailbox
    /\brelay(ing)?/ relaying-issues
    /domain (retired|bad|invalid|unknown|illegal|unavailable)/ bad-domain
    /domain no longer in use/ bad-domain
    /domain (\S+ +)?(is +)?obsolete/ bad-domain
    /denied/ policy-related
    /prohibit/ policy-related
    /refused/ policy-related
    /allowed/ policy-related
    /banned/ policy-related
    /policy/ policy-related
    /suspicious activity/ policy-related
    /bad sequence/ protocol-errors
    /syntax error/ protocol-errors
    /\broute\b/ routing-errors
    /\bunroutable\b/ routing-errors
    /\bunrouteable\b/ routing-errors
    /Invalid 7bit DATA/ content-related
    /^[45]\.1\.[1346];/ bad-mailbox
    /^[45]\.1\.2/ bad-domain
    /^[45]\.1\.[78];/ invalid-sender
    /^[45]\.2\.0;/ bad-mailbox
    /^[45]\.2\.1;/ inactive-mailbox
    /^[45]\.2\.2;/ quota-issues
    /^[45]\.3\.3;/ content-related
    /^[45]\.3\.5;/ bad-configuration
    /^[45]\.4\.1;/ no-answer-from-host
    /^[45]\.4\.2;/ bad-connection
    /^[45]\.4\.[36];/ routing-errors
    /^[45]\.4\.7;/ message-expired
    /^[45]\.5\.3;/ policy-related
    /^[45]\.5\.\d+;/ protocol-errors
    /^[45]\.6\.\d+;/ content-related
    /^[45]\.7\.[012];/ policy-related
    /^[45]\.7\.7;/ content-related
    // other    # catch-all
</bounce-category-patterns>
