Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I believe my smtp server is: qq.smtp.com for qq mail. But I remember when I used to fetch emails with Python, I needed the IMAP server and IMAP password.
As sudo, using nano, I created /etc/mail/authinfo with the following content:
I believe my smtp server is: qq.smtp.com for qq mail. But I remember when I used to fetch emails with Python, I needed the IMAP server and IMAP password.
The smtp servername is smtp.qq.com. It also uses port 587 STARTTLS or 465 SSL for connecting, so you have to define that also.
For the rest, you can take a look at this tutorial written for gmail. Replace gmail.com with qq.com and test.
Always take o look mail logs, that will help you identify whatever problems may exist.
It is worth noting that almost all mail servers are configured to reject mail that does not originate from an authorized domain smtp host that is defined by dns, and a local smtp server usually only accepts outgoing email from hosts within its own defined IP address range..
For example, it is quite possible to read mail by imap from a users mail server even when remote, but sending mail by the same server that originates from an IP address that is outside the domain of that server will be rejected.
I previously had this issue when using a local isp and traveling. I could send and receive email from home, but when remote I could only read email, not send.
Using gmail has its own intricacies when not using the web interface.
Last edited by computersavvy; 10-05-2023 at 11:29 AM.
I also installed something called sasl2-bin Not sure what that is, some kind of support for mail.
Quote:
sudo apt install sasl2-bin
Then I sent this again:
Quote:
echo "This is a test email." | mail -s "Test Email" me@gmail.com
But I still get a verify=FAIL even though at the end it says stat=Sent!! Maybe it is as computersavvy says, I have no fixed ip, so I get rejected, because they don't know where it is coming from.
Like I said, on my little cloud the form for sending a message works fine! I am just changing my webhost and my webpage, I thought I could test the form page from home! Not so important!
You have two issues going on. The verify stuff is with TLS, and you need to configure your sendmail install with the proper CA, certificates, and CRLs for the hosts for it to verify correctly.
or wherever you put them on your install. There's probably a package to get all the CA certs if you don't have them already. They may be in a different location on your system. If the cert is not available, you can often get it from the organization itself or use openssl s_client.
The second issue is as stated, almost all mailservers using block lists (almost all of them) will block you unless you are using Gmail or another mega-provider. You can thank Spamhaus and the other over-zealous outfits like them for making email virtually unusable by us little people.
But I still get a verify=FAIL even though at the end it says stat=Sent!! Maybe it is as computersavvy says, I have no fixed ip, so I get rejected, because they don't know where it is coming from.
As I told you before and jayjwa also posted above, you miss the qq.com CA, so your server fails to validate the certificate presented by smtp.qq.com
Maybe you need to add STARTTLS to sendmail
Most likely smtp.qq.com does not like the sender email address (pedro@pedro-HP)
You can use masquerade to change the domain part to a FQDN one (pedro@your-domain.com)
Please excuse my ignorance, I have created ssl keys so that I could ssl into my old cloud server.
That worked well, and I always used Filezilla to upload new html and php. (After testing it on this laptop.)
Where would I get certificates to put in /etc/mail/certs/ so that this: define(`confCACERT_PATH', `/etc/mail/certs/') could work?
At present there is no directory /etc/mail/certs/ and as such, also no certificates.
On my little cloud server I had a fixed ip, but apart from that, I did none of this stuff. Nevertheless my form.php worked fine. It sent an email to me using php mail().
I made another version of form.php so people could upload files, contact details and a message, but those were saved on the cloud, not emailed to anywhere.
But that is about the limit of my computer ability!!
When prompted for the Common Name be sure to enter the FQDN of your webserver i.e. www.mywebserver.com
Now that we have our own CA lets go ahead and make a certificate and sign it.
Note that the CA is good for 5 years (1865 days) and the cert is good for 4 years (1460 days). Its always a good idea to make the cert invalid before
the CA that signed it.
Next, we must put the right permissions on our cert as it contains sensitive data
Oct 16 08:00:02 ubuntu sm-msp-queue[10362]: My unqualified host name (ubuntu) unknown; sleeping for retry
Oct 16 08:01:02 ubuntu sm-msp-queue[10362]: unable to qualify my own domain name (ubuntu) -- using short name
You should use a nameserver to resolve hosts/domains when running your own mailserver.
As a workaround you can add first in /etc/hosts the following line:
According to the mail logs you posted previously, your hostname is ubuntu. If you want mail from your server to be accepted by other mailservers you need a FQDN for it. And this FQDN must be provided by a dns. The /etc/hosts file will work only locally for the mailserver itself.
When you connect to qq.com, their smtp server will ask a dns to resolve your IP and match it with your FQDN. In your case is sees as hostname just a plain ubuntu, so it closes connection in order to prevent "spam".
Now if you want to have also a webserver with the name www.mywebpage.com (and/or mywebpage.com), you can also put these names in /etc/hosts. But again they will be available only locally.
A different computer can access your webserver using your server's public IP, nut if you like that computer to use www.mywebpage.com you need again a dns, or add a similar entry in the other computer's hosts file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.