Virtual exim (vexim) is a nice PHP frontend for the Exim4 mail transport agent. Using vexim it is easy to add or modify email accounts and virus and spam settings.

Vexim's homepage already has a few patches and modifications, however I found a few bugs and they were not nicely integrated into the PHP frontend. So I tried to fix them and integrate my favorite patches into one file.

The major improvements over the existing release are:

Screenshot of the new Vexim GUI


This modification is based on vexim2.2RC1 .


This tar file is pretty much identical with what I have currently installed on live systems. Some path names, user IDs etc. are different from what is in the vexim2.2RC1.tar.gz file.


This is a patch file to be applied on the contents of vexim2.2RC1.tar.gz file. It does not contain any locally modified path names, user IDs etc. but it is not tested. To apply the patch, executed the commands below:

v0000:/tmp# tar xfz vexim2.2RC1.tar.gz
v0000:/tmp# cd vexim2
v0000:/tmp/vexim2# patch -p1 < ../vexim2.2RC1-schirmacher.patch
patching file docs/configure
patching file vexim/adminuseradd.php
patching file vexim/adminuserchange.php
patching file vexim/adminuserchangesubmit.php
patching file vexim/locale/de_DE/LC_MESSAGES/de.po
patching file vexim/sitechange.php
patching file vexim/style.css
patching file vexim/userchange.php
patching file vexim/userchangesubmit.php
patching file docs/vexim-acl-check-content.conf
patching file docs/vexim-acl-check-rcpt.conf
patching file docs/rewrite_subject.pl


Use the Virtual Vexim installation manual (http://silverwraith.com/vexim/readme.php), or this DebianHowto Page (in german language).

If you are modifying an existing vexim installation instead of installing from scratch, you need to manually create two new database fields:

mysql vexim
> alter table users  ADD on_rewritesubject bool NOT NULL  default '0';
> alter table users  ADD movedelete bool NOT NULL  default '0';

The file docs/rewrite_subject.pl must be copied into /etc/exim4 and it must be made executeable. The perl script requires the Mail::Internet perl package, which is not available on some systems. Run the perl script from the command line. If there is an error install the missing perl package (libmailtools-perl on Debian).

# cp docs/rewrite_subject.pl /etc/exim4
# chmod 755 /etc/exim4/rewrite_subject.pl
#  perl /etc/exim4/rewrite_subject.pl
Can't locate Mail/Internet.pm in @INC ....

Note that the german localization file is not included because it is a binary file. Either recreate it with

msgfmt -v locale/de_DE/LC_MESSAGES/de.po -o locale/de_DE/LC_MESSAGES/messages.mo

or copy this file from the archive above.


I have started a german Vexim handbook. It currently contains only the user part, not the administrator part.

Known Bugs

If you find a bug in this vexim modification, I want to hear about it and fix it.

Please contact: Arne Schirmacher .

Activating forwarding turns off email subject rewriting

The "forward email" and "rewrite email subject" can't be used at the same time. The rewrite email subject code is never executed.

Blacklists don't work

The blacklisting feature does not work, because the ACL rules actually do not retrieve the blacklisting information from MySQL. 


Filtering Spam

Based on: http://veximwiki.silverwraith.com/index.php/Filtering_Spam_New

This patch moves all spam into a separate folder. I am using the folder name "Junk" instead of "Spam", because also Thunderbird uses this folder name and both SpamAssassin filtered and Thunderbird filtered emails will end up in the same directory.

The user can choose whether to move spam into this folder, to delete it right away or to deliver it in the standard way.

Rewriting Subject of Spam

Inspired by: http://veximwiki.silverwraith.com/index.php/Marking_Subject_of_SPAM

... but the patch has bugs. It sort of works, but not as intended. The author wanted to rewrite the subject of the spam email according to user settings, but at execution time the variables $local_part and $domain are undefined and the whole clause fails. However, the Subject line is rewritten whenever the SpamAssassin spam ratings exceeds the defaults (instead of the user defined values). So if the user has entered the same rating as SpamAssassin's default (5) it looks as if it actually works but it does not.

The correct time for rewriting the Subject line is at transport time. This will also make sure that each user can user their own subject rewriting preferences. The original patch modified the Subject line for every user.

While you are configuring vexim, you may want to check out this new article on greylisting:

SPAM filtern mit Greylisting 

New german language translation 

I went through all of the german text to make it a bit more consistent and added the required strings for the new features. Some strings in the PHP code lacked the internationalization function, which were added. This will also benefit other translations.


Thanks to Avleen Vig for creating Virtual Exim. Several other individuals have also contributed:



This page has been viewed

{content-info:value=viewCount}zero {content-info}