Home Postfix-resend tool

Postfix-resend tool (purge all mails in /var/spool/postfix/)

E-mail Print PDF
Download: http://www.artica.fr/postfix-resend.zip (all linux distributions) 

Postfix-resend is a tool designed to perform these operations:

  • get status of the number of mails stored in all postfix /var/spool/postfix/ queues.
  • Perform resend operations by parsing all mails in a defined queue.
    Resend operations, get emails, resolve MX, parse /etc/hosts and resend all mails.

it sould be used when  the postfix spool is  to heavy  or for postfix migrations.

		PURGE resend postfix files
-----------------------------------------
--purge...............: purge queue directory
--queue-path=path.....: change queue path from default to specific path
--nameserver=IP/name..: Define nameserver other than default (127.0.0.1)
--no-delete-source....: Do not delete files sources
--just-count..........: Just output the number of files
--backup=path.........: Target path for backup files (if not define, use /tmp as backup)
--timeout=value.......: Define timeout in smtp sessions
--watch=value.........: How many mails must reach to start operation
--fork................: Send one process for each mail
verbose,debug,output..: output debugs infos
Read
-----------------------------------------
--read path..........: Read a postfix file
STATS
----------------------------------------------------
--stats...............: Get number of mails stored in each queue
--in-line.............: All values in same line

Examples:

  • resend all mails stored in "active" queue : 

postfix-resend --purge -queue-path=active --nameserver=127.0.0.1 --backup=/var/backup --timeout=1 --fork

  • Adding postfix-resend in cron and execute resend operation when queue exceed a maximal 10000 emails number (the postfix daemon is automatically stopped and started during the operation)

postfix-resend --purge -queue-path=active --nameserver=127.0.0.1 --backup=/var/backup --timeout=1 --watch=10000 --fork

  • Get number of emails in queue:

postfix-resend --stats

 


Newsflash

blackducksoftware.com has decided to put Artica in top 10 of Open Sources Rookies for 2008 years.
Artica start to be seen in the world....

More infos :

http://www.blackducksoftware.com/news/news/2009-01-21