Hi
I need to setup sending voicemail to email. I want to use built in SMTP server. But I have a problem with SMTP configuration.
Jun 3 11:43:22 50 postfix[30359]: warning: valid_hostname: numeric hostname: *.*.*.81
Jun 3 11:43:22 50 postfix[30359]: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: *.*.*.81
Jun 3 11:43:23 50 postfix/sendmail[30368]: warning: valid_hostname: numeric hostname: *.*.*.81
Jun 3 11:43:23 50 postfix/sendmail[30368]: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: *.*.*.81
My settings looks like
My Hostname : Empty
My Origin: *.*.*.81
My Domain: *.*.81
or
My Hostname : Empty
My Origin: *.*.*.80
My Domain: *.*.80
My external IP is ...80
If I’m leaving Hostname empty then SysAdmin in the main.cf putting myhostname = ...81
How can I fix that or do I need to install any additional modules ?
FreePBX 6.12.65-32
System Admin 13.0.57.2
Asterisk 11.21.2
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[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…