/* * [CustConfig.java] * * Summary: Copy to CustConfig.java and recompile. Configuration constants for customer. * * Copyright: (c) 2002-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.7 2007-08-21 */ package com.mindprod.bulk; import java.util.concurrent.TimeUnit; /** * Copy to CustConfig.java and recompile. Configuration constants for customer. *

* This file must be customised, then the whole package recompiled. Whenever * you make any changes to this file, make sure you do a clean compile. * * @author Roedy Green, Canadian Mind Products * @version 1.7 2007-08-21 * @since 2002 */ class CustConfig { /** * true if want to see voluminous SMTP debugging messages. */ static final boolean DEBUGGING = false; /** * How long sleep before checking again for incoming email Advanced. * Normally do not change. */ static final long SLEEP_INTERVAL = TimeUnit.SECONDS.toMillis( ( DEBUGGING ? 15 : 30 ) ); /** * Does the send mail server require a password and logon. Usually yes. */ static final boolean NEED_PASSWORD_TO_SEND = true; /** * Normally this is true, but some IAPs block the bulk emailer from talking * directly to any mailserver other than ones owned by the IAP. The symptom * is that all mailservers other than those owned by the IAP always appear * to be not working. In that case you must turn off email server * validation. */ static final boolean VALIDATE_EMAIL_SERVERS = false; /** * Minimal quality to accept in email addressos before evven testing them. * Number 1 .. 9. */ static final int EMAIL_ADDRESS_QUALITY = 1; /** * Max emails can send in total, usually the daily limit your ISP imposes. */ static final int MAX_EMAILS_IN_BATCH = 900; /** * Max emails, each with BCCs can send without logging off and on again to * the email server. Ideally is the same as MAX_EMAILS_IN_BATCH. */ static final int MAX_EMAILS_PER_LOGIN = 15; /** * How long to wait for a mailserver to respond before giving up on it. */ static final int PROBE_TIMEOUT = ( int ) TimeUnit.SECONDS.toMillis( 20 ); /** * port of the pop3 receive mail server, usually 110. */ static final int RECEIVE_PORT = 110; /** * port of the smtp send mail server, usually 25, sometimes 24.. */ static final int SEND_PORT = 25; /** * How long to go before culling a domain nobody emails to, in milliseconds * Also used to cull list of already sent email message ids. Advanced. * Normally do not change. */ static final long CULL_INTERVAL = TimeUnit.DAYS.toMillis( 60 ); /** * How long to go before reprobing after a failed domain in milliseconds. * Advanced. Normally do not change. */ static final long FAILED_PROBE_INTERVAL = TimeUnit.HOURS.toMillis( 1 ); /** * history Mask. Which historical probes to consider when the latest probe * was bad. With any past good history we assume the domain is good, * just temporarily down, So long as it has good DNS records for mailservers * as of the most recent probe. High order bit is most recent probe, * 1=consider 0=ignore. Advanced. Normally do not change. */ static final long HISTORY_MASK = 0xff00000000000000L; /** * How long to go before reprobing a good domain, in milliseconds. Advanced. * Normally do not change. */ static final long PASSED_PROBE_INTERVAL = TimeUnit.DAYS.toMillis( 7 ); /** * Where bulk emails are sent to be relayed. RFC822 format. "first last * " */ static final String BULK_EMAIL_ADDRESS = "pollinator "; /** * customer abbreviation. Used in creating filenames. */ static final String CUST_ABBREVIATION = "BEE"; /** * Customer name. */ static final String CUST_NAME = "Bees's Wax Society"; /** * Encoding for stats message send back to originator usually windows-1252, * ISO-8859-1, UTF-8 or US-ASCII. */ static final String ORIGINATORS_PREFERRED_ENCODING = "UTF-8"; /** * Domain to identify as when probing mailservers. It is the DNS name * associated with your face IP of your workstation. * See http://mindprod.com/jgloss/faceip.html * e.g. "vc.shawcable.net" or "bchsia.telus.net" * Not the mailserver's domain. */ static final String PROBE_DOMAIN = "bchsia.telus.net"; /** * host of the pop3 receive-mail server. */ static final String RECEIVE_HOST = "pop3.beeswax.com"; /** * Login id for the bulk email receive account. case-sensitive Usually this * is just the name of the account to the left of the @, but sometime the * email provider will use a completely separate name. */ static final String RECEIVE_LOGIN_ID = "pollinator"; /** * pop3 name for the inbox. */ static final String RECEIVE_MBOX = "INBOX"; /** * password for the bulk email receive account. case-sensitive * Alternatively "%mypassword" will look in set environment for SET mypassword=sesame23 */ static final String RECEIVE_PASSWORD = "sesame22"; /** * protocol used on the receive mail server. Only pop3 tested. Case * sensitive. */ static final String RECEIVE_PROTOCOL = "pop3"; /** * host of the smtp send mail server. */ static final String SEND_HOST = "smtp.beeswax.com"; /** * Login id for the bulk email send account. case-sensitive Usually this is * just the name of the account to the left of the @, but sometime the email * provider will use a completely separate name. */ static final String SEND_LOGIN_ID = "pollinator"; /** * password for the bulk email send account. case-sensitive * Alternatively "%mysendpassword" will look in set environment for SET mysendpassword=sesame23 */ static final String SEND_PASSWORD = "sesame22"; /** * protocol used on the send mail server. Only pop3 tested. Case sensitive. */ static final String SEND_PROTOCOL = "smtp"; /** * List of people who get a copy of every bulk email to monitor use of the * product. If they are senders, they will get only one copy. RFC822 format. * "first last " */ static final String[] MONITORS = { "Roedy Green " }; /** * Domains that despite all evidence, are actually bad. Don't bother to * test them, just treat them as bad. */ static final String[] TREAT_AS_BAD_DOMAINS = { "home.com", "nowhere.com", "invalid.com", "nospam.com", }; /** * Domains that despite all evidence, are actually good. Don't bother to * test them, just treat them as good. */ static final String[] TREAT_AS_GOOD_DOMAINS = { "aol.ca", "aol.com", "hotmail.com", "shaw.ca", "telus.net", }; /** * name of the file containing the list of email addresses to forward this * email to. case-insensitive. */ static final String[] VALID_ATTACHMENT_NAMES = { "emails.txt", "emails1.txt", "emails2.txt", "emails3.txt", "emails4.txt", "emails5.txt", "emails6.txt", "emails7.txt", "emails8.txt", "emails9.txt", "canadanewspapers.txt", "bcnewspapers.txt", "test.csv", "victoriacouncillors.txt", }; /** * List of legal MIME types for the message body. */ static final String[] VALID_MIME_TYPES = { "text/plain", "text/html" }; /** * Who is allowed to use the bulk mail resender. case-sensitive. Just the * computer xxx@xxxx part. */ static final String[] VALID_SENDERS = { "lorna@beeswax.org", "admin@beeswax.org", "bulk@beeswax.org", "beeswax@beeswax.org", "info@beeswax.org", "sales@beeswax.org", "library@beeswax.org", }; /** * dummy constructor. All fields are static */ private CustConfig() { } } // end CustConfig