On Wednesday 18 February 2009 16:56:05 jeffs wrote:
> Sahil Tandon wrote:
> > On Wed, 18 Feb 2009, jeffs wrote:
> >> Thank you for your prompt reply.
> >
> > No problem, but please do not top-post; place all future replies *below*
> > quoted text.  Thanks.
> >
> >> I am working on a project in which -- depending on the level of the
> >> users subscription -- either their mail is delayed for at least 2 hours
> >> or it is sent out immediately.  Actually, I could use some advice on the
> >> best way to implement this.  Because of the application in use all email
> >> whether or not it belongs to one group or another, originates from the
> >> same domain.  It is an application sitting on the smtp server which
> >> processes mail for the application.  The users fill in a form and
> >> depending on their level of subscription, the values from the form are
> >> converted into an email message, go out right away or are delayed.  So,
> >> as far as the smtp server is concerned , all mail originates from the
> >> same user but in fact gets destined for different recipients.  The
> >> application can ad tags or codes to the individual messages to indicate
> >> which group they are in so perhaps if postfix can look inside the
> >> message or something and see the tag or code, it can then decide if it
> >> should delay or deliver immediately the message.
> >>
> >> I hope I'm making myself clear and please ask if you need clarification.
> >
> > Why not configure your application to inspect the mail and, depending on
> > your criteria, submit to Postfix immediately or after a two hour delay?

Because he then creates a queue for an application that already has a queue. 
It's possible, but he'd have to create and maintain N queue directories, then 
let cron pick up each queue by inspecting the date header.

> I did look at defer_transports and that looks promising.  Would I simple
> put defer_transports = smtp in the main.cf or do I have to fiddle with
> other settings someplace too?  I'd prefer something a little more
> elegant than defer_transports unless I can, again, specify somehow which
> mails are to be delayed.

This sounds more like something for a policy server. Take a look at postgrey 
for example, it defers mail based on criteria postfix does not care about. 
All information is available to a policy server to enforce the delay policy 
you're describing.
-- 
Melvyn Sopacua

Reply via email to