<commit_before>package mireka.transmission.queuing;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import mireka.address.Recipient;
import mireka.smtp.SendException;
import mireka.transmission.LocalMailSystemException;
import mireka.transmission.Mail;
import mireka.transmission.Transmitter;
import mireka.transmission.dsn.DelayReport;
import mireka.transmission.dsn.DsnMailCreator;
import mireka.transmission.dsn.PermanentFailureReport;
import mireka.transmission.dsn.RecipientProblemReport;
import mireka.transmission.immediate.PostponeException;
import mireka.transmission.immediate.RecipientRejection;
import mireka.transmission.immediate.RecipientsWereRejectedException;
import mireka.transmission.immediate.RemoteMtaErrorResponseException;

import org.joda.time.DateTime;
import org.joda.time.Instant;
import org.joda.time.Period;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * RetryPolicy decides what actions are necessary after a transmission attempt
 * failed and executes those actions.
 */
public class RetryPolicy {
    private final Logger logger = LoggerFactory.getLogger(RetryPolicy.class);
    private List<Period> retryPeriods = Arrays.asList(Period.minutes(3),
            Period.minutes(27), Period.minutes(30), Period.hours(2),
            Period.hours(2), Period.hours(2), Period.hours(2), Period.hours(2),
            Period.hours(2), Period.hours(2), Period.hours(2), Period.hours(2),
            Period.hours(2), Period.hours(3));
    /**
     * Elements indicates the count of failed delivery attempts after which a
     * delayed DSN mail must be sent. For example 3 means that a DSN must be
     * issued after the third failed attempt.
     */
    private final List<Integer> delayReportPoints = new ArrayList<Integer>();
    private DsnMailCreator dsnMailCreator;
    private Transmitter dsnTransmitter;
    private Transmitter retryTransmitter;<commit_msg>We have found a site where graylisting is held for for 5 minutes. Default retry periods is now adjusted to consider this five minutes, i.e. there is a retry attempt after 6 minutes.<commit_after>package mireka.transmission.queuing;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import mireka.address.Recipient;
import mireka.smtp.SendException;
import mireka.transmission.LocalMailSystemException;
import mireka.transmission.Mail;
import mireka.transmission.Transmitter;
import mireka.transmission.dsn.DelayReport;
import mireka.transmission.dsn.DsnMailCreator;
import mireka.transmission.dsn.PermanentFailureReport;
import mireka.transmission.dsn.RecipientProblemReport;
import mireka.transmission.immediate.PostponeException;
import mireka.transmission.immediate.RecipientRejection;
import mireka.transmission.immediate.RecipientsWereRejectedException;
import mireka.transmission.immediate.RemoteMtaErrorResponseException;

import org.joda.time.DateTime;
import org.joda.time.Instant;
import org.joda.time.Period;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * RetryPolicy decides what actions are necessary after a transmission attempt
 * failed and executes those actions.
 */
public class RetryPolicy {
    private final Logger logger = LoggerFactory.getLogger(RetryPolicy.class);
    private List<Period> retryPeriods = Arrays.asList(Period.minutes(3),
            Period.minutes(3), Period.minutes(9), Period.minutes(15),
            Period.minutes(30), Period.hours(2),
            Period.hours(2), Period.hours(2), Period.hours(2), Period.hours(2),
            Period.hours(2), Period.hours(2), Period.hours(2), Period.hours(2),
            Period.hours(2), Period.hours(3));
    /**
     * Elements indicates the count of failed delivery attempts after which a
     * delayed DSN mail must be sent. For example 3 means that a DSN must be
     * issued after the third failed attempt.
     */
    private final List<Integer> delayReportPoints = new ArrayList<Integer>();
    private DsnMailCreator dsnMailCreator;
    private Transmitter dsnTransmitter;
    private Transmitter retryTransmitter;
{'fraction_non_alphanumeric': 0.0902200488997555, 'fraction_numerical': 0.010268948655256724, 'mean_word_length': 4.8193456614509245, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2134032', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1181, 'n_words': 295}