Postfix RFC Complaint E-mail IDs

We are running postfix . With postfix when sending mails to e-mail IDs which are not of RFC complaints it is rejecting the mails.

Is there any way to solve this so that postfix will not follow the  RFC standards & it should relay any mail format.
LVL 1
SrikantRajeevAsked:
Who is Participating?
 
Maciej SsysadminCommented:
As far as I know, you can't do this.
0
 
Maciej SsysadminCommented:
What do you mean by 'e-mail IDs'? Do you mean message id, or email address? If message id - postfix shouldn't complain about them at all.
Can you write sample 'e-mail ID' which causes that postfix rejects such email? What is exact error message from postfix when such email is rejected?
0
 
SrikantRajeevAuthor Commented:
Error Message:

postfix/smtpd[29995]: warning: Illegal address syntax from

Sample Email ID ->     -pix-10@in.com
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
Maciej SsysadminCommented:
That first '-' is problematic character. As far as I know, there is no option in postfix to accept such email address. The only way would be to change postfix's source.
0
 
thehagmanCommented:
Hm, it says "warning", not "error" - are you sure this is the true problem?

Moreover, I think -pix-10@in.com is valid according to RFC5322:



atext           =   ALPHA / DIGIT /   
                       "!" / "#" /    
                       "$" / "%" /    
                       "&" / "'" /
                       "*" / "+" /
                       "-" / "/" /
                       "=" / "?" /
                       "^" / "_" /
                       "`" / "{" /
                       "|" / "}" /
                       "~"
 
=>  each of  "-" "p" "i" "x" "1" "0" "i" "n" "c" "o" "m"   is atext
 
dot-atom-text   =   1*atext *("." 1*atext)
=>  each of  "-pix-10" "in.com"  is dot-atom-text
 
dot-atom        =   [CFWS] dot-atom-text [CFWS]
=>  each of  "-pix-10" "in.com"  is dot-atom
 
local-part      =   dot-atom / quoted-string / obs-local-part
=>  "-pix-10"  is valid local-part
 
domain          =   dot-atom / domain-literal / obs-domain
=> "in.com"  is valid domain
 
addr-spec       =   local-part "@" domain
=> "-pix-10@in.com" is valid addr-spec

Open in new window

0
 
SrikantRajeevAuthor Commented:
Yes this is a true problem. My mails are not getting delievered. Postfix is deleting the messages.
How you derived that the e-mail ID is valid.
0
 
SrikantRajeevAuthor Commented:
Hi Orlit - How should i change the postfix source to accept mails with -
0
 
thehagmanCommented:
> How you derived that the e-mail ID is valid.

I quoted the syntax for email addresses from the relevant RFC and listed the productions actually used. This of course does only guarantee that the address is syntactically valid - not that a mailbox actually exists.
0
 
Maciej SsysadminCommented:
thehagman:
"Warning" is in postfix logfile, but client gets '501 5.1.3 Bad recipient address syntax" error message.

As for SMTPs RFC documents - if I remember correctly, last RFC about SMTP protocol is 2821, not 5322 (correct me if I'm wrong). But even if it's not 5322 rfc but 2821/821, you may be right - I can't find anything about 'minus' as first character - rfc2821 specifies few characters, that can't be used in local-part of email's address, but '-' is not one of them.
I think it can be postfix issue - I checked this on exim4 and exim accepted such recipient.

SrikantRajeev - I'm afraid I can't help you with changing postfix's sources - I'm not programmer.
0
 
thehagmanCommented:
@oklit:  RFC5321/2 seem to be recent revisions of  RFC2821/2 - http://tools.ietf.org/html/rfc5321 http://tools.ietf.org/html/rfc5322
I did not check for any differences however; if at all they will hardly affect the syntax of SMTP addresses.
0
 
SrikantRajeevAuthor Commented:
is there any way in postfix so that the configuration change will not lookup for the syntax of the e-mai IDs.
i.e validation of the e-mail IDs will not take place.
0
 
Maciej SsysadminCommented:
I looked through postfix documentation once again, and... found it :)
allow_min_user is option you are looking for. By default it's set to 'no'. Edit your main.cf, add "allow_min_user = yes" line, and do postfix reload. Should be ok.
0
 
SrikantRajeevAuthor Commented:
does this command accept mail ID of any format like for example

abc@.point.ne.com & abc.@point.ne.com
0
 
Maciej SsysadminCommented:
allow_min_user is option which lets you use addresses which begins with '-' character. It doesn't change anything else.
Address abc.@point.ne.com is valid, so it should be accepted by default.
Address abc@.point.ne.com is invalid, and won't be accepted by postfix for sure (checked also sendmail and exim - they doesn't accept such mail also).
0
 
SrikantRajeevAuthor Commented:
Thanks the command allow_min_user works for "-"

Is there any way postfix can accpet mails from abc@.point.ne.com
Is there any work around.
0
 
Maciej SsysadminCommented:
As far as I know it's impossible to configure SMTP server in a way, that it will accept emails to invalid domain.
0
 
SrikantRajeevAuthor Commented:
By default, the Postfix SMTP server accepts RFC 822 syntax in MAIL FROM and RCPT TO addresses.

what will happen if i set the command "strict_rfc821_envelopes = yes"

I want the postfix to not follow the RFC 822 standard..
0
 
Maciej SsysadminCommented:
From documentation:
strict_rfc821_envelopes (default: no)
Require that addresses received in SMTP MAIL FROM and RCPT TO commands are enclosed with <>, and that those addresses do not contain RFC 822 style comments or phrases. This stops mail from poorly written software.
By default, the Postfix SMTP server accepts RFC 822 syntax in MAIL FROM and RCPT TO addresses.

Mentioned part of RFC 822: http://tools.ietf.org/html/rfc822#section-3.3

Changing this option won't cause that postfix will accept email address with '.' in front of domain part.
0
 
SrikantRajeevAuthor Commented:
My main aim is to configure my postfix so that i can send mails to any receipients irrrespective of their syntax of the receipient.
My postfix should not check for the sysntax of the receipient e-mail ID that I am sending out.
0
 
SrikantRajeevAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.