HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Technical (http://www.howtoforge.com/forums/forumdisplay.php?f=8)
-   -   Postfix: handling undelivered/bouced emails with a script (http://www.howtoforge.com/forums/showthread.php?t=59764)

manarak 2nd December 2012 07:42

Postfix: handling undelivered/bouced emails with a script
 
I'm running ISPConfig3 on my server, and I'm looking into the possibility of automatically processing undelivered emails with a script, if possible PHP.

So I've been looking through the /var/vmail/ directories and the incoming mail is easy enough to detect, allright.

So I would like to run a PHP cron that looks through the mailbox and does "something".
Ideally, I would like to remove the bounced messages from the mailbox.

But I could not find any description of the mail server's (is it postfix?) behavior, and if removing a message was as simple as just deleting it from the /new directory?

Is there a description of postfix somewhere?

Mark_NL 14th December 2012 19:19

If you use Maildir structure you can simply delete a file and the mail is gone.

Code:

grep -HRe '(MAILER-DAEMON|550)' /var/vmail
should get you started with emails that couldn't be delivered.

manarak 14th December 2012 19:52

thanks! just the info I was after


All times are GMT +2. The time now is 19:08.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.