On 2011-12-15 3:27 PM, Christian Boltz <pos...@cb...> wrote:
>> I'd appreciate some comments/replies on this Feature Request for a
>> documented way to easily add new from/mailfrom strings that will cause
>> the vacation message to NOT be sent...
>>
>> I have seen numerous vacation messages sent that should NOT be sent
> Have a look at vacation.pl around line 558 to 569. There are lines like
> (broken into multiple lines for better readability)
>
> elsif (/^List\-(Id|Post|Unsubscribe):/i) {
> $logger->debug("List-$1: found; exiting");
> exit (0);
> }
>
> You can add similar lines there, for example
>
> elsif (/^autoresponders-are:\s+evil/i) {
> $logger->debug("autoresponders-are: evil found; exiting");
> exit (0);
> }
>
> would not respond to mails which have this header:
> Autoresponders-are: evil
Ok, one problem is, I don't usually get these emails, others do, so all
I have are the log entries, not the full headers - yeah, I could ask the
user to forward it to me or go look at it, but I'd like to be able to do
this simply from the log entry, and also not provide a full header
match, just a 'contains' match, see below...
Here is another example of one I just saw go out (was watching the logs
for something else):
Feb 19 15:03:25 myhost postfix-25/smtpd[12575]: CCD158B3D5B:
client=sv4-mta-52b.emailfiltering.com[208.87.137.233]
Feb 19 15:03:26 myhost postfix/cleanup[12580]: CCD158B3D5B:
message-id=<175...@el...d>
Feb 19 15:03:26 myhost postfix/qmgr[11885]: CCD158B3D5B:
from=<m-g...@bo...>,
size=6660, nrcpt=2 (queue active)
Feb 19 15:03:26 myhost postfix/virtual[12581]: CCD158B3D5B:
to=<val...@me...>, relay=virtual, delay=0.38,
delays=0.37/0/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
Feb 19 15:03:26 myhost postfix-25/smtpd[12575]: disconnect from
sv4-mta-52b.emailfiltering.com[208.87.137.233]
Feb 19 15:03:26 myhost postfix-25/smtpd[12575]: connect from
myhost.media-brokers.com[127.0.0.1]
Feb 19 15:03:26 myhost postfix-25/smtpd[12575]: 9B082973CC9:
client=myhost.media-brokers.com[127.0.0.1]
Feb 19 15:03:26 myhost postfix/cleanup[12580]: 9B082973CC9:
message-id=<201...@me...>
Feb 19 15:03:26 myhost postfix/qmgr[11885]: 9B082973CC9:
from=<val...@me...>, size=1133, nrcpt=1 (queue active)
Feb 19 15:03:26 myhost postfix-25/smtpd[12575]: disconnect from
myhost.media-brokers.com[127.0.0.1]
Feb 19 15:03:26 myhost postfix/pipe[12591]: CCD158B3D5B:
to=<validuser#med...@au...>,
orig_to=<val...@me...>, relay=vacation, delay=0.92,
delays=0.37/0.03/0/0.52, dsn=2.0.0, status=sent (delivered via vacation
service)
Feb 19 15:03:26 myhost postfix/qmgr[11885]: CCD158B3D5B: removed
Feb 19 15:03:27 myhost postfix/qmgr[11885]: 9B082973CC9: removed
Feb 19 15:03:27 myhost postfix/smtp[12594]: 9B082973CC9:
to=<m-g...@bo...>,
relay=post52.us.emailfiltering.com[208.87.137.137]:25, delay=1.2,
delays=0.05/0.01/0.84/0.34, dsn=2.0.0, status=sent (250 accepted
(1186764686))
What I would like is a simple way to add additional lines to
vacation.pl, that would - ie, in this case - not respond to anything
that had 'linkedin.com' *anywhere* (ie, a *contains* filter, not
requiring an exact match) in the header or mailfrom.
Or, maybe instead of linkedin.com, just anything with 'bounce' anywhere
in the header or mailfrom (this is only the vacation responder, so I'm
ok with not replying to some end-case message that maybe should have
gotten replied to, if it stops all of these that should not get replied
to)...
Can you help with that constructing a line item for that? Then I could
simply clone that one and change the string.
Incidentally, the main reason I'm asking for help with this is testing
it is hard, since it's not like we get these all the time, and nothing
I've tried so far has worked (blocked these).
But regardless, if I can get one working example, that would be awesome.
Thanks Christian (or anyone else willing to help)!
Charles
|