[ale] messages

Chris Fowler cfowler at outpostsentinel.com
Thu Mar 25 09:28:49 EDT 2010


I'm changing my subject because the last email I sent did not go
through.  Maybe the real reason I don't see messages here is because
they are filtered

I've spent some time googling how to create an away message using
procmail.  For the 10 years that I've used this system not once have I
sent an away message.  I'm coming up blank on a solution that looks like
it is simple enough to implement.

My procmailrc is very long.  I use it to sort my mail into mbox files
instead of using Evolution rules.  I do this so that using mutt,
openwebmail, Evolution, or etc my mail boxes look the same and rules in
the client are not needed.  

Here is the issue:

I absolutely despise receiving away messages on mailing lists.  I have
to give you guys kudos because rarely do I see them here.  I mainly see
them on mailing lists like Atlanta Java Users, etc.  Maybe it is because
we are more technical and feel like mailing lists do not need vacation
replies.  Good job here and I don't want to start sending you replies
either.

Every one of my customers I send their email to a mailbox named
'Customers'.  This allows me to filter their mail and see it instantly.
Here is a sample rule:

:0
* ^From.*XXXXXXXXXXXX.com
Mail/Customers


I have *many* of those littered in my .procmailrc.

Now I want all email that goes to that folder only to be sent a vacation
reply.  When I look at sample rules on the Internet they look more
general and would not work for my setup.

What I've ended up doing it what I normally do.  I use perl to create a
custom solution.  I've got a program that will process an email and send
a reply back to the sender.  It also uses ARGV[0] to specify what mbox
file that email should be placed.  New rule looks like this:

:0
* ^From.*XXXXXXXXXXXX.com
| /home/cfowler/vacation.pl mail/CUSTOMERS

Program does the following.

1.  Captures STDIN as the $email
2.  Prints $email to 'mail/CUSTOMERS' Now I have a copy
3.  Looks for ~/vacation.txt
4.  Gets headers using Email::Simple
5.  Looks in vacation.cache to see if we've sent one to them or not
6.  Sends the sender the contents of ~/vacation.txt using Net::SMTP


What I like about Perl is that now I can do anything I want.  I can use
DBD::SQLite to keep track of the senders and when I send a reply and I
could only send them another if the last time I sent them one was 24hrs
in the past.  Consider it a reminder.   What I don't like about Perl is
that I may be re-inventing the wheel that someone has done with clever
procmail scripts.

My goal is that *only* customers get my vacation message and no one
else.

Chris






More information about the Ale mailing list