#########################Global configuration#####################
Pickup /var/spool/pmtaPickup/Pickup /var/spool/pmtaPickup/BadMail

postmaster servers@globalmediajob.com

#...Logging file name
log-file /var/log/pmta/log
log-file-world-readable false

#...Spool directories
spool /var/spool/pmta

#...Accounting file name
<acct-file /var/log/pmta/acct>
  move-to /var/log/pmtaAccRep/
  move-interval 1d
  records d,b
  world-readable yes
  record-fields d timeLogged,timeQueued,timeImprinted,orig,dsnAction,dsnStatus,dsnDiag,dsnMta,bounceCat,srcType,srcMta,dlvType,dlvSourceIp,dlvDestinationIp,dlvEsmtpAvailable,dlvSize,vmta,jobId
  record-fields b timeLogged,timeQueued,timeImprinted,orig,rcpt,orcpt,dsnAction,dsnStatus,dsnDiag,dsnMta,bounceCat,srcType,srcMta,dlvType,dlvSourceIp,dlvDestinationIp,dlvEsmtpAvailable,dlvSize,vmta,jobId
</acct-file>

<acct-file /var/log/pmtaErr/acct>
  move-to /var/log/pmtaErrRep/
  move-interval 1d
  records t,tq
</acct-file>

#...HTTP management interface
#http-mgmt-port 2833
http-mgmt-port 8080
http-access 0/0 admin

#...relay-domain
[RELAY_DOMAIN]

#...relay-ip
[SMTP_LISTENER]

#source master : TEST GLOBAL
include /var/www/app/mailer/server/access/config.d/sources.txt
[SOURCE]

<source 0/0>
   always-allow-relaying no
   smtp-service yes
   pattern-list incomingRules
   log-connections yes
   log-data no
   log-commands no
</source>

###################Incoming messages configuration#####################
<pattern-list incomingRules>   
  rcpt-to /^fbl-hotmail@.*$/ virtual-mta=incomingfbl-hotmail
  rcpt-to /^admin@.*$/ virtual-mta=incomingAdmin
  rcpt-to /^contact@.*$/ virtual-mta=incomingContact
  rcpt-to /^contactus@.*$/ virtual-mta=incomingContactus
  rcpt-to /^info@.*$/ virtual-mta=incomingInfo
  rcpt-to /^mail@.*$/ virtual-mta=incomingMail
  rcpt-to /^support@.*$/ virtual-mta=incomingSupport
  rcpt-to /^tech@.*$/ virtual-mta=incomingTech
  rcpt-to /^webmaster@.*$/ virtual-mta=incomingWebmaster
  rcpt-to /^listunsub@.*$/ virtual-mta=incomingListunsub  
  rcpt-to /^postmaster@.*$/ virtual-mta=incomingPostm
  rcpt-to /^abuse@.*$/ virtual-mta=incomingAbuse
  rcpt-to /^return@.*$/ virtual-mta=incomingBounce
  rcpt-to /^helpme@.*$/ virtual-mta=incomingHelpme
  rcpt-to /^helpus@.*$/ virtual-mta=incomingHelpus
  rcpt-to /^help@.*$/ virtual-mta=incomingHelp
  rcpt-to /^manage@.*$/ virtual-mta=incomingManage
  rcpt-to /^sales@.*$/ virtual-mta=incomingSales
  rcpt-to /^report@.*$/ virtual-mta=incomingReport
  rcpt-to /^techsupportme@.*$/ virtual-mta=incomingTechsupportme
  rcpt-to /^techsupport@.*$/ virtual-mta=incomingTechsupport
  rcpt-to /^techsupportus@.*$/ virtual-mta=incomingTechsupportus
  rcpt-to /^billing@.*$/ virtual-mta=incomingBilling
  rcpt-to /^server247@.*$/ virtual-mta=incomingServer247
  rcpt-to /^mywebsite@.*$/ virtual-mta=incomingMywebsite
  rcpt-to /^docs@.*$/ virtual-mta=incomingDocs
  rcpt-to /^notification@.*$/ virtual-mta=incomingNotification
  rcpt-to /^provisioning@.*$/ virtual-mta=incomingProvisioning
  rcpt-to /^provisioning_customer@.*$/ virtual-mta=incomingProvisioning_customer
  rcpt-to /^project@.*$/ virtual-mta=incomingProject
  rcpt-to /^design@.*$/ virtual-mta=incomingDesign
  rcpt-to /^support24@.*$/ virtual-mta=incomingSupport24
  rcpt-to /^develop@.*$/ virtual-mta=incomingDevelop
  rcpt-to /^guideus@.*$/ virtual-mta=incomingGuideus
  rcpt-to /^guide@.*$/ virtual-mta=incomingGuide
  rcpt-to /^netsolution@.*$/ virtual-mta=incomingNetsolution
  rcpt-to /^techsystem@.*$/ virtual-mta=incomingTechsystem
  rcpt-to /^system@.*$/ virtual-mta=incomingSystem
  rcpt-to /^express@.*$/ virtual-mta=incomingExpress
  rcpt-to /.*@.*$/ virtual-mta=incomingReply
