Voilá
https://github.com/valkum/postfixadmin/commit/08cccdff6880d69d4523b40471c079ab13f23b2b
Am Sonntag, 3. März 2013 21:51:38 schrieb Rudi Floren:
> That means that the code is not well done.
>
> It should have a structure like:
> * get all information from header part
> * test against some patterns and set a variable to send or not to send.
> * send a vacation mail if the variable is true or something else.
>
> I would create patch but i don't have enough time.
>
> Am Sonntag, 3. März 2013 21:05:44 schrieb Christian Boltz:
>> Hello,
>>
>> Am Sonntag, 3. März 2013 schrieb Tanstaafl:
>>> If all it does is store info for later, why/how does it prevent my
>>> line from being evaluated if it comes after this line?
>>
>> That's how the if / elsif / else block works:
>>
>> The first "true" condition (which is the "/^from:\s*(.*)\n$/i" check for
>> lines starting with "from:") "wins". This also means that the remaining
>> "elsif" conditions and the "else" are not even checked.
>>
>> To give you an (I hope) easily understandable example:
>>
>> if ( $day == my_birthday ) {
>> go_out_for_lunch_with_friends;
>> } elsif ( $day == sunday )
>> go_to_church;
>> } else {
>> go_to_work;
>> }
>>
>> This pseudocode translates to:
>>
>> If it's your birthday, then you go out for lunch with some friends - and
>> don't care about going to church or your work because you are in the
>> restaurant with your friends ;-)
>>
>> If it's not your birthday, then you go (depending on the weekday) to
>> church or to work.
>>
>> Well, real life isn't that easy, but you should get the point ;-)
>>
>>
>> Regards,
>>
>> Christian Boltz
|