I'm having a problem with Postfix 2.4.6, built from source on Solaris 10. Locally delivered mail is placed in maildirs on an NFS-imported disk. The NFS server uses file system quotas. Using alias_maps, mail for root is sent to several users.
When one of the expanded recipients goes over quota, Postfix successfully delivers the mail to all other expanded recipients and reports a failed delivery for the user who is over quota. The mail goes into the queue for another delivery attempt a few minutes later. However, what's queued seems to be the original (un-expanded) recipient, so at the next attempt, the alias is expanded again, and the users who are under quota get another copy, while the user that is over quota gets another failure, and the mail is re-queued again. And so it goes, around and around, until someone notices and increases the offending user's quota temporarily, allowing the deliveries to succeed completely and the queue to drain. How can I get Postfix to just re-attempt delivery to the user over quota, not the others? The sample below has a two-step alias expansion (syslog-all -> root -> user1,...), but the same happens for mail sent directly to root. aliases: syslog-all: root root: user1,useroverquota,user2,user3,user4,user5,user6,user7 A sample piece of mail in mailq: F03CF3B469 1092 Mon Aug 3 20:13:22 r...@example.com (maildir delivery failed: error writing message: Disc quota exceeded) useroverqu...@example.com syslog-...@example.com Syslog: Aug 4 00:14:08 ns1 postfix/smtpd[21102]: [ID 197553 mail.info] 775993B4F5: client=pc1.example.com[10.0.177.250] Aug 4 00:14:08 ns1 postfix/cleanup[21008]: [ID 197553 mail.info] 775993B4F5: message-id=<200908032214.n73me812061...@pc1.example.com> Aug 4 00:14:08 ns1 postfix/qmgr[665]: [ID 197553 mail.info] 775993B4F5: from=<r...@example.com>, size=5316, nrcpt=1 (queue active) Aug 4 00:14:08 ns1 postfix/local[21103]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=0.13, delays=0.09/0/0/0.04, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:14:08 ns1 postfix/local[21103]: [ID 197553 mail.info] 775993B4F5: to=<useroverqu...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=0.18, delays=0.09/0/0/0.09, dsn=4.2.2, status=deferred (maildir delivery failed: error writing message: Disc quota exceeded) Aug 4 00:14:08 ns1 postfix/local[21103]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=0.42, delays=0.09/0/0/0.33, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:14:08 ns1 postfix/local[21103]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=0.47, delays=0.09/0/0/0.38, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:14:08 ns1 postfix/local[21103]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=0.5, delays=0.09/0/0/0.41, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:14:09 ns1 postfix/local[21103]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=0.58, delays=0.09/0/0/0.49, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:14:09 ns1 postfix/local[21103]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=0.65, delays=0.09/0/0/0.56, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:14:09 ns1 postfix/local[21103]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=0.72, delays=0.09/0/0/0.63, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:20:31 ns1 postfix/qmgr[665]: [ID 197553 mail.info] 775993B4F5: from=<r...@example.com>, size=5316, nrcpt=1 (queue active) Aug 4 00:20:34 ns1 postfix/local[22951]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=386, delays=383/3.1/0/0.02, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:20:34 ns1 postfix/local[22951]: [ID 197553 mail.info] 775993B4F5: to=<useroverqu...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=386, delays=383/3.1/0/0.04, dsn=4.2.2, status=deferred (maildir delivery failed: error writing message: Disc quota exceeded) Aug 4 00:20:34 ns1 postfix/local[22951]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=386, delays=383/3.1/0/0.06, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:20:34 ns1 postfix/local[22951]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=386, delays=383/3.1/0/0.07, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:20:34 ns1 postfix/local[22951]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=386, delays=383/3.1/0/0.08, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:20:34 ns1 postfix/local[22951]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=386, delays=383/3.1/0/0.1, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:20:34 ns1 postfix/local[22951]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=386, delays=383/3.1/0/0.15, dsn=2.0.0, status=sent (delivered to maildir) Aug 4 00:20:34 ns1 postfix/local[22951]: [ID 197553 mail.info] 775993B4F5: to=<us...@example.com>, orig_to=<syslog-...@example.com>, relay=local, delay=386, delays=383/3.1/0/0.18, dsn=2.0.0, status=sent (delivered to maildir) [ ... lots more attempts for the same queue ID after these two, but they all look the same ... ] postconf -n: alias_database = dbm:/p/local/mail/mailalias/aliases alias_maps = dbm:/p/local/mail/mailalias/aliases command_directory = /opt/admin/postfix/sbin config_directory = /opt/admin/postfix/etc daemon_directory = /opt/admin/postfix/libexec debug_peer_level = 2 html_directory = /opt/admin/postfix/doc/html inet_interfaces = $myhostname line_length_limit = 8192 local_header_rewrite_clients = static:all local_recipient_maps = unix:passwd.byname $alias_maps mail_owner = postfix mail_spool_directory = /ld/mailstore/ mailbox_size_limit = 0 mailq_path = /opt/admin/postfix/bin/mailq manpage_directory = /opt/admin/postfix/man masquerade_classes = envelope_sender, envelope_recipient, header_sender, header_recipient masquerade_domains = example.com message_size_limit = 0 mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain myhostname = mailhost.example.com myorigin = $mydomain newaliases_path = /opt/admin/postfix/bin/newaliases queue_directory = /var/spool/postfix readme_directory = /opt/admin/postfix/doc recipient_delimiter = + sample_directory = /etc/postfix sendmail_path = /opt/admin/postfix/lib/sendmail setgid_group = postdrop transport_maps = dbm:/opt/admin/postfix/etc/transport unknown_local_recipient_reject_code = 550 -- Karl-Johan Karlsson