Postfix mail throttle and amavis daemons

Discussion in 'ISPConfig 3 Priority Support' started by Davide, May 16, 2019.

  1. Davide

    Davide Member


    Trying to avoid my IP being grey/blacklisted (mainly with microsoft domains: hotmail/outlook/, I've put the following option in my postfix
    default_destination_rate_delay = 10s

    This is working great, and every other mail sent to the same domain gets delayed for 10s by postfix. This is what I need for not being rate limited by microsoft

    But mailqueue started to get increased and it's because with this option active, only one of the eight amavis daemons I have up and ready are used to process mail. Only one avavis process cannot cope with the normal traffic in my server.
    As soon as I comment out the option and restart postfix, mail system starts to use 8 amavis process again.

    I've tried with "1s" instead of 10s, with no difference. Only one simultaneous amavis process is used when rate delay is active

    What am I missing that is making postfix ignore amavis settings when I activate rate delay?

    BTW, this is my amavis configuration for increasing process:

    grep servers /etc/amavis/conf.d/51-user-customised
    $max_servers = 8;

    grep amavis /etc/postfix/
    amavis unix - - - - 8 smtp

    Thank you!
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to set the delay option for the relevant transport (smtp) in only instead of setting it globally in
  3. Davide

    Davide Member

    I've put it this way:

    smtp inet n - - - - smtpd
    -o default_destination_rate_delay=10s

    But it's not working at all. I can send as many mails to a domain as I want without any throttle.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, ok. It was worth a try. You can either try to set it for smtps and submission as well. if this does not work, you can try to set it in globally again and set it to 0 for the amavis and 10025 and 10027 port transports.
  5. Davide

    Davide Member

    Tried adding it to "smtps" and "submission", and it made no difference.

    Putting options in the amavis transports makes mail system fail:

    May 18 02:17:05 HOST amavis[18656]: (18656-11) (!)rw_loop: leaving rw loop, no progress, last event (select) 35.030 s ago
    May 18 02:17:05 HOST amavis[18656]: (18656-11) (!)mfJ2MztC4YMc FWD from <[email protected]> -> <[email protected]>,<[email protected]>,<[email protected]>, 451 4.5.0 From MTA() during fwd-connect (No greeting, dt: 35.030 s): id=18656-11
    May 18 02:17:05 HOST amavis[18656]: (18656-11) Blocked MTA-BLOCKED {TempFailedOutbound}, ORIGINATING LOCAL []:47014 [] <[email protected]_DOMAIN> -> <[email protected]>,<[email protected]>,<[email protected]>, Queue-ID: 66DF0B478DE, Message-ID: <[email protected]>, mail_id: mfJ2MztC4YMc, Hits: -2.9, size: 1658, 92283 ms

    Deleting it solves the problem.
    Any other idea?
  6. Davide

    Davide Member

    It seems the last error was a transient error. The configuration works, but it seems it makes postfix use only one amavis process again.

    Any other idea?
    Last edited: May 18, 2019
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Not really, never tried to configure it like this. Maybe someone else has an idea how to do that or you might want to ask @florian030 if he knows how to set it up so that all amavis processes are used.

    What I did in the past to get email sending quotas was to use policyd (cluebringer), but that's a few years ago and I don't have a ready made guide for you on that topic.

Share This Page