1

sendmail 8.14.x

This question is somewhat related to Does sendmail send everything to downstream smarthost in "single file"? but is separate to present information regarding a specific issue.

I have a mail environment with the following setup:

Application Servers -> sendmail relay -> cloud email service -> internet

The downstream cloud service requires emails to be smarthosted to them in single file. If it sees multiple simultaneous SMTP connections from the same public source IP, it accepts one and defers the others with a 400-class error. Obviously this severely limits outbound throughput and we're working with the cloud provider to try to resolve this. In the meantime though, I need to find a way to have sendmail send everything in a single connection.

At first glance, I thought that the confSINGLE_THREAD_DELIVERY option might be appropriate but I still feel like I'd experience issues if the queue runner is processing a deferred messages at the same time that a new incoming connection wants to send something immediately through. Or worse -- the queue runner is busy with a large queue and never lets any new messages get sent through.

I know it's a silly requirement and as I mentioned, we're working with the cloud provider but in the meantime, is there a sendmail configuration that could satisfy that requirement while balancing the delivery of both new and queued messages?

  • 1
    Have you considered forbidding at once delivery attempt (e.g. selecting custom "expensive" mailer via mailertable) and using separate queue group for the destination? I may be tuned to cause only a few minutes delivery delay. – AnFi Jul 20 '17 at 22:53
  • @AndrzejA.Filip Sorry - I'm not following you... you mean send everything to a queue and then have the queue runner execute very often? I'm open to trying that. Can you describe how that could be configured? I'll try it in a lab environment. – Mike B Jul 20 '17 at 23:24
1

You can

  1. use relay mailer for deliveries to smart host (relay is used by default)
  2. make relay mailer expensive to avoid "at once" delivery attempts
  3. make relay mailer use custom queue group with its own more frequent queue run period
  4. if the above works you may consider using persistent queue runners to make delvery delays even lower

sendmail.mc

dnl Declare relay queue group with queue run period 10m
dnl Do not forget to create /var/spool/mqueue/relay directory 
QUEUE_GROUP(`relay', `P=/var/spool/mqueue/relay I=10m')
dnl OPTIONAL: define minimum time BETWEEN delivery attempt of any message
define(`confMIN_QUEUE_AGE',`25m')dnl

dnl  Make sendmail honor mailers' expensive flag
define(`confCON_EXPENSIVE',`True')dnl
dnl Add F=e "expensive" flag to relay mailer flags
define(`RELAY_MAILER_FLAGS',`e')dnl
dnl make relay mailer select custom queue group for relay mailer
define(`RELAY_MAILER_QGRP',`relay')dnl

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.