Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to hold all non-relay mail?

26 views
Skip to first unread message

Darren Pilgrim

unread,
May 4, 2006, 5:42:18 PM5/4/06
to
I'm looking for is a way to tell postfix to silently hold all mail
destined for the virtual transport. Basically, I want to "pause" local
delivery without interrupting everything else (i.e., postfix should
continue to accept inbound mail and relay to other hosts).

I've read the postfix(1), postqueue(1), sendmail(1), master(5),
transport(5) and virtual(8) man pages. I've also Googled for "postfix
hold mail" and derivations thereof. The closest thing I could find was
`postsuper -h ALL`, but that only works for mail already queued.

How do I tell postfix to hold delivery?

Magnus Bäck

unread,
May 5, 2006, 12:47:25 AM5/5/06
to
On Thursday, May 04, 2006 at 23:42 CEST,
Darren Pilgrim <darren....@bitfreak.org> wrote:

> I'm looking for is a way to tell postfix to silently hold all mail
> destined for the virtual transport. Basically, I want to "pause" local
> delivery without interrupting everything else (i.e., postfix should
> continue to accept inbound mail and relay to other hosts).

How about using defer_transports?

defer_transports = virtual

This may or may not be a good idea, it depends on what actual problem
you are trying to solve by doing this.

[...]

--
Magnus Bäck
mag...@dsek.lth.se

Darren Pilgrim

unread,
May 5, 2006, 2:44:32 AM5/5/06
to

I need to stop postfix from attempting delivery via the virtual
transport during maintenance and upgrades to the underlying mail stores,
IMAP servers, filter databases, etc. The system uses maildrop, so in
the past we just set the sticky bit on users' $HOME's. The system is
going through its first major overhaul (re-evaluate everything) and such
hackery is no longer practical for the scale and level of automation
desired.

defer_transports seems fairly on the mark for what I want. Will it
cause postfix to silently hold mail indefinitely?


Victor Duchovni

unread,
May 5, 2006, 10:29:52 AM5/5/06
to
On Thu, May 04, 2006 at 11:44:32PM -0700, Darren Pilgrim wrote:

> defer_transports seems fairly on the mark for what I want. Will it
> cause postfix to silently hold mail indefinitely?

Yes, provided nobody runs "sendmail -q", "postfix flush", "postqueue -f",
or if the virtual domain is listed in "fast_flush_domains": "sendmail
-qRyour-domain.tld" or "postqueue -s your-domain.tld". In the latter
case you may also want to disable the SMTP ETRN command:

smtpd_etrn_restrictions = reject
smtpd_discard_ehlo_keywords = ETRN,silent-discard

--
Viktor.

P.S. Morgan Stanley is looking for a New York City based, Senior Unix
system/email administrator to architect and sustain the Unix email
environment. If you are interested, please drop me a note.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majo...@postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Wietse Venema

unread,
May 5, 2006, 10:44:00 AM5/5/06
to
Victor Duchovni:

> On Thu, May 04, 2006 at 11:44:32PM -0700, Darren Pilgrim wrote:
>
> > defer_transports seems fairly on the mark for what I want. Will it
> > cause postfix to silently hold mail indefinitely?
>
> Yes, provided nobody runs "sendmail -q", "postfix flush", "postqueue -f",
> or if the virtual domain is listed in "fast_flush_domains": "sendmail
> -qRyour-domain.tld" or "postqueue -s your-domain.tld". In the latter
> case you may also want to disable the SMTP ETRN command:
>
> smtpd_etrn_restrictions = reject
> smtpd_discard_ehlo_keywords = ETRN,silent-discard

If I recall correctly, defer_transports will defer mail until it
expires, as controlled with the *queue_life_time parameters.

Wietse

Victor Duchovni

unread,
May 5, 2006, 10:49:01 AM5/5/06
to

Sorry, yes, the "indefinitely" part was not accurate, the mail will bounce
after ~5 days (or the appropriate locally select queue lifetime).

Darren Pilgrim

unread,
May 5, 2006, 7:18:27 PM5/5/06
to
Victor Duchovni wrote:
> On Fri, May 05, 2006 at 10:44:00AM -0400, Wietse Venema wrote:
>> If I recall correctly, defer_transports will defer mail until it
>> expires, as controlled with the *queue_life_time parameters.
>
> Sorry, yes, the "indefinitely" part was not accurate, the mail will bounce
> after ~5 days (or the appropriate locally select queue lifetime).

maximal_queue_lifetime?

Magnus Bäck

unread,
May 6, 2006, 2:35:06 AM5/6/06
to
On Saturday, May 06, 2006 at 01:18 CEST,
Darren Pilgrim <darren....@bitfreak.org> wrote:

> Victor Duchovni wrote:
>
> > Sorry, yes, the "indefinitely" part was not accurate, the mail
> > will bounce after ~5 days (or the appropriate locally select
> > queue lifetime).
>
> maximal_queue_lifetime?

Indeed, or bounce_queue_lifetime if the message is a bounce.

--
Magnus Bäck
mag...@dsek.lth.se

0 new messages