Many e-mail servers, especially corporate ones, do not allow numeric server names in the From address. That’s why Postfix doesn’t allow you to send with a numeric address in the from. You would have to try a couple email services to see which ones have “numeric server names” allowed.
No email server SHOULD allow IP addresses in the From address, and certainly no modern ones are configured this way out of the box, but there might be a system out there somewhere that allows numeric FROM addresses - especially in “hobby shop” or local-use-only mail servers. It would have to be in a place where they turned of the MX check.
I agree that it’s wrong and the sysadmin should be beaten with a cat-6 cable, but it’s still possible to set one up. Since I don’t administer all of the systems out there, I was reticent to say “No”.
Having said that, I agree that it’s dangerous as HECK to allow numeric addresses in a From address.
I’m receiving the error with gmail account:
postfix/sendmail: warning: valid_hostname: numeric hostname: 126.96.36.199
postfix/sendmail: fatal: unable to use my own hostname
It is automatically taking IP of the host
I change main.cf manually by removing
myhostname = 188.8.131.52
in the end of that file
My “SMTP Email Setup” looks like
SMTP Server : Use External SMTP Server
My Hostname: Empty
My Domain: comcastbusiness.net
Username: [email protected]
What is wrong with using a hostname? I don’t understand why you find it so hard to understand it when we keep telling you DON’T DO THAT. I’m serious - usually, I try really hard to be helpful, but I just can’t understand how you can possibly think that an address that ends in digits in a hostname field is going to work.
YOU MUST USE A HOSTNAME - NOT AN IP ADDRESS.
Let me say that another way:
STOP DOING WHAT WE KEEP TELLING YOU NOT TO DO.
Seriously - we are seven messages into this thread and you are posting that you are getting the same error message you got on message 1 - the 5 messages in between told you what the problem was and to not do it. Are you just not reading the messages we are typing?
That issue was resolved by changing the host name.
But now I have a new one
Dec 6 15:25:05 50 postfix/pickup: EF2A86C130B: uid=498 from=
Dec 6 15:25:05 50 postfix/cleanup: EF2A86C130B: message-id=[email protected]
Dec 6 15:25:06 50 postfix/qmgr: EF2A86C130B: from=[email protected], size=485, nrcpt=1 (queue active)
Dec 6 15:25:49 50 postfix/smtp: fatal: open database /etc/postfix/sasl_passwd.db: No such file or directory
Dec 6 15:25:50 50 postfix/master: warning: process /usr/libexec/postfix/smtp pid 18523 exit status 1
Dec 6 15:25:50 50 postfix/master: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Dec 6 15:26:50 50 postfix/smtp: fatal: open database /etc/postfix/sasl_passwd.db: No such file or directory
Dec 6 15:26:51 50 postfix/master: warning: process /usr/libexec/postfix/smtp pid 18589 exit status 1
Dec 6 15:26:51 50 postfix/master: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
I changed sasl_passwd to sasl_passwd.db and now I have a new issue
Dec 15 16:05:44 50 postfix/smtp: fatal: open database /etc/postfix/sasl_passwd.db: Invalid argument
Dec 15 16:05:45 50 postfix/master: warning: process /usr/libexec/postfix/smtp pid 26381 exit status 1
Dec 15 16:05:45 50 postfix/master: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Dec 15 16:06:02 50 postfix/pickup: 5BF126C1E01: uid=498 from=
Dec 15 16:06:02 50 postfix/cleanup: 5BF126C1E01: message-id=[email protected]
Dec 15 16:06:02 50 postfix/qmgr: 5BF126C1E01: from=[email protected], size=471, nrcpt=1 (queue active)
This means that the database file that contains your password does not actually exist…
Normally if this file was not supposed to be updated/generated by FreePBX you would issue a
or something similar (it might not be a hash table) to generate tjhis file from the content of /etc/postfix/sasl_passwd.
But as far as I know this should all be done for you by FreePBX…
I guess you could renote your PBX and check if /etc/postfix/sasl_passwd exists, what its content is (is it the user and password you expect) and try to issue the postmap line I gave you above to see if it gives any error…
This actually tells Postfix to load the /etc/postfix/sasl_passwd.db (note the added .db) as an hash file…
Normally you generate the sasl_passwd.db file from the sasl_passwd file by typing this
but this should be done by FreePBX for you…
Even though I don’t have a gmail account I tried to fake having one and provide login info and it didn’t quite behave like I expected it to… It was doing absolutely nothing with the login info when said I had a gmail account, I had to choose “other” for it to behave a little more like I expected…
(I usually use my own mail server so I don’t have to use authentication…)
Can you please provide a screen capture of how you configure this (hide what you might think is sensitive)?
Can you also recheck those files? sasl_passwd should be in plain text, sasl_passwd.db should definitely contain binary data…