sendmail QUEUE_GROUP

/usr/local/share/doc/sendmail/TUNING

Let's assume a simple example: a mailing list where most of the
recipients are at three domains: the local one (local.domain) and
two remotes (one.domain, two.domain) and the rest is splittered
over several other domains.  For this case it is useful to specify
three queue groups:

QUEUE_GROUP(`local', `P=/var/spool/mqueue/local, F=f, R=2, I=1m')dnl
QUEUE_GROUP(`one', `P=/var/spool/mqueue/one, F=f, r=50, R=3')dnl
QUEUE_GROUP(`two', `P=/var/spool/mqueue/two, F=f, r=30, R=4')dnl
QUEUE_GROUP(`remote', `P=/var/spool/mqueue/remote, F=f, r=5, R=8, I=2m')dnl
define(`ESMTP_MAILER_QGRP', `remote')dnl
define(`confDELIVERY_MODE', `q')dnl
define(`confMAX_QUEUE_CHILDREN', `50')dnl
define(`confMIN_QUEUE_AGE', `27m')dnl

and specify the queuegroup ruleset as follows:

LOCAL_RULESETS
Squeuegroup
R$* @ local.domain      $# local
R$* @ $* one.domain     $# one
R$* @ $* two.domain     $# two
R$* @ $*                $# remote
R$*                     $# mqueue

FEATURE(`queuegroup')

access.dbでqueuegroupを制御する

sendmail.mc に以下の2行を書きます。

FEATURE(`access_db')
FEATURE(`queuegroup')

上がaccess.dbを使うという設定、下がaccess.dbでqueuegroupに関する設定を 行う、という設定です。
queuegroup 2002

FEATURE(`queuegroup')
FEATURE(`queuegroup', `default group')

https://www.oreilly.com/library/view/sendmail-4th-edition/9780596510299/ch11s04s04.html

FEATURE(`queuegroup')

Squeuegroup
R< $+ >		$1
R $+ @ $+	$: $>SearchList <! qgrp> $| <F:$1@$2> <D:$2> <>
R<?>		$@
R<$+>		$# $1

FEATURE(`queuegroup', `localgroup')

Squeuegroup
R< $+ >		$1
R $+ @ $+	$: $>SearchList <! qgrp> $| <F:$1@$2> <D:$2> <>
R<?>		$# localgroup
R<$+>		$# $1

The first line causes the queue group to default to mqueue if a queue group in the access database is missing or nonexistent. The second line allows you to set a different default queue group. For example, consider the following lines from an mc file:

QUEUEGROUP(`localgroup', `/queue/lq') 
FEATURE(`queuegroup', `localgroup')

This causes sendmail to use the group named localgroup instead of mqueue as the default if a queue group in the access database is missing or nonexistent. Once you have enabled the FEATURE(queuegroup), the next step is to add lines such as the following to the source file for your access database:

QGRP:slow-poke.com slowgroup  
QGRP:root@notify.com fastgroup  
QGRP:your.domain localgroup

Sendmail performance tuning

FEATURE(`queuegroup')
QUEUE_GROUP(`mqueue', `P=/var/spool/mqueue/mqueue, R=5, r=15, F=f, Interval=1h')
QUEUE_GROUP(`fast', `P=/var/spool/mqueue/fast, R=5, r=15, F=f, Interval=5m')
QUEUE_GROUP(`cno', `P=/var/spool/mqueue/cno, R=5, r=15, F=f, Interval=15m')
in access:

QGRP:default                    mqueue
QGRP:de                         fast
QGRP:wichtig.com                fast
QGRP:auchwichtig.org            fast
QGRP:com                        cno
QGRP:net                        cno
QGRP:org                        cno

linux:mail:sendmail:sendmail-queues [HeinerWiki]

参考

[携帯への配信] ================================================
#
# 携帯キャリアに配信する場合、キュー周りの扱いを変える必要があります。
#
cd /var/spool/mqueue
mkdir -p generic \
      docomo.ne.jp \
      ezweb.ne.jp \
      vodafone.ne.jp/{c,d,h,k,n,q,r,s,t} &&
  chown -R root:mail generic docomo.ne.jp ezweb.ne.jp vodafone.ne.jp &&
  chmod -R 700 generic docomo.ne.jp ezweb.ne.jp vodafone.ne.jp

cd /etc/mail
>>> vi sendmail.mc
dnl
dnl 携帯キャリア各社以外へのメールをまとめるキューを指定します。
define(`QUEUE_DIR', `/var/spool/mqueue/generic*')dnl
dnl
dnl デーモンのチェック頻度が上がるので、キューのサイズを制限します。
define(`confMAX_QUEUE_RUN_SIZE', `100')dnl
dnl
FEATURE(`queuegroup')dnl
QUEUE_GROUP(`docomo', `P=/var/spool/mqueue/docomo.ne.jp,R=3,F=f,J=10')dnl
QUEUE_GROUP(`ezweb', `P=/var/spool/mqueue/ezweb.ne.jp,R=3,F=f,J=10')dnl
QUEUE_GROUP(`vodafone-c', `P=/var/spool/mqueue/vodafone.ne.jp/c,R=2,F=f,J=10')dnl

sendmail(8.12.x) tune for mail magazine | 株式会社システミクス 2007