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[29752]: warning: valid_hostname: numeric hostname: 50.111.111.81
postfix/sendmail[29752]: fatal: unable to use my own hostname
It is automatically taking IP of the host
I change main.cf manually by removing
myhostname = 50.111.111.81
in the end of that file
My “SMTP Email Setup” looks like
SMTP Server : Use External SMTP Server
My Hostname: Empty
My Origin:50-111-111-81.static.comcastbusiness.net
My Domain: comcastbusiness.net
Provider: Gmail
Username: [email protected]
Password:******
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?
In the previous post I said that I’m not using it. System automatically adding it and I have no idea why. Also I remove myhostname = 50.111.111.81 in the main.cf.
That issue was resolved by changing the host name.
But now I have a new one
Dec 6 15:25:05 50 postfix/pickup[18107]: EF2A86C130B: uid=498 from=
Dec 6 15:25:05 50 postfix/cleanup[18481]: EF2A86C130B: message-id=20161206212505.EF2A86C130B@company
Dec 6 15:25:06 50 postfix/qmgr[18108]: EF2A86C130B: from=[email protected], size=485, nrcpt=1 (queue active)
Dec 6 15:25:49 50 postfix/smtp[18523]: fatal: open database /etc/postfix/sasl_passwd.db: No such file or directory
Dec 6 15:25:50 50 postfix/master[17614]: warning: process /usr/libexec/postfix/smtp pid 18523 exit status 1
Dec 6 15:25:50 50 postfix/master[17614]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Dec 6 15:26:50 50 postfix/smtp[18589]: fatal: open database /etc/postfix/sasl_passwd.db: No such file or directory
Dec 6 15:26:51 50 postfix/master[17614]: warning: process /usr/libexec/postfix/smtp pid 18589 exit status 1
Dec 6 15:26:51 50 postfix/master[17614]: 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[26381]: fatal: open database /etc/postfix/sasl_passwd.db: Invalid argument
Dec 15 16:05:45 50 postfix/master[17614]: warning: process /usr/libexec/postfix/smtp pid 26381 exit status 1
Dec 15 16:05:45 50 postfix/master[17614]: warning: /usr/libexec/postfix/smtp: bad command startup – throttling
Dec 15 16:06:02 50 postfix/pickup[24769]: 5BF126C1E01: uid=498 from=
Dec 15 16:06:02 50 postfix/cleanup[26446]: 5BF126C1E01: message-id=20161215220602.5BF126C1E01@Y
Dec 15 16:06:02 50 postfix/qmgr[20199]: 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
postmap hash:/etc/postfix/sasl_passwd
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
postmap hash:/etc/postfix/sasl_passwd
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…
I just changed my IP adress to 123.456.67.890 and password
The first two screenshots are showing my sysadmin tab and the third the postfix folder. Also I already changed back sasl_passwd.db to sasl_passwd like it was before
Thanks! That command helped me to generate sasl_passwd.db
But now I have new errors
Dec 21 10:10:21 50 postfix/pickup[8307]: 47F906C1E0B: uid=498 from=
Dec 21 10:10:21 50 postfix/cleanup[8536]: 47F906C1E0B: message-id=20161221161021.47F906C1E0B@Y
Dec 21 10:10:21 50 postfix/qmgr[8308]: 47F906C1E0B: from=[email protected], size=471, nrcpt=1 (queue active)
Dec 21 10:10:21 50 postfix/smtp[8538]: warning: SASL authentication failure: No worthy mechs found
Dec 21 10:10:21 50 postfix/smtp[8538]: 47F906C1E0B: SASL authentication failed; cannot authenticate to server smtp.gmail.com[2607:f8b0:4001:c02::6c]: no mechanism available
Dec 21 10:10:21 50 postfix/smtp[8538]: warning: SASL authentication failure: No worthy mechs found
Dec 21 10:10:21 50 postfix/smtp[8538]: 47F906C1E0B: SASL authentication failed; cannot authenticate to server smtp.gmail.com[74.125.70.109]: no mechanism available
Dec 21 10:10:22 50 postfix/smtp[8538]: warning: SASL authentication failure: No worthy mechs found
Dec 21 10:10:22 50 postfix/smtp[8538]: 47F906C1E0B: to=[email protected], relay=smtp.gmail.com[74.125.70.108]:587, delay=0.96, delays=0.13/0.06/0.76/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.gmail.com[74.125.70.108]: no mechanism available)
Packages cyrus-sasl, cyrus-sasl-lib and cyrus-sasl-plain are installed.
Here is the bottom of main.cfg
Finally! After removing “noplaintext” from “smtp_sasl_security_options =” I received test e-mail!
Thank you Marble and everybody who was helping me !!!
Don’t directly update that setting there, this will surely get overwritten the next time FreePBX regenerates those files…
Back when I did a lot of MTA (mail server) administration I never played with SASL so I had to read up on it a little…
It sounds like the authentification to gmail server has to be done in plain text (it is still in TLS though so the point is moot) which is why Postfix was complaining with “noplaintext”.
(From what I understood you asked it not to use plain text and it’s the only thing it would be able to negotiate with gmail’s servers…)
You actually told FreePBX to put it there by putting “Requires both” in “SASL security options”.
Choose “Allow Plain Text” instead…
When you submit that page it looks like the following 3 files should be updated (you should see their timestamps change):