I checked arround a little bit what database modifications Postfixadmin does when vacation/autoreply is activated.
This is the database "postfix":
+-----------------------+
| Tables_in_postfix |
+-----------------------+
| admin |
| alias |
| alias_domain |
| config |
| domain |
| domain_admins |
| fetchmail |
| log |
| mailbox |
| quota |
| quota2 |
| transport |
| transport_copyto |
| transport_mail |
| vacation |
| vacation_notification |
+-----------------------+
The "alias" table looks like this:
+----------+--------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------------------+-------+
| address | varchar(255) | NO | PRI | NULL | |
| goto | text | NO | | NULL | |
| domain | varchar(255) | NO | MUL | NULL | |
| created | datetime | NO | | 0000-00-00 00:00:00 | |
| modified | datetime | NO | | 0000-00-00 00:00:00 | |
| active | tinyint(1) | NO | | 1 | |
+----------+--------------+------+-----+---------------------+-------+
When vacation/autoreply is activated the "goto" field is added a new adress.
At first it's: "
[email protected]" and after it's "
[email protected],test#
[email protected]"
The "autoreply.domain.com" is specified in the configuration.
The vacation table looks like this:
+---------+--------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+--------------+------+-----+---------------------+-------+
| email | varchar(255) | NO | PRI | NULL | |
| subject | varchar(255) | NO | | NULL | |
| body | text | NO | | NULL | |
| cache | text | NO | | NULL | |
| domain | varchar(255) | NO | | NULL | |
| created | datetime | NO | | 0000-00-00 00:00:00 | |
| active | tinyint(1) | NO | | 1 | |
+---------+--------------+------+-----+---------------------+-------+
And the information is added/modified like this:
email: "
[email protected]"
subject: "autoreply" (or whatever you write)
body: "On vacation" (or whatever autoreply you want to send)
cache: this is empty, don't know what it's for.
domain: "domain.com" the domain name from the email-adress.
created: "2010-09-10 12:30:21" current date when activated.
active: "1" 1 if active, 0 if not.
I'm no expert but that doesn't look so hard to make a simple plugin that modifies those database entries with two simple text fields and maybe a checkbox for active/not-active..
Someone who's feeling they can manage the task? :D
It would seriously be frigign awesome if it would be done and I would be forever grateful!
Thanks,
-Patric