[postfixadmin:patches] #9 simple PHP vacation script
Brought to you by:
christian_boltz,
gingerdog
From: Christian B. <chr...@us...> - 2018-01-12 19:48:27
|
- **status**: open --> closed-rejected - **Group**: --> SVN (please specify revision!) - **Comment**: Given the limitations, I'm afraid that this script has no chances to replace vacation.pl - and we aren't bored enough to maintain multiple vacation scripts ;-) --- ** [patches:#9] simple PHP vacation script** **Status:** closed-rejected **Group:** SVN (please specify revision!) **Labels:** Vacation **Created:** Thu Jul 12, 2007 12:19 AM UTC by John Seifarth **Last Updated:** Mon Aug 25, 2014 07:35 AM UTC **Owner:** nobody This is a simplistic vacation script for postfixadmin, written in PHP. Since postfix has already figured out who the sender is, and who the recipient is, we can use these values passed via the command line from the postfix pipe daemon process when our script is called. This avoids having to parse the email message itself, and vastly simplifies the program logic. It does impose some limitations, described below. This version only supports the postgres backend database. It should be easy to adapt to mysql, by someone familiar with that database. Ideally, it should be database-independent. The main design goal is extreme simplicity, with decent error checking, to avoid sending inappropriate vacation notifications. It is much simpler than the vacation.pl script included with postfixadmin, since it does not have to parse the email headers to extract the sender and recipient. However, it should be easily modifiable by anyone reasonably familiar with PHP. Features: \- Written entirely in simple, linear PHP. \- Error checking: at each step, if an error is encountered, the error is logged and the program exits \- Relies on postfix for the sender and recipient address \- Allows a time-based repeat policy for re-sending notifications. For example, it can be set to notify every 10 days, every day, or even every 1 second if you want a notification sent for each incoming mail from each sender. Limits: \* Postgres only, because I do not have a Mysql test DB. I previously had the vacation-psql.pl script running when I was using postfix 2.2, but it stopped working when I upgraded to postfix 2.3 \(which I needed for working with dovecot SASL auth\). This vacation-psql.pl uses the vacation\_notification table to keep track of which senders have already received a vacation notification. I did not see this table used in the mysql vacation.pl script. \* Does not attempt to find the actual address to which the mail was sent, it just uses the $\{recipient\} macro from the postfix pipe interface to find the recipient mailbox. Therefore, the return address of the vacation notification is that of the user's mailbox, not necessarily the address to which the sender originaly sent the email, which may well be an alias to that mailbox. My workaround for this limitation for users who have ab...@wh...d type addresses is to suggest that they put their usual address or their name in the subject line. --- Sent from sourceforge.net because pos...@li... is subscribed to https://sourceforge.net/p/postfixadmin/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/postfixadmin/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |