Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Disable check sender address syntax

1,105 views
Skip to first unread message

Michal Kurka

unread,
Nov 1, 2012, 11:05:18 AM11/1/12
to
Hello.
I need accept incoming mails with invalid envelope sender address. But
Postfix reject these mails:

MAIL FROM: <@168.1.150>
501 5.1.7 Bad sender address syntax

I used "sender_canonical_maps" with record
@168.1.150 us...@domain.tld
but this isn't enough.

(In old version Postfix (2.1.5) it was enough.)

How can I solve this now?

With regards
--
Michal Kurka - Mysak
sluzby spojene s operacnim systemem Linux

Benny Pedersen

unread,
Nov 1, 2012, 11:18:20 AM11/1/12
to
Michal Kurka skrev den 01-11-2012 16:05:
> Hello.
> I need accept incoming mails with invalid envelope sender
> address. But
> Postfix reject these mails:
>
> MAIL FROM: <@168.1.150>
> 501 5.1.7 Bad sender address syntax

add [] around hostname

sillyexample@[127.0.0.1]

Michal Kurka

unread,
Nov 1, 2012, 11:48:59 AM11/1/12
to
Dne 1.11.2012 v 16:18 Benny Pedersen napsal(a):
Unfortunately I cannot set up that mail client which sending this ugly
address. It always send MAIL FROM: <@168.1.150>

Viktor Dukhovni

unread,
Nov 1, 2012, 11:56:39 AM11/1/12
to
On Thu, Nov 01, 2012 at 04:05:18PM +0100, Michal Kurka wrote:

> Hello.
> I need accept incoming mails with invalid envelope sender address. But
> Postfix reject these mails:
>
> MAIL FROM: <@168.1.150>
> 501 5.1.7 Bad sender address syntax

http://www.postfix.org/postconf.5.html#smtpd_command_filter

--
Viktor.

Reindl Harald

unread,
Nov 1, 2012, 12:01:08 PM11/1/12
to


Am 01.11.2012 16:48, schrieb Michal Kurka:
> Dne 1.11.2012 v 16:18 Benny Pedersen napsal(a):
>
>> Michal Kurka skrev den 01-11-2012 16:05:
>>> Hello.
>>> I need accept incoming mails with invalid envelope sender address. But
>>> Postfix reject these mails:
>>>
>>> MAIL FROM: <@168.1.150>
>>> 501 5.1.7 Bad sender address syntax
>>
>> add [] around hostname
>>
>> sillyexample@[127.0.0.1]
>
> Unfortunately I cannot set up that mail client which sending this ugly
> address. It always send MAIL FROM: <@168.1.150>

why not?
are you not the admin of this client?

if so then tell the admin if he wants to send mail
to you he has to play with your rules and not with his

signature.asc

Benny Pedersen

unread,
Nov 1, 2012, 12:32:39 PM11/1/12
to
Michal Kurka skrev den 01-11-2012 16:48:

> Unfortunately I cannot set up that mail client which sending this
> ugly
> address. It always send MAIL FROM: <@168.1.150>

and telnet 168.1.150 25 works ?

have you invented ipv3 for mobilephones ? :)

it should be possible to make it contain valid sender address

Claus Assmann

unread,
Nov 1, 2012, 12:37:46 PM11/1/12
to
>address. It always send MAIL FROM: <@168.1.150>

Which also has a command syntax error: space after colon is invalid.
This is explicitly listed in RFC 5321, pg.20:

Since it has been a common source of errors, it is worth noting that
spaces are not permitted on either side of the colon following FROM
in the MAIL command or TO in the RCPT command. The syntax is exactly
as given above.

You might want to contact the author of that garbage...

Michal Kurka

unread,
Nov 1, 2012, 12:44:33 PM11/1/12
to
Dne 1.11.2012 v 15:56 Viktor Dukhovni napsal(a):

> > I need accept incoming mails with invalid envelope sender address. But
> > Postfix reject these mails:
> >
> > MAIL FROM: <@168.1.150>
> > 501 5.1.7 Bad sender address syntax
>
> http://www.postfix.org/postconf.5.html#smtpd_command_filter

Yes, nice solution, thanks for a link!

But is some solution for Postfix version <2.7 (and >2.1), if upgrade
isn't possible?


Dne 1.11.2012 v 17:01 Reindl Harald napsal(a):

> >> add [] around hostname
> >>
> >> sillyexample@[127.0.0.1]
> >
> > Unfortunately I cannot set up that mail client which sending this ugly
> > address. It always send MAIL FROM: <@168.1.150>
>
> why not? are you not the admin of this client?

