Vacation message with exim

I don't really understand why people love so mush auto-responders, especially business people. These messages add a considerable amount of useless noise in our mailboxes. Even though I dislike those emails, it doesn't prevent companies or friends I am hosting on my servers to request them.

One of those companies is closing during the holidays. They wanted to have a vacation message sent whenever someone tried to contact them during this period.

They wanted to have a single vacation message for the entire company instead of asking each employee to set his or her own vacation message for each account.

Here is the solution I have used to do this.

Router

virtual_vacation:
  domains = +virt_domains
  driver = accept
  require_files = /space/hosting/${domain}/vacation.msg
  transport = virtual_vacation_trans
  condition =  ${if or { \
                {match {$h_precedence:} {(?i)junk|bulk|list}} \
                {eq {$sender_address} {}} \
                } {no} {yes}}
  # do not reply to errors or bounces or lists
  senders = ! ^.*-request@.*: ! ^bounce-.*@.*: ! ^.*-bounce@.*: ! ^owner-.*@.*:\
            ! ^postmaster@.*: ! ^webmaster@.*: ! ^listmaster@.*: ! ^mailer-daemon@.*:\
            ! ^root@.*: ! ^abuse@.*
  unseen
  no_verify

virtual_vacation:
domains = +virt_domains
driver = accept
require_files = /space/hosting/${domain}/vacation.msg
transport = virtual_vacation_trans
condition = ${if or { \
{match {$h_precedence:} {(?i)junk|bulk|list}} \
{eq {$sender_address} {}} \
} {no} {yes}}
# do not reply to errors or bounces or lists
senders = ! ^.*-request@.*: ! ^bounce-.*@.*: ! ^.*-bounce@.*: ! ^owner-.*@.*:\
! ^postmaster@.*: ! ^webmaster@.*: ! ^listmaster@.*: ! ^mailer-daemon@.*:\
! ^root@.*: ! ^abuse@.*
unseen
no_verify


The router checks if the file message.msg exists in the home for that domain.
The router also tries to determine if the mail is coming from a mailing list or if it was auto-generatd. We don't want to send the vacation message to these addresses.

Transport

virtual_vacation_trans:
  driver = autoreply
  to = ${sender_address}
  from = "do_not_reply@${domain}"
  file = /space/hosting/${domain}/vacation.msg
  once = /var/tmp/vacation_${domain}.db
  once_repeat = 7d
  subject = "Re: Away for holidays / En vacances - ${local_part}@${domain}"

virtual_vacation_trans:
driver = autoreply
to = ${sender_address}
from = "do_not_reply@${domain}"
file = /space/hosting/${domain}/vacation.msg
once = /var/tmp/vacation_${domain}.db
once_repeat = 7d
subject = "Re: Away for holidays / En vacances - ${local_part}@${domain}"


The transport is pretty straightforward. It sets the to, from, and subject as well as the content of the mail extracted from the file vacation.msg. The email addresses of the senders are kept into the file vacation${domain}.db, in order to send the vacation message only once a week. Determined by once_repeat = 7d.
 
Posted on Dec 24, 2008 by: Fred Cirera @ 15:58 Leave a comment Comments: 29

Customize your Mail.app Headers

It is possible to add custom headers to mails your are sending with Mail.app. You need to open and type the following commands. This is very useful to add headers with your mail priority, a default reply-to field or with your GnuPG or identity.

 
Posted on Dec 27, 2007 by: Fred Cirera @ 15:50 Leave a comment Comments: 19

Email obfuscation

Email harvester traverse the Web looking for email signatures in web pages. In the sole purpose of building large databases of email addresses to send spam.

That's why it is always a good idea to not publish your email address on a web page, but sometime you absolutely need to be contacted and you need to post your email address.

On web pages you have no control, such as forums, blogs or commercial websites, you can use a service like KasMail [kasmail.com] to create a temporary email address. When you need to enter your email somewhere you use that temporary email address. This email address is only valid a short period of time (from few days to several month) and then it is automatically deleted by KasMail. Email harvesters will send the spam to an expired email address.

Sometimes though, you need to publish your personal email address. What you can do is to obfuscate your address so the harvesters will miss it. Here is the recipe I often use myself.

If you have a Mac, UNIX, or Linux type the following line in a terminal window, to encrypt your email address. If you have Windows installed on your computer, install a real OS.
$ echo 'booba@gump.com' | openssl base64
Ym9vYmFAZ3VtcC5jb20K

$ echo 'booba@gump.com' | openssl base64
Ym9vYmFAZ3VtcC5jb20K

The string "Ym9vYmFAZ3VtcC5jb20K" is your email address encoded in base 64. Enter the following line in your web pages at the place you want to enter your email address.
<script type="text/javascript">
document.write(atob('Ym9vYmFAZ3VtcC5jb20K'));
</script>

<script type="text/javascript">
document.write(atob('Ym9vYmFAZ3VtcC5jb20K'));
</script>

Voila! An email harvester will see a group of meaningless characters, and a real web browser will display your email address.
 
Posted on Dec 19, 2007 by: Fred Cirera @ 12:05 Leave a comment Comments: 15