postfixadmin-devel Mailing List for PostfixAdmin (Page 11)
Brought to you by:
christian_boltz,
gingerdog
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(39) |
Nov
(29) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(5) |
Feb
|
Mar
(8) |
Apr
(8) |
May
|
Jun
(11) |
Jul
(21) |
Aug
(4) |
Sep
(9) |
Oct
(5) |
Nov
(25) |
Dec
(11) |
2009 |
Jan
(40) |
Feb
(16) |
Mar
(1) |
Apr
(46) |
May
(3) |
Jun
|
Jul
(1) |
Aug
(9) |
Sep
(9) |
Oct
(27) |
Nov
(35) |
Dec
(20) |
2010 |
Jan
(3) |
Feb
(2) |
Mar
(8) |
Apr
(1) |
May
(9) |
Jun
(8) |
Jul
(1) |
Aug
(7) |
Sep
(2) |
Oct
(2) |
Nov
(12) |
Dec
(7) |
2011 |
Jan
(45) |
Feb
(11) |
Mar
(18) |
Apr
(15) |
May
(20) |
Jun
|
Jul
(5) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
|
Dec
(14) |
2012 |
Jan
(30) |
Feb
(36) |
Mar
(6) |
Apr
(32) |
May
(20) |
Jun
(5) |
Jul
(2) |
Aug
|
Sep
(4) |
Oct
|
Nov
(22) |
Dec
(1) |
2013 |
Jan
(13) |
Feb
(4) |
Mar
(70) |
Apr
(10) |
May
(6) |
Jun
(11) |
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(15) |
Nov
(4) |
Dec
(4) |
2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
(3) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(8) |
Dec
(2) |
2015 |
Jan
(1) |
Feb
(9) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
(4) |
Feb
|
Mar
(10) |
Apr
(3) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(13) |
2017 |
Jan
(1) |
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(3) |
2018 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(10) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2023 |
Jan
|
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(3) |
From: Tanstaafl <tan...@li...> - 2013-03-03 17:40:23
|
On 2013-03-03 12:35 PM, Christian Boltz <pos...@cb...> wrote: > It isn't a real "check" or "whitelist". Instead, it stores information > for later usage. > > Let's say there's a line > From: foo bar<fo...@ex...> > then the regex will match and > - set $from to the first match group ("(.*)" in the regex), which is > foo bar<fo...@ex...> > - set $lastheader to point to $from Thanks Christian, but... hmmm... still not clear to me... 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? |
From: Christian B. <pos...@cb...> - 2013-03-03 17:36:03
|
Hello, Am Sonntag, 3. März 2013 schrieb Tanstaafl: > Thanks VERY much Christian, tested and working now... :-) > What precisely is that other 'from' line checking: > > elsif (/^from:\s*(.*)\n$/i) { $from = $1; $lastheader = \$from; } > > and why would it be acting like a 'whitelist' of sorts? It isn't a real "check" or "whitelist". Instead, it stores information for later usage. Let's say there's a line From: foo bar <fo...@ex...> then the regex will match and - set $from to the first match group ("(.*)" in the regex), which is foo bar <fo...@ex...> - set $lastheader to point to $from I agree it might be a bit too much perl magic in one line ;-) Regards, Christian Boltz PS: hand-picked .sig today ;-) -- Perl - the only language that looks the same before and after RSA encryption. -- Keith Bostic |
From: Tanstaafl <tan...@li...> - 2013-03-03 12:19:20
|
On 2013-03-02 1:19 PM, Christian Boltz <pos...@cb...> wrote: > Move your line near the beginning, so that it looks like this: > >>> > > if (/^\s+(.*)/ and $lastheader) { $$lastheader .= " $1"; next; } >>> > ># new 'multi-string' line is for adding any string you want to test for in the from header, but be careful what you put in here >>> > > elsif (/^from:.*(alerts|autoreply|bounce|do-not-reply|facebook|linkedin|list-|myspace|noreply|twitter).*/i) { $logger->debug("Multi-string From header matching $1 found; exiting"); exit (0); } >>> > > elsif (/^from:\s*(.*)\n$/i) { $from = $1; $lastheader = \$from; } > Now perl will first check your new line, and if it doesn't match, it will > run the line that fills $from. Ka-ching! Thanks VERY much Christian, tested and working now... And many thanks also for the more in-depth explanations, but, just so I understand this a little better... What precisely is that other 'from' line checking: elsif (/^from:\s*(.*)\n$/i) { $from = $1; $lastheader = \$from; } and why would it be acting like a 'whitelist' of sorts? Thanks again! I'm soooo glad to get this working... :) |
From: Christian B. <pos...@cb...> - 2013-03-02 18:19:18
|
Hello, Am Samstag, 2. März 2013 schrieb Tanstaafl: > On 2013-03-01 1:06 PM, Christian Boltz <pos...@cb...> wrote: > > sorry for not replying earlier - I was busy with too many other > > things. At least one of them was PostfixAdmin - the old edit-...php > > and create-...php files are finally gone (replaced by *Handler > > classes). Now up to the TODOs and the CLI ;-) (add in interactive > > mode already works with the *Handler classes) > > No problem at all Christian... I'm really looking forward to the 3.x > release too! :) ;-) > > Am Montag, 25. Februar 2013 schrieb Tanstaafl: > >> Thanks very much Rudi. Change applied, but only time will tell. > > > > There might be another issue, independent from your regex. > > > > My guess is that there's another (els)if condition that matches > > before your regex even has a chance to get checked. > > > > To check that, please post some more lines. To be exact: I'd like to > > see the complete code block starting from (around line 607) > Ok, well, just to be thorough, I'm including everything in the 'Take > headers apart' section, including the line immediately following my > new line: > > $logger->debug("Script argument SMTP recipient is : '$smtp_recipient' and smtp_sender : '$smtp_sender'"); > > while (<STDIN>) { > > last if (/^$/); > > if (/^\s+(.*)/ and $lastheader) { $$lastheader .= " $1"; next; } > > elsif (/^from:\s*(.*)\n$/i) { $from = $1; $lastheader = \$from; } > > elsif (/^to:\s*(.*)\n$/i) { $to = $1; $lastheader = \$to; } > > elsif (/^cc:\s*(.*)\n$/i) { $cc = $1; $lastheader = \$cc; } > > elsif (/^Reply\-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader = \$replyto; } > > elsif (/^subject:\s*(.*)\n$/i) { $subject = $1; $lastheader = \$subject; } > > elsif (/^message\-id:\s*(.*)\s*\n$/i) { $messageid = $1; $lastheader = \$messageid; } > > elsif (/^x\-spam\-(flag|status):\s+yes/i) { $logger->debug("x-spam-$1: yes found; exiting"); exit (0); } > > # new 'multi-string' line is for adding any string you want to test for in the from header, but be careful what you put in here > > elsif (/^from:.*(alerts|autoreply|bounce|do-not-reply|facebook|linkedin|list-|myspace|noreply|twitter).*/i) { $logger->debug("Multi-string From header matching $1 found; exiting"); exit (0); } > > elsif (/^x\-facebook\-notify:/i) { $logger->debug('Mail from facebook, ignoring'); exit(0); } Looks like my guess was correct - which also means your new line was never run. The reason is: > > if (/^\s+(.*)/ and $lastheader) { $$lastheader .= " $1"; next; } > > elsif (/^from:\s*(.*)\n$/i) { $from = $1; $lastheader = \$from; } ^^^^^^^^^^^^^ This matches all lines starting with 'from:', so the condition is met. This also means the if block is "done" - perl won't check any of the following elsif conditions. Move your line near the beginning, so that it looks like this: > > if (/^\s+(.*)/ and $lastheader) { $$lastheader .= " $1"; next; } > > # new 'multi-string' line is for adding any string you want to test for in the from header, but be careful what you put in here > > elsif (/^from:.*(alerts|autoreply|bounce|do-not-reply|facebook|linkedin|list-|myspace|noreply|twitter).*/i) { $logger->debug("Multi-string From header matching $1 found; exiting"); exit (0); } > > elsif (/^from:\s*(.*)\n$/i) { $from = $1; $lastheader = \$from; } Now perl will first check your new line, and if it doesn't match, it will run the line that fills $from. For the records: This also means: your line has to call exit (it does) because otherwise it might happen that $from stays empty, which might cause some interesting[tm] problems later. Hmm, maybe I should split the if block into two (one for filling $from etc. and one for checking exit conditions) to avoid those problems. In theory, it might be slightly slower, but I doubt it's measureable - and it will make adding new checks easier because a problem like yours won't happen. > My biggest problem is testing changes though... I basically need to > wait for someone to have their vacation enabled, and that gets emails > from some of these senders I want to not send vacation messages for. You can run vacation.pl in test mode, see the VIRTUAL_VACATION/tests/ directory for some examples. test.sh is the script to run the tests. The only thing you need are some example mails ;-) Regards, Christian Boltz -- > ich mochte gerne fur eine unbestimte Zeit Linux von meiner > Festplatte werfen wie mache ich das genau? [Glenn Charpantier] Nimm die Platte aus dem Rechner, und pack sie ganz fest mit der Hand. Dann machst Du eine heftige Wurfbewegung, als wolltest Du die Platte ganz weit weg werfen. [...] Wenn die Bewgeung heftig genug war, ist Linux nun von der Platte gefallen. [Adalbert Michelic in suse-linux] |
From: Tanstaafl <tan...@li...> - 2013-03-02 15:00:34
|
On 2013-03-01 1:06 PM, Christian Boltz <pos...@cb...> wrote: > sorry for not replying earlier - I was busy with too many other things. > At least one of them was PostfixAdmin - the old edit-...php and > create-...php files are finally gone (replaced by *Handler classes). Now > up to the TODOs and the CLI ;-) (add in interactive mode already works > with the *Handler classes) No problem at all Christian... I'm really looking forward to the 3.x release too! :) > Am Montag, 25. Februar 2013 schrieb Tanstaafl: >> Thanks very much Rudi. Change applied, but only time will tell. > > There might be another issue, independent from your regex. > > My guess is that there's another (els)if condition that matches before > your regex even has a chance to get checked. > > To check that, please post some more lines. To be exact: I'd like to > see the complete code block starting from (around line 607) > $logger->debug("Script argument SMTP recipient is : '$smtp_recipient' and smtp_sender : '$smtp_sender'"); > while (<STDIN>) { > until (around line 630) > else {$lastheader = '' ; } > } Ok, well, just to be thorough, I'm including everything in the 'Take headers apart' section, including the line immediately following my new line: > # Take headers apart > $cc = ''; > $replyto = ''; > > $logger->debug("Script argument SMTP recipient is : '$smtp_recipient' and smtp_sender : '$smtp_sender'"); > while (<STDIN>) { > last if (/^$/); > if (/^\s+(.*)/ and $lastheader) { $$lastheader .= " $1"; next; } > elsif (/^from:\s*(.*)\n$/i) { $from = $1; $lastheader = \$from; } > elsif (/^to:\s*(.*)\n$/i) { $to = $1; $lastheader = \$to; } > elsif (/^cc:\s*(.*)\n$/i) { $cc = $1; $lastheader = \$cc; } > elsif (/^Reply\-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader = \$replyto; } > elsif (/^subject:\s*(.*)\n$/i) { $subject = $1; $lastheader = \$subject; } > elsif (/^message\-id:\s*(.*)\s*\n$/i) { $messageid = $1; $lastheader = \$messageid; } > elsif (/^x\-spam\-(flag|status):\s+yes/i) { $logger->debug("x-spam-$1: yes found; exiting"); exit (0); } > # new 'multi-string' line is for adding any string you want to test for in the from header, but be careful what you put in here > elsif (/^from:.*(alerts|autoreply|bounce|do-not-reply|facebook|linkedin|list-|myspace|noreply|twitter).*/i) { $logger->debug("Multi-string From header matching $1 found; exiting"); exit (0); } > elsif (/^x\-facebook\-notify:/i) { $logger->debug('Mail from facebook, ignoring'); exit(0); } Many thanks for being willing to take a look at it. Again, I'm hoping for a one-liner that tests for any of the strings in both the mail-from and any other From headers. My biggest problem is testing changes though... I basically need to wait for someone to have their vacation enabled, and that gets emails from some of these senders I want to not send vacation messages for. Anyway, thanks again, and hopefully you'll either confirm that it maybe should work now, or point out something else I should change. Regards, Charles |
From: Christian B. <pos...@cb...> - 2013-03-01 21:46:05
|
Hello, sorry for not replying earlier - I was busy with too many other things. At least one of them was PostfixAdmin - the old edit-...php and create-...php files are finally gone (replaced by *Handler classes). Now up to the TODOs and the CLI ;-) (add in interactive mode already works with the *Handler classes) Am Montag, 25. Februar 2013 schrieb Tanstaafl: > Thanks very much Rudi. Change applied, but only time will tell. There might be another issue, independent from your regex. My guess is that there's another (els)if condition that matches before your regex even has a chance to get checked. To check that, please post some more lines. To be exact: I'd like to see the complete code block starting from (around line 607) $logger->debug("Script argument SMTP recipient is : '$smtp_recipient' and smtp_sender : '$smtp_sender'"); while (<STDIN>) { until (around line 630) else {$lastheader = '' ; } } Regards, Christian Boltz -- Zu schön um nicht gesiggt zu werden ;-) [Rainer Behrendt in dag°] |
From: Jakob U. <jak...@gm...> - 2013-02-25 22:09:17
|
On 25.02.2013 19:58, Tanstaafl wrote: > [...] but only time will tell. Try it out on some regular expression website like http://regexpal.com/ if you are not sure. Looks good though. Jakob |
From: Tanstaafl <tan...@li...> - 2013-02-25 18:59:35
|
Thanks very much Rudi. Change applied, but only time will tell. I'll report back once I know if it works... On 2013-02-25 9:25 AM, Rudi Floren <rud...@go...> wrote: > Try this: > > /^from:.*(bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter).*/i > > Am Montag, 25. Februar 2013 13:43:33 schrieb Tanstaafl: >> On 2013-01-15 9:25 AM, Tanstaafl <tan...@li...> wrote: >>> Again, here is the one-liner (in the 'Take Headers Apart' section >>> thatI'm trying to get working: >>>> >>>> elsif (/^from:.*+(bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter)/i) { $logger->debug("Multi-string From header matching $1: $2 found; exiting"); exit (0); } >> >> I'm still trying to get this working and am getting desperate... can >> someone PLEASE take a few minutes and help me? There has to be a simple >> solution to this. >> >> After asking on the postfix list and getting a recommendation to remove >> the '+' character, so it now looks like: >> >>> elsif (/^from:.*(bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter)/i) { $logger->debug("Multi-string From header matching $1;$ >> >> I just saw another one in the logs go out that shouldn't have: >> >> from=<bounces+57277-7c79-validuser=exa...@se...>, >> size=88637, nrcpt=2 (queue active) >> >> Note the 'bounces' string in the beginning of the mail-from address. >> >> This should have matched the very first match sting ('bounce') in my >> one-liner... so, why isn't it? >> >> Does this 'Take Headers Apart' section even actually look at the >> mail-from address? >> >> Again, I just want this string to do a 'contains' match on anything in >> the mail-from address, whether it is in the local or domain part of the >> address. >> >> Anyone? Pretty please? >> >> Thanks, >> >> Charles |
From: Rudi F. <rud...@go...> - 2013-02-25 14:25:41
|
Try this: /^from:.*(bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter).*/i Am Montag, 25. Februar 2013 13:43:33 schrieb Tanstaafl: > On 2013-01-15 9:25 AM, Tanstaafl <tan...@li...> wrote: >> Again, here is the one-liner (in the 'Take Headers Apart' section >> thatI'm trying to get working: >>> >>> elsif (/^from:.*+(bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter)/i) { $logger->debug("Multi-string From header matching $1: $2 found; exiting"); exit (0); } > > I'm still trying to get this working and am getting desperate... can > someone PLEASE take a few minutes and help me? There has to be a simple > solution to this. > > After asking on the postfix list and getting a recommendation to remove > the '+' character, so it now looks like: > >> elsif (/^from:.*(bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter)/i) { $logger->debug("Multi-string From header matching $1;$ > > I just saw another one in the logs go out that shouldn't have: > > from=<bounces+57277-7c79-validuser=exa...@se...>, > size=88637, nrcpt=2 (queue active) > > Note the 'bounces' string in the beginning of the mail-from address. > > This should have matched the very first match sting ('bounce') in my > one-liner... so, why isn't it? > > Does this 'Take Headers Apart' section even actually look at the > mail-from address? > > Again, I just want this string to do a 'contains' match on anything in > the mail-from address, whether it is in the local or domain part of the > address. > > Anyone? Pretty please? > > Thanks, > > Charles > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > Postfixadmin-devel mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel |
From: Tanstaafl <tan...@li...> - 2013-02-25 13:00:32
|
On 2013-01-15 9:25 AM, Tanstaafl <tan...@li...> wrote: > Again, here is the one-liner (in the 'Take Headers Apart' section > thatI'm trying to get working: >> >> elsif (/^from:.*+(bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter)/i) { $logger->debug("Multi-string From header matching $1: $2 found; exiting"); exit (0); } I'm still trying to get this working and am getting desperate... can someone PLEASE take a few minutes and help me? There has to be a simple solution to this. After asking on the postfix list and getting a recommendation to remove the '+' character, so it now looks like: > elsif (/^from:.*(bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter)/i) { $logger->debug("Multi-string From header matching $1;$ I just saw another one in the logs go out that shouldn't have: from=<bounces+57277-7c79-validuser=exa...@se...>, size=88637, nrcpt=2 (queue active) Note the 'bounces' string in the beginning of the mail-from address. This should have matched the very first match sting ('bounce') in my one-liner... so, why isn't it? Does this 'Take Headers Apart' section even actually look at the mail-from address? Again, I just want this string to do a 'contains' match on anything in the mail-from address, whether it is in the local or domain part of the address. Anyone? Pretty please? Thanks, Charles |
From: Tanstaafl <tan...@li...> - 2013-01-15 14:26:16
|
Specifically, why is the 'do-not-reply' not matching the one liner? On 2013-01-13 2:50 PM, Tanstaafl <tan...@li...> wrote: > Thanks for your help Christian... > > On 2013-01-10 12:59 PM, Christian Boltz <pos...@cb...> wrote: >> You can replace the \s with .* to allow any number of any character, > > Tried this, but no luck... > >> Again, seeing the mail headers would it make easier to find out how >> strict the regex can be.) > > Again, here is the one-liner that I'm trying to get working: > >> elsif (/^from:.*+(bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter)/i) { $logger->debug("Multi-string From header matching $1: $2 found; exiting"); exit (0); } > > And here are the full headers for one of these messages that is > generating an auto-reply that shouldn't (this is our anti-spam > quarantine message): > >> Subject: Maildistiller Quarantine Summary >> From: "Maildistiller Summary" <do-...@ma...> >> Date: 2013-01-11 2:06 PM >> To: cm...@me... >> Return-Path: <do-...@ma...> >> X-Original-To: cm...@me... >> Delivered-To: cm...@me... >> Received: from relay-eu1.maildistiller.com (relay-eu1.maildistiller.com [5.135.34.120]) by smtp.media-brokers.com (Postfix) with ESMTPS id 3FB5DABDA9C for <cm...@me...>; Fri, 11 Jan 2013 14:06:15 -0500 (EST) >> Received: from relay-eu1.maildistiller.com (localhost [127.0.0.1]) by > relay-eu1.maildistiller.com (Mail Distiller ESMTP Server) with ESMTP id > 673D86005E for <cm...@me...>; Fri, 11 Jan 2013 19:06:14 > +0000 (UTC) >> Received: from interface1.dco.mdlocal (unknown [10.15.14.61]) by relay-eu1.maildistiller.com (Mail Distiller ESMTP Server) with ESMTP id 6530D6A for <cm...@me...>; Fri, 11 Jan 2013 19:06:14 +0000 (UTC) >> Received: from localhost (localhost [127.0.0.1]) by interface1.dco.mdlocal (Mail Distiller ESMTP Server) with ESMTP id 5A4D02A1A for <cm...@me...>; Fri, 11 Jan 2013 19:06:14 +0000 (UTC) >> MIME-Version: 1.0 >> Content-Type: text/html; charset=utf-8 >> Content-Transfer-Encoding: quoted-printable >> Reply-To: "Maildistiller Summary" <do-...@ma...> >> Message-ID: <201...@in...local> |
From: Tanstaafl <tan...@li...> - 2013-01-13 19:51:17
|
Thanks for your help Christian... On 2013-01-10 12:59 PM, Christian Boltz <pos...@cb...> wrote: > You can replace the \s with .* to allow any number of any character, Tried this, but no luck... > Again, seeing the mail headers would it make easier to find out how > strict the regex can be.) Again, here is the one-liner that I'm trying to get working: > elsif (/^from:.*+(bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter)/i) { $logger->debug("Multi-string From header matching $1: $2 found; exiting"); exit (0); } And here are the full headers for one of these messages that is generating an auto-reply that shouldn't (this is our anti-spam quarantine message): > Subject: Maildistiller Quarantine Summary > From: "Maildistiller Summary" <do-...@ma...> > Date: 2013-01-11 2:06 PM > To: cm...@me... > Return-Path: <do-...@ma...> > X-Original-To: cm...@me... > Delivered-To: cm...@me... > Received: from relay-eu1.maildistiller.com (relay-eu1.maildistiller.com [5.135.34.120]) by smtp.media-brokers.com (Postfix) with ESMTPS id 3FB5DABDA9C for <cm...@me...>; Fri, 11 Jan 2013 14:06:15 -0500 (EST) > Received: from relay-eu1.maildistiller.com (localhost [127.0.0.1]) by relay-eu1.maildistiller.com (Mail Distiller ESMTP Server) with ESMTP id 673D86005E for <cm...@me...>; Fri, 11 Jan 2013 19:06:14 +0000 (UTC) > Received: from interface1.dco.mdlocal (unknown [10.15.14.61]) by relay-eu1.maildistiller.com (Mail Distiller ESMTP Server) with ESMTP id 6530D6A for <cm...@me...>; Fri, 11 Jan 2013 19:06:14 +0000 (UTC) > Received: from localhost (localhost [127.0.0.1]) by interface1.dco.mdlocal (Mail Distiller ESMTP Server) with ESMTP id 5A4D02A1A for <cm...@me...>; Fri, 11 Jan 2013 19:06:14 +0000 (UTC) > MIME-Version: 1.0 > Content-Type: text/html; charset=utf-8 > Content-Transfer-Encoding: quoted-printable > Reply-To: "Maildistiller Summary" <do-...@ma...> > Message-ID: <201...@in...local> Any other ideas? Thanks again! |
From: Christian B. <pos...@cb...> - 2013-01-10 18:01:50
|
Hello, Am Mittwoch, 9. Januar 2013 schrieb Tanstaafl: > I changed the line per your recommendation to match only on the from > header, and another one that should have been matched didn't... > > I'd really appreciate some help getting this line working so I can > stop replying to messages from linkedin and others I shouldn't be > replying to... > Why didn't this line: > > elsif > > (/^from:\s+(bounce|do-not-reply|facebook|linkedin|list-|myspace|twi > > tter)/i) { $logger->debug("Multi-string From header matching $1: $2 > > found; exiting"); exit (0); } > match on the string 'bounce'? Probably because you only allow whitespace ("\s") between the "from:" and "bounce" - sorry for overlooking this before. You can replace the \s with .* to allow any number of any character, but it would probably be better to have it more restricted (for example ".*\@.*(bounce|....." would mean it only matches on the domain part - and yes, AFAIK the @ needs to be escaped in perl). Again, seeing the mail headers would it make easier to find out how strict the regex can be.) You might also want to read http://perldoc.perl.org/perlre.html to get a better understanding of the perl regex syntax ;-) Regards, Christian Boltz -- > By getting back to the bugs you are high-jacking the thread > and drawing away attention of what is asked. I'm ready to try this wonderfull new car with no engine nor wheels... [> houghi and jdd in opensuse-factory] |
From: Tanstaafl <tan...@li...> - 2013-01-09 15:00:56
|
I changed the line per your recommendation to match only on the from header, and another one that should have been matched didn't... I'd really appreciate some help getting this line working so I can stop replying to messages from linkedin and others I shouldn't be replying to... Why didn't this line: > elsif (/^from:\s+(bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter)/i) { $logger->debug("Multi-string From header matching $1: $2 found; exiting"); exit (0); } match on the string 'bounce'? Jan 9 09:51:52 myhost postfix/qmgr[6122]: C8136AE6DBF: from=<bou...@ic...>, size=6162, nrcpt=2 (queue active) Jan 9 09:51:52 myhost postfix/virtual[2921]: C8136AE6DBF: to=<val...@ex...>, relay=virtual, delay=0.33, delays=0.27/0/0/0.06, dsn=2.0.0, status=sent (delivered to maildir) Jan 9 09:51:52 myhost postfix-25/smtpd[2919]: disconnect from relay-eu1.maildistiller.com[5.135.34.120] Jan 9 09:51:52 myhost postfix-25/smtpd[2640]: connect from myhost.example.com[127.0.0.1] Jan 9 09:51:52 myhost postfix-25/smtpd[2640]: 7FA89AE6DC6: client=myhost.example.com[127.0.0.1] Jan 9 09:51:52 myhost postfix/cleanup[2920]: 7FA89AE6DC6: message-id=<201...@ex...> Jan 9 09:51:52 myhost postfix/qmgr[6122]: 7FA89AE6DC6: from=<val...@ex...>, size=949, nrcpt=1 (queue active) Jan 9 09:51:52 myhost postfix-25/smtpd[2640]: disconnect from myhost.example.com[127.0.0.1] Jan 9 09:51:52 myhost postfix/pipe[2970]: C8136AE6DBF: to=<valid-user#exa...@au...>, orig_to=<val...@ex...>, relay=vacation, delay=0.83, delays=0.27/0.01/0/0.55, dsn=2.0.0, status=sent (delivered via vacation service) Jan 9 09:51:52 myhost postfix/qmgr[6122]: C8136AE6DBF: removed Jan 9 09:52:01 myhost postfix/smtp[2967]: 7FA89AE6DC6: to=<bou...@ic...>, relay=filtered.maildistiller.com[5.135.34.120]:25, delay=8.5, delays=0.12/0/6.1/2.3, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as A913DD3) Jan 9 09:52:01 myhost postfix/qmgr[6122]: 7FA89AE6DC6: removed On 2013-01-07 3:52 PM, Tanstaafl <tan...@li...> wrote: > On 2013-01-06 6:53 PM, Christian Boltz <pos...@cb...> wrote: >> The more interesting question is if there are better headers to identify >> those mails - "bounce" in the From might be a good hint, but a >> mailinglist header is better ;-) >> Therefore (the headers of) some example mails would be helpful. > > Well, since sometimes these trigger and sometimes they don't, it is > easier for me to find them in the logs - this doesn't give you the > headers, but it shows you what the logs are seeing - for example, this > one should have matched on the 'bounce', but it didn't: > > Jan 7 07:40:07 myhost postfix/qmgr[6122]: 125D8AE0063: > from=<bounce-b_p7u18bgm62k2lkqip6d7150c3k======@bounces.livingsocial.com>, > size=99193, nrcpt=2 (queue active) > Jan 7 07:40:07 myhost postfix/virtual[13259]: 125D8AE0063: > to=<val...@ex...>, relay=virtual, delay=0.38, > delays=0.31/0/0/0.07, dsn=2.0.0, status=sent (delivered to maildir) > Jan 7 07:40:07 myhost postfix-25/smtpd[13256]: disconnect from > relay-eu1.maildistiller.com[5.135.34.120] > Jan 7 07:40:07 myhost postfix-25/smtpd[13256]: connect from > myhost.example.com[127.0.0.1] > Jan 7 07:40:07 myhost postfix-25/smtpd[13256]: C5D5AAE4E7E: > client=myhost.example.com[127.0.0.1] > Jan 7 07:40:07 myhost postfix/cleanup[13219]: C5D5AAE4E7E: > message-id=<201...@ex...> > Jan 7 07:40:07 myhost postfix/qmgr[6122]: C5D5AAE4E7E: > from=<val...@ex...>, size=1443, nrcpt=1 (queue active) > Jan 7 07:40:07 myhost postfix-25/smtpd[13256]: disconnect from > myhost.example.com[127.0.0.1] > Jan 7 07:40:07 myhost postfix/qmgr[6122]: 125D8AE0063: removed > Jan 7 07:40:07 myhost postfix/pipe[13261]: 125D8AE0063: > to=<valid-user#exa...@au...>, > orig_to=<val...@ex...>, relay=vacation, delay=0.84, > delays=0.31/0.01/0/0.52, dsn=2.0.0, status=sent (delivered via vacation > service) > Jan 7 07:40:10 myhost postfix/smtp[13237]: C5D5AAE4E7E: > to=<bounce-b_p7u18bgm62k2lkqip6d7150c3k======@bounces.livingsocial.com>, > relay=filtered.maildistiller.com[5.135.34.120]:25, delay=2.8, > delays=0.1/0/2.5/0.25, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as > 7611EA2) > Jan 7 07:40:10 myhost postfix/qmgr[6122]: C5D5AAE4E7E: removed > >> I'm not sure if I want this in the GUI -IMHO it's somthing that should >> only be editable by the server admin. > > Well, yeah, but it should only be in the GUI when an Admin is logged in > (not a normal user)... just a field where the Admin could add strings > like 'bounce', 'twitter', etc, with a selector on which of the headers > to match on (ie, 'All', 'From', 'Envelope', etc...)... > > What I'm doing now is just much more error prone... > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122412 > _______________________________________________ > Postfixadmin-devel mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel > |
From: Tanstaafl <tan...@li...> - 2013-01-07 20:53:11
|
On 2013-01-06 6:53 PM, Christian Boltz <pos...@cb...> wrote: > The more interesting question is if there are better headers to identify > those mails - "bounce" in the From might be a good hint, but a > mailinglist header is better ;-) > Therefore (the headers of) some example mails would be helpful. Well, since sometimes these trigger and sometimes they don't, it is easier for me to find them in the logs - this doesn't give you the headers, but it shows you what the logs are seeing - for example, this one should have matched on the 'bounce', but it didn't: Jan 7 07:40:07 myhost postfix/qmgr[6122]: 125D8AE0063: from=<bounce-b_p7u18bgm62k2lkqip6d7150c3k======@bounces.livingsocial.com>, size=99193, nrcpt=2 (queue active) Jan 7 07:40:07 myhost postfix/virtual[13259]: 125D8AE0063: to=<val...@ex...>, relay=virtual, delay=0.38, delays=0.31/0/0/0.07, dsn=2.0.0, status=sent (delivered to maildir) Jan 7 07:40:07 myhost postfix-25/smtpd[13256]: disconnect from relay-eu1.maildistiller.com[5.135.34.120] Jan 7 07:40:07 myhost postfix-25/smtpd[13256]: connect from myhost.example.com[127.0.0.1] Jan 7 07:40:07 myhost postfix-25/smtpd[13256]: C5D5AAE4E7E: client=myhost.example.com[127.0.0.1] Jan 7 07:40:07 myhost postfix/cleanup[13219]: C5D5AAE4E7E: message-id=<201...@ex...> Jan 7 07:40:07 myhost postfix/qmgr[6122]: C5D5AAE4E7E: from=<val...@ex...>, size=1443, nrcpt=1 (queue active) Jan 7 07:40:07 myhost postfix-25/smtpd[13256]: disconnect from myhost.example.com[127.0.0.1] Jan 7 07:40:07 myhost postfix/qmgr[6122]: 125D8AE0063: removed Jan 7 07:40:07 myhost postfix/pipe[13261]: 125D8AE0063: to=<valid-user#exa...@au...>, orig_to=<val...@ex...>, relay=vacation, delay=0.84, delays=0.31/0.01/0/0.52, dsn=2.0.0, status=sent (delivered via vacation service) Jan 7 07:40:10 myhost postfix/smtp[13237]: C5D5AAE4E7E: to=<bounce-b_p7u18bgm62k2lkqip6d7150c3k======@bounces.livingsocial.com>, relay=filtered.maildistiller.com[5.135.34.120]:25, delay=2.8, delays=0.1/0/2.5/0.25, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 7611EA2) Jan 7 07:40:10 myhost postfix/qmgr[6122]: C5D5AAE4E7E: removed > I'm not sure if I want this in the GUI -IMHO it's somthing that should > only be editable by the server admin. Well, yeah, but it should only be in the GUI when an Admin is logged in (not a normal user)... just a field where the Admin could add strings like 'bounce', 'twitter', etc, with a selector on which of the headers to match on (ie, 'All', 'From', 'Envelope', etc...)... What I'm doing now is just much more error prone... |
From: Christian B. <pos...@cb...> - 2013-01-07 00:06:40
|
Hello, Am Sonntag, 6. Januar 2013 schrieb Tanstaafl: > On 2013-01-06 11:59 AM, Christian Boltz wrote: > > Am Samstag, 5. Januar 2013 schrieb Tanstaafl: > >> In the 'Take headers apart' section, where all of the stuff goes to > >> determine what NOT to send auto-replies to, there is stuff like: > >> > >> elsif (/^Reply\-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader = > >> \$replyto; } > >> > >> However, in earlier version of vacation.pl, it was: > >> > >> elsif (/^reply-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader = > >> \$replyto; } > >> > >> Aside from escaping the '-', > > > > which was superfluous ;-) BTW: s/was/is/ - it's still there ;-) > ? The '-' is currently escaped (in vacaion.pl 2.3.6) - are you saying > it doesn't need to be? Exactly. It doesn't hurt, but it's not needed. (Not only in the Reply-To check.) The only place where - has a special meaning in regexes is inside square brackets like [a-f] which matches the letters a, b, c, d, e and f. To make it more interesting, you can't escape - inside []. Instead you have to add it at the beginning or the end if you want to match a - inside [], for example [a-f-] or [-a-f] will match a, b, c, d, e, f and - (using [a-f\-] would also allow a \). Regards, Christian Boltz -- Hmm.. Good point Adrian. I should get used to that thing close to my keyboard... how did you call it? Mouse? :-) [Dominique Leuenberger in opensuse-factory] |
From: Christian B. <pos...@cb...> - 2013-01-06 23:53:37
|
Hello, Am Sonntag, 6. Januar 2013 schrieb Tanstaafl: > On 2013-01-06 12:10 PM, Christian Boltz wrote: > > Am Samstag, 5. Januar 2013 schrieb Tanstaafl: > >> elsif > >> (/^(.*):\s+(bounce|facebook|linkedin|list-|myspace|twitter)/i) { > >> $logger->debug("Multi-string header matching $1: $2 found; > >> exiting"); exit (0); } > >> > >> Also, I'd dearly appreciate comments on whether or not this line > >> is/should work as expected/desired. > > > > I'm sure it will catch every mail from facebook, twitter etc. - but > > at the risk of matching too many mails. While we tend to avoid > > autoreplies if in doubt, matching against _all_ headers (which > > includes for example the subject) might be a bit too much. > > Hmmm... ok, I thought it was only matching on the from headers... > > Is there an easy way to limit it to just the from headers? Yes, you can make the regex more specific. Instead of ".*" (which matches anything) (/^(.*):[...] use "From" (/^From:[...] Note: There's already a check for ^from to get the From: address into a variable. You probably need to add your rule _before_ the existing one. If you can restrict your regex a bit more (for example "-bounce@" instead of "bounce" - headers of example mails might help), there are even chances to include the check in the official code. The more interesting question is if there are better headers to identify those mails - "bounce" in the From might be a good hint, but a mailinglist header is better ;-) Therefore (the headers of) some example mails would be helpful. > > (and, while we are on it, would it be possible to have an optional > > hook function in vacation.conf.pl where more checks could be > > added?) Thinking about it, an array (or however it's named in perl) with regexes should also work. > Yes - I had actually posted a Feature Request in the bug tracker for > something like this in the GUI... I'm not sure if I want this in the GUI -IMHO it's somthing that should only be editable by the server admin. Regards, Christian Boltz -- SOAP is really now just called "SOAP", I think they've dropped the "Simple..." bit from the name as it can be anything but simple. [http://codepoets.co.uk/using-soap-and-xmlrpc-php5-newbies-findings] |
From: Tanstaafl <tan...@li...> - 2013-01-06 19:38:44
|
On 2013-01-06 11:59 AM, Christian Boltz <pos...@cb...> wrote: > Hello, > > Am Samstag, 5. Januar 2013 schrieb Tanstaafl: >> In the 'Take headers apart' section, where all of the stuff goes to >> determine what NOT to send auto-replies to, there is stuff like: >> >> elsif (/^Reply\-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader = >> \$replyto; } >> >> However, in earlier version of vacation.pl, it was: >> >> elsif (/^reply-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader = >> \$replyto; } >> >> Aside from escaping the '-', > which was superfluous ;-) ? The '-' is currently escaped (in vacaion.pl 2.3.6) - are you saying it doesn't need to be? |
From: Tanstaafl <tan...@li...> - 2013-01-06 18:43:22
|
On 2013-01-06 12:10 PM, Christian Boltz <pos...@cb...> wrote: > Am Samstag, 5. Januar 2013 schrieb Tanstaafl: >> # new 'multi-string' line is for adding any string you want to test >> for in any header - but be careful what you put in here >> elsif (/^(.*):\s+(bounce|facebook|linkedin|list-|myspace|twitter)/i) { >> $logger->debug("Multi-string header matching $1: $2 found; exiting"); >> exit (0); } >> >> Also, I'd dearly appreciate comments on whether or not this line >> is/should work as expected/desired. > I'm sure it will catch every mail from facebook, twitter etc. - but at > the risk of matching too many mails. While we tend to avoid autoreplies > if in doubt, matching against _all_ headers (which includes for example > the subject) might be a bit too much. Hmmm... ok, I thought it was only matching on the from headers... Is there an easy way to limit it to just the from headers? If not, thats ok - this is only a vacation message, so I'm really much more concerned about NOT replying when I shouldn't. It isn't the same (for me) as antispam measures, where I am indeed very careful about not implementing anything overly aggressive (prone to FPs)... > David, what do you think? > > (and, while we are on it, would it be possible to have an optional hook > function in vacation.conf.pl where more checks could be added?) Yes - I had actually posted a Feature Request in the bug tracker for something like this in the GUI... >> It is difficult to test, since I >> basically have to wait for messages from one/more of these sources to >> show up in the logs... > If you store the mails as text file, you can test them with the test > mode of vacation.pl (see the VIRTUAL_VACATION/tests/ directory). Oh, cool - thanks! Didn't know about/never noticed that! :) |
From: Christian B. <pos...@cb...> - 2013-01-06 17:20:41
|
Hello, Am Samstag, 5. Januar 2013 schrieb Tanstaafl: > I just realized that some changes I had made to the vacation.pl script > a while back did not survive the last update... > > Would it be possible to add the following to lines to the 'Take > headers apart' section in the core code for vacation.pl, so I don't > have to remember to manually update it? > > # new 'multi-string' line is for adding any string you want to test > for in any header - but be careful what you put in here > elsif (/^(.*):\s+(bounce|facebook|linkedin|list-|myspace|twitter)/i) { > $logger->debug("Multi-string header matching $1: $2 found; exiting"); > exit (0); } > > Also, I'd dearly appreciate comments on whether or not this line > is/should work as expected/desired. I'm sure it will catch every mail from facebook, twitter etc. - but at the risk of matching too many mails. While we tend to avoid autoreplies if in doubt, matching against _all_ headers (which includes for example the subject) might be a bit too much. David, what do you think? (and, while we are on it, would it be possible to have an optional hook function in vacation.conf.pl where more checks could be added?) > It is difficult to test, since I > basically have to wait for messages from one/more of these sources to > show up in the logs... If you store the mails as text file, you can test them with the test mode of vacation.pl (see the VIRTUAL_VACATION/tests/ directory). Regards, Christian Boltz -- > Genau, Office und M$-Programme haben meist alle den gleichen Stil. Stimmt, die schaffen das Kammquoting meist besonders gut. *g,d&r* [> Andre Heine und Florian Gross in suse-linux] |
From: Christian B. <pos...@cb...> - 2013-01-06 17:15:41
|
Hello, Am Samstag, 5. Januar 2013 schrieb Tanstaafl: > In the 'Take headers apart' section, where all of the stuff goes to > determine what NOT to send auto-replies to, there is stuff like: > > elsif (/^Reply\-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader = > \$replyto; } > > However, in earlier version of vacation.pl, it was: > > elsif (/^reply-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader = > \$replyto; } > > Aside from escaping the '-', which was superfluous ;-) > note that the 'R' is now capitalized > 'Reply\-to:', whereas before it was not... > > Are these tests case sensitive? If they end with /i (like this one) they are not ;-) Regards, Christian Boltz -- [Greylisting ist] das alte Hotline-Prinzip: Wenn der 4 Minuten lang in der 01805 dringehangen hat, dann will er auch was von uns. Aber sofort ans Telefon gehen? Ne! [Peer Heinlein auf dem LinuxTag Chemnitz 2011] |
From: Tanstaafl <tan...@li...> - 2013-01-05 16:15:27
|
Hope someone can answer this... In the 'Take headers apart' section, where all of the stuff goes to determine what NOT to send auto-replies to, there is stuff like: elsif (/^Reply\-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader = \$replyto; } However, in earlier version of vacation.pl, it was: elsif (/^reply-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader = \$replyto; } Aside from escaping the '-', note that the 'R' is now capitalized 'Reply\-to:', whereas before it was not... Are these tests case sensitive? Thanks, Charles |
From: Tanstaafl <tan...@li...> - 2013-01-05 16:10:23
|
Hi all, I just realized that some changes I had made to the vacation.pl script a while back did not survive the last update... Would it be possible to add the following to lines to the 'Take headers apart' section in the core code for vacation.pl, so I don't have to remember to manually update it? # new 'multi-string' line is for adding any string you want to test for in any header - but be careful what you put in here elsif (/^(.*):\s+(bounce|facebook|linkedin|list-|myspace|twitter)/i) { $logger->debug("Multi-string header matching $1: $2 found; exiting"); exit (0); } Also, I'd dearly appreciate comments on whether or not this line is/should work as expected/desired. It is difficult to test, since I basically have to wait for messages from one/more of these sources to show up in the logs... Thanks, Charles |
From: Luigi R. <li...@lu...> - 2012-12-01 14:22:39
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The db_connect() function calls a generic query function to set charset for mysqli According to PHP manual http://php.net/manual/en/mysqli.set-charset.php the preferred method to set charset in mysqli is to call mysqli_set_charset() The reasons are explained here http://php.net/manual/en/mysqlinfo.concepts.charset.php Ciao, luigi - -- / +--[Luigi Rosa]-- \ If you tell the boss you were late for work because you had a flat tire, the next morning you will have a flat tire. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlC6Ep8ACgkQ3kWu7Tfl6ZRLPACeLDsJ26Nor77gsbVVtwEHtsgC FLkAoI3Qe216bBkX3/mQIBaIOJDf7xle =W5vN -----END PGP SIGNATURE----- |
From: Rudi F. <rud...@go...> - 2012-11-14 11:22:01
|
Am Mittwoch, 14. November 2012 12:19:53 schrieb Johan Hendriks: > At first it did not, but the error log did show me an error on line 98 > $pw = OC_User_Postfixadmin::md5crypt ($password, salt); > > i did replace salt with $salt, and now i can log in using my postfixadmin credentials. > If i give a wrong password it deny's me access. > > thank you very much, i feel a little quilty taking up so much of your time > > one thing i do see is the following. > > > [Wed Nov 14 12:14:49 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: mail in /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.php on line 67, referer: http://localhost/owncloud/ > > thank you very much again. > > gr > Johan > > > > > -----Oorspronkelijk bericht----- > Van: Rudi Floren [mailto:rud...@go...] > Verzonden: woensdag 14 november 2012 11:59 > Aan: Johan Hendriks > CC: pos...@li...; Rudi Floren > Onderwerp: Re: [Postfixadmin-devel] Owncloud Authenticate against postfixadmin database > > Now it should work. :) > > > Am Mittwoch, 14. November 2012 08:52:09 schrieb Johan Hendriks: >> No errors in the http-error.log file. >> The login page returns the forgot password page! >> So that is all working ok. >> >> But still no login. >> >> It gets the password field wrong. >> In my mysql.log file i have this: >> >> tail -f /var/log/mysql/mysql.log | grep hen >> 18882 Query SELECT `uid`, `password` FROM `oc_users` WHERE LOWER(`uid`) = LOWER('j.h...@te...') >> 18883 Query SELECT password FROM mailbox WHERE username = 'j.h...@te...' AND active = '1' >> 18883 Query SELECT username FROM mailbox WHERE username = 'j.h...@te...' AND active = '1' AND password = '$1$$1$d7fc6$1kExrEkwxej2AGTE2FqEo.' >> >> >> >> From mysql itsel i got this: >> mysql> select password from mailbox where username = 'j.h...@te...'; >> +------------------------------------+ >> | password | >> +------------------------------------+ >> | $1$d7fc6e81$n8xTB.YOtAv0VmBvhy/Xv0 | >> +------------------------------------+ >> 1 row in set (0.00 sec) >> >> mysql> >> >> >> thanks again >> >> gr >> Johan >> >> >> >> >> -----Oorspronkelijk bericht----- >> Van: Rudi Floren [mailto:rud...@go...] >> Verzonden: dinsdag 13 november 2012 17:58 >> Aan: Johan Hendriks >> Onderwerp: Re: [Postfixadmin-devel] Owncloud Authenticate against postfixadmin database >> >> Am Dienstag, 13. November 2012 15:37:05 schrieb Johan Hendriks: >>> We are getting close :D >>> >>> If i use the latest file i get the following. >>> >>> [Tue Nov 13 15:29:15 2012] [error] [client 192.168.50.102] PHP Notice: >>> Undefined index: mail in >>> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.php >>> on line 67, referer: http://192.168.50.200/owncloud/ [Tue Nov 13 >>> 15:29:15 2012] [error] [client 192.168.50.102] PHP Notice: Undefined >>> index: username in >>> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.php >>> on line 94, referer: http://192.168.50.200/owncloud/ >>> >>> If i alter the code to >>> # $sql = 'SELECT password FROM mailbox WHERE username = :uid AND active = :active'; >>> $sql = 'SELECT username FROM mailbox WHERE username = :uid AND active = :active'; >>> $sth = $this->db->prepare($sql); >>> if ($sth->execute(array(':uid' => $uid, ':active' => 1))) { >>> $row = $sth->fetch(); >>> if ($row) { >>> $this->setEmail($uid); >>> return $row['username']; >>> >>> Then it works. >>> If i alter the code to >>> $sql = 'SELECT password FROM mailbox WHERE username = :uid AND active = :active'; >>> # $sql = 'SELECT username FROM mailbox WHERE username = :uid AND active = :active'; >>> $sth = $this->db->prepare($sql); >>> if ($sth->execute(array(':uid' => $uid, ':active' => 1))) { >>> $row = $sth->fetch(); >>> if ($row) { >>> $this->setEmail($uid); >>> return $row['password']; Then it works also, >>> except that my data directory is called $1$d7fc6e81$n8xTB.YOtAv0VmBvhy >>> So i guess that the return $row['password'] line gives owncloud the >>> username to use >>> >>> The problem is that it is not using the password field, i can use whatever password i want, owncloud will always let me in. >>> >>> thanks >>> >>> gr >>> johan >>> >>> >>> >>> ________________________________________ >>> Van: Rudi Floren [rud...@go...] >>> Verzonden: dinsdag 13 november 2012 15:05 >>> Aan: Johan Hendriks >>> Onderwerp: Re: [Postfixadmin-devel] Owncloud Authenticate against >>> postfixadmin database >>> >>> Am Dienstag, 13. November 2012 14:53:32 schrieb Johan Hendriks: >>>> After that change i get the following. >>>> >>>> So the line 88 looks like : >>>> if ($sth->execute(array(':uid' => $uid, ':active' => 1))) { >>>> >>>> [Tue Nov 13 14:50:49 2012] [error] [client 192.168.50.102] PHP >>>> Notice: Undefined variable: sth in >>>> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.php >>>> on line 88, referer: http://192.168.50.200/owncloud/ [Tue Nov 13 >>>> 14:50:49 2012] [error] [client 192.168.50.102] PHP Fatal error: Call >>>> to a member function execute() on a non-object in >>>> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.php >>>> on line 88, referer: http://192.168.50.200/owncloud/ >>>> >>>> gr >>>> Johan >>>> >>>> >>>> ________________________________________ >>>> Van: Rudi Floren [rud...@go...] >>>> Verzonden: dinsdag 13 november 2012 14:40 >>>> Aan: Johan Hendriks >>>> CC: pos...@li...; Rudi Floren >>>> Onderwerp: Re: [Postfixadmin-devel] Owncloud Authenticate against >>>> postfixadmin database >>>> >>>> the second = should be => >>>> >>>> Am Dienstag, 13. November 2012 14:39:50 schrieb Johan Hendriks: >>>>> That gives me the following error. >>>>> >>>>> [error] [client 192.168.50.102] PHP Parse error: syntax error, >>>>> unexpected '=', expecting ')' in >>>>> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.php >>>>> on line 88, referer: http://192.168.50.200/owncloud/ >>>>> >>>>> line 88 is >>>>> if ($sth->execute(array(':uid' => $uid, ':active' = 1))) { >>>>> >>>>> thanks >>>>> gr >>>>> Johan >>>>> ________________________________________ >>>>> Van: Rudi Floren [rud...@go...] >>>>> Verzonden: dinsdag 13 november 2012 14:33 >>>>> Aan: Johan Hendriks >>>>> CC: pos...@li...; Christian Boltz >>>>> Onderwerp: Re: [Postfixadmin-devel] Owncloud Authenticate against >>>>> postfixadmin database >>>>> >>>>> I think the problem is the salt. >>>>> >>>>> try this. its untested. >>>>> >>>>> >>>>> Am Dienstag, 13. November 2012 14:19:14 schrieb Johan Hendriks: >>>>>> Thank you, that error is gone now, after that i got the same error on the hex2bin function. >>>>>> Using the same method that error is gone also :D >>>>>> >>>>>> Then i did get a method error on to64, but i solved that also. >>>>>> >>>>>> So everything seems to function. >>>>>> >>>>>> I set the encrypt to md5crypt in postfixadmin, and reset the password for the test user. >>>>>> >>>>>> Then i log on to owncloud using my email adres with the new >>>>>> password set through postfixadmin In the mysql log i see the following: >>>>>> >>>>>> Query SELECT username FROM mailbox WHERE username = 'j.h...@te...' AND password = '$1$6be349d6$tckNf.G6.uv2DqWG1XlpL0' >>>>>> >>>>>> So it look much more like the password that is used, but stil no match. >>>>>> If i look from within mysql itself i get. >>>>>> >>>>>> mysql> select password from mailbox where username = >>>>>> mysql> 'j.h...@te...'; >>>>>> +------------------------------------+ >>>>>> | password | >>>>>> +------------------------------------+ >>>>>> | $1$d7fc6e81$n8xTB.YOtAv0VmBvhy/Xv0 | >>>>>> +------------------------------------+ >>>>>> 1 row in set (0.00 sec) >>>>>> >>>>>> >>>>>> The user_postfixadmin.php file is attached. >>>>>> >>>>>> Thanks you all for your time and patience with me! >>>>>> regards >>>>>> Johan >>>>>> >>>>>> ________________________________________ >>>>>> Van: Christian Boltz [pos...@cb...] >>>>>> Verzonden: maandag 12 november 2012 21:31 >>>>>> Aan: pos...@li... >>>>>> Onderwerp: Re: [Postfixadmin-devel] Owncloud Authenticate against >>>>>> postfixadmin database >>>>>> >>>>>> Hello, >>>>>> >>>>>> Am Freitag, 9. November 2012 schrieb Johan Hendriks: >>>>>>> It does not work, the error i get is [Fri Nov 09 09:32:00 2012] >>>>>>> [error] [client 192.168.50.105] PHP Fatal >>>>>>> error: Call to undefined function create_salt() in >>>>>>> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.p >>>>>>> hp >>>>>>> on line 147 >>>>>>> >>>>>>> I saw in the postfixadmin function.inc.php file the following >>>>>>> >>>>>>> >>>>>>> function create_salt () { >>>>>>> srand ((double) microtime ()*1000000); >>>>>>> $salt = substr (md5 (rand (0,9999999)), 0, 8); >>>>>>> return $salt; >>>>>>> } >>>>>>> >>>>>>> So i thougt i add it at the end of the file, but i keep getting >>>>>>> the error?? >>>>>> >>>>>> You probably added the function inside the class, which means you >>>>>> need to replace all calls of "create_salt" with >>>>>> "OC_User_Postfixadmin::create_salt" >>>>>> >>>>>> >>>>>> Regards, >>>>>> >>>>>> Christian Boltz >>>>>> -- >>>>>> Der Tag hat 24 Stunden und wenn es sein muss, dann arbeiten wir >>>>>> auch noch nachts! >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------- >>>>>> ----------- Monitor your physical, virtual and cloud infrastructure >>>>>> from a single web console. Get in-depth insight into apps, servers, >>>>>> databases, vmware, SAP, cloud infrastructure, etc. Download 30-day >>>>>> Free Trial. >>>>>> Pricing starts from $795 for 25 servers or applications! >>>>>> http://p.sf.net/sfu/zoho_dev2dev_nov >>>>>> _______________________________________________ >>>>>> Postfixadmin-devel mailing list >>>>>> Pos...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------- >>>>>> ----------- Monitor your physical, virtual and cloud infrastructure >>>>>> from a single web console. Get in-depth insight into apps, servers, >>>>>> databases, vmware, SAP, cloud infrastructure, etc. Download 30-day >>>>>> Free Trial. >>>>>> Pricing starts from $795 for 25 servers or applications! >>>>>> http://p.sf.net/sfu/zoho_dev2dev_nov >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Postfixadmin-devel mailing list >>>>>> Pos...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > |