Weird postfix problem when upgrading to Squeeze
Hi guys,
The weirdest thing happened today with postfix when upgrading our mail relay from Lenny to Squeeze. My main.cf has a mynetworks directive specifying which servers can relay without authenticating. It looked like this: mynetworks = 127.0.0.0/8 x.x.x.x x.x.x.x x.x.x.x When I upgraded, things stopped working. After enabling smtpd debug, I found that the new postfix was matching only the first line of the directive. The previous postfix version was working flawlessly. When I changed this line to: mynetworks = 127.0.0.0/8 x.x.x.x x.x.x.x x.x.x.x x.x.x.x things went back normal. The odd fact is that in the postfix manual it is stated that: [0] - "Mynetworks - Specify a list of network addresses or network/netmask patterns, separated by commas and/or whitespace. Continue long lines by starting the next line with whitespace." Did somebody have this problem? Is this behavior expected? Am I missing something here? Thanks! [0] - http://www.postfix.org/postconf.5.html#mynetworks -- Pedro Eugênio Rocha -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: http://lists.debian.org/CAM3FfDxS18nDkP_1ryOOJhdBSTON=6iic=mybY_YmgU-VqGK4Q@mail.gmail.com |
Weird postfix problem when upgrading to Squeeze
On Mon, 03 Sep 2012 17:20:34 -0300, Pedro Eugênio Rocha wrote:
> The weirdest thing happened today with postfix when upgrading our mail > relay from Lenny to Squeeze. My main.cf has a mynetworks directive > specifying which servers can relay without authenticating. It looked > like this: > > mynetworks = 127.0.0.0/8 > x.x.x.x > x.x.x.x > x.x.x.x And that was working fine for all the IP addresses? :-? > When I upgraded, things stopped working. After enabling smtpd debug, I > found that the new postfix was matching only the first line of the > directive. The previous postfix version was working flawlessly. When I > changed this line to: > > mynetworks = 127.0.0.0/8 x.x.x.x x.x.x.x x.x.x.x x.x.x.x This is the format I always use. > things went back normal. The odd fact is that in the postfix manual it > is stated > that: > > [0] - "Mynetworks - Specify a list of network addresses or > network/netmask patterns, separated by commas and/or whitespace. > Continue long lines by starting the next line with whitespace." > > Did somebody have this problem? Is this behavior expected? Am I missing > something here? Mmmm... there has to be something wrong (then or now) given the other format worked for you but after reading the decription from Postfix manual I understand the allowed options (regarding long lines) are either: # long lines mynetworks = ip/block ip ip/block ip ip/block ip ip/block ip ip/block ip ^ (whitespace goes up there) # long lines mynetworks = ip/block, ip, ip/block, ip, ip/block, ip, ip/block, ip, ip/block,ip ^ (white space goes up there) And Postfix is very nitpitcky with the correctness of the file formats :-) Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: http://lists.debian.org/k253db$kaf$2@ger.gmane.org |
Weird postfix problem when upgrading to Squeeze
On Tue, Sep 4, 2012 at 11:32 AM, Camaleón <noelamac@gmail.com> wrote:
> On Mon, 03 Sep 2012 17:20:34 -0300, Pedro Eugênio Rocha wrote: > >> The weirdest thing happened today with postfix when upgrading our mail >> relay from Lenny to Squeeze. My main.cf has a mynetworks directive >> specifying which servers can relay without authenticating. It looked >> like this: >> >> mynetworks = 127.0.0.0/8 >> x.x.x.x >> x.x.x.x >> x.x.x.x > > And that was working fine for all the IP addresses? :-? Yes. It had worked for a couple of years... o.O > >> When I upgraded, things stopped working. After enabling smtpd debug, I >> found that the new postfix was matching only the first line of the >> directive. The previous postfix version was working flawlessly. When I >> changed this line to: >> >> mynetworks = 127.0.0.0/8 x.x.x.x x.x.x.x x.x.x.x x.x.x.x > > This is the format I always use. > >> things went back normal. The odd fact is that in the postfix manual it >> is stated >> that: >> >> [0] - "Mynetworks - Specify a list of network addresses or >> network/netmask patterns, separated by commas and/or whitespace. >> Continue long lines by starting the next line with whitespace." >> >> Did somebody have this problem? Is this behavior expected? Am I missing >> something here? > > Mmmm... there has to be something wrong (then or now) given the other > format worked for you but after reading the decription from Postfix > manual I understand the allowed options (regarding long lines) are either: > > # long lines > mynetworks = ip/block ip ip/block ip ip/block ip ip/block ip > ip/block ip > ^ > (whitespace goes up there) > > # long lines > mynetworks = ip/block, ip, ip/block, ip, ip/block, ip, ip/block, ip, > ip/block,ip > ^ > (white space goes up there) > > And Postfix is very nitpitcky with the correctness of the file formats :-) The weirdest thing is that it was working before the upgrade. Anyway, just changing the format solves the problem, but finding where the problem was gave me some headache and some email lost. :-} Best, > > Greetings, > > -- > Camaleón > > > -- > To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org > Archive: http://lists.debian.org/k253db$kaf$2@ger.gmane.org > -- Pedro Eugênio Rocha -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: http://lists.debian.org/CAM3FfDwwxemn=-Kufj_+HFbe7ktrA4j+BtPd4rTpVc7r5wZuWw@mail.gmail.co m |
Weird postfix problem when upgrading to Squeeze
On 9/3/2012 3:20 PM, Pedro Eugênio Rocha wrote:
> Hi guys, > > The weirdest thing happened today with postfix when upgrading our mail > relay from Lenny to Squeeze. My main.cf has a mynetworks directive > specifying which servers can relay without authenticating. It looked like this: > > mynetworks = 127.0.0.0/8 > x.x.x.x > x.x.x.x > x.x.x.x > > When I upgraded, things stopped working. After enabling smtpd debug, > I found that the new postfix was matching only the first line of the directive. > The previous postfix version was working flawlessly. When I changed this > line to: > > mynetworks = 127.0.0.0/8 x.x.x.x x.x.x.x x.x.x.x x.x.x.x > > things went back normal. The odd fact is that in the postfix manual it > is stated > that: > > [0] - "Mynetworks - Specify a list of network addresses or network/netmask > patterns, separated by commas and/or whitespace. Continue long lines by > starting the next line with whitespace." > > Did somebody have this problem? Is this behavior expected? Am I missing > something here? You likely had trailing white space after 127.0.0.0/8 which is not allowed. Did you check your postfix logs? -- Stan -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 504638A5.3090509@hardwarefreak.com">http://lists.debian.org/504638A5.3090509@hardwarefreak.com |
Weird postfix problem when upgrading to Squeeze
On 9/4/2012 10:58 AM, Pedro Eugênio Rocha wrote:
> The weirdest thing is that it was working before the upgrade. Anyway, just > changing the format solves the problem, but finding where the problem was > gave me some headache and some email lost. :-} http://www.postfix.org/postconf.5.html Each logical line is in the form "parameter = value". Whitespace around the "=" is ignored, as is whitespace at the end of a logical line. Empty lines and whitespace-only lines are ignored, as are lines whose first non-whitespace character is a `#'. A logical line starts with non-whitespace text. A line that starts with whitespace continues a logical line. Reading that carefully reveals your problem, which I already explained. Whitespace at the end of a line terminates the line, making it a logical line. Therefore, you cannot continue that logical line. Therefore, the leading space on the following 3 lines causes Postfix to ignore them, because logical lines begin with non-whitespace characters. Thus, never use trailing whitespace in a Postfix configuration file. Recent versions of Postfix are much pickier about enforcing main/master.cf syntax. Postfix 2.9 even informs you of deprecated and unused parameter definitions in your config files. -- Stan -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 50463D68.7090401@hardwarefreak.com">http://lists.debian.org/50463D68.7090401@hardwarefreak.com |
Weird postfix problem when upgrading to Squeeze
Hi Stan,
I guess that explains the odd behavior. Probably the former version did not enforce that restriction. Thanks for the explanation Best, On Tue, Sep 4, 2012 at 2:42 PM, Stan Hoeppner <stan@hardwarefreak.com> wrote: > On 9/4/2012 10:58 AM, Pedro Eugênio Rocha wrote: > >> The weirdest thing is that it was working before the upgrade. Anyway, just >> changing the format solves the problem, but finding where the problem was >> gave me some headache and some email lost. :-} > > http://www.postfix.org/postconf.5.html > > Each logical line is in the form "parameter = value". Whitespace around > the "=" is ignored, as is whitespace at the end of a logical line. > > Empty lines and whitespace-only lines are ignored, as are lines whose > first non-whitespace character is a `#'. > > A logical line starts with non-whitespace text. A line that starts with > whitespace continues a logical line. > > > Reading that carefully reveals your problem, which I already explained. > Whitespace at the end of a line terminates the line, making it a > logical line. Therefore, you cannot continue that logical line. > Therefore, the leading space on the following 3 lines causes Postfix to > ignore them, because logical lines begin with non-whitespace characters. > > Thus, never use trailing whitespace in a Postfix configuration file. > Recent versions of Postfix are much pickier about enforcing > main/master.cf syntax. Postfix 2.9 even informs you of deprecated and > unused parameter definitions in your config files. > > -- > Stan > > > -- Pedro Eugênio Rocha -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: CAM3FfDw7_kELHinS4jo9BFCt1hEh7Vvd7+fWUTZtpUd7Y+eOz g@mail.gmail.com">http://lists.debian.org/CAM3FfDw7_kELHinS4jo9BFCt1hEh7Vvd7+fWUTZtpUd7Y+eOz g@mail.gmail.com |
Weird postfix problem when upgrading to Squeeze
Stan Hoeppner <stan@hardwarefreak.com> writes:
> On 9/4/2012 10:58 AM, Pedro Eugênio Rocha wrote: > >> The weirdest thing is that it was working before the upgrade. Anyway, just >> changing the format solves the problem, but finding where the problem was >> gave me some headache and some email lost. :-} > > http://www.postfix.org/postconf.5.html > > Each logical line is in the form "parameter = value". Whitespace around > the "=" is ignored, as is whitespace at the end of a logical line. > > Empty lines and whitespace-only lines are ignored, as are lines whose > first non-whitespace character is a `#'. > > A logical line starts with non-whitespace text. A line that starts with > whitespace continues a logical line. > > > Reading that carefully reveals your problem, which I already explained. > Whitespace at the end of a line terminates the line, making it a > logical line. That's flawed: If whitespace at the end of a line is ignored, it cannot terminate the line and you can have as much whitespace as you like at the end of lines. > Therefore, you cannot continue that logical line. > Therefore, the leading space on the following 3 lines causes Postfix to > ignore them, because logical lines begin with non-whitespace characters. You say above that a line starting with whitespace continues a logical --- I would call it a virtual --- line. If the virtual line was already terminated because there was (non-ignored) whitespace before(!) the end of the line (whatever "end of the line" means; there is really no whitespace in that sense /in between/ lines), then an error should have been reported instead of just ignoring "random" lines that are not whitespace-only and do not begin with a '#'. In case the devs of postfix have made a conscious decision to make use of whitespace in such an unusual way, I'd rather not use postfix because I'd be in for too many surprises. -- Debian testing amd64 -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 877gs92to3.fsf@yun.yagibdah.de">http://lists.debian.org/877gs92to3.fsf@yun.yagibdah.de |
| All times are GMT. The time now is 12:24 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.