</pattern-list>

<virtual-mta incomingfbl-hotmail>      
  <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/fbl-hotmail
   </domain>
</virtual-mta>
 
<virtual-mta incomingAdmin>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/admin
   </domain>
</virtual-mta>
 
<virtual-mta incomingContact>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/contact
   </domain>
</virtual-mta>
    
<virtual-mta incomingContactus>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/contactus
   </domain>
</virtual-mta>
    
<virtual-mta incomingInfo>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/info
   </domain>
</virtual-mta>
   
<virtual-mta incomingMail>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/mail
   </domain>
</virtual-mta>
  
<virtual-mta incomingSupport>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/support
   </domain>
</virtual-mta>
 
 
<virtual-mta incomingTech>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/tech
   </domain>
</virtual-mta>
 
<virtual-mta incomingWebmaster>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/webmaster
   </domain>
</virtual-mta>


<virtual-mta incomingPostm>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/postm
   </domain>
</virtual-mta>

<virtual-mta incomingHelpme>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/helpme
   </domain>
</virtual-mta>

 <virtual-mta incomingHelpus>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/helpus
   </domain>
</virtual-mta>

 <virtual-mta incomingHelp>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/help
   </domain>
</virtual-mta>

 <virtual-mta incomingManage>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/manage
   </domain>
</virtual-mta>

 <virtual-mta incomingSales>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/sales
   </domain>
</virtual-mta>

 <virtual-mta incomingReport>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/report
   </domain>
</virtual-mta>

 <virtual-mta incomingTechsupportme>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/techsupportme
   </domain>
</virtual-mta>

 <virtual-mta incomingTechsupport>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/techsupport
   </domain>
</virtual-mta>

 <virtual-mta incomingTechsupportus>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/techsupportus
   </domain>
</virtual-mta>

 <virtual-mta incomingBilling>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/billing
   </domain>
</virtual-mta>

 <virtual-mta incomingServer247>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/server247
  </domain>
</virtual-mta>

 <virtual-mta incomingMywebsite>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/mywebsite
   </domain>
</virtual-mta>

 <virtual-mta incomingDocs>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/docs
   </domain>
</virtual-mta>

 <virtual-mta incomingNotification>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/notification
   </domain>
</virtual-mta>

 <virtual-mta incomingProvisioning>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/provisioning
   </domain>
</virtual-mta>

 <virtual-mta incomingProvisioning_customer>
  <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/provisioning_customer
   </domain>
</virtual-mta>

 <virtual-mta incomingProject>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/project
   </domain>
</virtual-mta>

 <virtual-mta incomingDesign>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/design
   </domain>
</virtual-mta>

 <virtual-mta incomingSupport24>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/support24
   </domain>
</virtual-mta>

 <virtual-mta incomingDevelop>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/develop
   </domain>
</virtual-mta>

 <virtual-mta incomingGuideus>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/guideus
   </domain>
</virtual-mta>

 <virtual-mta incomingGuide>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/guide
   </domain>
</virtual-mta>

 <virtual-mta incomingNetsolution>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/netsolution
   </domain>
</virtual-mta>

 <virtual-mta incomingTechsystem>
   <domain *>
      type file
     file-format append-mbox
      file-destination /var/spool/pmtaIncoming/techsystem
   </domain>
</virtual-mta>

 <virtual-mta incomingSystem>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/system
   </domain>
</virtual-mta>

 <virtual-mta incomingExpress>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/express
   </domain>
</virtual-mta>

<virtual-mta incomingListunsub>
   <domain *>
      type pipe
      command "/etc/smrsh/listunsubscribe.php --envid \"$envid\" \"$user\""
   </domain>
</virtual-mta>