Bad mail client is encapsulated in a proprietary application.


Dne 1.11.2012 v 17:32 Benny Pedersen napsal(a):

> > Unfortunately I cannot set up that mail client which sending this ugly
> > address. It always send MAIL FROM: <@168.1.150>
>
> and telnet 168.1.150 25 works ?
> have you invented ipv3 for mobilephones ? :)

Yes, author of mail client had a sense of humor :-)

> it should be possible to make it contain valid sender address

Yes, should be. But it isn't :-(

Viktor Dukhovni

unread,
Nov 1, 2012, 12:48:22 PM11/1/12
to
On Thu, Nov 01, 2012 at 05:44:33PM +0100, Michal Kurka wrote:

> > > MAIL FROM: <@168.1.150>
> > > 501 5.1.7 Bad sender address syntax
> >
> > http://www.postfix.org/postconf.5.html#smtpd_command_filter
>
> Yes, nice solution, thanks for a link!
>
> But is some solution for Postfix version <2.7 (and >2.1), if upgrade
> isn't possible?

Upgrades are always *possible*. You just need to be sufficiently
motivated. Which is more pain, rejecting the mail, or doing the
upgrade?

Another option is to point the mail at a different server, which
is upgraded, or at a proxy that performs the same sender "address"
(what the application sends is not an address) transformation.

--
Viktor.

Reindl Harald

unread,
Nov 1, 2012, 12:57:09 PM11/1/12
to


Am 01.11.2012 17:44, schrieb Michal Kurka:
> Dne 1.11.2012 v 15:56 Viktor Dukhovni napsal(a):
>>> I need accept incoming mails with invalid envelope sender address. But
>>> Postfix reject these mails:
>>>
>>> MAIL FROM: <@168.1.150>
>>> 501 5.1.7 Bad sender address syntax
>>
>> http://www.postfix.org/postconf.5.html#smtpd_command_filter
>
> Yes, nice solution, thanks for a link!
>
> But is some solution for Postfix version <2.7 (and >2.1), if upgrade
> isn't possible?

why should a upgrade not be possible?

postfix is damned stable from the view of compatibility
builing a postfix package with the tools of your
distribution should be easy, i am doing this since
i started with mailservers some years ago because
the fedora packages are missing mysql support or
at least missed it years ago

postfix-2.8.10-1.fc15: newest official package for F15
postfix-2.8.12-1.fc16: newest official package for F16

update history of this year:
Feb 01 20:41:03 Updated: 2:postfix-2.8.8-2.fc15.20120201.rh.x86_64
Feb 05 02:53:32 Updated: 2:postfix-2.9.0-2.fc15.20120205.rh.x86_64
Feb 12 19:57:33 Updated: 2:postfix-2.9.0-2.fc15.20120212.rh.x86_64
Feb 22 20:10:20 Updated: 2:postfix-2.9.1-2.fc15.20120222.rh.x86_64
Mar 27 01:08:16 Updated: 2:postfix-2.9.1-3.fc16.20120325.rh.x86_64
Apr 25 22:27:31 Updated: 2:postfix-2.9.2-3.fc16.20120425.rh.x86_64
May 22 12:38:08 Updated: 2:postfix-2.9.3-3.fc16.20120522.rh.x86_64
Aug 03 12:18:02 Updated: 2:postfix-2.9.4-3.fc16.20120803.rh.x86_64
Oct 17 21:48:11 Updated: 2:postfix-2.9.4-3.fc17.20121016.rh.x86_64

>>> Unfortunately I cannot set up that mail client which sending this ugly
>>> address. It always send MAIL FROM: <@168.1.150>
>>
>> why not? are you not the admin of this client?
>
> Bad mail client is encapsulated in a proprietary application.

make a bug-report at the company who is responsible
for this useless crap with silly defaults and lack
of configuration

>> and telnet 168.1.150 25 works ?
>> have you invented ipv3 for mobilephones ? :)
>
> Yes, author of mail client had a sense of humor :-)

the author does not have humor - he is missing any qualification
to write a mail-client and finally even take money for his crap

signature.asc

Michal Kurka

unread,
Nov 1, 2012, 2:06:04 PM11/1/12
to
Dne 1.11.2012 v 09:37 Claus Assmann napsal(a):

> >address. It always send MAIL FROM: <@168.1.150>
>
> Which also has a command syntax error: space after colon is invalid.

Yes. Fortunately Postfix this tolerates.


Dne 1.11.2012 v 16:48 Viktor Dukhovni napsal(a):

