Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Alternative title: How to delay a mail queue in postfix for a certain user.

I am planning to build a solution. At first it would be I would create a separate email address for queuing. Use a client to send the email from that address. The queue on that email would be paused (not processing) and then create a job/script or something(separate question) to relay a sendmail -q to postfix to release the queue.

How do I make the queue stay in a delayed state so this is possible. I do not wish to stop the service and restart it at certain times since that would disable all other email.

share|improve this question
    
This sounds like mail delivery. What does it have to do with dovecot? Shouldn't this be a Postfix/sendmail/exim/qmail question? –  Celada Feb 1 '13 at 18:46
    
Very quite possibly. I am still a little confused on this structure. I am afraid I am still at the follow the instructions closely stage of my linux email delivery structures. I am using Postfix. I will update the question –  user148760 Feb 1 '13 at 18:48
    
Forget dovecot, it doesn't matter here. Why do you want to do this anyway? –  Sven Feb 1 '13 at 18:50
    
All typical delayed email solution require the client to be active. Since I am between different OS/computers I can't rely on the client. I am trying to get a better solution for delayed send. I am aware I can use squirrelmail, but I would prefer a solution that doesn't require an active web server. If there is an available add-in/project that would be wonderful. I don't mean to re-invent the wheel. Reason 2: I might learn something –  user148760 Feb 1 '13 at 18:54
    
Why do you want to delay mail in the first place? Mail servers are designed to get rid of the mail as soon as possible. –  Sven Feb 1 '13 at 19:01

1 Answer 1

up vote 1 down vote accepted

You could instruct postfix via header_checks to hold emails with specific subjects or headers and then have a cron job that would release those emails at specific intervals/time.

So you would put this in your postfix configuration:

header_checks = regexp:/etc/postfix/header_checks 

and then create the header_checks file an put:

/^From: "snailmail/ HOLD

then a cronjob would have to scan the mails that are on hold and release them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.