#<virtual-mta incomingAbuse> 
   #<domain *>
  #    type pipe
 #     command "/etc/smrsh/unsubs.php --envid \"$envid\" \"$user\""
#   </domain>
#</virtual-mta>

<virtual-mta incomingAbuse>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/abuse
   </domain>
</virtual-mta>

<virtual-mta incomingBounce>
   <domain *>
      type file
      file-format append-mbox
      file-destination /var/spool/pmtaIncoming/bounce
   </domain>
</virtual-mta>

#<virtual-mta incomingBounce>
   #<domain *>
   #   type pipe
  #    command "/etc/smrsh/bounce.php --envid \"$envid\" \"$user\""
 #  </domain>
#</virtual-mta>

<virtual-mta incomingReply>
   <domain *>
      type pipe
      command "/etc/smrsh/unsubs.php --envid \"$envid\" \"$user\""
   </domain>
</virtual-mta>

###################Outgoing messages configuration#####################
<domain gmail.com>
  dk-sign yes
  dkim-sign yes
  retry-after 10m
  bounce-after 24h
    log-transfer-failures yes
  log-connections yes
  log-commands no
    log-data no
  max-smtp-out 1200
</domain>


<domain btinternet.com>
  dk-sign no
  dkim-sign no
  max-smtp-out 1000
  route btinternet.com
</domain>

domain-macro hotmail hotmail, outlook, msn, live
domain-macro htld com, de, co.uk, es, fr

<domain $hotmail.$htld>
    dk-sign yes               
    dkim-sign yes
    retry-after 10m
    bounce-after 24h
    max-smtp-out 60        
    max-msg-per-connection 100
    421-means-mx-unavailable yes
    queue-priority 100
    log-transfer-failures yes
    log-connections yes
    log-commands no
    log-data no                  
</domain>

domain-macro aol aol, aim, wmconnect, netscape, cs, compuserve, luckymail, icqmail
domain-macro topLevel com, de, co.uk, net

<domain $aol.$topLevel>
    dk-sign yes
    dkim-sign yes
    log-transfer-failures yes
    retry-after 10m
    bounce-after 24h
    log-connections yes
    log-commands no
    log-data no
    max-smtp-out 500
    max-msg-per-connection 1200
</domain>

domain-macro yahoo yahoo.com, ymail.com, rocketmail.com

<domain $yahoo>
  dk-sign no
  dkim-sign no
  log-transfer-failures yes
  retry-after 2m
  bounce-after 24h
  log-connections yes
  log-commands no
        log-data no
  max-smtp-out 1200
  max-msg-per-connection 100
</domain>

<domain comcast.net>
    #dk-sign yes
    #dkim-sign yes
    log-transfer-failures yes
    retry-after 3m
    bounce-after 24h
    log-connections yes
    log-commands no
    log-data no
    max-smtp-out 30
    max-msg-per-connection 100
</domain>

<domain cox.net>
    #dk-sign yes
    #dkim-sign yes
    log-transfer-failures yes
    retry-after 3m
    bounce-after 24h
    log-connections yes
    log-commands no
    log-data no
    max-smtp-out 25
    max-msg-per-connection 80
</domain>

<domain sbcglobal.net>
    dk-sign yes
    dkim-sign yes
    log-transfer-failures yes
    retry-after 10m
    bounce-after 24h
    log-connections yes
    log-commands no
    log-data no
    max-smtp-out 1200
</domain>


<domain att.net>
  dk-sign yes
  dkim-sign yes
  log-transfer-failures yes
  retry-after 10m
  bounce-after 24h
  log-connections yes
  log-commands no
        log-data no
  max-smtp-out 50
  max-msg-per-connection 100
</domain>

<domain bellsouth.net>
  dk-sign yes
  dkim-sign yes
  log-transfer-failures yes
  retry-after 10m
  bounce-after 24h
  log-connections yes
  log-commands no
        log-data no
  max-smtp-out 50
  max-msg-per-connection 100
</domain>

<domain *>
    dk-sign yes
    dkim-sign yes
    log-transfer-failures yes
    retry-after 10m
    bounce-after 24h
    log-connections yes
    log-commands no
    log-data no
    max-smtp-out 200 
</domain>

###################Vmtas configuration#####################
include /var/www/app/mailer/server/vmta/config.d/vmtas.txt
include /var/www/app/mailer/server/vmta/config.d/vmtas1.txt
