Comments on Autoresponders to accompany Virtual Users and Domains with Postfix, Courier and MySQL
Autoresponders to accompany Virtual Users and Domains with Postfix, Courier and MySQL This guide focuses on making Yaa! (Yet Another Autoresponder!) work with Debian Sarge and the virtual users on Postfix tutorial (see http://www.howtoforge.com/virtual_postfix_mysql_quota_courier). The first thing to understand about the guide is that it uses the Virtual Delivery Agent (VDA) and as a result any of the auto responders that you could use by passing them to a pipe via a .forward file simply won't work as the VDA does not support .forward expansions. This limitation can be overcome via Procmail/Maildrop delivery but that is messy and slower especially for mail systems that are heavily used. The simple answer is Yaa!
5 Comment(s)
Comments
hi,
after a few minutes my autoresponder was working as it have to.
the link to the YAA!-scripts isn't up to date
here's the working link to YAA!0.3.1: http://www.sourcefiles.org/Internet/Mail/Utilities/Autoresponders/yaa-0.3.1.tar.bz2
thx&bye
mac
That link is broken too now - I managed to find it via archive.org though:
http://web.archive.org/web/20070612112516/http://frost.ath.cx/software/yaa/dist/yaa-0.3.1.tar.bz2
Here is the another link to YAA0.3: http://www.sourcefiles.org/Internet/Mail/Utilities/Autoresponders/yaa-0.3.1.tar.bz2
Hi all,
in order to exclude SPAM messages to be responded, i've added a single line in a yaa! file.
This work with spammassassin because it add X-Spam-Flag to the mail.
And use the MailingList detection runtime.
In 'yaa-0.3.1/lib/Yaa/Message.pm'
near line 461, add this line :
$self->getHeader('X-Spam-Flag', 1)
dont forget the || on precedent line.
Result block :
# is this a mailing list post?
if (
lc($self->getHeader('Precedence', 1)) eq 'list' ||
$self->getHeader('List-Id', 1) ||
$self->getHeader('List-Subscribe', 1) ||
$self->getHeader('List-Unsubscribe', 1) ||
$self->getHeader('List-Archive', 1) ||
$self->getHeader('List-Post', 1) ||
$self->getHeader('X-Mailing-List', 1) ||
$self->getHeader('Mailing-List', 1) ||
$self->getHeader('X-List', 1) ||
$self->getHeader('X-Spam-Flag', 1)
) {
$self->{_msg_flag_mailinglist} = 1;
}
that's all.
There is a better way ?
At least for me the above method happily ignored all messages because Spamassassin sets the header
X-Spam-Flag:
to all messages.
The value is either YES or NO
so the correct way for me is
$self->getHeader('X-Spam-Flag', 1) eq 'YES'
The whole if:
if (
lc($self->getHeader('Precedence', 1)) eq 'list' ||
$self->getHeader('List-Id', 1) ||
$self->getHeader('List-Subscribe', 1) ||
$self->getHeader('List-Unsubscribe', 1) ||
$self->getHeader('List-Archive', 1) ||
$self->getHeader('List-Post', 1) ||
$self->getHeader('X-Mailing-List', 1) ||
$self->getHeader('Mailing-List', 1) ||
$self->getHeader('X-List', 1) ||
$self->getHeader('X-Spam-Flag', 1) eq 'YES'
) {
$self->{_msg_flag_mailinglist} = 1;
}