> > But is some solution for Postfix version <2.7 (and >2.1), if upgrade
> > isn't possible?
>
> Upgrades are always *possible*. You just need to be sufficiently
> motivated. Which is more pain, rejecting the mail, or doing the
> upgrade?

It's true. But sometimes this stance isn't good.


Dne 1.11.2012 v 17:57 Reindl Harald napsal(a):

> > But is some solution for Postfix version <2.7 (and >2.1), if upgrade
> > isn't possible?
>
> why should a upgrade not be possible?

If server has older system, then upgrade means either reinstall whole
server or compile new version Postfix and hope no earlier glibc needed -
both variants expensive for me.

> > Bad mail client is encapsulated in a proprietary application.
>
> make a bug-report at the company who is responsible
> for this useless crap with silly defaults and lack
> of configuration

Yes, of course bug-report was created before one year. Author of
application is too big company and I too small company. Official answer is
- with Gmail no problem. I like Postfix more than Gmail ;-)

Viktor Dukhovni

unread,
Nov 1, 2012, 2:09:34 PM11/1/12
to
On Thu, Nov 01, 2012 at 07:06:04PM +0100, Michal Kurka wrote:

> Dne 1.11.2012 v 16:48 Viktor Dukhovni napsal(a):
>
> > > But is some solution for Postfix version <2.7 (and >2.1), if upgrade
> > > isn't possible?
> >
> > Upgrades are always *possible*. You just need to be sufficiently
> > motivated. Which is more pain, rejecting the mail, or doing the
> > upgrade?
>
> It's true. But sometimes this stance isn't good.

Not the case with Postfix. Postfix still compiles on very old
operating systems, until recently (and perhaps still) these included
SunOS 4.1.3 which was last released 20 years ago.

> > why should a upgrade not be possible?
>
> If server has older system, then upgrade means either reinstall whole
> server or compile new version Postfix and hope no earlier glibc needed -
> both variants expensive for me.

Postfix will work on your relatively young system, it is probably less
than a decade old.

--
Viktor.

/dev/rob0

unread,
Nov 1, 2012, 3:15:51 PM11/1/12
to
On Thu, Nov 01, 2012 at 07:06:04PM +0100, Michal Kurka wrote:
> Dne 1.11.2012 v 17:57 Reindl Harald napsal(a):
>
> > > But is some solution for Postfix version <2.7 (and >2.1), if
> > > upgrade isn't possible?
> >
> > why should a upgrade not be possible?
>
> If server has older system, then upgrade means either reinstall
> whole server or compile new version Postfix and hope no earlier
> glibc needed - both variants expensive for me.

FWIW, I have been running snapshots up to and including 2.10 on a
Slackware 10.0 host. That's old. Only thing close to a problem I
remember was something about the ancient openssl, but it wasn't a
major problem, which is why I can't remember the fix. :)

> > > Bad mail client is encapsulated in a proprietary application.
> >
> > make a bug-report at the company who is responsible
> > for this useless crap with silly defaults and lack
> > of configuration
>
> Yes, of course bug-report was created before one year. Author of
> application is too big company and I too small company. Official
> answer is - with Gmail no problem. I like Postfix more than Gmail
> ;-)

Perhaps, but you can't always expect Postfix to fix other bad
programming.
--
http://rob0.nodns4.us/ -- system administration and consulting
Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Wietse Venema

unread,
Nov 1, 2012, 7:29:55 PM11/1/12
to
Michal Kurka:
> Hello.
> I need accept incoming mails with invalid envelope sender address. But
> Postfix reject these mails:
>
> MAIL FROM: <@168.1.150>
> 501 5.1.7 Bad sender address syntax
>
> I used "sender_canonical_maps" with record
> @168.1.150 us...@domain.tld
> but this isn't enough.
>
> (In old version Postfix (2.1.5) it was enough.)
>
> How can I solve this now?

The SMTP server supports command rewriting with regular expressions.
It was created for cases like this (and for testing such cases).

smtpd_command_filter (default: empty)
A mechanism to transform commands from remote SMTP clients. This is a
last-resort tool to work around client commands that break inter-oper-
ability with the Postfix SMTP server. Other uses involve fault injec-
tion to test Postfix's handling of invalid commands.

Specify the name of a "type:table" lookup table. The search string is
the SMTP command as received from the remote SMTP client, except that
initial whitespace and the trailing <CR><LF> are removed. The result
value is executed by the Postfix SMTP server.

See also the examples of things that don't need smtpd_command_filter,
and of things that do.

Wietse

0 new messages