– English message below –
Onlangs kregen we veel vragen om html-gebaseerde afwezigheidsberichten mogelijk te maken in ons controlpanel. Echter omdat ons controlpanel DirectAdmin is, is dat nog niet zo eenvoudig.
Na wat research kwam ik er achter dat het eenvoudig is om via de exim config een content-type header toe te voegen aan de vacationmessages.
Zelf kun je dit ook realiseren met DirectAdmin, wel is root access vereist of wat medewerking van je provider.
Open je exim.conf file (normaal onder /etc)
Zoek naar de vacation transporter, herkenbaar aan de regel:
## vacation transport
Voor het nette, maken we de text variabele leeg, zodat er geen tekst wordt toegevoegd aan de afwezigheidsberichten. Aanvullend de headers toevoegen/aanpassen. In onderstaande code gaan we er vanuit dat er geen headers worden geplaatst op dit moment. De code kan tussen de oude text en de to variable geplaatst worden.
text = ""
headers = "${if exists{/etc/virtual/${domain}/reply/${local_part}.msg.html}{Content-Type: text/html; charset=us-ascii}{Content-Type: text/plain; charset=us-ascii}}"
Naderhand dien je nog even een bestandje aan te maken met ‘touch’, dit bestand is gelijk aan het eerste deel van het emailadres waarvoor de het vakantiebericht in html moet worden verzonden. Voor ons is dat:
/etc/virtual/${domain}/reply/${local_part}.msg.html
English message:
Since a short period we received message for a html-based vacationmessage through exim and DirectAdmin.
Afterwards a short research period i managed to create the possibility to send html-based away messages.
Open the exim.conf file (normaly in /etc)
Find your vacation transporter, you can recognize it with the line:
## vacation transport
The basic vacation systems adds some own text. We will clear this message. Next we will add some headers. Following code can be placed between the text and to lines.
text = ""
headers = "${if exists{/etc/virtual/${domain}/reply/${local_part}.msg.html}{Content-Type: text/html; charset=us-ascii}{Content-Type: text/plain; charset=us-ascii}}"
After adding this line you need to ‘touch’ a file called ‘likewise to the mailbox’ followed by ‘.msg.html’.
You can find it in:
/etc/virtual/${domain}/reply/${local_part}.msg.html