I tried anyways to send an email from that account, and received this error: Code: [09:15:11] SMTP< 504 5.5.2 <mypc>: Helo command rejected: need fully-qualified hostname What do I need to do about this one?
Activate smtp-auth in your email client to authenticate yourself with the email address and password. When you do not authenticate yourself, then the incoming email is treated as if it was sent from an internet mail server and as your local PC has no valid FQDN hostname, it got rejected for not originating from a valid server.
When postfix rejected messages, then the other server tries to send them again for a few days. The hostname of your server is a subdomain like server1.example.com and not a domain like 'example.com', right? This is important, if you would have used just the domain name instead of a subdomain, then email for that domain name will not work.
No, it's just a domain like example.com. I fixed that, but still get this: Code: * Account 'MyUsername': Connecting to SMTP server: smtp.domain.de:465... *** smtp.domain.de:465: connection failed (Connection refused). *** Error occurred while sending the message. In maillog, I get this: Code: Oct 12 10:12:55 myserver postfix/smtpd[28858]: warning: connect to 127.0.0.1:10023: Connection refused Oct 12 10:12:55 myserver postfix/smtpd[28858]: warning: problem talking to server 127.0.0.1:10023: Connection refused Oct 12 10:12:56 myserver postfix/smtpd[28858]: warning: connect to 127.0.0.1:10023: Connection refused Oct 12 10:12:56 myserver postfix/smtpd[28858]: warning: problem talking to server 127.0.0.1:10023: Connection refused Oct 12 10:12:56 myserver postfix/smtpd[28858]: NOQUEUE: reject: RCPT from pmta40013.emarsys.net[91.211.240.13]: 451 4.3.5 Server configuration problem; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<pmta40013.emarsys.net> Oct 12 10:12:57 myserver postfix/smtpd[28858]: disconnect from pmta40013.emarsys.net[91.211.240.13]
These are two different issues. For sending, you would normally use port 587 today as that's the TLS enabled submission port in postfix. Port 465 is normally not used anymore, so not sure if CentOS has it still enabled in master.cf by default. But you can check it to see if the smtps line in postfix main.cf is enabled. The second issue is postgrey. Please check if the postgrey package is installed with yum and if not, install it with yum. Then start postgrey and check if it listens on port 10023.
SMTP-port: I didn't find anything pointing to a particular port in /etc/postfix/main.cf Trying to send a mail with port 587 didn't work. Receiving: postgrey is running, but probably not listening to 10023. I tried netstat and other tools to figure out what it's listening to, but found nothing. Strange. netstat -tpan doesn't shopw postgrey at all. netstat -npl lists postgrey as a socket Code: unix 2 [ ACC ] STREAM HÖRT 851837 11711/postgrey.pid /var/spool/postfix/postgrey/socket lsof -Pnl +M -i4 doesn't show it (or I don't see it, as some process names are cut off). Disabling postgrey lets mails come through, but I don't want to give up on postgrey, because it's quite helpful in reducing spam.
The file where the listening ports for postfix are defined in is master.cf, not main.cf. @Postgrey, please see here: https://www.howtoforge.com/communit...ng-seems-not-to-be-working.79205/#post-374823
Either I'm blind or I don't know: in /eetc/postfix/master.cf I find no port for smtps. There are two lines for smtpd, which indicate the ports 10025 and 10027 (each line followed by a bunch of other options). The smtps line is commented out: Code: smtp inet n - n - - smtpd #smtp inet n - n - 1 postscreen #smtpd pass - - n - - smtpd #dnsblog unix - - n - 0 dnsblog #tlsproxy unix - - n - 0 tlsproxy #submission inet n - n - - smtpd # -o syslog_name=postfix/submission # -o smtpd_tls_security_level=encrypt # -o smtpd_sasl_auth_enable=yes # -o smtpd_reject_unlisted_recipient=no # -o smtpd_client_restrictions=$mua_client_restrictions # -o smtpd_helo_restrictions=$mua_helo_restrictions # -o smtpd_sender_restrictions=$mua_sender_restrictions # -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #smtps inet n - n - - smtpd I'll look into postgrey.
Postfix uses ports by number and ports by service name, so the word smtps refers to the smtps port and the word submission to the submission port 587. Remove the # in front of the smtps and submission line to enable both additional ports and restart postfix.
I did remove them, and sending goes so far as it times out. So the message isn't sent, but at least it doesn't slam the door in my face. Error message ist just that the connection had reached its timeout (about 60 to 120 seconds, I figure). Postgrey works now, thanks for the pointer, I was already close at that... However, I'm not sure if mails are coming through. A few have dropped in, but now it's quiet already for quite a while. I just sent a test mail from another account, if that doesn't come through within a few minutes, it's still not working... Another message came through just a moment ago, so this should be fine now. Remains only the sending stuff...
I think this is it: Code: Oct 12 14:23:32 myserver postfix/smtpd[28829]: lost connection after UNKNOWN from pD9FB4DB8.dip0.t-ipconnect.de[xxx.xxx.xxx.xxx] Oct 12 14:23:32 myserver postfix/smtpd[28829]: disconnect from pD9FB4DB8.dip0.t-ipconnect.de[xxx.xxx.xxx.xxx] That's not much. Is there a better place where I should look?
Which port do you use for sending emails now? Try to use port 587 which is the default port to send emails and choose to use tls on that port and ensure you removed the # in front of postfix master.cf and that you restarted postfix afterward. If you like to have someone look at your server directly, then you might want to contact Florian from ISPConfig Business support here: https://www.ispconfig.org/get-support/?type=ispconfig
I tried both ports, both yielded the same result. I removed both # in etc/postfix/master.cf and restarted postfix. A restart of Thunderbird didn't help either. I don't really like the idea of having someone look at the server...
Please run the command: netstat -ntap and post the result. Just to see if postfix listens on all ports now.
New day, new luck? I continued searching and found that this timeout may have to do with the virus scanner. So I checked and found that clamav wasn't actually running. Now it is active, but it seems to me as if mail is not sent through clamav (even though in the headers of received mails, it says: "X-Virus-Scanned amavisd-new at myserver". This message is also in mails which I received before clamav was running. Or does amavis use a different virus scanner? In clamav's log I don't find any indication that any mail was checked, while numerous mails arrive.
Funny thing: I just set up roundcubemail properly, and then I discovered that I can send mails from there without any problems. Does this mean it's a Thunderbird problem? Or does roundcube just not use certain parts of the setup?
Does your OS use systemd? If yes, use Code: systemctl --state=failed to check what services are not running. If not, use other methods to check this.