Running exim4 i cannot figure out how to send a notice message to the sender, if a certain address gets mail (the address of the user that will left the company).
Running exim4 i cannot figure out how to send a notice message to the sender, if a certain address gets mail (the address of the user that will left the company).
You can use the "autoreply" driver to send automated reply messages. It is normally used for vacation messages, but it is of course capable of sending back any kind of mail.
Roughly, what you need is a router, which (depending on some condition) redirects the message to the transport using the autoreply driver. The router is something like this:
The router above is a snippet about vacation, again, but you should have no problem rewriting this. Also, it uses mysql as a backend, so your config will be slightly different if you use files for example, but you get the idea...
Having the router, you need a transport (in this example, it is called "vacation_transport"), which is something like this:
Again, it is using a mysql backend (it is a copy-paste from the same config file, ofcoz). The point is to set the "from", "to", "subject" and "text" variables. The autoreply transport will use these to compose the reply mail. If you need to notify the sender about the user's absence, you can remove the lookups, and for the most part you can include a static text. Again, this example is about vacation mails, where the user can customize his/her message.
See this page about the autoreply driver: http://wiki.exim.org/EximAutoReply
Also, the exim documentation is useful as well.
I would assume that when you delete the mailbox it will send a bounce back saying that the mailbox doesn't exist.