Hey all!
I'm posting here few scripts which implement Mail Forwarding and
Auto-Responder for qmail(-ldap).
All settings are stored in MySQL database (create-sql file is provided)
and could be managed from any
third-party tool as Horde's Vacations module, for example.
Administrative command-line scripts are
provided as well. This package could be useful for any virtual hosting.
How to use it? First, create the DB, and grand rights to qmail, alias
and administrative users to use it.
Copy qmail-bin scripts to /var/qmail/bin and chown them properly. Copy
qmail-alias scripts to alias/~
and chown it as well. Then include forwardcheck.sh in your qmail run
script (default delivery) like this
|/var/qmail/bin/forwardcheck.sh
usualy before ./Maildir/ line. Again, make sure the qmail user has right
to use this MySQL database.
If you are going to write sql by hand in order to integrate it to
third-party tools (web-mail), please note
that all e-mail addresses stored in DB have a space character in front
of them.
Local users can activate/deactivate mail forwarding remotely by sending
a blank email to this address
secretary@your-domain.com
specifying forwarding address in Subject line in order to set it up, or
dast (-) in order to deactivate it.
Make sure the alias user has right to use the MySQL database. Note that
in this case local copy of
forwarded messages will not be kept.
Hope this could be useful to someone.
--
Zdravko Stoychev
System Software and Support
MPS Ltd.
zdravko.stoychev@mps.bg
+359-2-491-1827 (ext.271)
Ако не отговарям на писмата Ви - погледнете тук: http://6lyokavitza.org/mail
--------------------------------------
"Quality is never an accident; it is always the result of high intention, sincere
effort, intelligent direction, and skillful execution; it presents the wise choice of
many alternatives."
- W. Foster.
--------------------------------------
This e-mail is intended only for the addressee(s) and may contain privileged
and confidential information. It should not be disseminated, distributed, or
copied. If you have received this e-mail message by mistake, please inform the
sender, and delete it from your system.
qmail-secretary.tar.gz
Description: GNU Zip compressed data
smime.p7s
Description: S/MIME Cryptographic Signature
|