We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Postfix RFC Complaint E-mail IDs

SrikantRajeev
on
Medium Priority
795 Views
Last Modified: 2013-11-10
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.
Comment
Watch Question

Maciej Ssysadmin
CERTIFIED EXPERT

Commented:
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?

Author

Commented:
Error Message:

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

Sample Email ID ->     -pix-10@in.com
Maciej Ssysadmin
CERTIFIED EXPERT

Commented:
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.
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

Author

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.

Author

Commented:
Hi Orlit - How should i change the postfix source to accept mails with -
> 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.
Maciej Ssysadmin
CERTIFIED EXPERT

Commented:
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.
@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.

Author

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.
Maciej Ssysadmin
CERTIFIED EXPERT

Commented:
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.

Author

Commented:
does this command accept mail ID of any format like for example

abc@.point.ne.com & abc.@point.ne.com
Maciej Ssysadmin
CERTIFIED EXPERT

Commented:
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).

Author

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.
Maciej Ssysadmin
CERTIFIED EXPERT

Commented:
As far as I know it's impossible to configure SMTP server in a way, that it will accept emails to invalid domain.

Author

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..
Maciej Ssysadmin
CERTIFIED EXPERT

Commented:
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.

Author

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.
sysadmin
CERTIFIED EXPERT
Commented:
As far as I know, you can't do this.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
thanks
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.